本文整理汇总了PHP中M_Controller类的典型用法代码示例。如果您正苦于以下问题:PHP M_Controller类的具体用法?PHP M_Controller怎么用?PHP M_Controller使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了M_Controller类的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');
}