本文整理汇总了PHP中action::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP action::__construct方法的具体用法?PHP action::__construct怎么用?PHP action::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类action
的用法示例。
在下文中一共展示了action::__construct方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
parent::__construct();
$this->init();
$this->view_header();
$this->view_footer();
}
示例2: __construct
public function __construct()
{
parent::__construct();
ignore_user_abort(true);
set_time_limit(0);
require APP_PATH . 'model/functions.php';
}
示例3: __construct
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');
}
}
}
示例4: T
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);
}
示例5: __construct
public function __construct()
{
parent::__construct();
}
示例6: __construct
public function __construct()
{
parent::__construct();
require APP_PATH . 'model/functions.php';
}