예제 #1
0
 /**
  * 流程导出功能
  */
 public function webcountexportAction()
 {
     $stationid = reqnum('stationid', 1);
     $model = new Psys_StationModel();
     $stationname = $model->GetOne(array('id' => $stationid), 'stationname', 'rha_station');
     $data = $model->webcountexport($stationid, $page, $pagesize);
     $databody = array();
     foreach ($data as $k => $v) {
         $databody[$k][] = $v['date'];
         $databody[$k][] = $v['link'];
         $databody[$k][] = $v['ad'];
         $databody[$k][] = $v['reg'];
         $databody[$k][] = $v['login'];
         $databody[$k][] = $v['sindex'];
     }
     $header = array('日期', 'WIFI连接', '广告页1/uv', '注册页/uv', '注册成功数/uv', '首页/uv');
     require COMMON_PATH . 'XExportExcel.php';
     $excel = new Excel();
     $excel->addHeader($header);
     $excel->addBody($databody);
     $excel->downLoad($stationname['stationname']);
 }