コード例 #1
0
ファイル: BaseController.class.php プロジェクト: hardy419/P8
 public function __construct()
 {
     parent::__construct();
     $common = new CommonController();
     if (!$common->checkStatus()) {
         $this->redirect('Common/login');
     }
 }
コード例 #2
0
 public function __construct()
 {
     parent::__construct();
     $common = new CommonController();
     if (!$common->checkStatus()) {
         $this->redirect('Common/login');
     }
     if (!$common->checkPrivilege()) {
         $this->error('你所在的用戶組沒有此權限');
     }
     $this->lang = I('cookie.lang', 'en');
     $this->assign('lang', $this->lang);
 }