public function __construct() { parent::__construct(); header('Cache-control: private, must-revalidate'); if (!$this->checkAccess()) { $this->error("没有操作权限"); } }
public function __construct() { parent::__construct(); //网站开启验证 if (!$this->verification()) { $this->display("Template/system/site_close.html"); exit; } $this->cacheDir = 'temp/Content/' . substr(md5(__URL__), 0, 3); }
/** * 构造函数 */ public function __construct() { parent::__construct(); //网站开启验证 if (!$this->verification()) { $this->display("./data/Template/web_close.html"); exit; } //分配模板目录URL defined("__TEMPLATE__") or define("__TEMPLATE__", __ROOT__ . "/template/" . C("WEB_STYLE")); }
public function __construct() { parent::__construct(); if (!$this->checkAccess()) { $this->error("没有操作权限"); } //消息数 $message_count = M("user_message")->where(array('to_uid' => $_SESSION['uid'], 'user_message_state' => 0))->count(); $this->assign('message_count', $message_count); //信息信息 $systemmessage_count = M("system_message")->where(array('uid' => $_SESSION['uid'], 'state' => 0))->count(); $this->assign('systemmessage_count', $systemmessage_count); }
public function __construct() { parent::__construct(); //会员中心是否关闭 if (C("member_open") == 0 && empty($_SESSION['admin'])) { $this->display("./data/Template/close_member"); exit; } else { if (!session('uid')) { go(U("Member/Login/login")); } else { if (!empty($_SESSION['lock'])) { //锁定用户无法操作(IP禁止,限制访问日期等) $this->error('您已被锁定,无法进行操作', __WEB__); } } } }
function __construct() { parent::__construct(); }