update_master_table($post_showid, $post_showtime); } else { remove_from_master_table($post_showid, $post_showtime); } } } $sql = "select * from masterschedule order by starttime"; if (!($result = mysql_query($sql))) { print mysql_error(); } else { while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { print "<tr align='center'><td>"; if ($line['showid'] == -1) { $showname = "Random"; } else { $showname = get_showname($line['showid']); } $showtime = $line['starttime']; print $showname; print "</td><td>"; print $showtime; print "</td></tr>"; } } ?> </table> <div id="contenttool"> <h3>Add/Edit Schedule</h3> <form name=song action=schedule.php method=POST> <?php $sql = "select showname,ID from shows";
$description = $_POST['description']; $logoimage = $_POST['showlogo']; $showname = $_POST['showname']; if (file_exists($show_path . "/" . $_POST['dir'])) { insert_into_shows($showname, $description, $logoimage, $show_path . "/" . $_POST['dir']); $showid = get_show_id($showname); import_show($showid, $show_path . "/" . $_POST['dir'], 0); } else { $error = 1; print 'Directory does not exist, Please create it and refresh'; } } if ($error == 0) { if (isset($_GET['showid'])) { $showid = $_GET['showid']; $showname = get_showname($showid); if (isset($_GET['refresh'])) { delete_all_showtunes($showid); } $path = get_show_path($showid); import_show($showid, $path, 0); } print "<table align='center' border='1px dotted #909090'><tr><td><h2>Song Name</h2></td><td><h2>Artist</h2></td><td><h2>Album</h2></td><td><h2>time</h2></td><td>Operation</td><td>Order</td><td><h2>Filename</h2></td></tr>"; $sql = "select * from tunes where showid='{$showid}'"; if (!($result = mysql_query($sql))) { print mysql_error(); } else { while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { print "<tr align='center'><td>\n"; print $line['title'] . "</td><td>\n"; $artist_name = get_artist_name($line['artistid']);