permission($radice,$_GET["codice_simog"],$id_modulo)) { if (!empty($_GET["codice_simog"])) { $anac = anac::init($_GET["codice_simog"]); if (!empty($anac)) { $error = false; $codice_lotto = $_GET["codice_lotto"] ?? 0; ob_start(); $echo = $anac->printRicevutaCIG($codice_lotto); $content = ob_get_clean(); if (!$echo || empty($content)) { alertManager::printAlertBox(__("Errore richiesta")); } else { if (empty($_GET["pdf"])) { echo $content; $get = http_build_query($_GET); ?> " . $content . ""; $pdf = documentConverter::getPDFWithDOMPDF($content,"A4","portrait",false); if (!empty($pdf)) { header("Content-type: application/pdf"); header("Content-Disposition: inline; filename=Ricevuta.pdf"); echo $pdf; } else { $error = true; } } } } } } if ($error) { header('HTTP/1.0 403 Forbidden'); die(); } ?>