Example #1
0
 /**
  * 用户抽奖活动统计页面
  */
 public function NewUserLotteryInfoAction()
 {
     $data = reqstr('data');
     // if (!$data) {
     // 	return;
     // }
     $data = urldecode($data);
     $info = array();
     parse_str($data, $info);
     //$date = (int)$info['date']?(int)$info['date']:7; //默认是查出7天的数据
     $sdate = trim($info['sdate']) ? trim($info['sdate']) : '';
     $edate = trim($info['edate']) ? trim($info['edate']) : '';
     $station = (int) $info['station'] ? (int) $info['station'] : 0;
     // 0 表示查询出所有车站
     $hour = trim($info['time']) ? trim($info['time']) : '';
     $type = trim($info['type']) ? trim($info['type']) : 'pv';
     //默认是游戏
     if (!$sdate && !$edate) {
         $edate = $sdate = date('Y-m-d');
     }
     if (!$sdate || !$edate) {
         if ($sdate) {
             $edate = $sdate;
         } else {
             $sdate = $edate;
         }
     }
     //wifi、首页、总下载、活动下载、抽奖人数只统计UV
     $nt = new Psys_ResourceModel();
     $action = array('wifi' => 'wifi', 'sindex_uv' => 'sindex_uv', 'totaldown' => 'totaldown', 'alertwindow' => 'alertwindow', 'alertdraw' => 'alertdraw', 'alertclose' => 'alertclose', 'redpacket' => 'redpacket', 'activity_window' => 'activity_window', 'activity_redpacket' => 'activity_redpacket', 'activdown' => 'activdown', 'lottery' => 'lottery');
     foreach ($action as $k => $v) {
         $data_tab[$k] = $nt->NewUserActivity($sdate, $edate, $station, $hour, $type, $v);
     }
     return $data_tab;
 }