本文整理汇总了PHP中member::isAdmin方法的典型用法代码示例。如果您正苦于以下问题:PHP member::isAdmin方法的具体用法?PHP member::isAdmin怎么用?PHP member::isAdmin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类member
的用法示例。
在下文中一共展示了member::isAdmin方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: hasAccess
/**
*
* @param type $who
* @param type $whom
* @return boolean
*/
public function hasAccess($who, $whom)
{
//accessArray
$accessArray = array(12, 13, 15, 16, 0, 17, 1, 2);
////This contains the relation which have access over each other
//Basic things. User can edit is own information.
if ($who === $whom) {
return true;
}
//Make a check if the person is admin
$mclass = new member($who);
if ($mclass->isAdmin()) {
//The person suggesting is admin. Just do it. :P
return true;
}
$relation = $this->calculateRelation($who, $whom);
if (in_array($relation, $accessArray)) {
return true;
} else {
return false;
}
}
示例2: dirname
<?php
/**
* @package iCMS
* @copyright 2007-2010, iDreamSoft
* @license http://www.idreamsoft.com iDreamSoft
* @author coolmoo <idreamsoft@qq.com>
*/
require_once dirname(__FILE__) . '/../global.php';
define('__ADMINCP__', __SELF__ . '?mo');
error_reporting(E_ALL ^ E_NOTICE);
iCMS_DB::$show_errors = true;
require_once iPATH . 'include/member.class.php';
require_once iPATH . 'include/forum.class.php';
require_once iPATH . 'admin/function.php';
require_once iPATH . 'admin/admincp.lang.php';
require_once iPATH . 'include/UI.class.php';
require_once iPATH . 'admin/menu.class.php';
require_once iPATH . 'admin/admincp.class.php';
//admincp_log();
if ($_POST['action'] == "login") {
ckseccode($_POST['seccode'], 'B') && javascript::alert("验证码错误!", 'js:parent.$("#seccodeimg").click();');
}
member::$isAdmin = true;
member::checklogin();
member::MP("ADMINCP", "ADMINCP_Permission_Denied");