本文整理汇总了PHP中Rank::get_info方法的典型用法代码示例。如果您正苦于以下问题:PHP Rank::get_info方法的具体用法?PHP Rank::get_info怎么用?PHP Rank::get_info使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Rank
的用法示例。
在下文中一共展示了Rank::get_info方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addMember
public function addMember()
{
$rankObj = new Rank($this->MySQL);
$rankObj->selectByOrder(2);
$newMemRank = $rankObj->get_info("rank_id");
$appInfo = $this->get_info();
$arrColumns = array("username", "password", "password2", "rank_id", "email", "datejoined", "lastlogin", "lastseen");
$arrValues = array($appInfo['username'], $appInfo['password'], $appInfo['password2'], $newMemRank, $appInfo['email'], time(), time(), time());
if ($this->objMember->addNew($arrColumns, $arrValues)) {
$this->setMemberProfile();
$returnVal = $this->update(array("memberadded"), array(1));
$this->notifyNewMember();
}
return $returnVal;
}
示例2: strrpos
$actualPageNameLoc = strrpos($PAGE_NAME, " - ");
$actualPageName = substr($PAGE_NAME, 0, $actualPageNameLoc);
if ($PAGE_NAME == "") {
$actualPageName = "Home Page";
}
$lastSeenLink = "<a href='" . $dispHTTP . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] . "'>" . $actualPageName . "</a>";
$arrUpdateColLastSeen = array("lastseen", "lastseenlink");
$arrUpdateValLastSeen = array(time(), $lastSeenLink);
if (time() - $memberInfo['lastlogin'] > 3600) {
$arrUpdateColLastSeen[] = "lastlogin";
$arrUpdateValLastSeen[] = time();
}
$memberObj->update($arrUpdateColLastSeen, $arrUpdateValLastSeen);
$rankObj = new Rank($mysqli);
$rankObj->select($memberInfo['rank_id']);
$rankInfo = $rankObj->get_info();
$memberRank = $rankInfo['name'];
$consoleOptionObj = new ConsoleOption($mysqli);
// Members Only Tagger
$dispMembersOnlyTagger = "";
if (isset($_SESSION['btMembersOnlyTagger']) && $_SESSION['btMembersOnlyTagger'] == 1 && substr($_SERVER['PHP_SELF'], -11) != "console.php") {
$pageTaggerURL = $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
$taggerCID = $consoleOptionObj->findConsoleIDByName("Member's Only Pages");
if ($taggerObj->select($pageTaggerURL, false)) {
$pageTagStatus = "<span class='pendingFont'>Member's Only</span>";
$dispTagOrUntag = "Untag";
} else {
$pageTagStatus = "<span class='publicNewsColor'>Public</span>";
$dispTagOrUntag = "Tag";
}
$dispMembersOnlyTagger = "\n\t\t\t\t<div id='membersOnlyTagger'>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t<div id='membersOnlyLoadingSpiral' style='display: none'>\n\t\t\t\t\t\t<p align='center' class='main'>\n\t\t\t\t\t\t\t<img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/loading-spiral2.gif'><br>Loading\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t<div id='membersOnlyTaggerHTML'>\n\t\t\t\t\t\t<p align='center' style='margin: 0px; margin-bottom: 15px'><b>Members Only Tagger: " . $actualPageName . "</b></p>\n\t\t\t\t\t\n\t\t\t\t\t\t<p align='center'>Current Status: " . $pageTagStatus . "<br>Return to <a href='" . $MAIN_ROOT . "members/console.php?cID=" . $taggerCID . "'>Member's Only Pages</a></p>\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t<div class='taggerBottomLeft'><a href='javascript:void(0)' onclick='setMembersOnlyTaggerStatus()'>Turn Off</a></div>\n\t\t\t\t\t\t<div class='taggerBottomRight'><a href='javascript:void(0)' onclick='setMembersOnlyPageStatus()'>" . $dispTagOrUntag . " Page</a></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\t\t\n\t\t\t\t\tfunction setMembersOnlyTaggerStatus() {\n\t\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/admin/membersonlypagetagger.php', { setTaggerStatus: '1' }, function(data) {\n\t\t\t\t\t\t\t\t\$('#membersOnlyTagger').fadeOut(250);\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfunction setMembersOnlyPageStatus() {\n\t\t\t\t\t\n\t\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\t\t\$('#membersOnlyTaggerHTML').hide();\n\t\t\t\t\t\t\t\$('#membersOnlyLoadingSpiral').show();\n\t\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/admin/membersonlypagetagger.php', { setPageStatus: '1', pageName: '" . filterText($actualPageName) . "', tagURL: '" . $pageTaggerURL . "' }, function(data) {\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\$('#membersOnlyTaggerHTML').html(data);\n\t\t\t\t\t\t\t\t\$('#membersOnlyLoadingSpiral').hide();\n\t\t\t\t\t\t\t\t\$('#membersOnlyTaggerHTML').fadeIn(250);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t</script>\n\t\t\t\t\n\t\t\t\t";
示例3: Rank
$countErrors++;
$dispError .= " <b>·</b> The Image Width must be a value greater than 0.<br>";
}
if ($_FILES['rankimagefile']['name'] == "" and (trim($_POST['rankimagewidth']) == "" or $_POST['rankimagewidth'] <= 0)) {
$countErrors++;
$dispError .= " <b>·</b> You must supply an image width for images that aren't uploaded.<br>";
}
// Check Before/After and Rank
$beforeAfterRankOK = false;
$rankObj = new Rank($mysqli);
if ($_POST['rankorder'] != "first") {
if (!$rankObj->select($_POST['rankorder'])) {
$countErrors++;
$dispError .= " <b>·</b> You selected an invalid rank order. (rank)<br>";
} else {
$beforeAfterRankInfo = $rankObj->get_info();
$beforeAfterRankOK = true;
// Check to see if we can get a new rank order number
$intNewRankOrderNum = $rankObj->makeRoom($_POST['beforeafter']);
if (!is_numeric($intNewRankOrderNum)) {
$countErrors++;
$dispError .= " <b>·</b> You selected an invalid rank order. (rank)<br>";
}
}
} else {
$result = $mysqli->query("SELECT * FROM " . $dbprefix . "ranks WHERE rank_id != '1'");
$num_rows = $result->num_rows;
if ($num_rows != 0) {
$countErrors++;
$dispError .= " <b>·</b> You selected an invalid rank order.<br>";
} else {
示例4: autoPromote
function autoPromote()
{
if ($this->intTableKeyValue != "") {
$result = $this->MySQL->query("SELECT rank_id FROM " . $this->MySQL->get_tablePrefix() . "ranks WHERE autodays != '0' ORDER BY ordernum DESC");
while ($row = $result->fetch_assoc()) {
$arrRanks[] = $row['rank_id'];
}
$rankObj = new Rank($this->MySQL);
$rankObj->select($this->arrObjInfo['rank_id']);
$memberRankInfo = $rankObj->get_info();
$daysInClan = (time() - $this->arrObjInfo['datejoined']) / 86400;
foreach ($arrRanks as $rankID) {
$rankObj->select($rankID);
if ($rankObj->get_info("ordernum") > $memberRankInfo['ordernum'] && $memberRankInfo['rank_id'] != 1 && $daysInClan >= $rankObj->get_info("autodays") && time() > $this->arrObjInfo['freezerank']) {
if ($this->update(array("rank_id", "lastpromotion"), array($rankID, time()))) {
$this->logAction("Auto promoted for being in the clan for " . $rankObj->get_info("autodays") . " days.");
$memberRankInfo['ordernum'] = $rankObj->get_info("ordernum");
}
}
}
}
}
示例5: Rank
if ($_POST['autodisable'] != "") {
if (!is_numeric($_POST['autodisable']) or is_numeric($_POST['autodisable']) and $_POST['autodisable'] < 0) {
$countErrors++;
$dispError .= " <b>·</b> Auto disable must either be blank or a positive numeric value.<br>";
}
}
// Check Rank Order and Promote Power
$checkRankObj = new Rank($mysqli);
if ($_POST['rankorder'] == $rankInfo['rank_id']) {
// Hack attempt
$countErrors++;
$dispError .= " <b>·</b> You selected an invalid rank order. (possible hack attempt?)<br>";
}
//Check if rank selected for rank order is an actual rank
if ($checkRankObj->select($_POST['rankorder'])) {
$checkRankInfo = $checkRankObj->get_info();
if ($_POST['beforeafter'] == "before") {
$intTempRankOrder = $checkRankInfo['ordernum'] + 1;
} else {
$intTempRankOrder = $checkRankInfo['ordernum'] - 1;
}
// If the rank order is the same do nothing keep it the same
// If its not the same make room for the new order and then resort ordernum
if ($intTempRankOrder == $rankInfo['ordernum']) {
$intNewRankOrderNum = $rankInfo['ordernum'];
$resortRanks = false;
} else {
$intNewRankOrderNum = $checkRankObj->makeRoom($_POST['beforeafter']);
$resortRanks = true;
}
if (!is_numeric($intNewRankOrderNum)) {
示例6: array
$logObj->addNew($arrLogColumns, $arrLogValues);
}
}
// Disable members who fail to be promoted for auto-disable ranks
$arrRanks = array();
$result = $mysqli->query("SELECT rank_id FROM " . $dbprefix . "ranks WHERE autodisable != '0'");
while ($row = $result->fetch_assoc()) {
$arrRanks[] = $row['rank_id'];
}
$sqlRanks = "('" . implode("','", $arrRanks) . "')";
$result = $mysqli->query("SELECT * FROM " . $dbprefix . "members WHERE rank_id IN " . $sqlRanks . " AND onia = '0'");
while ($row = $result->fetch_assoc()) {
$member->select($row['member_id']);
$memberListInfo = $member->get_info();
$rankObj->select($row['rank_id']);
$memRankListInfo = $rankObj->get_info();
if (floor(time() / 86400) - floor($memberListInfo['datejoined'] / 86400) >= $memRankListInfo['autodisable']) {
$member->update(array("disabled", "disableddate"), array(1, $time));
$member->logAction("Disabled for failure to be promoted before " . $memRankListInfo['autodisable'] . " days.");
}
}
$rankCatObj = new RankCategory($mysqli);
$gameObj = new Game($mysqli);
$breadcrumbObj->setTitle("Members");
$breadcrumbObj->addCrumb("Home", $MAIN_ROOT);
$breadcrumbObj->addCrumb("Members");
include $prevFolder . "include/breadcrumb.php";
?>
<div id='tiltPhoneImg' style='display: none'><img src='<?php
echo $MAIN_ROOT;
?>
示例7: Member
*
*/
if (!isset($member) || substr($_SERVER['PHP_SELF'], -11) != "console.php") {
exit;
} else {
$memberInfo = $member->get_info();
$consoleObj->select($_GET['cID']);
if (!$member->hasAccess($consoleObj)) {
exit;
}
}
$cID = $_GET['cID'];
$memberObj = new Member($mysqli);
$rankObj = new Rank($mysqli);
$rankObj->select($memberInfo['rank_id']);
$rankInfo = $rankObj->get_info();
if ($memberInfo['promotepower'] != 0) {
$rankInfo['promotepower'] = $memberInfo['promotepower'];
} elseif ($memberInfo['promotepower'] == -1) {
$rankInfo['promotepower'] = 0;
}
if ($memberInfo['rank_id'] == 1) {
$highestOrderNum = $rankObj->getHighestOrderNum();
$rankObj->selectByOrder($highestOrderNum);
$powerRankInfo = $rankObj->get_info();
} else {
$rankObj->select($rankInfo['promotepower']);
$powerRankInfo = $rankObj->get_info();
}
if ($_POST['submit']) {
if (!$memberObj->select($_POST['member'])) {
示例8: array
$arrRanks = array();
$result = $mysqli->query("SELECT * FROM " . $dbprefix . "ranks WHERE ordernum <= '" . $maxRankInfo['ordernum'] . "' AND rank_id != '1' ORDER BY ordernum DESC");
while ($row = $result->fetch_assoc()) {
$arrRanks[] = $row['rank_id'];
}
// Check Member
$newRank = 0;
if (!$member->select($_POST['member']) || $_POST['member'] == $memberInfo['member_id']) {
$countErrors++;
$dispError = " <b>·</b> You selected an invalid member.<br>";
} elseif (!in_array($member->get_info("rank_id"), $arrRanks)) {
$countErrors++;
$dispError = " <b>·</b> You may not change the selected member's rank.<br>";
} else {
$rankObj->select($member->get_info("rank_id"));
$newRankOrder = $rankObj->get_info("ordernum") + 1;
$rankObj->selectByOrder($newRankOrder);
$newRank = $rankObj->get_info("rank_id");
}
// Check Rank
if (!in_array($newRank, $arrRanks)) {
$countErrors++;
$dispError = " <b>·</b> You may not promote this member any higher.<br>";
}
if ($countErrors == 0) {
$arrColumns = array("rank_id", "lastpromotion");
$arrValues = array($newRank, time());
$member->select($_POST['member']);
$rankObj->select($newRank);
$newRankInfo = $rankObj->get_info_filtered();
$rankObj->select($member->get_info("rank_id"));
示例9: Member
* 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";
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$rankObj = new Rank($mysqli);
if ($member->authorizeLogin($_SESSION['btPassword'])) {
$blnDispNone = true;
if (($_POST['action'] == "promote" || $_POST['action'] == "demote") && $member->select($_POST['mID'])) {
$rankObj->select($member->get_info("rank_id"));
if ($_POST['action'] == "promote") {
$nextRank = $rankObj->get_info("ordernum") + 1;
} else {
$nextRank = $rankObj->get_info("ordernum") - 1;
}
if ($nextRank != 1 && $rankObj->selectByOrder($nextRank)) {
$blnDispNone = false;
echo $rankObj->get_info_filtered("name");
}
}
if ($blnDispNone) {
echo "None";
}
} else {
echo "Error";
}
示例10: array
}
$membersOnlineCount = $result->num_rows;
$arrMembersOnline = array();
$arrRankCatCount = array();
$arrDispRankCat = array();
$result2 = $mysqli->query("SELECT rankcategory_id FROM " . $dbprefix . "rankcategory WHERE hidecat = '0' ORDER BY ordernum DESC");
while ($row = $result2->fetch_assoc()) {
$arrDispRankCat[$row['rankcategory_id']] = "";
$arrRankCatCount[$row['rankcategory_id']] = 0;
}
while ($row = $result->fetch_assoc()) {
$member->select($row['member_id']);
$arrMembersOnline[] = $member->getMemberLink();
if (constant('LOGGED_IN')) {
$rankObj->select($member->get_info("rank_id"));
$rankCat = $rankObj->get_info("rankcategory_id");
$arrRankCatCount[$rankCat] += 1;
}
}
$membersOnlineList = implode(", ", $arrMembersOnline);
// Get Page View Info
$totalPageViews = $mysqli->query("SELECT SUM(totalhits) FROM " . $dbprefix . "hitcounter");
$totalPageViews = $totalPageViews->fetch_array(MYSQLI_NUM);
$totalUniqueViews = $mysqli->query("SELECT DISTINCT ipaddress FROM " . $dbprefix . "hitcounter");
$totalYourViews = $mysqli->query("SELECT totalhits FROM " . $dbprefix . "hitcounter WHERE ipaddress = '" . $IP_ADDRESS . "'");
$totalYourViews = $totalYourViews->fetch_assoc();
$result = $mysqli->query("SELECT dateposted FROM " . $dbprefix . "hitcounter WHERE ipaddress = '" . $IP_ADDRESS . "' ORDER BY dateposted DESC LIMIT 1");
$lastVisitDate = $result->fetch_assoc();
if ($result->num_rows == 1) {
$dispLastVisitDate = "Your last visit was " . getPreciseTime($lastVisitDate['dateposted']) . ".";
} else {