gestione gare pubbliche
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 

45 righe
1.7 KiB

<?
$error = true;
$configPath = substr(__DIR__,0,strpos(__DIR__,"public_html/"))."config.php";
include_once($configPath);
$id_modulo = "preliminari-lotto";
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->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);
?>
<a href="/backend/anac/lotti/ricevuta-cig.php?<?= $get ?>&pdf=1" class="btn btn-block btn-info mt-3" target="_blank">
<span class="fa fa-file"></span> <?= __("Esporta PDF") ?>
</a>
<?
} else {
$content = "<html><style>body { font-size:10px; }td, th { padding:5px; }tr.odd { background-color: #DDD; }table { width:100% }</style><body>" . $content . "</body></html>";
$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();
}
?>