本文整理汇总了PHP中Rank::get_privileges方法的典型用法代码示例。如果您正苦于以下问题:PHP Rank::get_privileges方法的具体用法?PHP Rank::get_privileges怎么用?PHP Rank::get_privileges使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Rank
的用法示例。
在下文中一共展示了Rank::get_privileges方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
if ($checkMember) {
if ($member->authorizeLogin($_SESSION['btPassword'])) {
$LOGIN_FAIL = false;
$memberInfo = $member->get_info();
$_SESSION['lastConsoleCategory'] = array("catID" => $consoleInfo['consolecategory_id'], "exptime" => time() + 300);
// Check for IA
if ($memberInfo['onia'] == 1 && $cID != $consoleObj->findConsoleIDByName("Cancel IA")) {
$cancelIACID = $consoleObj->findConsoleIDByName("Cancel IA");
echo "\n\t\t\t\n\t\t\t\t<div id='iaMessage' style='display: none'>\n\t\t\t\t\t<p class='main' align='center'>You are currently Inactive!<br><br>While inactive, you do not have access to console options.<br><br><a href='" . $MAIN_ROOT . "members/console.php?cID=" . $cancelIACID . "'><b>Click Here</b></a> to become active again!</p>\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\tpopupDialog('Inactive Member', '" . $MAIN_ROOT . "members', 'iaMessage');\n\t\t\t\t</script>\n\t\t\t";
exit;
}
$memberRankID = $memberInfo['rank_id'];
define("MEMBERRANK_ID", $memberRankID);
$memberRank = new Rank($mysqli);
$memberRank->select($memberRankID);
$rankPrivileges = $memberRank->get_privileges();
if ($member->hasAccess($consoleObj) || $consoleInfo['pagetitle'] == "Manage Forum Posts" && !isset($_GET['noaccess'])) {
//$getClanInfo = $mysqli->query("SELECT * FROM ".$dbprefix."websiteinfo WHERE websiteinfo_id = '1'");
$arrClanInfo = $websiteInfo;
//$getClanInfo->fetch_assoc();
// Console Security
define("PREVENT_HACK", $arrClanInfo['preventhack']);
include $prevFolder . "include/breadcrumb.php";
if (isset($_GET['action']) && $_GET['action'] == "edit") {
echo "\n\t\t\t\t<p align='right' style='margin-bottom: 10px; margin-right: 20px;'>« <a href='" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "'>Go Back</a></p>\n\t\t\t\t";
} elseif (!isset($_GET['action'])) {
echo "\n\t\t\t\t<p align='right' style='margin-bottom: 20px; margin-right: 20px;'>« <a href='" . $MAIN_ROOT . "members/index.php?select=" . $consoleInfo['consolecategory_id'] . "' id='consoleTopBackButton'>Go Back</a></p>\n\t\t\t\t";
}
if (substr($consoleInfo['filename'], 0, strlen("../")) != "../") {
$include_file = "include/" . $consoleInfo['filename'];
} else {
示例2: array
function get_privileges()
{
$returnArr = array();
$filterArray = array();
$rankObj = new Rank($this->MySQL);
if ($this->intTableKeyValue != "") {
$rankObj->select($this->arrObjInfo['rank_id']);
$arrPrivileges = $rankObj->get_privileges();
$result = $this->MySQL->query("SELECT * FROM " . $this->MySQL->get_tablePrefix() . "console_members WHERE member_id = '" . $this->intTableKeyValue . "'");
while ($row = $result->fetch_assoc()) {
if ($row['allowdeny'] == 1 && !in_array($row['console_id'], $arrPrivileges)) {
$arrPrivileges[] = $row['console_id'];
} elseif ($row['allowdeny'] == 0 && in_array($row['console_id'], $arrPrivileges)) {
$key = array_search($row['console_id'], $arrPrivileges);
$arrPrivileges[$key] = 0;
}
}
}
return $arrPrivileges;
}