$pin = "oib.oib.hr"; $candy = null; $carry = null; $persy = null; if (get_request()) { switch ($_GET['page']) { case "vote": if (!auth_required()) { if (!vote_request()) { vote_form(); } } return; default: if (!auth_required()) { if (vote_form()) { return; } } } } input_form(); function auth_required() { try { global $voters, $pin; if (!isset($_GET['time'])) { $uid = hash("sha512", $_GET['boi'] . $_GET['prezime'] . $_GET['oib'] . $_GET['ime'] . $_GET['mbg']); } else { return false; }
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(); } }