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


PHP Admin_Controller::is_loaded方法代码示例

本文整理汇总了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();
         }
     }
 }
开发者ID:adamendvy89,项目名称:pandawa,代码行数:29,代码来源:Admin_Controller.php

示例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();
         }
     }
 }
开发者ID:roxio,项目名称:MyClientBase-SB,代码行数:41,代码来源:Admin_Controller.php


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