Exemple #1
0
 /**
  * 设置权限
  */
 public function setAuth()
 {
     $id = $this->isG('id', '请提交用户组');
     $record = [];
     $recordList = \Model\Content::listContent(['table' => 'node_group', 'condition' => 'user_group_id = :user_group_id', 'param' => ['user_group_id' => $id]]);
     if (!empty($recordList)) {
         foreach ($recordList as $value) {
             $record[] = $value['node_id'];
         }
     }
     $this->assign('record', json_encode($record));
     $this->assign('list', \Model\Node::nodeList());
     $this->assign('prefix', 'node_');
     $this->display('User_group_setting');
 }
 /**
  * 设置节点
  */
 public function setNode()
 {
     $id = $this->isG('id', '请选择用户组');
     $group = \Model\Content::findContent('user_group', $id, 'user_group_id');
     if (empty($group)) {
         $this->error('用户组不存在');
     }
     $nodeList = $this->db('node_group')->where('user_group_id = :user_group_id')->select(array('user_group_id' => $id));
     foreach ($nodeList as $key => $value) {
         $groupNode[] = $value['node_id'];
     }
     $this->assign('groupNode', $groupNode);
     $this->assign($group);
     $this->assign('node', \Model\Node::nodeList());
     $this->assign('title', "设置'{$group['user_group_name']}'用户组权限节点");
     $this->layout();
 }
Exemple #3
0
 public function index()
 {
     $this->assign('node', \Model\Node::nodeList());
     $this->layout();
 }
Exemple #4
0
 public function index()
 {
     $this->assign('title', $this->model['model_title']);
     $this->assign('node', \Model\Node::nodeList());
     $this->layout();
 }
 public function index()
 {
     $this->assign('node', \Model\Node::nodeList());
     parent::index();
 }