Exemple #1
0
        break;
    default:
        //no error
        $output .= '
          <h1>' . lang("ticket", "browse_tickets") . '</h1>';
}
unset($err);
$output .= '
        </div>';
$action = isset($_GET["action"]) ? $_GET["action"] : NULL;
switch ($action) {
    case "browse_tickets":
        browse_tickets();
        break;
    case "delete_tickets":
        delete_tickets();
        break;
    case "edit_ticket":
        edit_ticket();
        break;
    case "do_edit_ticket":
        do_edit_ticket();
        break;
    case "do_mark_ticket":
        do_mark_ticket();
        break;
    default:
        browse_tickets();
}
unset($action);
unset($action_permission);
Exemple #2
0
function insert_db_row($dbh, $row)
{
    $name = $row['Name'];
    $email = $row['E-mail'];
    # check if they are in the people table first
    $pid = person_exists($dbh, $name, $email);
    if (is_null($pid)) {
        $pid = insert_person($dbh, $name, $email);
        $oid = insert_order($dbh, $pid, $row['Spaces'], '', 1, $pid);
    }
    # check number of tickets
    $tickets = get_tickets($dbh, $pid);
    if (count($tickets) != $row['Spaces']) {
        # Delete and regenerate all tickets
        delete_tickets($dbh, $pid);
        generate_tickets_pdf($dbh, $pid, $pid, $row);
    }
    # Return something useful to indicate what we just did
}