Vándor Kuckó

MENÜ

<? 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); $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***91;"listeners"***93;; $starttime = strtotime($song***91;"date_played"***93;); $curtime = time(); $timeleft = $starttime+round($song***91;"duration"***93;/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; ?>

><? echo $song***91;"combine"***93;; if($song***91;"requestid"***93;!=0) { echo " ~Requested~ "; } ?>    

<? echo $song***91;"mmss"***93;; ?>

<? }//PutSongRow /* ## ===================================================================== ## */ ?>

<? $check1 = fsockopen("IP", "portBase"); if ($check1) { echo (""); $close = fclose($check1); } else echo (""); $rc=0; PutSongRow($song); $mainsong = $song; ?> <? $rc=0; while(list($key, $song) = each($history)) PutSongRow($song); ?> <? if(count($queue)>0){?>

Currently Playing

   

Time

Recently played songs

Coming up:
0) echo ", "; echo $song***91;"title"***93;; if($song***91;"requestid"***93;!=0) { echo " ~requested~"; } $i++; } ?>
Asztali nézet