本文整理汇总了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';
}
示例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());
}
示例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;
}
示例4:
/**
* Constructor
*
* @access public
*/
function __construct()
{
parent::__construct();
if (!$this->cp->allowed_group('can_access_content')) {
show_error(lang('unauthorized_access'));
}
}
示例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());
}
示例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
}
示例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');
}
示例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');
}
示例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();
}
示例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');
}
示例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');
}
示例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');
}
}
示例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();
}
示例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');
}
示例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');
}