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.
35 righe
1.3 KiB
35 righe
1.3 KiB
<? |
|
$error = true; |
|
$configPath = substr(__DIR__, 0, strpos(__DIR__, "public_html")) . "/config.php"; |
|
include_once($configPath); |
|
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->permission('progetti') && $_SESSION["utente"]->permission('cpn') && !empty($_GET["codice"])) { |
|
$programma = Programma::init($_GET["codice"]); |
|
if (!empty($programma)) { |
|
$error = false; |
|
if (!empty($programma->info["invio_cpn"])) { |
|
if (empty($_SESSION["cpn"]["token"])) { |
|
?> |
|
<script> |
|
modalURL = []; |
|
<? $action = base64_encode("/backend/progetti/programmazione/cpn/download.php?".http_build_query($_GET)); ?> |
|
showModalWithURL('/backend/common/cpn/views/login.php?codice_ente=<?= $programma->info["codice_ente"] ?>&action=<?= $action ?>'); |
|
</script> |
|
<? |
|
} else { |
|
?> |
|
<a href="/backend/progetti/programmazione/cpn/pdf.php?codice=<?= $programma->info["codice"] ?>" class="btn btn-lg btn-success btn-block p-5" target="_blank"> |
|
<span class="fa fa-3x fa-download"></span><br> |
|
<?= __("Download") ?> |
|
</a> |
|
<? |
|
} |
|
} else { |
|
alertManager::printAlertBox(__("Errore nell'elaborazione della richiesta")); |
|
} |
|
} |
|
} |
|
if ($error) { |
|
header('HTTP/1.0 403 Forbidden'); |
|
die(); |
|
} |
|
?>
|