Add version files and new GIF images for UI components
This commit is contained in:
34
themes/codebase4.0/grid-pdf-php/generate.php
Normal file
34
themes/codebase4.0/grid-pdf-php/generate.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
require_once 'gridPdfGenerator.php';
|
||||
require_once 'tcpdf/tcpdf.php';
|
||||
require_once 'gridPdfWrapper.php';
|
||||
|
||||
$debug = false;
|
||||
$error_handler = set_error_handler("PDFErrorHandler");
|
||||
|
||||
if (get_magic_quotes_gpc()) {
|
||||
$xmlString = stripslashes($_POST['grid_xml']);
|
||||
} else {
|
||||
$xmlString = $_POST['grid_xml'];
|
||||
}
|
||||
$xmlString = urldecode($xmlString);
|
||||
if ($debug == true) {
|
||||
error_log($xmlString, 3, 'debug_'.date("Y_m_d__H_i_s").'.xml');
|
||||
}
|
||||
|
||||
$xml = simplexml_load_string($xmlString);
|
||||
$pdf = new gridPdfGenerator();
|
||||
$pdf->printGrid($xml);
|
||||
|
||||
function PDFErrorHandler ($errno, $errstr, $errfile, $errline) {
|
||||
global $xmlString;
|
||||
if ($errno < 1024) {
|
||||
error_log($xmlString, 3, 'error_report_'.date("Y_m_d__H_i_s").'.xml');
|
||||
echo $errfile." at ".$errline." : ".$errstr;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user