本文整理汇总了PHP中Admin_Controller::is_loaded方法的典型用法代码示例。如果您正苦于以下问题:PHP Admin_Controller::is_loaded方法的具体用法?PHP Admin_Controller::is_loaded怎么用?PHP Admin_Controller::is_loaded使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Admin_Controller
的用法示例。
在下文中一共展示了Admin_Controller::is_loaded方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: redirect
function __construct()
{
parent::__construct();
$this->load->library('session');
$this->load->helper('url');
$user_id = $this->session->userdata('user_id');
if (!$user_id) {
redirect('sessions/login');
}
if (!isset(self::$is_loaded)) {
self::$is_loaded = TRUE;
$this->load->config('mcb_menu/mcb_menu');
modules::run('mcb_menu/check_permission', $this->uri->uri_string(), $this->session->userdata('global_admin'));
$this->load->database();
$this->load->helper(array('uri', 'mcb_currency', 'mcb_invoice', 'mcb_date', 'mcb_icon', 'mcb_custom', 'mcb_app', 'mcb_invoice_amount', 'mcb_invoice_item', 'mcb_invoice_payment', 'mcb_numbers'));
$this->load->model(array('mcb_modules/mdl_mcb_modules', 'mcb_data/mdl_mcb_data', 'mcb_data/mdl_mcb_userdata'));
$this->mdl_mcb_modules->set_module_data();
$this->mdl_mcb_data->set_session_data();
$this->mdl_mcb_userdata->set_session_data($user_id);
$this->mdl_mcb_modules->load_custom_languages();
$this->load->language('mcb', $this->mdl_mcb_data->setting('default_language'));
$this->load->model('fields/mdl_fields');
$this->load->library(array('form_validation', 'redir'));
$this->form_validation->set_error_delimiters('<div class="error">', '</div>');
if ($this->mdl_mcb_data->setting('enable_profiler')) {
$this->output->enable_profiler();
}
}
}
示例2: __construct
public function __construct()
{
parent::__construct();
//$a = get_class($this);
$this->load->helper('url');
$this->load->driver('plenty_parser');
//validate login
$user_id = $this->session->userdata('user_id');
if (!$user_id) {
redirect('sessions/login');
}
//this check is required to increase security in a multi hosting environment where different urls
//point to different installations of MCBSB
//the current base_url has to match the value stored in session
$this->load->config('mcbsb');
if ($this->config->item('validate_url')) {
$authenticated_for_url = $this->session->userdata('authenticated_for_url');
if ($authenticated_for_url != base_url()) {
redirect('sessions/logout');
}
}
if (!isset(self::$is_loaded)) {
self::$is_loaded = TRUE;
$this->load->config('mcb_menu/mcb_menu');
$this->load->database();
$this->load->helper(array('uri', 'mcb_currency', 'mcb_invoice', 'mcb_date', 'mcb_icon', 'mcb_custom', 'mcb_app', 'mcb_invoice_amount', 'mcb_invoice_item', 'mcb_invoice_payment', 'mcb_numbers'));
$this->load->model(array('mcb_modules/mdl_mcb_modules', 'mcb_data/mdl_mcb_data', 'mcb_data/mdl_mcb_userdata'));
modules::run('mcb_menu/check_permission', $this->uri->uri_string(), $this->session->userdata('global_admin'));
$this->mdl_mcb_modules->set_module_data();
$this->mdl_mcb_data->set_session_data();
$this->mdl_mcb_userdata->set_session_data($user_id);
$this->mdl_mcb_modules->load_custom_languages();
$this->load->language('mcb', $this->mdl_mcb_data->setting('default_language'));
$this->load->model('fields/mdl_fields');
$this->load->library(array('form_validation', 'redir'));
$this->form_validation->set_error_delimiters('<div class="error">', '</div>');
if ($this->mdl_mcb_data->setting('enable_profiler')) {
$this->output->enable_profiler();
}
}
}