本文整理汇总了PHP中Game::getGameList方法的典型用法代码示例。如果您正苦于以下问题:PHP Game::getGameList方法的具体用法?PHP Game::getGameList怎么用?PHP Game::getGameList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Game
的用法示例。
在下文中一共展示了Game::getGameList方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: displayTopPlayers
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";
}
}
示例2: displayTopPlayers
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);
}
}
示例3: array
$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;
示例4: round
$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>
示例5: saveProfileValue
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;
}
示例6: elseif
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>";
}