thinkphp关于简单的权限判定方法
时间:2017-11-22 16:41:29|栏目:ThinkPHP|点击: 次
实例如下:
<li>
<label>权限</label>
<cite>
<input name="MB_right" type="radio" value="1" checked="checked">超级管理员
<input name="MB_right" type="radio" value="0">普通管理员
</cite>
</li>
//权限判定
if($_SESSION ['adminqx']<>'1'){
if($czmc<>'main'&&$czmc<>'df1'&&$czmc<>'top'&&$czmc<>'left'&&$czmc<>'userlist'&&$czmc<>'team'&&$czmc<>'rggl'&&$czmc<>'getTreeso'&&$czmc<>'getTree'&&$czmc<>'get_childs'&&$czmc<>'getTreeInfo'&&$czmc<>'getTreeBaseInfo'&&$czmc<>'userbtc'&&$czmc<>'jbzs'){
$this->error('您暂无权限操作!','/laike.php/Home/Index/df1');die;
}
}