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["listeners"]; $db->query("SELECT UNIX_TIMESTAMP() as samtime"); $mysqltime = $db->row(); $curtime = $mysqltime["samtime"]; //echo "mysqltime: $curtime \n"; //echo "servetime: ".time(); $starttime = strtotime($song["date_played"]); // Both Servers are in LA now ... was 1 hour = 3600 msec $curtime = time() - 10785; //orig before scott got in here $secsRemain = (round($song["duration"] / 1000)-($curtime-$starttime)); //echo "Curtime: ,$curtime"; //echo "start: ,$starttime"; //echo "secremain:, $secsRemain"; //echo "duration: ".$song["duration"]; //echo "artist: ".$song["artist"]; //echo "current-start=".($curtime-$starttime); // $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, $songNew; PrepareSong($song); $rc++; $bgcolor = $darkrow; if(($rc % 2)==0) $bgcolor = $lightrow; ?> " target="_blank">" alt="Buy CD!" border=0> > ~requested~ "; } ?> date("Y-m-d H:i:s",time()-$songNew*24*60*60)) echo ""; ?>

" target="_blank">Buy this CD now!

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

LISTEN CHARTS MUSIC LAHC Info

$db->open("SELECT text1, text2 from currentshow"); $theshow = $db->row(); echo $theshow["text1"]; echo " -- "; echo $theshow["text2"]; ?>

open("SELECT text1, text2, current_song, current_artist from currentshow"); // $theshow = $db->row(); // if ($theshow["text1"] == "LIVE - Evening Country Jam") // { // $song["title"] = $theshow["current_song"]; // $song["artist"] = $theshow["current_artist"]; // } PutSongRow($song); $mainsong = $song; ?> 0){?>

Currently Playing (Time left: )

Links

Album

Time

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

Recently played songs

keep us on the AIR !!
Please Help !

HOT Song Of The Week

A Thousand Horses
A Thousand Horses
This Ain't No Drunk Dial