Exemplo n.º 1
0
 public function run()
 {
     $view = new Vera_View(true);
     //设置为true开启debug模式
     $view->display('rollcall/Data.tpl');
     return true;
 }
Exemplo n.º 2
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;
 }
Exemplo n.º 3
0
 public function run()
 {
     $resource = $this->getResource();
     $act = $_GET['act'];
     // 通过加密过的token选择对应的板
     $info = Service_Info::getActInfo($act);
     $view = new Vera_View(true);
     $view->assign('act', $act);
     $view->assign('info', $info);
     $view->display('rollcall/Board.tpl');
 }