|
|
|
@ -265,7 +265,7 @@ class AuthManagerController extends AdminController{
|
|
|
|
|
}else{
|
|
|
|
|
$ids = $_REQUEST['id'];
|
|
|
|
|
}
|
|
|
|
|
$lr = M("AuthGroup")->field('title,status')->where("id in ({$ids})")->select();
|
|
|
|
|
$lr = SM("AuthGroup")->field('title,status')->where("id in ({$ids})")->select();
|
|
|
|
|
$status = 0;
|
|
|
|
|
$op_name ='';
|
|
|
|
|
$op_type =1;
|
|
|
|
@ -309,7 +309,7 @@ class AuthManagerController extends AdminController{
|
|
|
|
|
"status"=>$status
|
|
|
|
|
];
|
|
|
|
|
// dd($savedata);
|
|
|
|
|
$res = D("AuthGroup")->where("id in ({$ids})")->syncSave($savedata);
|
|
|
|
|
$res = SM("AuthGroup")->where("id in ({$ids})")->save($savedata);
|
|
|
|
|
if($res !==false ){
|
|
|
|
|
$this->success($msg['success'],$msg['url'],$msg['ajax']);
|
|
|
|
|
}else{
|
|
|
|
@ -329,14 +329,14 @@ class AuthManagerController extends AdminController{
|
|
|
|
|
$this->error('参数错误');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$auth_group = M('AuthGroup')->where( array('status'=>array('egt','0'),'module'=>'admin','type'=>AuthGroupModel::TYPE_ADMIN) )
|
|
|
|
|
$auth_group = SM('AuthGroup')->where( array('status'=>array('egt','0'),'module'=>'admin','type'=>AuthGroupModel::TYPE_ADMIN) )
|
|
|
|
|
->getfield('id,id,title,rules');
|
|
|
|
|
$prefix = C('DB_PREFIX');
|
|
|
|
|
$l_table = $prefix.(AuthGroupModel::MEMBER);
|
|
|
|
|
$r_table = $prefix.(AuthGroupModel::AUTH_GROUP_ACCESS);
|
|
|
|
|
$model = M()->table( $l_table.' m' )->join ( $r_table.' a ON m.uid=a.uid' );
|
|
|
|
|
$model = SM()->table( $l_table.' m' )->join ( $r_table.' a ON m.uid=a.uid' );
|
|
|
|
|
$_REQUEST = array();
|
|
|
|
|
$list = $this->lists($model,array('a.group_id'=>$group_id,'m.status'=>array('egt',0)),'m.uid asc','m.uid,m.nickname,m.last_login_time,m.last_login_ip,m.status');
|
|
|
|
|
$list = $this->lists($model,array('a.group_id'=>$group_id,'m.status'=>array('egt',0)),'m.uid asc','m.uid,m.nickname,m.last_login_time,m.last_login_ip,m.status',true,true);
|
|
|
|
|
int_to_string($list);
|
|
|
|
|
$this->assign( '_list', $list );
|
|
|
|
|
$this->assign('auth_group', $auth_group);
|
|
|
|
@ -408,7 +408,7 @@ class AuthManagerController extends AdminController{
|
|
|
|
|
}
|
|
|
|
|
$AuthGroup = D('AuthGroup');
|
|
|
|
|
if(is_numeric($uid)){
|
|
|
|
|
if ( is_administrator($uid) ) {
|
|
|
|
|
if ( $uid == 1 ) {
|
|
|
|
|
$this->error('该用户为超级管理员');
|
|
|
|
|
}
|
|
|
|
|
if( !M('Member')->where(array('uid'=>$uid))->find() ){
|
|
|
|
|