Example #1
0
        $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'])) {
        echo '?edit=' . urlencode($match_id) . '">';
    } else {
Example #2
0
     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();
                         } else {
                             if ($_REQUEST["action"] == 'cancel_request') {
                                 cancel_request();
                             } else {
                                 if ($_REQUEST["action"] == '') {
                                 } else {
                                     show_error("action: " . $_REQUEST['action'] . " not understood");
                                 }
                             }
                         }
                     }
                 }