博客列表 >php权限

php权限

你微笑時好美丶的博客
你微笑時好美丶的博客原创
2018年09月05日 15:28:34769浏览

public function powerEdit(){

$group_id = $this->md->getAuthInfo('group_id');

$group_keys = $this->m_group->where('id='.$group_id)->getField('group_keys');

$id=I('id','','int');

$baoxiu_id = $this->m_group->where('id='.$id)->getField('baoxiu');

$id = I('id',0,'int');

$baoxiu = array(

'1'=>'教室维修','2'=>'供电维修',

'3'=>'木瓦维修','4'=>'生活维修',

'5'=>'供水维修','6'=>'供暖维修',

'7' => '网络维修',

);

$dataInfo = $this->m_group->find($id);

$this->assign('dataInfo',$dataInfo);

$subNav = C('NAV');

$this->assign('subNav',$subNav);

$this->assign('baoxiu',$baoxiu);

$this->assign('baoxiu_id',$baoxiu_id);

$this->display();

}

public function powerSave(){

$temp = $this->m_group->create();

$temp['group_keys'] = implode(',',$temp['group_keys']);

$temp['baoxiu'] = implode(',',$temp['baoxiu']);

if($temp['id']){

$this->m_group->save($temp);

$this->success($GLOBALS['notice']['success'][2],U('User/power'));

}else{

   $result = $this->m_group->add($temp);

if($result)$this->success('增加完毕',U('User/power'));

else $this->success('增加失败');

}

}

public function powerDel(){

$id = I('id',0,'int');

if ($this->m_group->delete($id)){

$this->success($GLOBALS['notice']['success'][1]);

}else{

$this->error($GLOBALS['notice']['error'][1]);

}

    }


声明:本文内容转载自脚本之家,由网友自发贡献,版权归原作者所有,如您发现涉嫌抄袭侵权,请联系admin@php.cn 核实处理。
全部评论
文明上网理性发言,请遵守新闻评论服务协议