Exemplo n.º 1
0
 function Page_Terminate($url = "")
 {
     global $conn, $gsExportFile, $gTmpImages;
     // Page Unload event
     $this->Page_Unload();
     // Global Page Unloaded event (in userfn*.php)
     Page_Unloaded();
     // Export
     global $EW_EXPORT, $v_hoja_manteniminto;
     if ($this->CustomExport != "" && $this->CustomExport == $this->Export && array_key_exists($this->CustomExport, $EW_EXPORT)) {
         $sContent = ob_get_contents();
         if ($gsExportFile == "") {
             $gsExportFile = $this->TableVar;
         }
         $class = $EW_EXPORT[$this->CustomExport];
         if (class_exists($class)) {
             $doc = new $class($v_hoja_manteniminto);
             $doc->Text = $sContent;
             if ($this->Export == "email") {
                 echo $this->ExportEmail($doc->Text);
             } else {
                 $doc->Export();
             }
             ew_DeleteTmpImages();
             // Delete temp images
             exit;
         }
     }
     $this->Page_Redirecting($url);
     // Close connection
     $conn->Close();
     // Go to URL if specified
     if ($url != "") {
         if (!EW_DEBUG_ENABLED && ob_get_length()) {
             ob_end_clean();
         }
         header("Location: " . $url);
     }
     exit;
 }
 function Page_Terminate($url = "")
 {
     global $conn, $gsExportFile, $gTmpImages;
     // Export
     global $EW_EXPORT, $cuenta;
     if ($this->CustomExport != "" && $this->CustomExport == $this->Export && array_key_exists($this->CustomExport, $EW_EXPORT)) {
         $sContent = ob_get_contents();
         if ($gsExportFile == "") {
             $gsExportFile = $this->TableVar;
         }
         $class = $EW_EXPORT[$this->CustomExport];
         if (class_exists($class)) {
             $doc = new $class($cuenta);
             $doc->Text = $sContent;
             if ($this->Export == "email") {
                 echo $this->ExportEmail($doc->Text);
             } else {
                 $doc->Export();
             }
             ew_DeleteTmpImages();
             // Delete temp images
             exit;
         }
     }
     //		$GLOBALS["Table"] = &$GLOBALS["MasterTable"];
     unset($GLOBALS["Grid"]);
     if ($url == "") {
         return;
     }
     $this->Page_Redirecting($url);
     // Go to URL if specified
     if ($url != "") {
         if (!EW_DEBUG_ENABLED && ob_get_length()) {
             ob_end_clean();
         }
         header("Location: " . $url);
     }
     exit;
 }
Exemplo n.º 3
0
 function __destruct()
 {
     ew_DeleteTmpImages();
 }
 function ExportPDF($html)
 {
     echo $html;
     ew_DeleteTmpImages();
     exit;
 }
Exemplo n.º 5
0
 function Export()
 {
     global $gsExportFile;
     ob_end_clean();
     header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' . (EW_CHARSET != "" ? ";charset=" . EW_CHARSET : ""));
     header('Content-Disposition: attachment; filename=' . $gsExportFile . '.xlsx');
     header('Cache-Control: max-age=0');
     $objWriter = PHPExcel_IOFactory::createWriter($this->phpexcel, 'Excel2007');
     $objWriter->save('php://output');
     ew_DeleteTmpImages();
 }