public function _initialize() { if (ACTION_NAME == 'userinfo') { } else { parent::_initialize(); } }
public function _initialize() { parent::_initialize(); self::$user = session("user"); //如果是用户登录 if (self::$user['type'] == "seeker") { self::$db = M('user_seeker'); } elseif (self::$user['type'] == "company") { self::$db = M('user_company'); } elseif (self::$user['type'] == "school") { self::$db = M('user_school'); } $where['id'] = self::$user['id']; $re = self::$db->where($where)->find(); if ($re) { //var_dump($re);exit(); $this->assign("user", $re); } else { } //判断账号审核状态 if (self::$user['state'] != 1) { if (self::$user['state'] == 2) { //$this->error("您的信息目前正在审核中,请耐心等待!"); } if (self::$user['state'] == 0) { $this->error("您的信息未通过审核!"); } } self::$p = I('get.p', I('post.p', 1)); self::$limit = I('get.limit', I('post.limit', 10)); }
public function _initialize() { parent::_initialize(); if (!$this->isLogin()) { $this->redirect('Login/login'); } }
public final function _initialize() { parent::_initialize(); if (!is_choose_site()) { $this->redirect('Website/Index'); } $this->site_info = session("site_info"); }
public function _initialize() { parent::_initialize(); if (!isLogin()) { cookie('__login_return_url__', $_SERVER['REQUEST_URI']); $this->error('请登录', U('Member/login')); } }
public function _initialize() { parent::_initialize(); if (!$this->isLogin()) { $this->redirect('Login/login'); } // $this->assign('controllerName', $this->getCurrentControllerName(CONTROLLER_NAME)); // $this->assign('actionName', $this->getCurrentActionName(ACTION_NAME, CONTROLLER_NAME)); }
/** * 初始化,限定页面,及登录检测 * * @author liuxiaolin * @access protected * @return 跳转页面 */ public function _initialize() { parent::_initialize(); $loginInfo = $this->isLogin(); // 登录后不可访问的action $filterAction = array('login', 'register', 'forgotPasswd'); if (in_array(ACTION_NAME, $filterAction) && $loginInfo) { $this->redirect('Home/Index/index'); } }
protected function _initialize() { parent::_initialize(); $function = ACTION_NAME; $uid = session('uid'); if (empty($uid)) { if ($function == 'ajaxPopLayer' || $function == "applyInfoAction") { return true; } $this->redirect('User/login', 0); } }
/** * 前期执行 */ public function _initialize(){ parent::_initialize(); if(!$this->user){ if(IS_AJAX){ ajaxErrReturn('请先登录',1001); }else{ $this->error('请先登录'); } } if(!IS_AJAX){ Cookie( '_redirectURL_', __SELF__ ); } }
public function _initialize() { parent::_initialize(); self::$user = session("user"); //如果是用户登录 if (self::$user['type'] == "seeker") { self::$db = M('user_seeker'); } elseif (self::$user['type'] == "company") { self::$db = M('user_company'); } elseif (self::$user['type'] == "school") { self::$db = M('user_school'); } self::$p = I('post.p', 1); self::$limit = I('post.limit', 10); }
public function _initialize() { parent::_initialize(); //select msg number $where['senderid'] = 0; $where['receiverid'] = $this->user['id']; $where['statu'] = 1; $where['receiverdel'] = 0; $sysnumber = M('message')->where($where)->count(); unset($where['senderid']); $where['senderid'] = array('neq', 0); $usernumber = M('message')->where($where)->count(); session('msg.sysnumber', $sysnumber); session('msg.usernumber', $usernumber); }
public function _initialize() { parent::_initialize(); self::$user = session("user"); //如果是用户登录 if (self::$user['type'] == "seeker") { self::$db = M('user_seeker'); } elseif (self::$user['type'] == "company") { self::$db = M('user_company'); } elseif (self::$user['type'] == "school") { self::$db = M('user_school'); } //判断账号审核状态 if (self::$user['state'] != 1) { if (self::$user['state'] == 2) { //$this->error("您的信息目前正在审核中,请耐心等待!"); } if (self::$user['state'] == 0) { $this->error("您的信息未通过审核!"); } } self::$p = I('get.p', I('post.p', 1)); self::$limit = I('get.limit', I('post.limit', 10)); }
public function _initialize() { parent::_initialize(); $this->assign('leftUrl', ACTION_NAME); }
public function _initialize() { parent::_initialize(); $this->unlock(); }
public function _initialize() { parent::_initialize(); $opt = A('Citys'); if (!F('province_temp')) { $province = $opt->optSelect(); F('province_temp', $province); } $this->province = F('province_temp'); }
public function _initialize() { parent::_initialize(); $this->assign('title', '公告'); }
public function _initialize() { parent::_initialize(); }
public function _initialize() { parent::_initialize(); $overdue_result = $this->overdue_order(); //处理过期订单 }