示例#1
0
 private function _download()
 {
     if (!isset($_GET['act'])) {
         return false;
     }
     $act = $_GET['act'];
     // $resource = $this->getResource();
     // if (!Service_Info::isActBelong($act, $resource['num'])) {
     //     $ret = array('errno'=>'2','errmsg'=>'此活动不属于您');
     //     echo json_encode($ret, JSON_UNESCAPED_UNICODE);
     //     return false;
     // }
     $actInfo = Data_Db::getActInfo($act);
     $list = Data_Db::getCheckinList($act);
     header('Content-Type: text/xls');
     header('Content-type:application/vnd.ms-excel;charset=utf-8');
     header('Content-Disposition: attachment;filename=' . $actInfo['name'] . '_签到表.xls');
     header('Cache-Control:must-revalidate,post-check=0,pre-check=0');
     header('Expires:0');
     header('Pragma:public');
     $excel = new Vera_View(true);
     $excel->assign('name', $actInfo['name']);
     $excel->assign('list', $list);
     $excel->display('rollcall/Excel.tpl');
     return true;
 }
示例#2
0
 public static function getCheckinList($act)
 {
     return Data_Db::getCheckinList($act);
 }