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.
 
 
 
 
 

26 righe
1.0 KiB

<?
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php";
include_once($configPath);
$error = true;
if (!empty($_GET) && !empty($_SESSION["utente"]) && $_SESSION["utente"]->gerarchia < 100 && tokenVerify($_GET["token"]) && (!empty($_GET["modulo"]) && !empty($_GET["codice_elemento"]))) {
$manager = new DGUE($_GET["modulo"],$_GET["codice_elemento"]);
if ($manager->checkAdminPermission()) {
$error = false;
$content = $manager->fillContent("preview");
$html = $manager->showDGUE($content,$manager->getRequestedCriteria(),$manager->version);
$html = mb_convert_encoding($html, 'HTML-ENTITIES', "UTF-8");
$content = documentConverter::getPDFWithTCPDF($html,"A4","portrait",true,true);
$fileName = 'DGUE.pdf';
if (!empty($content)) {
$error = false;
header("Content-type:application/pdf");
header("Content-Disposition:attachment;filename={$fileName}");
echo $content;
}
}
}
if ($error) {
header('HTTP/1.0 403 Forbidden');
die();
}
?>