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


PHP CP_Controller類代碼示例

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


在下文中一共展示了CP_Controller類的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類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。