function __construct($login_verify = true, $userTyp = 'a') { parent::__construct(); date_default_timezone_set("Asia/Shanghai"); P_Controller::Register(); $this->is_login = false; // $this->db = $this->cimongo; if (DB_TYPE == "MONGO") { $this->db = $this->cimongo; } else { } $this->force_lightbox = false; $this->load->helper('url'); $this->controller_name = $this->uri->segment(1) === false || $this->uri->segment(1) == "" ? 'index' : $this->uri->segment(1); $this->system_name = substr($this->controller_name, 0, 1); $this->method_name = $this->uri->segment(2) === false || $this->uri->segment(2) == "" ? 'index' : $this->uri->segment(2); if ($this->method_name == 'info') { $this->method_name = 'index'; } $this->searchInfo = array('t' => 'no'); $this->userTyp = $userTyp; $this->realLogin = $this->login; if ($login_verify) { $this->login_verify(true); $this->canEdit = $this->checkEditRule(); } else { $this->login_verify(false); } $this->title = array($this->config->item('base_title')); $this->perPage = 10; $this->cur_page = 1; }
function __construct() { parent::__construct(); date_default_timezone_set("Asia/Shanghai"); P_Controller::Register(); $this->db = $this->cimongo; $this->load->helper('url'); $this->controller_name = $this->uri->segment(1) === false || $this->uri->segment(1) == "" ? 'index' : $this->uri->segment(1); $this->method_name = $this->uri->segment(2) === false || $this->uri->segment(2) == "" ? 'index' : $this->uri->segment(2); if ($this->method_name == 'info') { $this->method_name = 'index'; } $this->searchInfo = array('t' => 'no'); $this->title = array($this->config->item('base_title')); $this->perPage = 10; $this->cur_page = 1; if ($this->login->is_login()) { $this->logined = true; } }