当前位置: 首页>>代码示例>>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;未经允许,请勿转载。