";s:14:"events_hd_tips";s:21:"填写问卷赢大礼";s:12:"events_rules";s:16:"
";s:15:"operationt_tips";s:0:"";s:13:"survery_prize";a:2:{i:1;a:4:{s:4:"name";s:24:"高姿世博限量套装";s:7:"img_url";s:69:"http://opcdn.sg.com.cn/public/upload/image/2015/1104/143703_40713.jpg";s:3:"num";s:1:"4";s:9:"unit_name";s:3:"份";}i:2;a:4:{s:4:"name";s:40:"格兰玛弗兰萝西滋润护手霜60ml";s:7:"img_url";s:69:"http://opcdn.sg.com.cn/public/upload/image/2015/1104/143735_25149.jpg";s:3:"num";s:2:"50";s:9:"unit_name";s:3:"份";}}s:8:"delivery";s:1:"1";s:5:"forms";a:3:{i:2;a:3:{s:4:"name";s:6:"姓名";s:4:"type";s:4:"text";s:8:"required";s:1:"1";}i:3;a:4:{s:4:"name";s:9:"手机号";s:4:"type";s:4:"text";s:4:"rule";a:2:{s:9:"regularid";s:1:"1";s:7:"regular";s:49:"/^(1[0-9][0-9]|15[0-9]|18[02-9]|14[57])[0-9]{8}$/";}s:8:"required";s:1:"1";}i:4;a:3:{s:4:"name";s:12:"收货地址";s:4:"type";s:4:"text";s:8:"required";s:1:"1";}}}';
$arr = unserialize($str);
unset( $arr['survery_question'][5]['answer'][9] );
unset( $arr['survery_question'][8]['answer'][9] );
unset( $arr['survery_question'][12]['answer'][5] );
$objD = new LotteryEvents();
$objD -> modify($arr,array('id'=>141));
exit('end');
*/
$thisTime = time();
$events_id = $this->getEventsCreateTimeToId();
if (!Verify::unsignedInt($events_id)) {
self::fail_exit('无效id');
}
# 获取用户信息
$objUserData = new UserInfo();
$uid = $this->getRunTimeUid();
$userData = $objUserData -> get($uid);
$this->setOutput('userData', $userData);
# 获取试用信息
$objDLotteryEvents = new LotteryEvents();
$surveyInfo = $objDLotteryEvents -> get($events_id);
# 检查是否移动端
$title = $surveyInfo['weixinShare']['title'] ? $surveyInfo['weixinShare']['title'] : $surveyInfo['events_name'];
$this->checkIsFromMobile($title);
# 获取登录地址
$url = Request::g('url');
$plat_form_id = $this->getPlatFormId();
$objMLottery = new Lottery();
$thisUrl = $objMLottery -> getEventsUrl($surveyInfo['type'],$surveyInfo['create_time'],$url);
$loginUrl = $this -> getLoginUrl($thisUrl);
$this->setOutput('loginUrl', $loginUrl);
# 判断是否需要登录
$ckLogin = $this->ckLogin();
$this->setOutput('ckLogin', $ckLogin);
# 检查当前活动是否需要登录
$authorize =$surveyInfo['authorize'];
if ($authorize && $loginUrl) {
if($ckLogin==true){
self::redirect($loginUrl);
}
}
$this->info($surveyInfo);
# 记录PV UV日志 访问
$objCount = new Count();
$objCount->setPassLog( $events_id,$plat_form_id);
# 活动状态
$TIME = time();
$eventsStatus = false;
$objMLotteryEventsLimitations = new LotteryEventsLimitations();
if($TIME < $surveyInfo['begin_time'] ){
$eventsStatus = 'STATUS_NOT_START';
} elseif ($TIME > $surveyInfo['end_time']){
$eventsStatus = 'STATUS_HAS_END';
} elseif ($surveyInfo['display'] == \Cas\Dao\LotteryEvents::EVENT_DISPLAY_HIDE) {
//$eventsStatus = 'STATUS_HIDE'; //先注释了。此隐藏 之印象列表
}elseif (!$objMLotteryEventsLimitations->ckEventRestrictions($uid,Request::ip(), $events_id)) {
$eventsStatus = 'STATUS_HAS_RESTRTICTIONS';
}
if (Cookie::get('SURVEY_IS_UNDERWAY') >= 2) {
Cookie::set('SURVEY_IS_UNDERWAY', 1, null, $_SERVER['HTTP_HOST'], '/');
$this->setOutput('zepto', 1);
$this->setOutput('display', $surveyInfo['list_display']);
$this->tpl = 'events_survey_underway';
} else {
$this->setOutput('display', $surveyInfo['list_display']);
$this->tpl = 'events_survey';
}
# 视频播放
preg_match_all('/