示例#1
0
 public function everydayAction()
 {
     $date = reqstr('date', date('Y_m_d', strtotime('-1 day')));
     $stationid = reqnum('stationid', 1);
     $obj = new Psys_StationModel();
     $stations = $obj->station();
     $picDir = $obj->picDir($stationid);
     $data = $obj->everyday($date, $stationid);
     $link = $data['link'] ? $data['link'] : '0';
     $list = $data['detail'];
     foreach ($list as &$v) {
         $v += array('register' => '0', 'index' => '0', 'visit' => '0', 'alert' => '0', 'down' => '0', 'first' => '0', 'undown' => '0', 'convert' => '0');
     }
     $this->smarty->assign('stations', $stations);
     $this->smarty->assign('picDir', $picDir);
     $this->smarty->assign('date', $date);
     $this->smarty->assign('stationid', $stationid);
     $this->smarty->assign('link', $link);
     $this->smarty->assign('list', $list);
     $this->forward = 'stateTable';
 }