Exemplo n.º 1
0
$cID = $consoleObj->findConsoleIDByName("Manage Tournaments");
$consoleObj->select($cID);
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$tournamentObj = new Tournament($mysqli);
$tID = $_POST['tID'];
$arrMembers = array();
if ($member->authorizeLogin($_SESSION['btPassword']) && $tournamentObj->select($tID) && $member->hasAccess($consoleObj)) {
    $memberInfo = $member->get_info();
    $tournamentInfo = $tournamentObj->get_info_filtered();
    if ($tournamentInfo['playersperteam'] == 1) {
        $dispTeamOrPlayer = "Player";
    } else {
        $dispTeamOrPlayer = "Team";
    }
    if (($memberInfo['member_id'] == $tournamentInfo['member_id'] || $memberInfo['rank_id'] == "1" || $tournamentObj->isManager($memberInfo['member_id'])) && $tournamentInfo['seedtype'] == 3) {
        echo "\n\t\t\n\t\t\t\t<table class='formTable' align='center' style='margin-left: auto; margin-right: auto; width: 250px'>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='formTitle' style='width: 40px'>Seed:</td>\n\t\t\t\t\t\t<td class='formTitle' style='width: 210px'>" . $dispTeamOrPlayer . ":</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t\t";
        $arrTeams = $tournamentObj->getTeams(true, "ORDER BY seed");
        foreach ($arrTeams as $teamID) {
            $dispName = $tournamentObj->getPlayerName($teamID);
            $tournamentObj->objTeam->select($teamID);
            $dispSeed = $tournamentObj->objTeam->get_info("seed");
            $teamPoolID = $tournamentObj->getTeamPoolID($teamID);
            $tournamentObj->objTournamentPool->select($teamPoolID);
            $tournamentObj->objTournamentPool->getTeamRecord($teamID);
            echo "\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td class='main' align='center'>" . $dispSeed . ".</td>\n\t\t\t\t\t\t\t<td class='main' style='padding-left: 5px'><a href='javascript:void(0)' onclick=\"setSeed('" . $teamID . "')\">" . $dispName . "</a> (" . $tournamentObj->objTournamentPool->getTeamRecord($teamID) . ")</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t";
            $seedCount++;
        }
        echo "\n\t\t\t\t\t\n\t\t\t\t</table>\n\t\t\n\t\t\n\t\t\n\t\t";
    }
}