login_prompt($_POST[username], $_POST[remember_me], $_SESSION["error"]); } else { /*----- CONTENT ------*/ ?> <script type='text/javascript'> AdminMadness.updateAdminScoreboard(); </script> <div class="row"> <div class="tweleve columns content full-width"> <h1>Modern Rock Madness Matches</h1> <form action="mrm_manage_matches.php" method="get"> <?php $current_match = now_match(); if ($current_match) { countdown_values($current_match['id']); } ?> <center>Select a round: <select name="round" onchange="javascript:this.form.submit();"> <?php $rounds = array(); for ($i = 1; $i <= 6; $i++) { array_push($rounds, $i); } foreach ($rounds as $roundvalue) { if ($roundvalue == $round) { echo '<option value="' . $roundvalue . '" selected="' . $roundvalue . '"> Round ' . $roundvalue . '</option>' . "\n"; } else { echo '<option value="' . $roundvalue . '"> Round ' . $roundvalue . '</option>' . "\n"; }
function show_match($match_id) { if ($match_id != 8888) { $match_status = get_match_status($match_id); $query = "SELECT * FROM mrm_matches WHERE id =" . $match_id; $result = mysql_query($query); if (!$result) { echo $update . "<br>"; die('Error Querying Database. Code: sm123'); } $match = mysql_fetch_assoc($result); echo '<table id="mrm_current_match" border="0"> <tr> <td> ' . get_band_name($match['band1_id']) . '</td> <td></td> <td> ' . get_band_name($match['band2_id']) . '</td> </tr> <tr> <td> <img src="' . get_band_pic_url($match['band1_id']) . '"></td> <td class="middle" id="mrm_timer">'; if ($match_status == 'over') { echo 'Match Over'; } echo '</td> <td> <img src="' . get_band_pic_url($match['band2_id']) . '"></td></tr> <tr>'; echo "<td class=\"hidden\">"; countdown_values($match_id); echo "</td>"; echo "</tr>\n<tr>"; if ($match_status == 'early') { echo '<td colspan=3 class="center">Voting has not started yet</td>'; } elseif ($match_status == 'running') { if (has_voted($match_id) == false) { echo '<td class="center">'; vote_form($match["id"], 1); echo "</td>\n\n <td></td>\n\n <td class='center'>"; vote_form($match["id"], 2); echo '</td>'; } else { echo '<td colspan=3 class="center">Thanks for Voting!</td>'; } } elseif ($match_status == 'over') { echo '<td colspan=3></td>'; } echo "\n</tr>\n</table>\n"; if ($match_status != "early") { echo '<table id="mrm_scoring" border="0">'; scoreboard($match); echo '</table>'; } } if (end_of_madness()) { winner_banner(); } elseif (waiting_for_final()) { echo "<div class=\"top-spacer_20 center\"><strong>Hang in there, we are still counting up all of the votes...</strong></div>"; } else { next_match(); } }