本文整理汇总了PHP中Game::select方法的典型用法代码示例。如果您正苦于以下问题:PHP Game::select方法的具体用法?PHP Game::select怎么用?PHP Game::select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Game
的用法示例。
在下文中一共展示了Game::select方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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
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;
} else {
$counter = 0;
示例4: getPreciseTime
<table class='formTable'>
<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";
}
示例5: elseif
if ($_POST['beforeafter'] != "before" and $_POST['beforeafter'] != "after") {
$countErrors++;
$dispError .= " <b>·</b> The selected an invalid display order. (before/after)<br>";
} elseif ($_POST['gameorder'] == "first") {
// Check if this is really the first game being added
$result = $mysqli->query("SELECT * FROM " . $dbprefix . "gamesplayed ORDER BY ordernum DESC");
$num_rows = $result->num_rows;
if ($num_rows > 0) {
$countErrors++;
$dispError .= " <b>·</b> The selected an invalid display order.<br>";
} else {
$intGameOrderNum = 1;
}
} elseif ($_POST['gameorder'] != "first") {
// Check if its a real game selected
if (!$gameObj->select($_POST['gameorder'])) {
$countErrors++;
$dispError .= " <b>·</b> The selected an invalid display order. (game position)<br>";
} else {
// Game was selected make some room for the new game and get a new ordernum
$intGameOrderNum = $gameObj->makeRoom($_POST['beforeafter']);
if (!is_numeric($intGameOrderNum)) {
$countErrors++;
$dispError .= " <b>·</b> The selected an invalid display order. (game position)<br>";
}
}
}
if ($countErrors == 0) {
// No Errors! Check game image, if it needs to be uploaded, try uploading.
if ($_FILES['gameimagefile']['name'] != "") {
$btUploadObj = new BTUpload($_FILES['gameimagefile'], "game_", "../images/gamesplayed/", array(".jpg", ".png", ".bmp", ".gif"));
示例6: getDisplayValue
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;
}
示例7: Basic
include $prevFolder . "_setup.php";
include $prevFolder . "classes/member.php";
include_once $prevFolder . "classes/rank.php";
include_once $prevFolder . "classes/game.php";
// Classes needed for index.php
$ipbanObj = new Basic($mysqli, "ipban", "ipaddress");
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();
}
}
$gameObj = new Game($mysqli);
if ($gameObj->select($_GET['gID'])) {
$gameObj->refreshImageSize();
$gameInfo = $gameObj->get_info_filtered();
} else {
die("<script type='text/javascript'>window.location = '" . $MAIN_ROOT . "';</script>");
}
// Start Page
$PAGE_NAME = $gameInfo['name'] . " - Top Players - ";
$dispBreadCrumb = "";
include $prevFolder . "themes/" . $THEME . "/_header.php";
$member = new Member($mysqli);
$breadcrumbObj->setTitle("Top Players: " . $gameInfo['name']);
$breadcrumbObj->addCrumb("Home", $MAIN_ROOT);
$breadcrumbObj->addCrumb("Top Players: " . $gameInfo['name']);
include $prevFolder . "include/breadcrumb.php";
$gameStatObj = new Basic($mysqli, "gamestats", "gamestats_id");
示例8: Member
* 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>";
}
}