예제 #1
0
    if ($event->getField('FixturesEnable') == TRUE) {
        $event->brackets(true);
    }
    updateStats($event_id, $time, TRUE);
    header("Location: eventmanage.php?eventid={$event_id}");
    exit;
}
if (isset($_POST['del_player_awards']) && $_POST['del_player_awards'] != "") {
    $playerid = $_POST['del_player_awards'];
    deletePlayerAwards($playerid);
    header("Location: eventmanage.php?eventid={$event_id}");
    exit;
}
if (isset($_POST['checkin_player']) && $_POST['checkin_player'] != "") {
    $playerid = $_POST['checkin_player'];
    checkinPlayer($playerid);
    if ($event->getField('FixturesEnable') == TRUE && $event->getField('Status') == 'active') {
        $event->brackets(true);
    }
    $event->setFieldDB('IsChanged', 1);
    header("Location: eventmanage.php?eventid={$event_id}");
    exit;
}
if (isset($_POST['replace_player']) && $_POST['replace_player'] != "") {
    $playerid = $_POST['replace_player'];
    $new_seed = $_POST['replace_player_' . $playerid];
    $event->replacePlayer($playerid, $new_seed);
    header("Location: eventmanage.php?eventid={$event_id}");
    exit;
}
if (isset($_POST['ban_team']) && $_POST['ban_team'] != "") {
예제 #2
0
파일: event.php 프로젝트: testt98/ebattles
function checkinTeam($team_id)
{
    global $sql;
    global $time;
    $q = "UPDATE " . TBL_TEAMS . " SET CheckedIn = '1' WHERE (" . TBL_TEAMS . ".TeamID = '{$team_id}')";
    $result = $sql->db_Query($q);
    // Checkin all the players of that team
    $q = "SELECT " . TBL_PLAYERS . ".*" . " FROM " . TBL_PLAYERS . " WHERE (" . TBL_PLAYERS . ".Team = '{$team_id}')";
    $result = $sql->db_Query($q);
    $numPlayers = mysql_numrows($result);
    for ($i = 0; $i < $numPlayers; $i++) {
        $player_id = mysql_result($result, $i, TBL_PLAYERS . ".PlayerID");
        checkinPlayer($player_id);
    }
}
예제 #3
0
if (isset($_POST['quitevent'])) {
    $pid = $_POST['player'];
    // Player can quit an event if he has not played yet
    // TODO - can quit if event not started.
    $q = "SELECT DISTINCT " . TBL_PLAYERS . ".*" . " FROM " . TBL_PLAYERS . ", " . TBL_SCORES . " WHERE (" . TBL_PLAYERS . ".PlayerID = '{$pid}')" . " AND (" . TBL_SCORES . ".Player = " . TBL_PLAYERS . ".PlayerID)";
    $result = $sql->db_Query($q);
    $nbrscores = mysql_numrows($result);
    if ($nbrscores == 0) {
        deletePlayer($pid);
        $event->setFieldDB('IsChanged', 1);
    }
    header("Location: eventinfo.php?eventid={$event_id}");
}
if (isset($_POST['checkinevent'])) {
    $pid = $_POST['player'];
    checkinPlayer($pid);
    if ($event->getField('FixturesEnable') == TRUE && $event->getField('Status') == 'active') {
        $event->brackets(true);
    }
    $event->setFieldDB('IsChanged', 1);
    header("Location: eventinfo.php?eventid={$event_id}");
}
if (isset($_POST['teamcheckinevent'])) {
    $team_id = $_POST['team'];
    checkinTeam($team_id);
    if ($event->getField('FixturesEnable') == TRUE && $event->getField('Status') == 'active') {
        $event->brackets(true);
    }
    $event->setFieldDB('IsChanged', 1);
    header("Location: eventinfo.php?eventid={$event_id}");
}