本文整理匯總了PHP中M_Controller::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP M_Controller::__construct方法的具體用法?PHP M_Controller::__construct怎麽用?PHP M_Controller::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類M_Controller
的用法示例。
在下文中一共展示了M_Controller::__construct方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* 構造函數
* @access public
* @return void
*/
public function __construct()
{
parent::__construct();
$this->load->model('mdl_member');
$this->load->library('email');
$this->this_view_data['_js'][] = 'jquery.form';
}
示例2: __construct
/**
* 構造函數
*
* @access public
* @return void
*/
public function __construct()
{
parent::__construct();
$this->load->model('Mdl_user');
$this->load->model('Mdl_grade');
$this->this_view_data['grade_data'] = $this->Mdl_grade->my_selects();
}
示例3: __construct
/**
* 構造函數
*/
public function __construct()
{
parent::__construct();
$this->data_field = $this->field = array('name' => array('ismain' => 1, 'fieldname' => 'name', 'fieldtype' => 'Text', 'setting' => array('option' => array('width' => 273), 'validate' => array('required' => 1))));
$this->data_field['displayorder'] = array('ismain' => 1, 'fieldname' => 'displayorder', 'fieldtype' => 'Text', 'setting' => array('option' => array('width' => 40, 'value' => '0')));
$this->load->model('format_model');
}
示例4: __construct
/**
* 構造函數
*/
public function __construct()
{
parent::__construct();
$this->space = $this->get_cache('member', 'setting', 'space');
define('SPACE_URL', $this->space['domain'] ? 'http://' . $this->space['domain'] . '/' : SITE_URL . 'space/');
define('SPACE_THEME_PATH', SPACE_URL . 'statics/' . SITE_THEME . '/');
}
示例5: __construct
/**
* 構造函數(網站表單)
*/
public function __construct()
{
parent::__construct();
$name = str_replace('form_', '', $this->router->class);
// 表單參數為數字時按id讀取
if (is_numeric($name)) {
$this->form = $this->get_cache('form-' . SITE_ID, $name);
} else {
$this->form = $this->get_cache('form-name-' . SITE_ID, $name);
}
if (!$this->form) {
if (!IS_ADMIN) {
exit($this->call_msg(lang('m-304')));
} elseif (IS_AJAX) {
exit(dr_json(0, lang('247')));
} else {
$this->admin_msg(lang('247'));
}
}
$this->load->model('form_model');
if (IS_ADMIN) {
$this->field = array('inputtime' => array('name' => lang('104'), 'ismain' => 1, 'fieldtype' => 'Date', 'fieldname' => 'inputtime', 'setting' => array('option' => array('width' => 140), 'validate' => array('required' => 1, 'formattr' => ''))), 'inputip' => array('name' => lang('106'), 'ismain' => 1, 'fieldname' => 'inputip', 'fieldtype' => 'Text', 'setting' => array('option' => array('width' => 157, 'value' => $this->input->ip_address()), 'validate' => array('formattr' => ' /><input type="button" class="button" value="' . lang('107') . '" onclick="dr_dialog_ip(\'inputip\')" name="ip"'))));
$this->uriprefix = 'admin/form_' . $this->form['table'] . '/';
}
}
示例6: __construct
/**
* 構造函數
*/
public function __construct()
{
parent::__construct();
$this->type = array(0 => lang('128'), 1 => lang('html-010'));
$this->template->assign('type', $this->type);
$this->template->assign('menu', $this->get_menu(array(lang('124') => 'admin/urlrule/index', lang('add') => 'admin/urlrule/add')));
}
示例7: __construct
/**
* 構造函數
*/
public function __construct()
{
parent::__construct();
$this->template->assign('menu', $this->get_menu(array(lang('190') => 'admin/mail/index', lang('206') => 'admin/mail/add_js', lang('325') => 'admin/mail/send', lang('112') => 'admin/mail/log')));
// 緩存文件名稱
$this->cache_file = md5('sendmail' . $this->uid . $this->input->ip_address() . $this->input->user_agent());
}
示例8: __construct
/**
* 構造函數
*/
public function __construct()
{
parent::__construct();
$use = $menu = array();
$data = explode(',', SITE_NAVIGATOR);
$this->type = (int) $this->input->get('type');
foreach ($data as $i => $name) {
if ($name) {
$use[$i] = $i;
$menu[$name] = 'admin/navigator/index' . (isset($_GET['type']) || $i ? '/type/' . $i : '');
$this->menu[$i] = $name;
}
}
// 設置默認選中
if (!isset($use[$this->type])) {
$this->type = @reset($use);
$_SERVER['QUERY_STRING'] .= '&type=' . $this->type;
}
// 帶分類參數時的選中
if (isset($_GET['pid'])) {
$_SERVER['QUERY_STRING'] = str_replace('&pid=' . $_GET['pid'], '', $_SERVER['QUERY_STRING']);
}
// 存在導航配置時才顯示添加鏈接
if ($this->menu) {
$menu[lang('add')] = 'admin/navigator/add/type/' . $this->type;
}
$this->template->assign('menu', $this->get_menu($menu));
$this->template->assign('name', $this->menu[$this->type]);
// 導航默認字段
$this->field = array('name' => array('ismain' => 1, 'fieldname' => 'name', 'fieldtype' => 'Text', 'setting' => array('option' => array('width' => 200))), 'title' => array('ismain' => 1, 'fieldname' => 'title', 'fieldtype' => 'Text', 'setting' => array('option' => array('width' => 300))), 'url' => array('name' => '', 'ismain' => 1, 'fieldname' => 'url', 'fieldtype' => 'Text', 'setting' => array('option' => array('width' => 400, 'value' => 'http://'))), 'thumb' => array('ismain' => 1, 'fieldname' => 'thumb', 'fieldtype' => 'File', 'setting' => array('option' => array('ext' => 'jpg,gif,png', 'size' => 10))));
$this->load->model('page_model');
$this->load->model('navigator_model');
}
示例9: __construct
/**
* 構造函數
*/
public function __construct()
{
parent::__construct();
$this->template->assign(array('menu' => $this->get_menu(array(lang('060') => 'admin/site/index', lang('add') => 'admin/site/add_js', lang('061') => isset($_GET['id']) && $_GET['id'] ? 'admin/site/config/id/' . (int) $_GET['id'] : 'admin/site/config'))));
$this->load->model('site_model');
$this->load->library('dconfig');
}
示例10: __construct
/**
* 構造函數
*/
public function __construct()
{
parent::__construct();
$this->_menu = array(lang('073') => 'admin/module/index', lang('086') => 'admin/module/store');
$this->template->assign(array('menu' => $this->get_menu($this->_menu), 'duri' => $this->duri));
$this->load->model('module_model');
}
示例11: __construct
/**
* 構造函數
*/
public function __construct()
{
parent::__construct();
$this->_is_space();
$this->thumb = array(array('ismain' => 1, 'fieldtype' => 'File', 'fieldname' => 'thumb', 'setting' => array('option' => array('size' => 10, 'ext' => 'jpg,gif,png'))));
$this->load->model('space_category_model');
}
示例12: Ajax
public function Ajax()
{
parent::__construct();
if ($this->config->item('ajax_security') !== $this->input->post('ajax_security')) {
die('No Access Allowed');
}
}
示例13: __construct
/**
* 構造函數
*/
public function __construct()
{
parent::__construct();
$this->template->assign('menu', $this->get_menu(array(lang('cat-00') => APP_DIR . '/admin/category/index', lang('258') => APP_DIR . '/admin/category/url', lang('add') => APP_DIR . '/admin/category/add')));
$this->thumb = array(array('name' => lang('cat-18'), 'ismain' => 1, 'fieldtype' => 'File', 'fieldname' => 'thumb', 'setting' => array('option' => array('ext' => 'jpg,gif,png', 'size' => 10))));
$this->load->model('category_model');
}
示例14: __construct
/**
* 構造函數
*/
public function __construct()
{
parent::__construct();
if (!$this->admin) {
$this->admin_msg('登錄超時,請重新登錄', 'index.php?c=login', 0);
}
$this->template->assign('menu', $this->get_menu(array('首頁' => 'home/index', '網站搬家' => 'home/move', '網站升級' => 'home/update', '管理員密碼' => 'home/password', '執行SQL語句' => 'home/sql')));
}
示例15: __construct
/**
* 構造函數
*/
public function __construct()
{
parent::__construct();
$this->template->assign('menu', $this->get_menu(array(lang('211') => 'admin/attachment/index', lang('212') => 'admin/attachment/unused')));
$this->cache_file = md5('admin/attachment' . $this->uid . SITE_ID . $this->input->ip_address() . $this->input->user_agent());
// 緩存文件名稱
$this->load->model('attachment_model');
}