getContext()->getRequest(); $this->setAttribute("button",$request->getAttribute("button")); $this->setAttribute("list",$request->getAttribute("list")); $this->setAttribute("pages_show",$request->getAttribute("pages_show")); $this->setAttribute("name",$request->getAttribute("name")); $this->setAttribute("startdate",$request->getAttribute("startdate")); $this->setAttribute("enddate",$request->getAttribute("enddate")); $this->setAttribute("excel",$request->getAttribute("excel")); $pageto = $request->getAttribute('pageto'); if($pageto != ''){ $r = rand(); header("Content-type: application/msexcel;charset=utf-8"); header("Content-Disposition: attachment;filename=userlist-$r.xls"); $this->setTemplate("excel_warning.tpl"); } else { $this->setTemplate("warning.tpl"); } } } ?>