<?php require_once "connect.php"; include "position_check.php"; if (!session_id()) { session_start(); } if (empty($_SESSION['username'])) { die('You need to login first!<br><a href="login.php">Click here to login!</a>'); } if (empty($_GET)) { $rot = 7; } else { $rot = $_GET["rotation"]; } if (!MD_check()) { die('<br>You have to be a music director to print labels and move rotation!<br>'); } echo "\n<script type='text/javascript'>\n\nvar albumids = new Array();\nfunction append(app) {\n\t\n\tdocument.getElementById('output').innerHTML += ' ' + app + ' ';\n\talbumids.push(app);\n\t\n\tif(albumids.length == 4) {\n\t\tvar get = 'printlabel.php?';\n\t\t\n\t\tfor(i=1; i<=4; i++)\n\t\t\tget += 'a' + i + '=' + albumids[i-1] + '&';\n\t\twindow.location.href = get;\n\t\tclearA();\n\t}\n}\nfunction clearA() {\n\talbumids.length = 0;\n\tdocument.getElementById('output').innerHTML = \" \";\n}\n</script>"; echo "<br><font size = 28>WSBF Rotation Control</font><br>Click 4 CDs to print labels, move rotation, or <a href=\"logout.php\">logout!</a> OR MOVE SHIT IN <a href=\"bulk_move.php\">BULK</a>"; echo "<br><a href='#' onclick='clearA()'>Clear clicked albums</a><br>\n\t<span id='output'> </span>\n\t<table border='1'>"; echo "<table border = \"1\" cellpadding=\"3\">"; switch ($rot) { case 7: //Recently echo "<th bgcolor = \"black\"><a href=\"rotation_control.php?rotation=7\"><font color = \"white\">Recently Reviewed</font></a></th><th><a href=\"rotation_control.php?rotation=1\">New</a></th><th><a href=\"rotation_control.php?rotation=2\">Heavy</a></th><th><a href=\"rotation_control.php?rotation=3\">Medium</a></th><th><a href=\"rotation_control.php?rotation=4\">Light</a></th><th><a href=\"rotation_control.php?rotation=5\">Optional</a></th><th><a href=\"rotation_control.php?rotation=6\">Jazz</a></th></table><br><br>"; break; case 1: //New echo "<th><a href=\"rotation_control.php?rotation=7\">Recently Reviewed</a></th><th bgcolor = \"black\"><a href=\"rotation_control.php?rotation=1\"><font color = \"white\">New</font></a></th><th><a href=\"rotation_control.php?rotation=2\">Heavy</a></th><th><a href=\"rotation_control.php?rotation=3\">Medium</a></th><th><a href=\"rotation_control.php?rotation=4\">Light</a></th><th><a href=\"rotation_control.php?rotation=5\">Optional</a></th><th><a href=\"rotation_control.php?rotation=6\">Jazz</a></th></table><br><br>"; break;
} require_once "connect.php"; $album_query = sprintf("SELECT album_name, num_discs, artistID, labelID, genre, general_genreID, album_code FROM libalbum WHERE albumID = '%d'", $albumID); $album = mysql_query($album_query, $link); if (!$album) { die('This is an error message: ' . mysql_error()); } $row = mysql_fetch_array($album, MYSQL_NUM); $album_name = $row[0]; $num_discs = $row[1]; $artistID = $row[2]; $labelID = $row[3]; $genre = $row[4]; $general_genreID = $row[5]; $album_code = $row[6]; $md = MD_check(); echo "<head><title>WSBF Read CD Reviews</title>"; echo "<style>table.bottomBorder td, table.bottomBorder th { border-bottom:1px dotted black; } #top {text-align:right; font-weight:bold;} #topcenter {font-weight:bold; text-align:center;} #bold{font-weight:bold;} #italic {font-style:italic;} #center {text-align:center;} #centerred {color:red; text-align:center;} #centergreen {color:green; text-align:center;} #centeryellow {color:yellow; text-align:center;} #centerblack {color:black; text-align:center;} #red {color:red;} #green {color:green;} #yellow {color:yellow;} #black {color:black;}</style>"; echo "</head>"; echo "When you're done, you can <a href=\"library.php\">go back</a>, or you can <a href=\"logout.php\">log out</a>."; $artist_query = sprintf("SELECT artist_name FROM libartist WHERE artistID = '%d'", $artistID); $artist = mysql_query($artist_query, $link); if (!$artist) { die('This is an error message: ' . mysql_error()); } $artist_get = mysql_fetch_array($artist, MYSQL_NUM); $artist = $artist_get[0]; $review = ""; $review_query = sprintf("SELECT review, username, reviewer, review_date FROM libreview WHERE albumID = '%d'", $albumID); $rev = mysql_query($review_query, $link); if (!$rev) {
$list = mysql_query($query, $link); //If query returns FALSE, no albums were returned. Die with error if (!$list) { die('No albums returned: ' . mysql_error()); } //Formatting table echo "<style type=\"text/css\"> table.bottomBorder td, table.bottomBorder th { border-bottom:1px dotted black; } </style>"; echo "<table class = \"bottomBorder\">"; if ($rot != 0) { echo "<tr><th style=\"text-align:center\">Album ID</th><th style=\"text-align:center\">Album Code</th>\n <th>Album</th><th>Artist</th><th>Reviewer</th><th>Date Reviewed</th>"; } else { echo "<tr><th style=\"text-align:center\">Album ID</th><th style=\"text-align:center\">Album Code</th>\n <th>Album</th><th>Artist</th>"; } //Check to see whether session is for music director. //True if so, false otherwise $md_ret_value = MD_check(); //Get row from SQL Query, populate tables with albums // while ($row = mysql_fetch_array($list, MYSQL_NUM)){ // $albumID = $row[0]; // $album_code = $row[1]; // $artist_name = $row[2]; // $album_name = $row[3]; while ($row = mysql_fetch_assoc($list)) { $albumID = $row['albumID']; $album_code = $row['album_code']; $artist_name = $row['artist_name']; $album_name = $row['album_name']; if ($rot != 0) { $review_date = $row['review_date']; $last_name = $row['last_name']; $first_name = $row['first_name'];
$var = $login[0]; $message = $login[1]; if (!$var) { die("{$message}<br><a href=\"/login\">Try again!</a>"); } } echo "<h3>Welcome, " . $_SESSION['preferred_name'] . "!</h3>"; //fishbowl/index.php // echo "<li><a href='https://docs.google.com/a/g.clemson.edu/forms/d/1UPddJuQAMkxxLYmg1Y89hLI5a_ooLv3ifjhrv3zDGTo/viewform' target=\"_blank\">SUBMIT FISHBOWL POINTS</a></li>"; //Spring 2013 if (reviewCheck()) { echo "<li><a href=\"library.php\">Go review a CD!</a></li>"; echo "<li>Or <a href='fishbowl/fishbowl_app.php'>Fill out some fishbowl points!</a></li>"; echo "<li><a href=\"show_sub/show_sub.php\">Go request/fill a show sub!</a></li>"; echo "<li><a href='archives/index.php'>Archives</a></li>"; } if (MD_check()) { echo "<li>Or you can <a href=\"rotation_control.php\">Print Labels or Move Rotation</a></li>"; echo "<li>Or you can <a href=\"import/import_main.php\">Import Music</a></li>"; } if (positionCheck("seniorstaff")) { echo '<li>Or you can <a href="schedule_addshow.php">Add shows to the schedule</a></li>'; } if (positionCheck(array("Computer Engineer", "Chief Engineer", "Equipment Engineer", "Promotions Director"))) { echo "<li>Write new Engineering Blog entry</li>"; } echo "<li><a href=\"weekly_top_20_tracks.php\">See the weekly top 20!</a></li>"; $statusID = $_SESSION['statusID']; if ($statusID == 0 or $statusID == 1 or $statusID == 2 or $statusID == 4) { echo "<li><a href=\"profiles/form_edit_profile.php\">Edit your contact info and radio show info!</a></li>"; } echo "<li><a href=\"profiles/view_show_profiles.php\">See radio show profiles!</a></li>";