public function _initialize() { parent::_initialize(); $function=M('Function')->where(array('funname'=>'choujiang'))->find(); if (intval($this->user['gid'])<intval($function['gid'])){ $this->error('您还开启该模块的使用权,请到功能模块中添加',U('Function/index',array('token'=>$this->token))); } }
public function _initialize() { parent::_initialize(); $this->canUseFunction('Lovers'); $this->lotteryType=8; $this->lotteryTypeName='摁死小情侣'; $this->assign('lotteryTypeName',$this->lotteryTypeName); }
public function _initialize() { parent::_initialize(); if (empty($this->token)) { $this->error('不合法的操作', U('Index/index')); } }
public function _initialize() { parent::_initialize(); $this->canUseFunction('AppleGame'); $this->lotteryType=7; $this->lotteryTypeName='走鹊桥'; $this->assign('lotteryTypeName',$this->lotteryTypeName); }
public function __construct() { parent::_initialize(); $id = (int) $this->_get('id'); if (!$id) { $this->error('不存在的活动'); } $wecha_id = $this->wecha_id; $token = $this->_get('token'); $Lottery = M('Lottery')->field('statdate,enddate,canrqnums,aginfo,title')->where(array('id' => $id, 'token' => $token, 'type' => 8))->find(); if (!$Lottery) { $this->error('不存在的活动'); } $record = M('Lottery_record')->field('usenums')->where(array('token' => $token, 'wecha_id' => $wecha_id, 'lid' => $id))->find(); if ($Lottery['statdate'] > time()) { //活动未开始 $this->error('活动未开始,请在' . date('Y-m-d H:i:s', $Lottery['statdate']) . '后再来参加活动!'); } $mpName = M('Wxuser')->where(array('token' => $token))->getField('weixin'); $keyword = M('Keyword')->where(array('token' => $token, 'module' => 'Lottery', 'pid' => $id))->getField('keyword'); $this->assign('mpName', $mpName); $this->assign('keyword', $keyword); $this->assign('canrqnums', $Lottery['canrqnums']); $this->assign('aginfo', $Lottery['aginfo']); $this->assign('title', $Lottery['title']); }
public function _initialize() { parent::_initialize(); $this->lotteryType = 5; $this->lotteryTypeName = '砸金蛋'; $this->assign('lotteryTypeName', $this->lotteryTypeName); }
public function _initialize() { parent::_initialize(); if (empty($this->token)) { $this->error('不合法的操作', U('Index/index')); } $this->canUseFunction('Research'); }
public function _initialize() { parent::_initialize(); $this->canUseFunction('Autumn'); $this->lotteryType = 9; $this->lotteryTypeName = '中秋吃月饼'; $this->assign('lotteryTypeName', $this->lotteryTypeName); }
public function _initialize() { parent::_initialize(); $this->canUseFunction('LuckyFruit'); $this->lotteryType = 4; $this->lotteryTypeName = '水果达人'; $this->assign('lotteryTypeName', $this->lotteryTypeName); }
public function _initialize() { parent::_initialize(); $function = M('Function')->where(array('funname' => 'wedding'))->find(); $this->canUseFunction('LuckyFruit'); $this->lotteryType = 4; $this->lotteryTypeName = '水果达人'; $this->assign('lotteryTypeName', $this->lotteryTypeName); }
public function __construct(){ parent :: _initialize(); $id = (int)$this -> _get('id'); if(!$id) $this -> error('不存在的活动'); $wecha_id = $this -> _get('wecha_id'); $token = $this -> _get('token'); $Lottery = M('Lottery') -> field('statdate,enddate,canrqnums,aginfo,title') -> where(array('id' => $id, 'token' => $token, 'type' => 7)) -> find(); if(!$Lottery) $this -> error('不存在的活动'); $record = M('Lottery_record') -> field('usenums') -> where(array('token' => $token, 'wecha_id' => $wecha_id, 'lid' => $id)) -> find(); if ($Lottery['statdate'] > time()){ $this -> error('活动未开始,请在' . date('Y-m-d H:i:s', $Lottery['statdate']) . '后再来参加活动!'); } $this -> assign('canrqnums', $Lottery['canrqnums']); $this -> assign('aginfo', $Lottery['aginfo']); $this -> assign('title', $Lottery['title']); }
public function _initialize() { parent::_initialize(); $id = $this->_get('id', 'intval'); $bid = M('Lottery')->where(array('id' => $id, 'token' => $this->token))->getField('zjpic'); if (!$id) { $this->error('不存在的活动'); } $Activity = M('Activity')->field('statdate,enddate,canrqnums,aginfo,title')->where(array('id' => $bid, 'token' => $this->token, 'type' => 10))->find(); if (!$Activity) { $this->error('不存在的活动'); } if ($Activity['statdate'] > time()) { $this->error('活动未开始,请在' . date('Y-m-d H:i:s', $Activity['statdate']) . '后再来参加活动!'); } $mpName = M('Wxuser')->where(array('token' => $this->token))->getField('weixin'); $keyword = M('Keyword')->where(array('token' => $this->token, 'module' => 'Activity', 'pid' => $bid))->getField('keyword'); $this->assign('mpName', $mpName); $this->assign('keyword', $keyword); $this->assign('canrqnums', $Activity['canrqnums']); $this->assign('aginfo', $Activity['aginfo']); $this->assign('title', $Activity['title']); }
public function __construct() { parent::_initialize(); }
public function _initialize() { parent::_initialize(); }
public function _initialize() { parent::_initialize(); $this->canUseFunction('choujiang'); }
public function _initialize() { parent::_initialize(); $this->canUseFunction('gua2'); }
public function _initialize() { parent::_initialize(); $this->canUseFunction('Jiugong'); }
public function _initialize() { parent::_initialize(); $this->canUseFunction('lottery'); }