public function __construct() { parent::__construct(); $this->init(); $this->view_header(); $this->view_footer(); }
public function __construct() { parent::__construct(); ignore_user_abort(true); set_time_limit(0); require APP_PATH . 'model/functions.php'; }
public function __construct() { parent::__construct(); require APP_PATH . 'model/functions.php'; if (!$this->model('login')->checklogin()) { header('Location: ' . url('admin/login')); exit; } $args = $_GET; $url = $args['c'] . '/' . $args['a']; unset($args['set_lang']); unset($args['c']); unset($args['a']); $query = http_build_query($args); $this->view['current_url_lang'] = url($url . '?' . ($query ? $query . '&' : '') . 'set_lang='); $m_id = $_SESSION['m_id']; $rs = $this->db->table('admin')->where("id={$m_id}")->get(); $this->view['username'] = $rs['name']; $languages =& $this->model('common')->languages(); if ($_GET['set_lang']) { $lang = trim($_GET['set_lang']); cookie('admin_lang', $lang); } elseif (!cookie('admin_lang')) { //main language $lang = $this->model('common')->main_lang(); cookie('admin_lang', $lang); } else { $lang = cookie('admin_lang'); $check = 0; foreach ($languages as $v) { if ($lang == $v['code']) { $check = 1; break; } } if ($check == 0) { $lang = $this->model('common')->main_lang(); cookie('admin_lang', $lang); } } $GLOBALS['config']['LAN_NAME'] = $lang; $this->view['lang'] = $lang; $this->view['select_lang'] = $languages; //default_cur $this->view['main_cur'] = $this->model('common')->main_cur(); $this->view['current_symbol'] =& $this->model('common')->current_symbol(); //weight_unit $this->view['weight_unit'] = $this->model('common')->weight_unit(); //error_report if (MODULE != 'report') { $n = $this->db->table('error_report')->where('status=0')->count(); if ($n > 0) { $this->view['error_num'] = $n; $this->view['error_msg'] = $this->db->table('error_report')->order('time desc')->getval('message'); } } }
function __construct() { parent::__construct(); T('user/steadmin'); //全局获取登录用户数据 steadmin::getLoginUser(); // T('user/permission'); // permission::checkPermission(steadmin$adminInfo['groupid']); if (!isAjax()) { $this->getSysMenu(); //获取系统菜单 $this->getAdminMenuSetting(); //获取帐号个性化菜单设置 } //全局获取当前页面URL $this->assign(array('adminInfo' => steadmin::$adminInfo, 'userGroup' => C('steward/admin', 'group'))); //清除main_path对后台的影响 G('main_path', null); }
public function __construct() { parent::__construct(); }
public function __construct() { parent::__construct(); require APP_PATH . 'model/functions.php'; }