當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Controller\CommonController類代碼示例

本文整理匯總了PHP中Admin\Controller\CommonController的典型用法代碼示例。如果您正苦於以下問題:PHP CommonController類的具體用法?PHP CommonController怎麽用?PHP CommonController使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了CommonController類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     $common = new CommonController();
     if (!$common->checkStatus()) {
         $this->redirect('Common/login');
     }
 }
開發者ID:hardy419,項目名稱:P8,代碼行數:8,代碼來源:BaseController.class.php

示例2: __construct

 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);
 }
開發者ID:hardy419,項目名稱:20150804,代碼行數:13,代碼來源:BaseController.class.php

示例3: _initialize

 public function _initialize()
 {
     parent::_initialize();
     $this->opname = "會議室";
     $this->dbname = 'Meeting';
     //var_dump("123212312321321321");
 }
開發者ID:gaoge00,項目名稱:sii,代碼行數:7,代碼來源:MeetingController.class.php

示例4: _initialize

 public function _initialize()
 {
     parent::_initialize();
     $this->dbname = 'authrule';
     $this->opname = "權限管理";
     //123123213123123Test
 }
開發者ID:gaoge00,項目名稱:sii,代碼行數:7,代碼來源:AuthruleController.class.php

示例5: D

 function __construct()
 {
     parent::__construct();
     $this->db = D('Taxonomy');
     $this->moduleDb = D('Module');
     $this->dbName = 'taxonomy';
 }
開發者ID:bbing,項目名稱:TP-Admin-V2.0,代碼行數:7,代碼來源:TaxonomyController.class.php

示例6: _initialize

 public function _initialize()
 {
     parent::_initialize();
     $this->dbname = "user";
     $this->opname = "用戶";
     $this->selname = "uv_gettel";
 }
開發者ID:gaoge00,項目名稱:sii,代碼行數:7,代碼來源:TelnotebooksController.class.php

示例7: _initialize

 public function _initialize()
 {
     $cate = new CategoryApi();
     $catelist = $cate->get_catelist(0, 1);
     $this->assign('clist', $catelist);
     parent::_initialize();
 }
開發者ID:Willshon,項目名稱:OLCS,代碼行數:7,代碼來源:ArticleController.class.php

示例8: __construct

 public function __construct()
 {
     parent::__construct();
     //$this->shop = $this->getShop();
     $this->group = $this->getUserGroup();
     //  dump($this->getUserGroup());
 }
開發者ID:quguo,項目名稱:wxpt,代碼行數:7,代碼來源:SystemController.class.php

示例9: _initialize

 /**
  * 權限控製,默認為查看 view
  */
 public function _initialize()
 {
     parent::_initialize();
     //權限判斷
     if (user_info('roleid') != 1 && strpos(ACTION_NAME, 'public_') === false) {
         $category_priv_db = M('category_priv');
         $tmp = explode('_', ACTION_NAME, 1);
         $action = strtolower($tmp[0]);
         unset($tmp);
         $auth = dict('auth', 'Category');
         //權限列表
         if (!in_array($action, array_keys($auth))) {
             $action = 'view';
         }
         $catid = I('get.catid', 0, 'intval');
         $roleid = user_info('roleid');
         $info = $category_priv_db->where(array('catid' => $catid, 'roleid' => $roleid, 'action' => $action))->count();
         if (!$info) {
             //兼容iframe加載
             if (IS_GET && strpos(ACTION_NAME, '_iframe') !== false) {
                 exit('<style type="text/css">body{margin:0;padding:0}</style><div style="padding:6px;font-size:12px">您沒有權限操作該項</div>');
             }
             //普通返回
             if (IS_AJAX && IS_GET) {
                 exit('<div style="padding:6px">您沒有權限操作該項</div>');
             } else {
                 $this->error('您沒有權限操作該項');
             }
         }
     }
 }
開發者ID:easytp,項目名稱:easytp,代碼行數:34,代碼來源:ContentController.class.php

示例10: __construct

 public function __construct()
 {
     parent::__construct();
     $this->assign("sidebar_active", array("Course", "index"));
     $this->_page_location = __APP__ . '?s=Course/index';
     $this->assign("classlist", $this->_course_class);
 }
開發者ID:imbzd,項目名稱:sessdw,代碼行數:7,代碼來源:CourseController.class.php

示例11: __construct

 public function __construct()
 {
     parent::__construct();
     $this->_page_location = __APP__ . '?s=User/index';
     $this->_course_class = CR('Course')->_course_class;
     $this->assign('courseclass', $this->_course_class);
 }
開發者ID:imbzd,項目名稱:sessdw,代碼行數:7,代碼來源:UserController.class.php

示例12: D

 function __construct()
 {
     parent::__construct();
     $this->db = D("Content");
     $this->model_db = D("Model");
     $this->category_db = D("Category");
 }
開發者ID:RocherKong,項目名稱:518ESHOP,代碼行數:7,代碼來源:ContentController.class.php

示例13: D

 function __construct()
 {
     parent::__construct();
     $this->db = D("Model");
     $this->fieldDb = D("ModelField");
     $this->modelTypes = $this->db->getModelTypes();
 }
開發者ID:9618211,項目名稱:TP-Admin-V2.0,代碼行數:7,代碼來源:ModelController.class.php

示例14: __construct

 public function __construct()
 {
     parent::__construct();
     $this->assign("sidebar_active", array("Testing", "index"));
     $this->_page_location = __APP__ . '?s=Testing/index';
     $this->assign("examtype", $this->_exam_type);
 }
開發者ID:imbzd,項目名稱:sessdw,代碼行數:7,代碼來源:TestingController.class.php

示例15: _initialize

 /**
  * 對應權限如下:
  * view 查看 | add 添加 | edit 編輯 | delete 刪除 | order 排序
  * 
  * TODO 現在時間上來不及完善此功能,暫時先屏蔽
  */
 public function _initialize()
 {
     parent::_initialize();
     //權限判斷
     if (session('roleid') != 1 && ACTION_NAME != 'index' && strpos(ACTION_NAME, 'public_') === false) {
         $category_priv_db = M('category_priv');
         $tmp = explode('_', ACTION_NAME);
         $action = strtolower($tmp[0]);
         unset($tmp);
         if (!in_array($action, array('view', 'add', 'edit', 'delete', 'order', 'export', 'import'))) {
             $action = 'view';
         }
         $catid = I('get.catid', 0, 'intVal');
         $roleid = session('roleid');
         $info = $category_priv_db->where(array('catid' => $catid, 'roleid' => $roleid, 'is_admin' => 1, 'action' => $action))->count();
         if (!$info) {
             //兼容iframe加載
             if (IS_GET && strpos(ACTION_NAME, '_iframe') !== false) {
                 exit('<style type="text/css">body{margin:0;padding:0}</style><div style="padding:6px;font-size:12px">您沒有權限操作該項</div>');
             }
             //普通返回
             if (IS_AJAX && IS_GET) {
                 exit('<div style="padding:6px">您沒有權限操作該項</div>');
             } else {
                 $this->error('您沒有權限操作該項');
             }
         }
     }
 }
開發者ID:huangxulei,項目名稱:app,代碼行數:35,代碼來源:ContentController.class.php


注:本文中的Admin\Controller\CommonController類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。