$site->write_self_closing_tag('input type="submit" name="match_enter_confirmed" value="Confirm to enter the new match" id="send"'); } else { $site->write_self_closing_tag('input type="submit" name="match_edit_confirmed" value="Confirm to edit the match" id="send"'); } $site->write_self_closing_tag('input type="submit" name="match_cancel" value="Cancel and change match data" id="cancel"'); echo '</div>' . "\n"; echo '</form>' . "\n"; // done with the confirmation form $site->dieAndEndPage(); } if ($confirmed === 2) { if (isset($_GET['enter'])) { // match entering logic enter_match($team_id1, $team_id2, $team1_caps, $team2_caps, $timestamp, $duration); } elseif (isset($_GET['edit'])) { edit_match($team_id1, $team_id2, $team1_caps, $team2_caps, $timestamp, $match_id, $duration); } elseif (isset($_GET['delete'])) { delete_match($match_id); } // done with entering the match $site->dieAndEndPage(); } // all necessary tasks are done function open_form() { global $site; global $match_id; echo '<form enctype="application/x-www-form-urlencoded" method="post" action="'; if (isset($_GET['enter'])) { echo '?enter">'; } elseif (isset($_GET['edit'])) {
edit_student(); } else { if ($_REQUEST["action"] == 'edit_tutor') { edit_tutor(); } else { if ($_REQUEST["action"] == 'edit_request') { edit_request(); $page = 'list_requests'; $request_info = request_info($_REQUEST['request_id']); $_REQUEST['student_id'] = $request_info['student_id']; } else { if ($_REQUEST["action"] == 'create_match') { create_match(); } else { if ($_REQUEST["action"] == 'edit_match') { edit_match(); } else { if ($_REQUEST["action"] == 'delete_student') { delete_student(); } else { if ($_REQUEST["action"] == 'delete_tutor') { delete_tutor(); } else { if ($_REQUEST["action"] == 'delete_request') { delete_request(); } else { if ($_REQUEST["action"] == 'delete_match') { delete_match(); } else { if ($_REQUEST["action"] == 'save_calling_screen') { save_calling_screen();