0000 AND date("H")<02 AND date("l")=="Monday")
{echo "It's the Request Hour! from Midnight until 2 AM";}
ELSE
IF(date("Hi")>0000 AND date("H")<14 AND date("l")=="Monday")
{echo "It's the Request Hour! from Noon until 2 PM.";}
?>
IF(date("Hi")>0000 AND date("H")<2 AND date("l")=="Tuesday")
{echo "It's the Request Hour! from Midnight until 2 AM";}
ELSE
IF(date("H")>11 AND date("H")<14 AND date("l")=="Tuesday")
{echo "It's the Request Hour! from Noon until 2 PM.";}
?>
IF(date("Hi")>0000 AND date("H")<2 AND date("l")=="Wednesday")
{echo "It's the Request Hour! from Midnight until 2 AM";}
ELSE
IF(date("H")>11 AND date("H")<14 AND date("l")=="Wednesday")
{echo "It's the Request Hour! from Noon until 2 PM.";}
?>
IF(date("Hi")>0000 AND date("H")<2 AND date("l")=="Thursday")
{echo "It's the Request Hour! from Midnight until 2 AM";}
ELSE
IF(date("H")>11 AND date("H")<14 AND date("l")=="Thursday")
{echo "It's the Request Hour! from Noon until 2 PM.";}
?>
IF(date("Hi")>0000 AND date("H")<2 AND date("l")=="Friday")
{echo "It's the Request Hour! from Midnight until 2 AM";}
ELSE
IF(date("H")>11 AND date("H")<14 AND date("l")=="Friday")
{echo "It's the Request Hour! from Noon until 2 PM.";}
?>
require("config.php");
$db->open("SELECT songlist.*, historylist.listeners as listeners, historylist.requestID as requestID, historylist.date_played as starttime FROM historylist,songlist WHERE (historylist.songID = songlist.ID) AND (songlist.songtype='S') ORDER BY historylist.date_played DESC",11);
$history = $db->rows();
reset($history);
$db->open("SELECT songlist.*, queuelist.requestID as requestID FROM queuelist, songlist WHERE (queuelist.songID = songlist.ID) AND (songlist.songtype='S') AND (songlist.artist <> '') ORDER BY queuelist.sortID ASC",2);
$queue = $db->rows();
reset($queue);
//### Calculate the bezt time to refresh the webpage in order to show new updated song information
//==================================================================================================
list($key, $song) = each($history);
$listeners = $song["listeners"];
$starttime = strtotime($song["date_played"]);
$curtime = time();
$timeleft = $starttime+round($song["duration"]/1000)-$curtime;
//Set refesh interval
if($timeleft>0) # 30 second minimum wait
{ $timeout = $timeleft;} # if timeleft is valid, refresh on timeleft (should be end of song)
else
{ $timeout = 90; } # otherwise, fall back on 90 second refresh
if(($timeout>180) or ($timeout==0)) $timeout = 180;
if($timeout<30) $timeout = 30;
$refreshURL = "playing.php?buster=".date('dhis').rand(1,1000);
//==================================================================================================
$pic_cnt = 0;
function PicName()
{
global $pic_cnt;
echo "Picture".$pic_cnt;
}
function NextPicName()
{
global $pic_cnt;
$pic_cnt += 1;
PicName();
}
function PutSongRow(&$song)
{
global $rc, $showpic, $darkrow, $lightrow;
PrepareSong($song);
$rc++;
$bgcolor = $darkrow;
if(($rc % 2)==0) $bgcolor = $lightrow;
?>
if($song["haspicture"]) {?>
" target="_blank"> " alt="Buy CD!" border=0>
};?>
|
}?>
>
echo $song["combine"];
if($song["requestid"]!=0) { echo " ~requested~ "; }
?> |
|
" target="_blank">
|
)">
|
echo $song["album"]; ?> |
echo $song["mmss"]; ?>
|
}//PutSongRow
/* ## ===================================================================== ## */
?>
require("header.php"); ?>
Currently Playing
|
Links
|
Performance
|
Time
|
$rc=0;
PutSongRow($song);
$mainsong = $song;
?>
if(count($queue)>0){?>
|
Coming Up Next:
$i=0;
while(list($key, $song) = each($queue))
{
if(empty($song["artist"]))
$song["artist"] = 'Unknown';
if($i>0) echo ", ";
echo $song["artist"];
if($song["requestid"]!=0)
{ echo " ~requested~"; }
$i++;
}
?>
|
}?>
Recently
Played Songs
|
$rc=0;
while(list($key, $song) = each($history))
PutSongRow($song);
?>
####################
# Request Dedication
require("dedication.php");
#===================
?>
####################
# BuyCD image
if($mainsong["haspicture"])
require("buycd.php");
#===================
?>
##################
# Top 10 requests
if($showtoprequests)
require("top10requests.php");
#===================
?>
|
?>