$prepareVariable = "null"; } else { $prepareVariable = "'{$variable['value']}'"; } $sqlStatement = str_ireplace($prepareKey, $prepareVariable, $sqlStatement); $sqlStatement = str_ireplace($prepareKey . '_operator', $variable['operator'], $sqlStatement); } return $sqlStatement; } } /** * This will combine the XML and the XSL * or generate the HTML, Text */ $rg = new ReportGenerator(); $rg->setRequest($_REQUEST); $date = new DateTime(); $Stamp = $date->format('Ymd-His'); $xslt = new XSLTProcessor(); $xslt->registerPHPFunctions(); switch ($rg->format) { case 'html': header('Content-Type: application/xslt+xml'); header('Content-Disposition: inline; filename=' . strtolower($rg->reportDir) . '-' . $Stamp . '".html"'); $xslt->importStylesheet(new SimpleXMLElement($rg->getXSLTemplate())); echo $xslt->transformToXml(new SimpleXMLElement($rg->getXMLDocument())); break; case 'pdf': require_once '../../../lib/html2pdf_v4.03/html2pdf.class.php'; $xslt->importStylesheet(new SimpleXMLElement($rg->getXSLTemplate())); $html2pdf = new HTML2PDF('P', 'A4', 'en');