예제 #1
0
 public function oldwebcountAction()
 {
     $date = reqstr('date', '2015-01-30');
     $allowdate = strtotime('2015-01-31');
     if (strtotime($date) >= $allowdate) {
         echo '旧流程只能统计2015-01-31之前的数据 <a href="/station/oldwebcount" >点击此处返回</a>';
         return;
     }
     if ($date) {
         $cdate = date('Y-m-d', strtotime($date));
     } else {
         $cdate = date('Y-m-d', strtotime('-1 day'));
     }
     //获取车站
     $stationid = reqnum('station', 3);
     $obj = new Psys_StationModel();
     $stations = $obj->station();
     foreach ($stations as $v) {
         if ($v['id'] == $stationid) {
             $curstation = $v['stationname'];
         }
     }
     $data = $obj->OldWebCount($cdate, $stationid);
     var_dump($data);
     exit;
     $this->smarty->assign('curstation', $curstation);
     $this->smarty->assign('date', $date);
     $this->smarty->assign('totallist', $data);
     $this->forward = 'oldwebcount';
 }