コード例 #1
0
ファイル: region.php プロジェクト: ravinderphp/landlordv2
 function add($id = null)
 {
     $model = $this->commonmodel->getByPk($id, $this->table);
     $this->inner['model'] = (array) $model;
     $this->index_view = 'region/add';
     parent::add();
 }
コード例 #2
0
 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');
 }
コード例 #3
0
 public function add()
 {
     $group = M('AuthRuleGroup')->select();
     $this->assign('group', $group);
     parent::add();
 }