Ejemplo n.º 1
0
function unbanTeam($team_id)
{
    global $sql;
    global $time;
    $q = "UPDATE " . TBL_TEAMS . " SET Banned = '0' 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");
        unbanPlayer($player_id);
    }
}
Ejemplo n.º 2
0
    $event->eventAddDivision($division, $notify);
    //echo "-- eventaddteam --<br />";
    header("Location: eventmanage.php?eventid={$event_id}");
    exit;
}
if (isset($_POST['ban_player']) && $_POST['ban_player'] != "") {
    $playerid = $_POST['ban_player'];
    banPlayer($playerid);
    // TODO: only for ladders?
    updateStats($event_id, $time, TRUE);
    header("Location: eventmanage.php?eventid={$event_id}");
    exit;
}
if (isset($_POST['unban_player']) && $_POST['unban_player'] != "") {
    $playerid = $_POST['unban_player'];
    unbanPlayer($playerid);
    // TODO: only for ladders?
    updateStats($event_id, $time, TRUE);
    header("Location: eventmanage.php?eventid={$event_id}");
    exit;
}
if (isset($_POST['kick_player']) && $_POST['kick_player'] != "") {
    $playerid = $_POST['kick_player'];
    deletePlayer($playerid);
    if ($event->getField('FixturesEnable') == TRUE && $event->getField('Status') == 'active') {
        $event->brackets(true);
    }
    updateStats($event_id, $time, TRUE);
    header("Location: eventmanage.php?eventid={$event_id}");
    exit;
}