} 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"; } } ?> </select> </center> <br> </form> <?php echo "<center><b>Round " . $round . "</b></center>"; if ($action == "view") { view_matches($round); } elseif ($action == "write") { $match = $_GET['match']; $band = $_GET['band']; vote($match, $band, $round); } elseif ($action == "close") { $match = $_GET['match']; close_match($match, $round); } ?> </div> <?php } require "ext/footer.php";
function close_match($match_id, $round) { $winner_id = set_winner($match_id); enable_score($match_id); if ($match_id < 63) { setup_next_match($match_id, $winner_id); } view_matches($round); }