include_once "../../../_setup.php"; include_once "../../../classes/member.php"; include_once "../../../classes/rank.php"; include_once "../../../classes/tournament.php"; $consoleObj = new ConsoleOption($mysqli); $cID = $consoleObj->findConsoleIDByName("Manage Tournaments"); $consoleObj->select($cID); $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $countErrors = 0; $dispError = ""; $tournamentObj = new Tournament($mysqli); if ($member->authorizeLogin($_SESSION['btPassword']) && $tournamentObj->objTeam->select($_POST['teamID']) && $tournamentObj->objTournamentPool->select($_POST['poolID']) && $tournamentObj->objTournamentPool->objTournamentPoolMatch->select($_POST['poolTeamID']) && $member->hasAccess($consoleObj)) { $memberInfo = $member->get_info(); $teamInfo = $tournamentObj->objTeam->get_info_filtered(); $tournamentObj->select($teamInfo['tournament_id']); $tournamentInfo = $tournamentObj->get_info_filtered(); $poolInfo = $tournamentObj->objTournamentPool->get_info(); $poolTeamInfo = $tournamentObj->objTournamentPool->objTournamentPoolMatch->get_info(); $dispTeamName = $tournamentObj->getPlayerName(); $tmemberID = $tournamentInfo['member_id']; if (($memberInfo['member_id'] == $tmemberID || $memberInfo['rank_id'] == "1" || $tournamentObj->isManager($memberInfo['member_id'])) && $poolInfo['tournament_id'] == $teamInfo['tournament_id'] && $poolTeamInfo['tournament_id'] == $teamInfo['tournament_id']) { // Check Match Score if (!is_numeric($_POST['teamScore']) || !is_numeric($_POST['opponentScore'])) { $countErrors++; $dispError .= " <b>·</b> Scores must be a numeric value."; } // Check Winner $arrMatchWinners = array(0, 1, 2); if (!in_array($_POST['matchWinner'], $arrMatchWinners)) { $countErrors++;
if (!$member->hasAccess($consoleObj)) { exit; } } include_once $prevFolder . "classes/tournament.php"; $cID = $_GET['cID']; $tournamentObj = new Tournament($mysqli); $counter = 0; $dispTournamentNames = ""; $arrTournaments = $member->getTournamentList(true); $createTournamentCID = $consoleObj->findConsoleIDByName("Create a Tournament"); echo "\n<p align='right' class='main' style='padding-right: 20px'>\n\t» <a href='" . $MAIN_ROOT . "members/console.php?cID=" . $createTournamentCID . "'>Create a Tournament</a> «\n</p>\n"; $clickCounter = 0; if (count($arrTournaments) > 0) { foreach ($arrTournaments as $tournamentID) { if ($tournamentObj->select($tournamentID)) { $categoryCSS = "consoleCategory_clicked"; $hideoptions = ""; if ($counter > 0) { $hideoptions = "style='display: none'"; $categoryCSS = "consoleCategory"; } $counter++; $tournamentInfo = $tournamentObj->get_info_filtered(); if ($_GET['select'] == $tournamentInfo['tournament_id']) { $clickCounter = $counter; } $dispTournamentNames .= "<div class='" . $categoryCSS . "' style='width: 200px; margin: 3px' id='categoryName" . $counter . "' onmouseover=\"moverCategory('" . $counter . "')\" onmouseout=\"moutCategory('" . $counter . "')\" onclick=\"selectCategory('" . $counter . "')\">" . $tournamentInfo['name'] . "</div>"; $dispTournamentOptions .= "<div id='categoryOption" . $counter . "' " . $hideoptions . ">"; $dispTournamentOptions .= "\n\t\t\t<div class='dottedLine' style='padding-bottom: 3px; margin-bottom: 5px'>\n\t\t\t<b>Manage Tournament - " . $tournamentInfo['name'] . "</b>\n\t\t\t</div>\n\t\t\t<div style='padding-left: 5px'><ul style='padding: 0px; padding-left: 15px'>\n\t\t\t"; $arrTournamentOptionsPageID = array("ManageMatches", "ManageTeams", "EditTournamentInfo");
* * License: http://www.bluethrust.com/license.php * */ if (!defined("SHOW_MANAGERLIST")) { include_once "../../../_setup.php"; include_once "../../../classes/member.php"; include_once "../../../classes/rank.php"; include_once "../../../classes/tournament.php"; $consoleObj = new ConsoleOption($mysqli); $cID = $consoleObj->findConsoleIDByName("Manage Tournaments"); $consoleObj->select($cID); $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $tournamentObj = new Tournament($mysqli); if (!$member->authorizeLogin($_SESSION['btPassword']) || !$tournamentObj->select($_POST['tID']) || $tournamentObj->get_info("member_id") != $memberInfo['member_id'] || !$member->hasAccess($consoleObj)) { exit; } } $arrManagers = $tournamentObj->getManagers(); foreach ($arrManagers as $tManagerID => $tMemberID) { $member->select($tMemberID); echo "<div class='mttPlayerSlot main'>" . $member->getMemberLink() . "<div class='mttDeletePlayer'><a href='javascript:void(0)' onclick=\"deleteManager('" . $tManagerID . "')\">X</a></div></div>"; } if (count($arrManagers) == 0) { echo "\n\t\t<div class='shadedBox' style='width: 75%; margin-top: 10px; margin-left: auto; margin-right: auto'>\n\t\t\t<p class='main' align='center'>\n\t\t\t\t<i>No managers assigned to this tournament.</i>\n\t\t\t</p>\n\t\t</div>\n\t"; } $member->select($memberInfo['member_id']); ?>
* Website: http://www.bluethrust.com * * License: http://www.bluethrust.com/license.php * */ include_once "../../_setup.php"; include_once "../../classes/member.php"; include_once "../../classes/rank.php"; include_once "../../classes/tournament.php"; $consoleObj = new ConsoleOption($mysqli); $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(); echo $tID; if ($member->authorizeLogin($_SESSION['btPassword']) && $tournamentObj->select($tID) && $member->hasAccess($consoleObj)) { $memberInfo = $member->get_info(); $tmemberID = $tournamentObj->get_info("member_id"); if ($memberInfo['member_id'] == $tmemberID || $memberInfo['rank_id'] == "1") { $tournamentObj->delete(); echo "deleted"; } } else { echo "no"; } ?>
include $prevFolder . "_setup.php"; include $prevFolder . "classes/member.php"; include_once $prevFolder . "classes/rank.php"; include_once $prevFolder . "classes/tournament.php"; $ipbanObj = new Basic($mysqli, "ipban", "ipaddress"); $tournamentObj = new Tournament($mysqli); $member = new Member($mysqli); if ($ipbanObj->select($IP_ADDRESS, false)) { $ipbanInfo = $ipbanObj->get_info(); if (time() < $ipbanInfo['exptime'] or $ipbanInfo['exptime'] == 0) { die("<script type='text/javascript'>window.location = '" . $MAIN_ROOT . "banned.php';</script>"); } else { $ipbanObj->delete(); } } if (!is_numeric($_GET['tID']) || !$tournamentObj->select($_GET['tID'])) { die("<script type='text/javascript'>window.location = '" . $MAIN_ROOT . "';</script>"); } $tournamentInfo = $tournamentObj->get_info_filtered(); if ($tournamentInfo['seedtype'] != 3 && !$tournamentObj->checkForPools()) { echo "\n\t\t<script type='text/javascript'>\n\t\t\twindow.location = '" . $MAIN_ROOT . "tournaments/bracket.php?tID=" . $_GET['tID'] . "';\n\t\t</script>\n\t"; exit; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title><?php echo $PAGE_NAME . $CLAN_NAME; ?>
foreach ($_SESSION['btComposeList'][$pmSessionID]['squad'] as $squadID) { if ($squadID != "" && in_array($squadID, $arrSquads) && $squadObj->select($squadID)) { $filterMembers = "('" . implode("','", $arrReceivers) . "')"; $result = $mysqli->query("SELECT member_id FROM " . $dbprefix . "squads_members WHERE squad_id = '" . $squadID . "' AND member_id NOT IN " . $filterMembers); while ($row = $result->fetch_assoc()) { $arrReceivers[] = $row['member_id']; $arrGroup[$row['member_id']] = array("squad", $squadID); } } } } // Check Tournaments $arrTournaments = $member->getTournamentList(true); if (count($_SESSION['btComposeList'][$pmSessionID]['tournament']) > 0) { foreach ($_SESSION['btComposeList'][$pmSessionID]['tournament'] as $tournamentID) { if ($tournamentID != "" && in_array($tournamentID, $arrTournaments) && $tournamentObj->select($tournamentID)) { $filterMembers = "('" . implode("','", $arrReceivers) . "')"; $result = $mysqli->query("SELECT member_id FROM " . $dbprefix . "tournamentplayers WHERE tournament_id = '" . $tournamentID . "' AND member_id != '' AND member_id NOT IN " . $filterMembers); while ($row = $result->fetch_assoc()) { $arrReceivers[] = $row['member_id']; $arrGroup[$row['member_id']] = array("tournament", $tournamentID); } } } } if (count($arrReceivers) == 0) { $countErrors++; $dispError .= " <b>·</b> You need to select at least one member to send your message to."; } elseif (count($arrReceivers) == 1) { $arrReceivers = $arrReceivers[0]; }
$prevFolder = "../../"; $PAGE_NAME = "Tournaments - " . $consoleTitle . " - "; $dispBreadCrumb = "<a href='" . $MAIN_ROOT . "'>Home</a> > <a href='" . $MAIN_ROOT . "members'>My Account</a> > " . $consoleTitle; $EXTERNAL_JAVASCRIPT .= "\n<script type='text/javascript' src='" . $MAIN_ROOT . "members/js/console.js'></script>\n<script type='text/javascript' src='" . $MAIN_ROOT . "members/js/main.js'></script>\n"; include "../../themes/" . $THEME . "/_header.php"; echo "\n<div class='breadCrumbTitle' id='breadCrumbTitle'>{$consoleTitle}</div>\n<div class='breadCrumb' id='breadCrumb' style='padding-top: 0px; margin-top: 0px'>\n{$dispBreadCrumb}\n</div>\n"; if (isset($_GET['match'])) { echo "\n\t<p align='right' style='margin-bottom: 20px; margin-right: 20px;'>« <a href='" . $MAIN_ROOT . "members/tournaments/managetournament.php?tID=" . $tID . "&pID=ManageMatches'>Go Back</a></p>\n\t"; } elseif ($_GET['pID'] == "ManagePools" && isset($_GET['poolID'])) { echo "\n\t<p align='right' style='margin-bottom: 20px; margin-right: 20px;'>« <a href='" . $MAIN_ROOT . "members/tournaments/managetournament.php?tID=" . $tID . "&pID=ManagePools'>Go Back</a></p>\n\t"; } else { echo "\n\t<p align='right' style='margin-bottom: 20px; margin-right: 20px;'>« <a href='" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "&select=" . $tID . "'>Go Back</a></p>\n\t"; } // Check Login $LOGIN_FAIL = true; if ($member->authorizeLogin($_SESSION['btPassword']) && $tournamentObj->select($tID)) { $tournamentInfo = $tournamentObj->get_info_filtered(); $memberInfo = $member->get_info_filtered(); if ($memberInfo['member_id'] == $tournamentInfo['member_id'] || $memberInfo['rank_id'] == "1" || $tournamentObj->isManager($memberInfo['member_id'])) { switch ($pID) { case "manageplayers": include "manageplayers.php"; break; case "manageteams": include "manageteams.php"; break; case "managepools": include "managepools.php"; break; case "deletetournament": if ($memberInfo['member_id'] == $tournamentInfo['member_id']) {
<div style='margin: 0px auto; '> <table class='formTable' style='margin-left: auto; margin-right: auto'> <tr> <td class='formTitle' width="30%">Tournament Name:</td> <td class='formTitle' width="25%">Manager:</td> <td class='formTitle' width="25%">Start Date:</td> <td class='formTitle' width="20%">Status:</td> </tr> <?php $memberObj = new Member($mysqli); $counter = 0; $result = $mysqli->query("SELECT * FROM " . $dbprefix . "tournaments ORDER BY startdate DESC"); while ($row = $result->fetch_assoc()) { $tournamentObj->select($row['tournament_id']); $memberObj->select($row['member_id']); $dispManager = $memberObj->getMemberLink(); $dateTimeObj = new DateTime(); $dateTimeObj->setTimestamp($row['startdate']); $includeTimezone = ""; $dateTimeObj->setTimezone(new DateTimeZone("UTC")); $dispStartDate = $dateTimeObj->format("M j, Y g:i A"); if ($row['timezone'] != "") { $dateTimeObj->setTimezone(new DateTimeZone($row['timezone'])); $includeTimezone = " T"; } $dispStartDate .= $dateTimeObj->format($includeTimezone); if ($row['startdate'] < time() && $tournamentObj->getTournamentWinner() == 0) { $dispStatus = "<img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/bluedot.png' title='Started'>"; } elseif ($row['startdate'] > time()) {
* * Author: Bluethrust Web Development * E-mail: support@bluethrust.com * Website: http://www.bluethrust.com * * License: http://www.bluethrust.com/license.php * */ // Config File $prevFolder = "../"; include_once $prevFolder . "classes/member.php"; include_once $prevFolder . "classes/tournament.php"; include $prevFolder . "_setup.php"; $tournamentObj = new Tournament($mysqli); $member = new Member($mysqli); if ($tournamentObj->select($_GET['tID'])) { $tournamentPass = $tournamentObj->get_info("outsidepassword"); if ($tournamentPass != "" && $tournamentPass == md5($_POST['connectPass'])) { header(":", true, 200); $tournamentInfo['info'] = $tournamentObj->get_info_filtered(); $arrPlayers = $tournamentObj->getPlayers(); foreach ($arrPlayers as $key => $value) { if ($member->select($value)) { $arrPlayers[$key] = $member->get_info_filtered("username"); } } $arrTeams = $tournamentObj->getTeams(); foreach ($arrTeams as $key => $value) { $tournamentObj->objTeam->select($value); //$arrTeams[$key]['seed'] = $tournamentObj->objTeam->get_info_filtered("seed"); $arrTeams[$key] = $tournamentObj->objTeam->get_info_filtered("name");
* Author: Bluethrust Web Development * E-mail: support@bluethrust.com * Website: http://www.bluethrust.com * * License: http://www.bluethrust.com/license.php * */ include_once "../../../_setup.php"; include_once "../../../classes/member.php"; include_once "../../../classes/rank.php"; include_once "../../../classes/tournament.php"; $consoleObj = new ConsoleOption($mysqli); $cID = $consoleObj->findConsoleIDByName("Manage Tournaments"); $consoleObj->select($cID); $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $tournamentObj = new Tournament($mysqli); if ($member->authorizeLogin($_SESSION['btPassword']) && $tournamentObj->objPlayer->select($_POST['playerID']) && $member->hasAccess($consoleObj)) { $memberInfo = $member->get_info(); $playerInfo = $tournamentObj->objPlayer->get_info_filtered(); $tournamentObj->objTeam->select($playerInfo['team_id']); $tournamentObj->select($playerInfo['tournament_id']); $tournamentInfo = $tournamentObj->get_info_filtered(); $tmemberID = $tournamentInfo['member_id']; if ($memberInfo['member_id'] == $tmemberID || $memberInfo['rank_id'] == "1" || $tournamentObj->isManager($memberInfo['member_id'])) { $tournamentObj->objPlayer->update(array("team_id"), array(0)); $_POST['teamID'] = $tournamentObj->objTeam->get_info("tournamentteam_id"); $_POST['getWhat'] = "playerlist"; include "getteaminfo.php"; } }
$arrTypeObj['event']['obj'] = $eventObj; $arrTypeObj['news']['title'] = "postsubject"; $arrTypeObj['tournament']['title'] = "name"; $arrTypeObj['event']['title'] = "title"; $arrTypeObj['news']['message'] = "newspost"; $arrTypeObj['tournament']['message'] = "description"; $arrTypeObj['event']['message'] = "description"; if (in_array($_POST['attachtype'], $arrTypes)) { $checkInfo = false; switch ($_POST['attachtype']) { case "news": $checkInfo = $newsObj->select($_POST['attachID']); $linkURL = $MAIN_ROOT . "news/viewpost.php?nID=" . $_POST['attachID']; break; case "tournament": $checkInfo = $tournamentObj->select($_POST['attachID']); $linkURL = $MAIN_ROOT . "tournaments/view.php?tID=" . $_POST['attachID']; break; case "event": $checkInfo = $eventObj->select($_POST['attachID']); $linkURL = $MAIN_ROOT . "events/info.php?eID=" . $_POST['attachID']; break; } if ($checkInfo) { $attachObj = $arrTypeObj[$_POST['attachtype']]['obj']; $attachTitle = $arrTypeObj[$_POST['attachtype']]['title']; $attachMessage = $arrTypeObj[$_POST['attachtype']]['message']; $attachInfo = $attachObj->get_info_filtered(); $attachMessage = str_replace(array("\r", "\n"), "\\n", $attachInfo[$attachMessage]); echo "\n\t\t\t\n\t\t\t\t<script type='text/javascript'>\n\t\t\t\n\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\n\t\t\t\t\t\t\$('#imageTitle').val('" . $attachInfo[$attachTitle] . "');\n\t\t\t\t\t\t\$('#imageMessage').val('" . $attachMessage . "');\n\t\t\t\t\t\t\n\t\t\t\t\t\t\$('#linkURL').val('" . $linkURL . "');\n\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t</script>\n\n\t\t\t\t\n\t\t\t"; }
* E-mail: support@bluethrust.com * Website: http://www.bluethrust.com * * License: http://www.bluethrust.com/license.php * */ include_once "../../../_setup.php"; include_once "../../../classes/member.php"; include_once "../../../classes/rank.php"; include_once "../../../classes/tournament.php"; $consoleObj = new ConsoleOption($mysqli); $cID = $consoleObj->findConsoleIDByName("Manage Tournaments"); $consoleObj->select($cID); $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $tournamentObj = new Tournament($mysqli); $tID = $_GET['tID']; $arrMembers = array(); if ($member->authorizeLogin($_SESSION['btPassword']) && $tournamentObj->select($tID) && $member->hasAccess($consoleObj) && strlen($_GET['term']) >= 3) { $memberInfo = $member->get_info(); $tmemberID = $tournamentObj->get_info("member_id"); if ($memberInfo['member_id'] == $tmemberID || $memberInfo['rank_id'] == "1" || $tournamentObj->isManager($memberInfo['member_id'])) { $tournamentPlayers = $tournamentObj->getPlayers(); $memberSQL = "('" . implode("','", $tournamentPlayers) . "')"; $result = $mysqli->query("SELECT * FROM " . $dbprefix . "members WHERE username LIKE '" . $_GET['term'] . "%' ORDER BY username"); while ($row = $result->fetch_assoc()) { $arrMembers[] = array("id" => $row['member_id'], "value" => $row['username']); } echo json_encode($arrMembers); } }
} else { // This is a little repeatative, but for security. $memberInfo = $member->get_info(); $consoleObj->select($cID); if (!$member->hasAccess($consoleObj)) { exit; } } include_once "../classes/tournament.php"; $tMemberObj = new Member($mysqli); $countErrors = 0; $dispError = ""; $tournamentObj = new Tournament($mysqli); $arrTournaments = $member->getTournamentList(); if ($_POST['submit']) { if (!$tournamentObj->select($_POST['tournament'])) { $countErrors++; $dispError .= " <b>·</b> You selected an invalid tournament.<br>"; } else { $tournamentInfo = $tournamentObj->get_info_filtered(); // Check Password if ($tournamentInfo['password'] != "" && $tournamentInfo['password'] != md5($_POST['tournamentpassword'])) { $countErrors++; $dispError .= " <b>·</b> You entered an incorrect password for the tournament.<br>"; } // Check Spots left $arrPlayers = $tournamentObj->getPlayers(); $maxPlayers = $tournamentInfo['playersperteam'] * $tournamentInfo['maxteams']; if ($maxPlayers == count($arrPlayers)) { $countErrors++; $dispError .= " <b>·</b> This tournament is currently full.<br>";