-changes to now playing bar

This commit is contained in:
mkonecny 2011-01-24 19:19:51 -05:00
parent 5173674714
commit c8b7cffdc6
9 changed files with 200 additions and 110 deletions

View file

@ -21,14 +21,14 @@ class Application_Model_Nowplaying
$rows = array();
foreach ($previous as $item){
array_push($rows, array(substr($item["starts"], 0, strpos($item["starts"], " ")), $item["starts"], $item["ends"], $item["clip_length"], $item["track_title"], $item["artist_name"],
array_push($rows, array($item["starts"], $item["starts"], $item["ends"], $item["clip_length"], $item["track_title"], $item["artist_name"],
$item["album_title"], "x" , "y"));
}
foreach ($current as $item){
array_push($rows, array($item["starts"], $item["starts"], $item["ends"], $item["clip_length"], $item["track_title"], $item["artist_name"],
$item["album_title"], "x" , "y"));
$item["album_title"], "x" , "y"));
}
foreach ($next as $item){

View file

@ -502,9 +502,10 @@ class Schedule {
public static function GetNextItems($timeNow, $nextCount = 1) {
global $CC_CONFIG, $CC_DBC;
$sql = "SELECT * FROM $CC_CONFIG[scheduleTable] st, $CC_CONFIG[filesTable] ft"
$sql = "SELECT *, pt.name as playlistName FROM $CC_CONFIG[scheduleTable] st, $CC_CONFIG[filesTable] ft, $CC_CONFIG[playListTable] pt"
." WHERE (st.starts > TIMESTAMP '$timeNow')"
." AND (st.file_id = ft.id)"
." AND (st.playlist_id = pt.id)"
." ORDER BY st.starts"
." LIMIT $nextCount";
$rows = $CC_DBC->GetAll($sql);