Esempio n. 1
0
 function add($id = null)
 {
     $model = $this->commonmodel->getByPk($id, $this->table);
     $this->inner['model'] = (array) $model;
     $this->index_view = 'region/add';
     parent::add();
 }
 public function add()
 {
     $rules = M('AuthRule')->where(array('status' => 1))->select();
     $group = M('AuthRuleGroup')->select();
     foreach ($group as $key => $row) {
         foreach ($rules as $k => $r) {
             if ($r['category'] == $row['id']) {
                 $group[$key]['child'][] = $r;
             }
         }
     }
     // 		dump($group);
     $this->assign('rules', $group);
     parent::add('AuthGroup');
 }
 public function add()
 {
     $group = M('AuthRuleGroup')->select();
     $this->assign('group', $group);
     parent::add();
 }