当前位置: 首页>>代码示例>>PHP>>正文


PHP CP_Controller::__construct方法代码示例

本文整理汇总了PHP中CP_Controller::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP CP_Controller::__construct方法的具体用法?PHP CP_Controller::__construct怎么用?PHP CP_Controller::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CP_Controller的用法示例。


在下文中一共展示了CP_Controller::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     // Permissions
     if (!$this->cp->allowed_group('can_access_content', 'can_access_files')) {
         show_error(lang('unauthorized_access'));
     }
     $this->lang->loadfile('filemanager');
     $this->load->library('api');
     $this->load->library('filemanager');
     $this->load->model('file_model');
     $this->load->model('file_upload_preferences_model');
     $this->cp->add_to_head($this->view->head_link('css/file_browser.css'));
     // Get upload dirs
     $upload_dirs = $this->filemanager->fetch_upload_dirs(array('ignore_site_id' => FALSE));
     foreach ($upload_dirs as $row) {
         $this->_upload_dirs[$row['id']] = $row;
     }
     if (AJAX_REQUEST) {
         $this->output->enable_profiler(FALSE);
     }
     $nav['file_manager'] = BASE . AMP . 'C=content_files' . AMP . 'M=index';
     if ($this->cp->allowed_group('can_admin_upload_prefs')) {
         $nav['file_upload_preferences'] = BASE . AMP . 'C=content_files' . AMP . 'M=file_upload_preferences';
         $nav['watermark_prefs'] = BASE . AMP . 'C=content_files' . AMP . 'M=watermark_preferences';
         //$nav['batch_upload']	= BASE.AMP.'C=content_files'.AMP.'M=batch_upload';
     }
     $this->cp->set_right_nav($nav);
     $this->_base_url = BASE . AMP . 'C=content_files';
 }
开发者ID:realfluid,项目名称:umbaugh,代码行数:33,代码来源:content_files.php

示例2: __construct

 /**
  * Admin::__construct()
  * 
  * @return
  */
 public function __construct()
 {
     parent::__construct();
     $this->load->library('CP_auth');
     $this->load->model('admin/admin_model', 'admin');
     $this->session->set_flashdata('redirect', current_url());
 }
开发者ID:shartte,项目名称:fw_bs_webpage,代码行数:12,代码来源:admin.php

示例3: array

    /**
     * Constructor
     */
    function __construct()
    {
        parent::__construct();
        if (FALSE === ($this->id = $this->auth_id())) {
            show_error(lang('unauthorized_access'));
        }
        // Load the language files
        $this->lang->loadfile('myaccount');
        $this->lang->loadfile('member');
        $this->load->model('member_model');
        // Fetch username/screen name
        $query = $this->member_model->get_member_data($this->id, array('username', 'screen_name'));
        if ($query->num_rows() == 0) {
            show_error(lang('unauthorized_access'));
        }
        if ($this->cp->allowed_group('can_edit_html_buttons')) {
            $this->javascript->output('
				$("#myaccountHtmlButtonsLink").show(); // JS only feature, its hidden by default
			');
        }
        $this->view->message = '';
        $this->view->id = $this->id;
        $this->username = $query->row('screen_name') == '' ? $query->row('username') : $query->row('screen_name');
        $this->view->member_username = $this->username;
        // Set self_edit to determine whether or not someone else is editing
        $this->self_edit = (int) $this->id === (int) $this->session->userdata('member_id') ? TRUE : FALSE;
    }
开发者ID:nigelpeters,项目名称:css-recruitment-ee,代码行数:30,代码来源:myaccount.php

示例4:

 /**
  * Constructor
  *
  * @access	public
  */
 function __construct()
 {
     parent::__construct();
     if (!$this->cp->allowed_group('can_access_content')) {
         show_error(lang('unauthorized_access'));
     }
 }
开发者ID:kentonquatman,项目名称:iofa,代码行数:12,代码来源:content.php

示例5: __construct

 /**
  * Searchengine::__construct()
  * 
  * @return
  */
 public function __construct()
 {
     parent::__construct();
     $this->search_index = APPPATH . 'cache/search_index/index';
     $this->load->library('zend');
     $this->zend->load('Zend/Search/Lucene');
     Zend_Search_Lucene_Analysis_Analyzer::setDefault(new Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8());
 }
开发者ID:shartte,项目名称:fw_bs_webpage,代码行数:13,代码来源:searchengine.php

示例6: lang

 /**
  * Constructor
  */
 function __construct()
 {
     parent::__construct();
     $this->lang->loadfile('admin');
     $this->lang->loadfile('admin_content');
     $this->cp->set_breadcrumb(BASE . AMP . 'C=admin_content', lang('admin_content'));
     // Note- no access check here to allow the publish page access to categories
 }
开发者ID:realfluid,项目名称:umbaugh,代码行数:11,代码来源:admin_content.php

示例7:

 /**
  * Constructor
  *
  * @access	public
  */
 function __construct()
 {
     parent::__construct();
     if (!$this->cp->allowed_group('can_access_addons', 'can_access_plugins')) {
         show_error(lang('unauthorized_access'));
     }
     $this->lang->loadfile('admin');
 }
开发者ID:ayuinc,项目名称:laboratoria-v2,代码行数:13,代码来源:addons_plugins.php

示例8: __construct

 public function __construct()
 {
     parent::__construct();
     $this->load->library('CP_auth');
     $this->load->model('user/user_model', 'user');
     $this->load->model('admin/admin_model', 'admin');
     $this->load->helper('load_controller');
 }
开发者ID:shartte,项目名称:fw_bs_webpage,代码行数:8,代码来源:user_auth.php

示例9: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->load->library('accessories');
     $this->human_names = $this->_fetch_human_names();
     $this->load->library('addons');
     $files = $this->addons->get_files();
 }
开发者ID:kentonquatman,项目名称:iofa,代码行数:11,代码来源:addons_accessories.php

示例10: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     if (!$this->cp->allowed_group('can_access_tools', 'can_access_utilities')) {
         show_error(lang('unauthorized_access'));
     }
     $this->lang->loadfile('tools');
 }
开发者ID:realfluid,项目名称:umbaugh,代码行数:11,代码来源:tools_utilities.php

示例11:

 /**
  * Constructor
  */
 function __construct()
 {
     parent::__construct();
     if (!$this->cp->allowed_group('can_access_addons', 'can_access_modules')) {
         show_error(lang('unauthorized_access'));
     }
     $this->load->model('addons_model');
     $this->lang->loadfile('modules');
 }
开发者ID:nigelpeters,项目名称:css-recruitment-ee,代码行数:12,代码来源:addons_modules.php

示例12: __construct

 public function __construct()
 {
     parent::__construct();
     $this->load->library('CP_auth');
     // Berechtigungsprüfung TEIL 1: eingelogged und Admin
     if (!$this->cp_auth->is_logged_in_admin()) {
         redirect('admin', 'refresh');
     }
 }
开发者ID:shartte,项目名称:fw_bs_webpage,代码行数:9,代码来源:log.php

示例13: __construct

 /**
  * Maps::__construct()
  * 
  * @return
  */
 public function __construct()
 {
     parent::__construct();
     $this->api_key = 'AIzaSyCIdNCnXP0RCrhpGxjGuS_qZEnz7QCLns4';
     $this->lat_lng_1 = '50.143521';
     $this->lat_lng_2 = '8.502216';
     $this->zoom = '14';
     $this->_set_config();
 }
开发者ID:shartte,项目名称:fw_bs_webpage,代码行数:14,代码来源:maps.php

示例14: __construct

 /**
  * Maintenance::__construct()
  * 
  * @return
  */
 public function __construct()
 {
     parent::__construct();
     $this->load->model('maintenance/maintenance_model', 'maintain');
     $this->load->model('module/module_model', 'module');
     $this->load->library('CP_auth');
     $this->load->model('admin/admin_model', 'admin');
     $this->load->model('einsatz/einsatz_model', 'einsatz');
 }
开发者ID:shartte,项目名称:fw_bs_webpage,代码行数:14,代码来源:maintenance.php

示例15: __construct

 /**
  * Pages::__construct()
  * 
  * @return
  */
 public function __construct()
 {
     parent::__construct();
     $this->load->model('pages/pages_model', 'm_pages');
     $this->load->model('menue/menue_model', 'm_menue');
     $this->load->model('fahrzeug/fahrzeug_model', 'm_fahrzeug');
     $this->load->model('mannschaft/mannschaft_model', 'm_mannschaft');
     $this->load->library('weather');
     $this->load->helper('load_controller');
 }
开发者ID:shartte,项目名称:fw_bs_webpage,代码行数:15,代码来源:pages.php


注:本文中的CP_Controller::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。