Recently Added Videos

"; if (!mysqli_num_rows($result_video)) { echo "There's no Saves the Day Videos"; } else { $result_video = mysqli_query($db, "SELECT * FROM video ORDER BY timeadd DESC LIMIT 0,2") or die(mysqli_error()); echo ""; echo ""; while ($row = mysqli_fetch_array($result_video)) { echo ""; echo "
"; echo "

".$row['name']."

"; echo "\"";
"; if ($row['descript'] != NULL) { echo $row['descript'] ."
"; } if ($row['date'] != 0000-00-00) { echo $row['date'] ."
"; } if ($row['credit'] != '?') { echo "Thanks to " .$row['credit'] ."
"; } else { echo "Whose video is this? Tell me.
"; } echo "
"; } echo "
"; echo "
See All Videos...
"; } $result_photo = mysqli_query($db2, "SELECT * FROM cpg14x_pictures ORDER BY pid DESC LIMIT 0,6") or die(mysqli_error()); echo "

Recently Added Photos

"; while ($row = mysqli_fetch_array($result_photo)) { echo ""; } echo "

See All Photos... "; $album = mysqli_query($db, "SELECT album FROM song WHERE date <= '$today' ORDER BY date DESC LIMIT 0, 1") or die(mysqli_error()); $latestalbum = mysqli_fetch_array($album); echo "

Recently Added Music

"; if (!mysqli_num_rows($album)) { echo "There's no Saves the Day Music"; } else { $result_album = mysqli_query($db, "SELECT * FROM album WHERE id = $latestalbum[album]") or die(mysqli_error()); while ($row = mysqli_fetch_array($result_album)) { echo "

".$row['name']."

"; if ($row['released'] != 0000-00-00 && $row['released'] != 2999-00-00) { echo "Release Date: ". $row['released']."
"; } if ($row['credit'] != '') { echo "Credit: ". $row['credit']."
"; } echo "
"; $songs = mysqli_query($db, "SELECT * FROM song WHERE album = '$latestalbum[album]' ORDER BY date DESC LIMIT 0, 5") or die(mysqli_error()); echo ""; while ($row2 = mysqli_fetch_array($songs)) { echo ""; if ($row2['download'] != '') { echo ""; } echo ""; } echo "
".$row2['name'].":: download

"; echo "
See All Albums... "; echo "  "; echo "See All Live Songs..."; echo "  "; echo "See All Demos...
"; } } } elseif ($safe_action == 'disc') { $result_studio = mysqli_query($db, "SELECT * FROM album WHERE kind = 'studio' ORDER BY released DESC") or die(mysqli_error()); echo "

Albums


"; while ($row = mysqli_fetch_array( $result_studio)) { echo "

".$row['name']."

"; echo "Release Date: ". $row['released']."

"; echo "
"; $studio_songs = mysqli_query($db, "SELECT * FROM song WHERE album = $row[id] ORDER BY tracknum") or die(mysqli_error()); echo ""; while ($row2 = mysqli_fetch_array($studio_songs)) { echo ""; if ($row2['download'] != '') { echo ""; } if ($row2['tabtext'] != '') { echo ""; } else { echo ""; } if ($row2['lyric'] != '') { echo ""; } echo ""; } echo "
".$row2['tracknum'].". "; echo $row2['name'].":: download:: tabs:: lyrics

"; } } elseif ($safe_action == 'live') { $result_live = mysqli_query($db, "SELECT * FROM album WHERE kind = 'live' ORDER BY released DESC") or die(mysqli_error()); echo "

Live


"; while ($row = mysqli_fetch_array($result_live)) { echo "

".$row['name']."

"; if ($row['released'] != 0000-00-00 && $row['released'] != 2999-00-00) { echo "Release Date: ". $row['released']."
"; } if ($row['credit'] != '') { echo "Credit: ". $row['credit']."
"; } echo "
"; $live_songs = mysqli_query($db, "SELECT * FROM song WHERE album = $row[id]") or die(mysqli_error()); echo ""; while ($row2 = mysqli_fetch_array($live_songs)) { if ($row2['album'] == 24) { echo ""; } else { echo ""; } if ($row2['download'] != '') { echo ""; } echo ""; } echo "
".$row2['name']." ". $row2['descript']."".$row2['name'].":: download

"; } } elseif ($safe_action == 'demo') { $result_demo = mysqli_query($db, "SELECT * FROM album WHERE kind = 'demo' ORDER BY released DESC") or die(mysqli_error()); echo "

Demos


"; while ($row = mysqli_fetch_array( $result_demo)) { echo "

".$row['name']."

"; echo "
"; $demo_songs = mysqli_query($db, "SELECT * FROM song WHERE album = $row[id] ORDER BY tracknum") or die(mysqli_error()); echo ""; while ($row2 = mysqli_fetch_array($demo_songs)) { echo ""; if ($row2['download'] != '') { echo ""; } echo ""; } echo "
".$row2['name'].":: download

"; } } elseif ($safe_action == 'vid') { if (!isset($safe_sort)) { $result_video = mysqli_query($db, "SELECT * FROM video ORDER BY timeadd DESC") or die(mysqli_error()); } elseif($safe_sort == 'date') { $result_video = mysqli_query($db, "SELECT * FROM video ORDER BY date DESC") or die(mysqli_error()); } echo "

Videos

"; echo " Sort by Date Added | Year"; $count = 1; echo ""; echo ""; while ($row = mysqli_fetch_array($result_video)) { echo ""; } $count++; } echo ""; echo "
"; echo "

".$row['name']."

"; echo "\"";
"; if ($row['descript'] != NULL) { echo $row['descript'] ."
"; } if ($row['date'] != 0000-00-00) { echo $row['date'] ."
"; } if ($row['credit'] != '?') { echo "Thanks to " .$row['credit'] ."
"; } else { echo "Whose video is this? Tell me.
"; } echo "
"; if ($count%2 == 0) { echo "
"; } elseif ($safe_action == 'down') { } ?>