function __construct(&$app) { parent::__construct($app); if ($_COOKIE['S']['SIGN']['AUTO'] > 0) { $minutes = 14 * 24 * 60; kernel::single('base_session')->set_sess_expires($minutes); } //如果有自动登录,设置session过期时间,单位:分 if ($_COOKIE['S']['SIGN']['REMEMBER'] !== '1') { setcookie("S[SIGN][REMEMBER]", null, time() - 3600); setcookie("loginName", null, time() - 3600); } $this->pagedata['site_b2c_remember'] = $_COOKIE['S']['SIGN']['REMEMBER']; $this->set_weixin_openid(); }
function __construct(&$app) { parent::__construct($app); $this->lm_model = $this->app->model('lobster_member'); $this->lz_model = $this->app->model('lobster_zlist'); // //判断开始结束 // $time = time(); // if($time < strtotime($this->_startdate)){ // $this->_js_alert($this->_active_name.'活动未开始,请先关注 品珍微信',$this->_follow_url); // exit; // } // if($time > strtotime($this->_end_date)){ // $this->_js_alert($this->_active_name.'活动已结束,更多活动请关注 品珍微信',$this->_follow_url); // exit; // } // //送完即止 // $gift_count = $this->lm_model->count(array('z_count|than'=>$this->lm_model->_zan_success_num-1)); // if($gift_count > $this->_gift_max){ // $this->_js_alert('本次活动奖品已派完,敬请期待下期活动!',$this->_follow_url); // exit; // } $this->_state = $_GET['state']; }