public function displayTopPlayers() { echo "\n\t\t\t<span>\n\t\t\t<b>·</b> <a href='" . MAIN_ROOT . "top-players/recruiters.php'>Recruiters</a>\n\t\t\t</span><br>\n\t\t\t"; $hpGameObj = new Game($this->MySQL); $arrGames = $hpGameObj->getGameList(); foreach ($arrGames as $gameID) { $hpGameObj->select($gameID); echo "\n\t\t\t\t<span>\n\t\t\t\t<b>·</b> <a href='" . MAIN_ROOT . "top-players/game.php?gID=" . $gameID . "'>" . $hpGameObj->get_info_filtered("name") . "</a>\n\t\t\t\t</span><br>\n\t\t\t\t"; } }
public function displayTopPlayers() { $menuItemInfo['name'] = "Recruiters"; $menuLinkInfo['link'] = MAIN_ROOT . "top-players/recruiters.php"; $menuLinkInfo['prefix'] = ""; $menuLinkInfo['linktarget'] = ""; $menuLinkInfo['textalign'] = "left"; $this->formatLink($menuItemInfo, $menuLinkInfo); $hpGameObj = new Game($this->MySQL); $arrGames = $hpGameObj->getGameList(); foreach ($arrGames as $gameID) { $hpGameObj->select($gameID); $menuItemInfo['name'] = $hpGameObj->get_info_filtered("name"); $menuLinkInfo['link'] = MAIN_ROOT . "top-players/game.php?gID=" . $gameID; $this->formatLink($menuItemInfo, $menuLinkInfo); } }
$shoutBoxEditLink = $MAIN_ROOT . "members/console.php?cID=" . $manageNewsCID . "&newsID="; $shoutBoxDeleteLink = $MAIN_ROOT . "members/include/news/include/deleteshoutpost.php"; } $postShoutboxCID = $consoleOptionObj->findConsoleIDByName("Post in Shoutbox"); $consoleOptionObj->select($postShoutboxCID); if ($memberObj->hasAccess($consoleOptionObj)) { $shoutBoxPostLink = $MAIN_ROOT . "members/include/news/include/postshoutbox.php"; } $arrSpecialMenuItems = array(); // TOP PLAYERS $arrSpecialMenuItems['top-players'] = " <b>·</b> <a href='" . $MAIN_ROOT . "top-players/recruiters.php'>Recruiters</a><br>"; $hpGameObj = new Game($mysqli); $arrGames = $hpGameObj->getGameList(); foreach ($arrGames as $gameID) { $hpGameObj->select($gameID); $arrSpecialMenuItems['top-players'] .= " <b>·</b> <a href='" . $MAIN_ROOT . "top-players/game.php?gID=" . $gameID . "'>" . $hpGameObj->get_info_filtered("name") . "</a><br>"; } // NEWEST MEMBERS $arrSpecialMenuItems['newmembers'] = "<div style='margin-left: 3px; margin-right: 3px; margin-top: 5px; margin-bottom: 20px'>"; $menuMemberObj = new Member($mysqli); $menuMemberRankObj = new Rank($mysqli); $counter = 0; $result = $mysqli->query("SELECT member_id FROM " . $dbprefix . "members WHERE rank_id != '1' ORDER BY datejoined DESC LIMIT 5"); while ($row = $result->fetch_assoc()) { $addCSS = ""; if ($counter == 0) { $addCSS = " alternateBGColor"; $counter = 1; } else { $counter = 0; }
<tr> <td class='formTitle'>Rank:</td> <td class='formTitle'>Username:</td> <td class='formTitle'>Main Game:</td> <td class='formTitle'>Inactive Since:</td> </tr> <?php $result = $mysqli->query("SELECT " . $dbprefix . "members.member_id, " . $dbprefix . "ranks.ordernum FROM " . $dbprefix . "members, " . $dbprefix . "ranks WHERE " . $dbprefix . "members.rank_id = " . $dbprefix . "ranks.rank_id AND " . $dbprefix . "members.onia = '1' AND " . $dbprefix . "members.disabled = '0' AND " . $dbprefix . "members.rank_id != '1' ORDER BY " . $dbprefix . "ranks.ordernum DESC"); while ($row = $result->fetch_assoc()) { $member->select($row['member_id']); $rankObj->select($member->get_info("rank_id")); $memberListInfo = $member->get_info_filtered(); $rankListInfo = $rankObj->get_info_filtered(); $dispMainGame = "Not Set"; if ($gameObj->select($memberListInfo['maingame_id'])) { $gameObj->refreshImageSize(); $gameInfo = $gameObj->get_info_filtered(); $dispMainGame = "<img src='" . $gameInfo['imageurl'] . "' width='" . $gameInfo['imagewidth'] . "' height='" . $gameInfo['imageheight'] . "' onmouseover=\"showToolTip('" . $gameInfo['name'] . "')\" onmouseout='hideToolTip()'>"; } echo "\n\t\t\t<tr>\n\t\t\t\t<td class='main' align='center'>\n\t\t\t\t\t<img src='" . $rankListInfo['imageurl'] . "' width='" . $rankListInfo['imagewidth'] . "' height='" . $rankListInfo['imageheight'] . "' onmouseover=\"showToolTip('" . $rankListInfo['name'] . "')\" onmouseout='hideToolTip()'>\n\t\t\t\t</td>\n\t\t\t\t<td class='main'>" . $member->getMemberLink() . "</td>\n\t\t\t\t<td class='main' align='center'>" . $dispMainGame . "</td>\n\t\t\t\t<td class='main' align='center'>" . getPreciseTime($memberListInfo['inactivedate']) . "</td>\n\t\t\t</tr>\n\t\t\n\t\t"; } ?> </table> <?php if ($result->num_rows > 0) { echo "\n\t\t<p align='center'>\n\t\t\t<b>Total Inactive Members:</b>\t<?php echo {$result->num_rows}; ?>\n\t\t</p>\n\t"; } else { echo "\n\t\n\t\t<div class='shadedBox' style='width: 40%; margin: 20px auto'>\n\t\t\t<p class='main' align='center'>\n\t\t\t\tThere are currently no inactive members.\n\t\t\t</p>\n\t\t</div>\n\t\t\n\t"; } include $prevFolder . "themes/" . $THEME . "/_footer.php";
$shoutBoxEditLink = $MAIN_ROOT . "members/console.php?cID=" . $manageNewsCID . "&newsID="; $shoutBoxDeleteLink = $MAIN_ROOT . "members/include/news/include/deleteshoutpost.php"; } $postShoutboxCID = $consoleOptionObj->findConsoleIDByName("Post in Shoutbox"); $consoleOptionObj->select($postShoutboxCID); if ($memberObj->hasAccess($consoleOptionObj)) { $shoutBoxPostLink = $MAIN_ROOT . "members/include/news/include/postshoutbox.php"; } $arrSpecialMenuItems = array(); // TOP PLAYERS $arrSpecialMenuItems['top-players'] = "<span class='menuLinks'><b>·</b> <a href='" . $MAIN_ROOT . "top-players/recruiters.php'>Recruiters</a></span><br>"; $hpGameObj = new Game($mysqli); $arrGames = $hpGameObj->getGameList(); foreach ($arrGames as $gameID) { $hpGameObj->select($gameID); $arrSpecialMenuItems['top-players'] .= "<span class='menuLinks'><b>·</b> <a href='" . $MAIN_ROOT . "top-players/game.php?gID=" . $gameID . "'>" . $hpGameObj->get_info_filtered("name") . "</a></span><br>"; } // NEWEST MEMBERS $arrSpecialMenuItems['newmembers'] = "<div style='margin-left: 3px; margin-right: 3px; margin-top: 5px; margin-bottom: 20px'>"; $menuMemberObj = new Member($mysqli); $menuMemberRankObj = new Rank($mysqli); $counter = 0; $result = $mysqli->query("SELECT member_id FROM " . $dbprefix . "members WHERE rank_id != '1' ORDER BY datejoined DESC LIMIT 5"); while ($row = $result->fetch_assoc()) { $addCSS = ""; if ($counter == 0) { $addCSS = " alternateBGColor"; $counter = 1; } else { $counter = 0; }
</div> <img src='<?php echo $MAIN_ROOT; ?> themes/minecraft/images/layout/menu/topplayers.png'> <div class='menuLinks'> <b>·</b> <a href='<?php echo $MAIN_ROOT; ?> top-players/recruiters.php'>Recruiters</a><br> <?php $hpGameObj = new Game($mysqli); $arrGames = $hpGameObj->getGameList(); foreach ($arrGames as $gameID) { $hpGameObj->select($gameID); echo "<b>·</b> <a href='" . $MAIN_ROOT . "top-players/game.php?gID=" . $gameID . "'>" . $hpGameObj->get_info_filtered("name") . "</a><br>"; } ?> </div> </td> <td class='main' valign='top'> <?php // Get UTC TIME $utcTime = time(); // Clock Display $displaydate = date("l, F j, Y"); $easternDate = new DateTime(date("Y-m-d"), new DateTimeZone('America/New_York')); $eastOffset = $easternDate->getOffset(); $eastTime = $utcTime + $eastOffset; $eastHour = gmdate("G", $eastTime);
$shoutBoxEditLink = $MAIN_ROOT . "members/console.php?cID=" . $manageNewsCID . "&newsID="; $shoutBoxDeleteLink = $MAIN_ROOT . "members/include/news/include/deleteshoutpost.php"; } $postShoutboxCID = $consoleOptionObj->findConsoleIDByName("Post in Shoutbox"); $consoleOptionObj->select($postShoutboxCID); if ($memberObj->hasAccess($consoleOptionObj)) { $shoutBoxPostLink = $MAIN_ROOT . "members/include/news/include/postshoutbox.php"; } $arrSpecialMenuItems = array(); // TOP PLAYERS $arrSpecialMenuItems['top-players'] = "<a href='" . $MAIN_ROOT . "top-players/recruiters.php'><div class='menuLink'>Recruiters</div></a>"; $hpGameObj = new Game($mysqli); $arrGames = $hpGameObj->getGameList(); foreach ($arrGames as $gameID) { $hpGameObj->select($gameID); $arrSpecialMenuItems['top-players'] .= "<a href='" . $MAIN_ROOT . "top-players/game.php?gID=" . $gameID . "'><div class='menuLink'>" . $hpGameObj->get_info_filtered("name") . "</div></a>"; } // NEWEST MEMBERS $arrSpecialMenuItems['newmembers'] = "<div style='margin-left: 3px; margin-right: 3px; margin-top: 0px; margin-bottom: 0px'>"; $menuMemberObj = new Member($mysqli); $menuMemberRankObj = new Rank($mysqli); $counter = 0; $result = $mysqli->query("SELECT member_id FROM " . $dbprefix . "members WHERE rank_id != '1' ORDER BY datejoined DESC LIMIT 3"); while ($row = $result->fetch_assoc()) { $addCSS = ""; if ($counter == 0) { $addCSS = " alternateBGColor"; $counter = 1; } else { $counter = 0; }
<?php if (!defined("SHOW_PROFILE_MAIN")) { exit; } // GAMES PLAYED $gameObj = new Game($mysqli); $gameStatObj = new Basic($mysqli, "gamestats", "gamestats_id"); $dispGamesPlayed = ""; $arrGames = $gameObj->getGameList(); foreach ($arrGames as $gameID) { if ($member->playsGame($gameID)) { $gameObj->select($gameID); $dispGameStats = ""; $arrGameStats = $gameObj->getAssociateIDs("ORDER BY ordernum"); foreach ($arrGameStats as $gameStatID) { $gameStatObj->select($gameStatID); if ($gameStatObj->get_info_filtered("hidestat") == 0) { if ($gameStatObj->get_info_filtered("stattype") == "calculate") { $dispGameStats .= "<b>" . $gameStatObj->get_info_filtered("name") . ":</b> " . $gameObj->calcStat($gameStatID, $member) . "<br>"; } else { $dispGameStats .= "<b>" . $gameStatObj->get_info_filtered("name") . ":</b> " . $member->getGameStatValue($gameStatID) . "<br>"; } } } $dispGamesPlayed .= "\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td class='profileLabel alternateBGColor' valign='top'>\n\t\t\t\t\t\t\t\t" . $gameObj->get_info_filtered("name") . ":\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td class='main' style='padding-left: 10px' valign='top'>\n\t\t\t\t\t\t\t\t" . $dispGameStats . "<br>\t\t\t\t\t\t\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t"; } } if ($dispGamesPlayed != "") { echo "\n\n\t\t\t\t\t<div class='formTitle' style='text-align: center; margin-top: 20px'>Game Statistics</div>\n\t\t\t\t\t<table class='profileTable' style='border-top-width: 0px'>\n\t\t\t\t\t" . $dispGamesPlayed . "</table>"; }
public function getDisplayValue($value) { if ($this->arrObjInfo['componenttype'] == "profile") { $profileOptionType = $this->getProfileOptionType(); switch ($profileOptionType) { case "birthday": $bdayDate = new DateTime(); $bdayDate->setTimestamp($value); $bdayDate->setTimezone(new DateTimeZone("UTC")); $returnVal = $bdayDate->format("M j, Y"); break; case "maingame": case "gamesplayed": $gameObj = new Game($this->MySQL); $returnVal = "Unknown Game"; if ($gameObj->select($value)) { $returnVal = $gameObj->get_info_filtered("name"); } break; case "recruiter": $memberObj = new Member($this->MySQL); $returnVal = "Not Set"; if ($memberObj->select($value)) { $returnVal = $memberObj->getMemberLink(); } break; default: $this->profileOptionObj->select($profileOptionType); if ($this->profileOptionObj->get_info("optiontype") == "input") { $returnVal = $value; } else { $returnVal = "Unknown Value"; if ($this->profileOptionObj->objProfileOptionSelect->select($value)) { $returnVal = $this->profileOptionObj->objProfileOptionSelect->get_info_filtered("selectvalue"); } } } } else { $returnVal = $value; } return $returnVal; }
} $postVal = "stat_" . $gameStatsID; $memberGameStatObj->addNew(array("gamestats_id", "member_id", $statType, "dateupdated"), array($gameStatsID, $memberInfo['member_id'], $_POST[$postVal], time())); } } } } } // Setup Form $i = 1; $arrComponents = array(); foreach ($arrGames as $gameID) { $gameObj->select($gameID); $arrGameStats = $gameObj->getAssociateIDs("ORDER BY ordernum"); if ($member->playsGame($gameID) && count($arrGameStats) > 0) { $arrComponents['customsection_' . $gameID] = array("type" => "section", "options" => array("section_title" => $gameObj->get_info_filtered("name")), "sortorder" => $i++); foreach ($arrGameStats as $gameStatsID) { $gameStatsObj->select($gameStatsID); $gameStatsInfo = $gameStatsObj->get_info_filtered(); if ($gameStatsInfo['stattype'] == "input") { $textBoxWidth = array("style" => "width: 5%"); $blnText = false; if ($gameStatsInfo['textinput'] == 1) { $textBoxWidth = array(); $blnText = true; } $gameStatValue = $member->getGameStatValue($gameStatsID, $blnText); $arrComponents['stat_' . $gameStatsID] = array("display_name" => $gameStatsInfo['name'], "attributes" => array_merge(array("class" => "formInput textBox"), $textBoxWidth), "value" => $gameStatValue, "sortorder" => $i++); } } }
$memberSocialInfo = $member->objSocial->getMemberSocialInfo(); foreach ($arrSocialMediaInfo as $socialMediaInfo) { $dispSocialMediaValue = isset($memberSocialInfo[$socialMediaInfo['social_id']]) ? $memberSocialInfo[$socialMediaInfo['social_id']] : ""; $tempComponentName = "socialmedia_" . $socialMediaInfo['social_id']; $arrSocialMediaComponents[$tempComponentName] = array("type" => "text", "display_name" => $socialMediaInfo['name'], "tooltip" => $socialMediaInfo['tooltip'], "attributes" => array("class" => "textBox formInput"), "sortorder" => $i++, "value" => $dispSocialMediaValue); } $arrBirthdayComponents = array("birthdaysection" => array("type" => "section", "options" => array("section_title" => "Birthday:"), "sortorder" => $i++), "birthday" => array("type" => "datepicker", "sortorder" => $i++, "display_name" => "Select Date", "attributes" => array("style" => "cursor: pointer", "id" => "jsBirthday", "class" => "textBox formInput"), "db_name" => "birthday", "value" => $memberInfo['birthday'] * 1000, "options" => array("changeMonth" => "true", "changeYear" => "true", "dateFormate" => "M d, yy", "minDate" => "new Date(50, 1, 1)", "maxDate" => $maxBirthdayDate, "yearRange" => "1950:" . $maxBirthdayYear, "defaultDate" => $defaultBirthdayDate, "altField" => "realBirthday"), "validate" => array("NUMBER_ONLY"))); if (count($arrGames) > 0) { // Setup Games Played Section $gamesPlayedOptions = array(); $mainGameOptions = array(); $gamesPlayedSection = array("gamesplayedsection" => array("type" => "section", "options" => array("section_title" => "Games Played:"), "sortorder" => $i++)); $mainGamePlayed = array("maingame" => array("type" => "select", "sortorder" => $i++, "display_name" => "Main Game", "value" => $memberInfo['maingame_id'], "db_name" => "maingame_id", "attributes" => array("class" => "textBox formInput"))); foreach ($arrGames as $gameID) { $gameObj->select($gameID); $mainGameOptions[$gameID] = $gameObj->get_info_filtered("name"); $gamesPlayedOptions["game_" . $gameID] = array("type" => "checkbox", "sortorder" => $i++, "attributes" => array("class" => "textBox formInput", "style" => "margin-left: 10px"), "value" => $member->playsGame($gameID), "options" => array("1" => $gameObj->get_info_filtered("name"))); } $mainGamePlayed['maingame']['options'] = $mainGameOptions; $arrComponents = array_merge($arrComponents, $arrSocialMediaComponents, $arrBirthdayComponents, $gamesPlayedSection, $mainGamePlayed, $gamesPlayedOptions); } // Set up Custom Profile Options $customCount = 1; $arrCustomOptions = array(); $result = $mysqli->query("SELECT * FROM " . $dbprefix . "profilecategory ORDER BY ordernum DESC"); while ($row = $result->fetch_assoc()) { $profileCategoryObj->select($row['profilecategory_id']); $arrProfileOptions = $profileCategoryObj->getAssociateIDs("ORDER BY sortnum"); $arrCustomOptions['customsection_' . $customCount] = array("type" => "section", "options" => array("section_title" => $profileCategoryObj->get_info_filtered("name") . ":"), "sortorder" => $i++); $customCount++; foreach ($arrProfileOptions as $profileOptionID) {
* License: http://www.bluethrust.com/license.php * */ include_once "../../../../_setup.php"; include_once "../../../../classes/member.php"; include_once "../../../../classes/rank.php"; include_once "../../../../classes/consoleoption.php"; include_once "../../../../classes/game.php"; $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $gameObj = new Game($mysqli); $consoleObj = new ConsoleOption($mysqli); $cID = $consoleObj->findConsoleIDByName("Manage Games Played"); $consoleObj->select($cID); $_GET['cID'] = $cID; if ($member->authorizeLogin($_SESSION['btPassword'])) { $memberInfo = $member->get_info_filtered(); if ($member->hasAccess($consoleObj) && $gameObj->select($_POST['gID'])) { define("MEMBERRANK_ID", $memberInfo['rank_id']); if ($_POST['confirm'] == 1) { $gameObj->delete(); //$gameObj->resortOrder(); include "main.php"; } else { $gameName = $gameObj->get_info_filtered("name"); echo "<p align='center'>Are you sure you want to delete the game <b>" . $gameName . "</b>?</p>"; } } elseif (!$gameObj->select($_POST['gID'])) { echo "<p align='center'>Unable find the selected game. Please try again or contact the website administrator.</p>"; } }