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 LIMIT 6"); $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 LIMIT 2"); $queue = $db->rows(); reset($queue); 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) $timeout = 180; if($timeout<30) $timeout = 30; $refreshURL = "playing.php?buster=".date('dhis').rand(1,1000); function PutSongRow(&$song) { global $rc, $showpic, $darkrow, $lightrow; PrepareSong($song); $rc++; $bgcolor = $darkrow; if(($rc % 2)==0) $bgcolor = $lightrow; ?> " target="_blank">" alt="Buy CD!" border=0> >

" target="_blank">Artist homepage )">Song information

0) /* echo "Aktuell haben $listeners Zuhörer eingeschaltet!

"; */ ?> 0){?>

Jetzt gespielt

Links

Album

Länge

Es folgt: 0) echo ", "; echo $song["artist"]; if($song["requestID"]!=0) { echo " ~requested~"; } $i++; } ?>

Zuletzt gespielte Songs

open("SELECT * FROM requestlist WHERE (ID = $requestID) LIMIT 1"); if(($info = $db->row()) and (!empty($info['message']))) require("dedication.php"); #=================== ?> open("SELECT songlist.*, requestlist.code as requestcode, count(*) as cnt FROM requestlist, songlist WHERE (requestlist.songID = songlist.ID) AND (requestlist.code<700) GROUP BY songlist.ID ORDER BY cnt DESC, songlist.date_played DESC LIMIT 10 "); $requests = $db->rows(); if(count($requests)>0) require("top10requests.php"); } #=================== ?>