示例#1
0
 public function navhitAction()
 {
     $page = reqnum("page", 1);
     $pagesize = reqnum("pagesize", 10);
     $stationid = reqnum('stationid', 1);
     $model = new Psys_StationModel();
     $stations = $model->station();
     $data = $model->navhitCount($page, $pagesize, $stationid);
     foreach ($data as &$v) {
         $sum1 = 0;
         $v += array('date' => '0', 'inquiries' => '0', 'station' => '0', 'luggage' => '0', 'movie' => '0', 'music' => '0', 'app' => '0', 'game' => '0');
         foreach ($v as $key => $value) {
             if ($key != 'date') {
                 $sum1 += $value;
             }
         }
         $v['sum'] = $sum1;
     }
     $allnum = $this->totalrows();
     self::inidate($allnum, $page, $pagesize, count($data));
     $this->smarty->assign('stations', $stations);
     $this->smarty->assign('stationid', $stationid);
     $this->smarty->assign('data', $data);
     $this->forward = 'navhit';
 }