本文整理汇总了PHP中CP_Controller类的典型用法代码示例。如果您正苦于以下问题:PHP CP_Controller类的具体用法?PHP CP_Controller怎么用?PHP CP_Controller使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CP_Controller类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16:
/**
* Constructor
*/
function __construct()
{
parent::__construct();
if (!$this->cp->allowed_group('can_access_tools', 'can_access_logs')) {
show_error(lang('unauthorized_access'));
}
$this->load->model('tools_model');
$this->lang->loadfile('tools');
$this->load->vars(array('controller' => 'tools/tools_logs'));
}
开发者ID:realfluid,项目名称:umbaugh,代码行数:13,代码来源:tools_logs.php
示例17: __construct
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
// Can't access addons? Can't see this page!
if (!$this->cp->allowed_group('can_access_addons')) {
show_error(lang('unauthorized_access'));
}
$this->lang->loadfile('addons');
$this->load->model('addons_model');
}
开发者ID:kentonquatman,项目名称:iofa,代码行数:13,代码来源:addons.php
示例18: __construct
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->perpage = $this->config->item('memberlist_row_limit');
if (!$this->cp->allowed_group('can_access_members')) {
show_error(lang('unauthorized_access'));
}
$this->lang->loadfile('members');
$this->load->model('member_model');
}
开发者ID:kentonquatman,项目名称:canyonwoodridge,代码行数:13,代码来源:members.php
示例19: __construct
public function __construct()
{
parent::__construct();
$this->load->library('CP_auth');
$this->load->model('module/module_model', 'module');
$this->load->model('admin/admin_model', 'admin');
// Berechtigungsprüfung TEIL 1: eingelogged und Admin
if (!$this->cp_auth->is_logged_in_admin()) {
redirect('admin', 'refresh');
}
$this->session->set_flashdata('redirect', current_url());
}
开发者ID:shartte,项目名称:fw_bs_webpage,代码行数:12,代码来源:module_admin.php
示例20:
/**
* Constructor
*/
function __construct()
{
parent::__construct();
if (!$this->cp->allowed_group('can_access_tools', 'can_access_comm')) {
show_error(lang('unauthorized_access'));
}
if (file_exists(PATH_MOD . 'mailinglist/mod.mailinglist.php') && $this->db->table_exists($this->db->dbprefix . 'mailing_lists') === TRUE) {
$this->mailinglist_exists = TRUE;
}
$this->load->model('communicate_model');
$this->lang->loadfile('communicate');
}
开发者ID:nigelpeters,项目名称:css-recruitment-ee,代码行数:15,代码来源:tools_communicate.php
注:本文中的CP_Controller类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论