Ejemplo n.º 1
0
 public function beforeRun($resource, $action)
 {
     parent::beforeRun($resource, $action);
     $this->_action = $action;
     $this->init();
 }
Ejemplo n.º 2
0
 public function beforeRun($resource, $action)
 {
     header("Content-type:text/html;charset=utf-8");
     parent::beforeRun($resource, $action);
     Doo::loadClassAt('User', 'default');
     $this->_user = new User(DBproxy::getManage());
     $this->_pageAuth = new PageAuth();
     $this->_action = $action;
     if ($this->_checkIsLogin) {
         if (!$this->_user->isLogin()) {
             $this->notLoginPage();
             exit;
         }
     } else {
         $this->_checkPageAuth = TRUE;
         // 关闭登录验证时,自动关闭页面权限验证
     }
     if ($this->_checkPageAuth) {
         $this->_currentPageAuth = isset($this->_checkActionAuthList[$action]) ? $this->_checkActionAuthList[$action] : $this->_checkActionAuthList['notauth'];
         if (!$this->_pageAuth->auth($this->_currentPageAuth)) {
             $this->notAuthPage();
             exit;
         }
     }
     $this->_pageTitle = Doo::conf()->siteName;
     $this->_opname = $this->_user->getUsername();
     $this->init();
 }