<?php

require 'header.php';

$query = "SELECT id, songid FROM " . INSTANTQTABLE . " ORDER BY id";
$sth = $globaldbh->prepare($query);
$sth->execute();
$data = array();
$firstsong = true;
while ( $row = $sth->fetch() ) {
   $id = $row['id'];
   $song = new Song($row['songid']);
   echo "<div id='juke_{$id}' class='songlist_song_container' onClick='dropJukeboxSong({$id});'>\n";
   echo "  <div class='songlist_img_container'><img class='songlist_img' src='{$song->getArtFile(ARTURL)}'></div>\n";
   echo "  <div class='songlist_details_container'>\n";
   echo "    <p class='nomargin'><span class='playing_label'>Song:</span> {$song->getTitle(HTMLSAFE)}</p>\n";
   echo "    <p class='nomargin'><span class='playing_label'>Artist:</span> {$song->getArtist(HTMLSAFE)}</p>\n";
   echo "    <p class='nomargin'><span class='playing_label'>Album:</span> {$song->getAlbum(HTMLSAFE)}</p>\n";
   echo "  </div>\n";
   echo "</div>\n";
   echo "<hr class='songlist'>\n";
}
exit();


?>
