/** * 构造函数 * @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'; }
/** * 构造函数 * * @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(); }
/** * 构造函数 */ 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'); }
/** * 构造函数 */ 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 . '/'); }
/** * 构造函数(网站表单) */ 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'] . '/'; } }
/** * 构造函数 */ 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'))); }
/** * 构造函数 */ 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()); }
/** * 构造函数 */ 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'); }
/** * 构造函数 */ 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'); }
/** * 构造函数 */ 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'); }
/** * 构造函数 */ 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'); }
public function Ajax() { parent::__construct(); if ($this->config->item('ajax_security') !== $this->input->post('ajax_security')) { die('No Access Allowed'); } }
/** * 构造函数 */ 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'); }
/** * 构造函数 */ 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'))); }
/** * 构造函数 */ 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'); }
public function __construct() { parent::__construct(); $this->load->helper(array('form', 'html', 'url')); $this->load->library('form_validation'); $this->load->model('client'); array_push($this->data['scripts'], 'Clients'); }
/** * 构造函数 */ public function __construct() { parent::__construct(); $this->template->assign('menu', $this->get_menu(array(lang('203') => 'admin/block/index', lang('add') => 'admin/block/add_js'))); $this->link = $this->site[SITE_ID]; $this->tablename = $this->db->dbprefix(SITE_ID . '_block'); $this->field = array('name' => array('ismain' => 1, 'fieldname' => 'name', 'fieldtype' => 'Text', 'setting' => array('option' => array('width' => 200), 'validate' => array('required' => 1))), 'content' => array('ismain' => 1, 'fieldname' => 'content', 'fieldtype' => 'Textarea', 'setting' => array('option' => array('width' => '370', 'height' => 250), 'validate' => array('xss' => 1)))); }
/** * 构造函数 */ public function __construct() { parent::__construct(); if (!$this->member['allowspace']) { $this->member_msg(lang('m-342')); } $this->load->model('space_model'); $this->space = $this->space_model->get($this->uid); }
/** * 构造函数 */ public function __construct() { parent::__construct(); $this->module = $this->get_cache('module-' . SITE_ID . '-' . APP_DIR); if (!$this->module) { $this->admin_msg(lang('m-148')); } $this->load->model('tag_model'); }
/** * 构造函数 */ public function __construct() { parent::__construct(); $this->load->library('Dfield', array(APP_DIR)); $this->sysfield = array('author' => array('name' => lang('101'), 'ismain' => 1, 'fieldtype' => 'Text', 'fieldname' => 'author', 'setting' => array('option' => array('width' => 157, 'value' => $this->admin['username']), 'validate' => array('tips' => lang('102'), 'check' => '_check_member', 'required' => 1, 'formattr' => ' /><input type="button" class="button" value="' . lang('103') . '" onclick="dr_dialog_member(\'author\')" name="user"'))), 'inputtime' => array('name' => lang('104'), 'ismain' => 1, 'fieldtype' => 'Date', 'fieldname' => 'inputtime', 'setting' => array('option' => array('width' => 140), 'validate' => array('required' => 1, 'formattr' => '')))); if ($this->admin['adminid'] > 1) { $this->verify = $this->_get_verify(); } }
/** * 构造函数 */ public function __construct() { parent::__construct(); $this->load->model('poster_model'); $this->template->assign('menu', $this->get_menu(array(lang('368') => 'admin/poster/index', lang('add') => 'admin/poster/add_js'))); $this->link = $this->site[SITE_ID]; $this->type = $this->poster_model->get_space_type(); $this->table = SITE_ID . '_poster_space'; $this->template->assign('type', $this->type); }
/** * 构造函数(模块表单后台) */ public function __construct() { parent::__construct(); // 表单验证 $this->fid = trim(strchr($this->router->class, '_'), '_'); $this->form = $this->get_cache('module-' . SITE_ID . '-' . APP_DIR, 'form', $this->fid); if (!$this->form) { $this->admin_msg(lang('247')); } // 内容验证 $this->cid = (int) $this->input->get('cid'); $this->cdata = $this->link->where('id', $this->cid)->get(SITE_ID . '_' . APP_DIR)->row_array(); if ($this->cid && !$this->cdata) { $this->admin_msg(lang('019')); } // 判断角色权限 if ($this->admin['adminid'] > 1) { } // 系统字段 $this->load->library('Dfield', array(APP_DIR)); $this->sysfield = array('author' => array('name' => lang('101'), 'ismain' => 1, 'fieldtype' => 'Text', 'fieldname' => 'author', 'setting' => array('option' => array('width' => 157, 'value' => $this->admin['username']), 'validate' => array('tips' => lang('102'), 'check' => '_check_member', 'required' => 1, 'formattr' => ' disabled /><input type="button" class="button" value="' . lang('103') . '" onclick="dr_dialog_member(\'author\')" name="user"'))), '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, 'fieldtype' => 'Text', 'fieldname' => 'inputip', '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->field = $this->form['field'] ? array_merge($this->form['field'], $this->sysfield) : $this->sysfield; $this->load->model('mform_model'); if ($this->cid) { $menu = $this->get_menu(array(lang('back') => APP_DIR . '/admin/home/index/catid/' . $this->cdata['catid'], $this->form['name'] => APP_DIR . '/admin/' . $this->router->class . '/index/cid/' . $this->cid, lang('331') => MODULE_URL . 'index.php?c=' . $this->router->class . '&cid=' . $this->cid . '" target="_blank')); } else { $menu = $this->get_menu(array($this->form['name'] => APP_DIR . '/admin/' . $this->router->class . '/index')); } // 判断栏目权限,如果数据量大时可以注释此判断 if (IS_ADMIN && $this->admin['adminid'] > 1) { $category = $this->get_cache('module-' . SITE_ID . '-' . APP_DIR, 'category'); if ($category) { $catid = array(); foreach ($category as $c) { // 具有管理权限的栏目id集合 if (!$c['child'] && $c['setting']['admin'][$this->admin['adminid']]['show'] == 1) { $catid[] = $c['id']; } } unset($category); if ($catid) { $data = $this->link->select('id')->where_in('catid', $catid)->get(SITE_ID . '_' . APP_DIR . '_index')->result_array(); if ($data) { foreach ($data as $t) { $this->ids[] = (int) $t['id']; } } } } } $this->template->assign(array('cid' => $this->cid, 'menu' => $menu, 'field' => $this->form['field'], '_class' => $this->router->class)); $this->cache_file = md5($this->duri->uri(1) . $this->uid . $this->sid . $this->input->ip_address() . $this->input->user_agent()); // 缓存文件名称 }
/** * 构造函数 */ public function __construct() { parent::__construct(); $uid = (int) $this->input->get('uid'); $this->userinfo = $this->member_model->get_member($uid); if (!$this->userinfo) { $this->admin_msg(lang('130')); } $this->template->assign(array('menu' => $this->get_menu(array(lang('back') => strpos($_SERVER['HTTP_REFERER'], 'home') ? $_SERVER['HTTP_REFERER'] : 'member/admin/home/index', SITE_SCORE => 'member/admin/score/index/uid/' . $uid, lang('add') => 'member/admin/score/add/uid/' . $uid . '_js')), 'userinfo' => $this->userinfo)); $this->load->model('score_model'); }
/** * 构造函数 */ public function __construct() { parent::__construct(); $uid = (int) $this->input->get('uid'); $this->userinfo = $this->member_model->get_member($uid); if (!$this->userinfo) { $this->admin_msg(lang('130')); } $this->template->assign(array('menu' => $this->get_menu(array(lang('back') => 'member/admin/home/index', SITE_EXPERIENCE => 'member/admin/experience/index/uid/' . $uid, lang('add') => 'member/admin/experience/add/uid/' . $uid . '_js')), 'userinfo' => $this->userinfo)); $this->load->model('score_model'); }
/** * 构造函数 */ public function __construct() { parent::__construct(); $this->load->library('Dfield', array(APP_DIR)); $this->sysfield = array('hits' => array('name' => lang('244'), 'ismain' => 1, 'fieldname' => 'hits', 'fieldtype' => 'Text', 'setting' => array('option' => array('value' => 0, 'width' => 157))), 'author' => array('name' => lang('101'), 'ismain' => 1, 'fieldtype' => 'Text', 'fieldname' => 'author', 'setting' => array('option' => array('width' => 157, 'value' => $this->admin['username']), 'validate' => array('tips' => lang('102'), 'check' => '_check_member', 'required' => 1, 'formattr' => ' /><input type="button" class="button" value="' . lang('103') . '" onclick="dr_dialog_member(\'author\')" name="user"'))), 'inputtime' => array('name' => lang('104'), 'ismain' => 1, 'fieldtype' => 'Date', 'fieldname' => 'inputtime', 'setting' => array('option' => array('width' => 140), 'validate' => array('required' => 1, 'formattr' => ''))), 'updatetime' => array('name' => lang('105'), 'ismain' => 1, 'fieldtype' => 'Date', 'fieldname' => 'updatetime', 'setting' => array('option' => array('width' => 140), 'validate' => array('required' => 1, 'formattr' => ''))), 'inputip' => array('name' => lang('106'), 'ismain' => 1, 'fieldtype' => 'Text', 'fieldname' => 'inputip', '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"')))); $field = $this->get_cache('module-' . SITE_ID . '-' . APP_DIR, 'field'); $this->field = $field ? array_merge($field, $this->sysfield) : $this->sysfield; if ($this->admin['adminid'] > 1) { $this->verify = $this->_get_verify(); } }
/** * 构造函数 */ public function __construct() { parent::__construct(); $this->mid = (int) $this->input->get('mid'); $this->model = $this->get_cache('space-model', $this->mid); if (!$this->model) { $this->admin_msg(lang('159')); } $this->template->assign(array('mid' => $this->mid, 'menu' => $this->get_menu(array($this->model['name'] => 'member/admin/content/index/mid/' . $this->mid)))); $this->load->model('space_content_model'); $this->space_content_model->tablename = $this->db->dbprefix('space_' . $this->model['table']); }
/** * 构造函数 */ public function __construct() { parent::__construct(); $this->load->library('Dfield', array(APP_DIR)); $this->table = $this->content_model->prefix . '_extend_verify'; $this->sysfield = array('inputtime' => array('name' => lang('104'), 'ismain' => 1, 'fieldtype' => 'Date', 'fieldname' => 'inputtime', 'setting' => array('option' => array('width' => 140), 'validate' => array('formattr' => '')))); $field = $this->get_cache('module-' . SITE_ID . '-' . APP_DIR, 'extend'); $this->field = $field ? array_merge($field, $this->sysfield) : $this->sysfield; if ($this->admin['adminid'] > 1) { $this->verify = $this->_get_verify(); } }
/** * 构造函数 */ public function __construct() { parent::__construct(); if (IS_ADMIN) { $menu = array(lang('152') => APP_DIR . '/admin/page/index', lang('add') => APP_DIR . '/admin/page/add', lang('html-629') => APP_DIR . '/admin/field/index/rname/page/rid/' . SITE_ID); if (APP_DIR) { unset($menu[lang('html-629')]); } $this->template->assign('menu', $this->get_menu($menu)); } $this->field = array('name' => array('name' => IS_ADMIN ? lang('139') : '', 'ismain' => 1, 'fieldname' => 'name', 'fieldtype' => 'Text', 'setting' => array('option' => array('width' => 150), 'validate' => array('required' => 1, 'formattr' => 'onblur="d_topinyin(\'dirname\',\'name\');"'))), 'dirname' => array('name' => IS_ADMIN ? lang('140') : '', 'ismain' => 1, 'fieldname' => 'dirname', 'fieldtype' => 'Text', 'setting' => array('option' => array('width' => 150), 'validate' => array('required' => 1))), 'thumb' => array('name' => IS_ADMIN ? lang('141') : '', 'ismain' => 1, 'fieldname' => 'thumb', 'fieldtype' => 'File', 'setting' => array('option' => array('ext' => 'jpg,gif,png', 'size' => 10))), 'keywords' => array('name' => IS_ADMIN ? lang('143') : '', 'ismain' => 1, 'fieldname' => 'keywords', 'fieldtype' => 'Text', 'setting' => array('option' => array('width' => 400))), 'title' => array('name' => IS_ADMIN ? lang('142') : '', 'ismain' => 1, 'fieldname' => 'title', 'fieldtype' => 'Text', 'setting' => array('option' => array('width' => 400))), 'description' => array('name' => IS_ADMIN ? lang('144') : '', 'ismain' => 1, 'fieldname' => 'description', 'fieldtype' => 'Textarea', 'setting' => array('option' => array('width' => 500, 'height' => 60))), 'template' => array('name' => IS_ADMIN ? lang('147') : '', 'ismain' => 1, 'fieldname' => 'template', 'fieldtype' => 'Text', 'setting' => array('option' => array('width' => 200, 'value' => 'page.html'))), 'urllink' => array('name' => IS_ADMIN ? lang('148') : '', 'ismain' => 1, 'fieldname' => 'urllink', 'fieldtype' => 'Text', 'setting' => array('option' => array('width' => 400, 'value' => ''))), 'urlrule' => array('name' => IS_ADMIN ? lang('149') : '', 'ismain' => 1, 'fieldname' => 'urlrule', 'fieldtype' => 'Text', 'setting' => array('option' => array('width' => 300))), 'show' => array('name' => IS_ADMIN ? lang('html-357') : '', 'ismain' => 1, 'fieldname' => 'show', 'fieldtype' => 'Radio', 'setting' => array('option' => array('value' => '1', 'options' => (IS_ADMIN ? lang('yes') : 'Yes') . '|1' . PHP_EOL . (IS_ADMIN ? lang('no') : 'No') . '|0'))), 'getchild' => array('name' => IS_ADMIN ? lang('order') : '', 'ismain' => 1, 'fieldtype' => 'Radio', 'fieldname' => 'getchild', 'setting' => array('option' => array('value' => '1', 'options' => (IS_ADMIN ? lang('yes') : 'Yes') . '|1' . PHP_EOL . (IS_ADMIN ? lang('no') : 'No') . '|0')))); $this->load->model('page_model'); }
/** * 构造函数 */ public function __construct() { parent::__construct(); $this->dir = $this->input->get('dir'); $module = $this->get_cache('module-' . SITE_ID . '-' . $this->dir); if (!$module) { $this->admin_msg(lang('100')); } $this->link = $this->site[SITE_ID]; $this->table = $this->db->dbprefix(SITE_ID . '_' . $this->dir . '_form'); $this->template->assign('menu', $this->get_menu(array(dr_lang('330', $module['name']) => 'admin/mform/index/dir/' . $this->dir, lang('add') => 'admin/mform/add/dir/' . $this->dir, lang('334') => 'admin/mform/export/dir/' . $this->dir, lang('333') => 'admin/mform/import/dir/' . $this->dir))); $this->load->model('mform_model'); }
/** * 构造函数 */ public function __construct() { parent::__construct(); $this->groupid = (int) $this->input->get('gid'); if (!$this->groupid) { $this->admin_msg(lang('m-126')); } if ($this->groupid < 2) { $this->admin_msg(lang('m-127')); } $this->template->assign(array('menu' => $this->get_menu(array(lang('m-032') => 'member/admin/group/index', lang('m-034') => 'member/admin/level/index/gid/' . $this->groupid, lang('add') => 'member/admin/level/add/gid/' . $this->groupid)), 'groupid' => $this->groupid)); $this->load->model('level_model'); }