<?php
# Copyright by: Manuel
# Support: www.ilch.de
define (
'main'
, TRUE);
require_once
(
'include/includes/config.php'
);
require_once
(
'include/includes/loader.php'
);
db_connect();
$sec
= 20 ;
$bg_image
=
''
;
echo
'<!DOCTYPE html>
<html>
<head>
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<title>Radiomodul</title>
<meta http-equiv=
"refresh"
content=
"'.$sec.'; URL='.$url.'"
>
<style type=
"text/css"
>
a:visited {
color: #00F;
}
a:hover {
color: #F00;
text-decoration: underline;
}
a {
font-family: Arial, Times;
font-size: 12px;
text-decoration: none;
}
</style>
</head><body style=
"background-image:url('.$bg_image.'); font-family:Arial, Helvetica, sans-serif"
>';
#####################################################
# RadioModul by DjGeCk0
# www.swat-report.net
# On Air - Box
# Support: http:
######################################################
require_once
(
'./include/includes/class/scRadioModul.php'
);
$stream
=
new
scRadioModul();
$ip
= @db_result(db_query(
"SELECT `einstellung` FROM `prefix_radio_settings` WHERE `auswahl` = 'hostip'"
));
$port
= @db_result(db_query(
"SELECT `einstellung` FROM `prefix_radio_settings` WHERE `auswahl` = 'hostport'"
));
$status
=
$stream
->isOnline(
$ip
,
$port
,
$stream
->getPassword()) &&
$stream
->getStatus() ? true : false;
if
(
$status
)
{
$dj
=
$stream
->getIRC();
echo
'<strong>LIVE On Air:</strong><br />'
;
echo
'<div align="center" style="margin-top:4px;color:#FF0000;font-style:italic;">'
.
$dj
.
'<br />'
;
echo
'<br /><img src="include/images/radio/playlist.png" title="Playlist" alt="IMAGE" /></div><br />'
;
$show
=
$stream
->getAIM();
if
(
empty
(
$show
))
$show
= @db_result(db_query(
"SELECT `sendung` FROM `prefix_radio_onair` WHERE `id` = '1' LIMIT 1"
));
if
(!
empty
(
$show
))
{
echo
'<strong>mit der Show:</strong><br />'
;
echo
'<div align="center" style="margin-top:4px;color:#FF0000;font-style:italic;">'
.output(
$show
).
'</div>'
;
}
$title
= trim(
$stream
->getTitle());
if
(!
empty
(
$title
))
{
echo
'<strong>und dem Song:</strong><br />'
;
echo
'<div align="center" style="margin-top:4px;color:#FF0000;font-style:italic;"><marquee scrollamount="1" scrolldelay="1" direction="left">'
.output(
$title
).
'</marquee></div>'
;
}
if
(@db_result(db_query(
"SELECT `einstellung` FROM `prefix_radio_settings` WHERE `auswahl` = 'showlistener'"
)) ==
"Ja"
)
{
echo
'<br /><strong>Zuhörer:</strong> <font style="color:#FF0000;font-style:italic">'
.
$stream
->getListeners().
'</font>'
;
}
}
else
echo
'<div align="center" style="color:#FF0000;font-weight:bold;">Zur Zeit ist das Radio offline.<br /><img src="include/images/radio/offline.png" title="Zur Zeit offline!" alt="OFFLINE_IMAGE" /></div>'
;
if
(@db_result(db_query(
"SELECT `einstellung` FROM `prefix_radio_settings` WHERE `auswahl` = 'sendeplanlink'"
)) ==
'Ja'
)
echo
'<hr /><div align="center"><a target="_top" href="index.php?sendeplan" title="Sendeplan">Zum Sendeplan</a></div>'
;
function
output(
$text
)
{
return
preg_replace(
'/([^\s]{10})(?=[^\s])/'
,
"$1-\n"
,
$text
);
}
echo
'</body></html>'
;
db_close();
?>