Exemplo n.º 1
0
 public function _initialize()
 {
     header("Content-Type:text/html; charset=utf-8");
     import('ORG.Util.Authority');
     //加载类库
     $auth = new Authority();
     //后台 admin_name
     $uid = $this->_session('admin_uid');
     $user = $this->_session('admin_name');
     $prompt = $uid ? "你没有权限" : "请登陆";
     $url = $uid ? "" : "__ROOT__/Admin/Logo.html";
     if ($user != "admin") {
         if (!$auth->getAuth(GROUP_NAME . '/' . MODULE_NAME . '/' . ACTION_NAME, $uid)) {
             //echo $user;
             $this->error($prompt, $url);
         }
     }
     $system = $this->systems();
     $this->assign('s', $system);
 }