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); } }
$manageNewsCID = $consoleOptionObj->findConsoleIDByName("Manage News"); $consoleOptionObj->select($manageNewsCID); if ($memberObj->hasAccess($consoleOptionObj)) { $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;
$dispBars = "<div class='solidBox' style='position: reltaive; padding: 0px; margin: 0px; width: 90%'><div class='tinyFont' style='width: " . $totalBars . "%; background-color: " . $rankCatInfo['color'] . "'> </div></div>"; echo "\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='main' style='font-weight: bold; width: 40%'>Total " . $rankCatInfo['name'] . ":</td>\n\t\t\t\t\t\t<td class='main' style='font-weight: bold; width: 20%'>" . $value . " - " . round($value / $totalMembers, 2) * 100 . "%</td>\n\t\t\t\t\t\t<td class='main' style='width: 40%'>" . $dispBars . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t"; } ?> </table> </div> <div style='margin: 20px auto'> <table class='formTable' id='membersPageTable' style='width: 85%; margin-left: auto; margin-right: auto'> <tr> <td colspan='3' class='main dottedLine' align='center'><b>- Game Statistics -</b></td> </tr> <?php $arrGames = $gameObj->getGameList(); $arrTotalGamesPlayed = array_count_values($arrGamesPlayed); foreach ($arrGames as $value) { $gameObj->select($value); $gameInfo = $gameObj->get_info_filtered(); if ($arrTotalGamesPlayed[$value] == "") { $arrTotalGamesPlayed[$value] = 0; } $totalBars = round($arrTotalGamesPlayed[$value] / $totalMembers) * 100; $dispBars = "<div class='solidBox' style='position: reltaive; padding: 0px; margin: 0px; width: 90%'><div class='tinyFont alternateBGColor' style='width: " . $totalBars . "%'> </div></div>"; echo "\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='main' style='font-weight: bold; width: 40%'>Total " . $gameInfo['name'] . " Players:</td>\n\t\t\t\t\t\t<td class='main' style='font-weight: bold; width: 20%'>" . $arrTotalGamesPlayed[$value] . " - " . round($arrTotalGamesPlayed[$value] / $totalMembers, 2) * 100 . "%</td>\n\t\t\t\t\t\t<td class='main' style='letter-spacing: -4px; width: 40%'>" . $dispBars . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t"; } ?> </table>
private function saveProfileValue() { if ($this->getProfileOptionType() == "gamesplayed") { $gameObj = new Game($this->MySQL); $arrGameList = $gameObj->getGameList(); $returnVal = $this->saveMultiValues($arrGameList); } else { $returnVal = $this->saveSingleValue(); } return $returnVal; }
if ($_POST['startampm'] == "AM" && $_POST['starthour'] == 12) { $tempHour = 0; } elseif ($_POST['startampm'] == "PM" && $_POST['starthour'] != 12) { $tempHour += 12; } $tempTimezone = date_default_timezone_get(); date_default_timezone_set("UTC"); $tempDate = $_POST['startdate']; $tempYear = date("Y", $tempDate); $tempMonth = date("n", $tempDate); $tempDay = date("j", $tempDate); $formattedDate = mktime($tempHour, $_POST['startminute'], 0, $tempMonth, $tempDay, $tempYear); date_default_timezone_set($tempTimezone); } // Check Game $arrGamesPlayed = $gameObj->getGameList(); if (!in_array($_POST['game'], $arrGamesPlayed)) { $countErrors++; $dispError .= " <b>·</b> You selected an invalid game.<br>"; } // Check Eliminations if ($_POST['eliminations'] != 1 && $_POST['eliminations'] != 2) { $countErrors++; $dispError .= " <b>·</b> You selected an invalid eliminations value.<br>"; } // Check Teams/Players $arrTeamCount = array(4, 8, 16, 32, 64); if (!in_array($_POST['totalteams'], $arrTeamCount)) { $countErrors++; $dispError .= " <b>·</b> You selected an invalid Max Teams/Players value.<br>"; }