[insert-html-here 1]
[insert_php]
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”,6);
$history = $db->rows();
reset($history);
//### 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 = "http://fs-insidejazz.fast-serv.com/nowplaying1.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;
[/insert_php]
[insert_php]
}//PutSongRow
/* ## ===================================================================== ## */
[/insert_php]
[insert_php] require("header1.php"); [/insert_php]
Now Playing: The Mix |
echo $song["artist"]; ?> | |
echo $song["album"]; ?> |