$dispName = $tournamentObj->objPlayer->get_info_filtered("displayname"); } $dispTeamOrPlayer = "Player"; } else { $dispName = $tournamentObj->objTeam->get_info_filtered("name"); $dispTeamOrPlayer = "Team"; } echo "\n\t\t\t\t<p class='main'>Use the form below to change the selected " . strtolower($dispTeamOrPlayer) . "'s seed.</p>\n\t\t\t\t<table class='formTable' style='width: 350px'>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='formLabel'>" . $dispTeamOrPlayer . ":</td>\n\t\t\t\t\t\t<td class='main'>" . $dispName . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='formLabel'>Seed:</td>\n\t\t\t\t\t\t<td class='main'><select id='newSeedSelect' class='textBox'>" . $seedOptions . "</option></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t"; } elseif (isset($_POST['newSeed']) && $_POST['newSeed'] > 0 && $_POST['newSeed'] <= $tournamentInfo['maxteams'] && $tournamentObj->getTeamIDBySeed($_POST['newSeed']) !== false) { if ($tournamentInfo['playersperteam'] == 1) { $strPlayerTeam = "Player"; } else { $strPlayerTeam = "Team"; } $swappingTeamInfo = $tournamentObj->objTeam->get_info(); $teamMatchID = $tournamentObj->getMatches(1, $teamInfo['tournamentteam_id']); $swappingTeamMatchID = $tournamentObj->getMatches(1, $swappingTeamInfo['tournamentteam_id']); $blnCheck1 = $tournamentObj->objTeam->update(array("seed"), array($teamInfo['seed'])); $tournamentObj->objTeam->select($teamInfo['tournamentteam_id']); $blnCheck2 = $tournamentObj->objTeam->update(array("seed"), array($swappingTeamInfo['seed'])); $tournamentObj->objMatch->select($teamMatchID[0]); $teamMatchInfo = $tournamentObj->objMatch->get_info(); if ($teamMatchInfo['team1_id'] == $teamInfo['tournamentteam_id']) { $arrUpdateColumn = array("team1_id"); } else { $arrUpdateColumn = array("team2_id"); } $blnCheck3 = $tournamentObj->objMatch->update($arrUpdateColumn, array($swappingTeamInfo['tournamentteam_id'])); $tournamentObj->objMatch->select($swappingTeamMatchID[0]); $swappingTeamMatchInfo = $tournamentObj->objMatch->get_info(); if ($swappingTeamMatchInfo['team1_id'] == $swappingTeamInfo['tournamentteam_id']) {
$consoleObj->select($cID); $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $tournamentObj = new Tournament($mysqli); } if (!isset($tID)) { $tID = $_POST['tID']; } if (!$tournamentObj->select($tID)) { exit; } $tournamentInfo = $tournamentObj->get_info_filtered(); if (!isset($_POST['roundSelected']) || !is_numeric($_POST['roundSelected'])) { $_POST['roundSelected'] = 1; } $arrMatches = $tournamentObj->getMatches($_POST['roundSelected']); $matchCount = 0; foreach ($arrMatches as $matchID) { $matchCount++; $tournamentObj->objMatch->select($matchID); $matchInfo = $tournamentObj->objMatch->get_info(); $teamScore[1] = $matchInfo['team1score']; $teamScore[2] = $matchInfo['team2score']; $addStyle[1] = ""; $addStyle[2] = ""; if ($matchInfo['outcome'] == 1) { $addStyle[1] = " class='successFont' style='font-weight: bold'"; $addStyle[2] = " class='failedFont'"; } elseif ($matchInfo['outcome'] == 2) { $addStyle[2] = " class='successFont' style='font-weight: bold'"; $addStyle[1] = " class='failedFont'";