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.
 
 
 
 
 

43 righe
1.6 KiB

<?php
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php";
include_once($configPath);
$error = true;
if (!empty($_GET["codice"]) && !empty($_GET["filename"]) && !empty($_GET["sourceID"]) && !empty($_GET["sourceType"])) {
$file = filesManager::fileInfo($_GET["codice"],base64_decode($_GET["filename"]),$_GET["sourceID"],base64_decode($_GET["sourceType"]),true);
if ($file !== false) {
$content = $file["content"];
$error = false;
header('Content-Description: File Transfer');
header('Content-Disposition: inline; filename=' . str_replace("-",".",$file["name"]));
header('Content-Type: ' . $file["mime"]);
header('Content-Transfer-Encoding: binary');
header('Connection: Keep-Alive');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . strlen($content));
echo $content;
die();
}
}
if ($error) {
header("HTTP/1.0 403 Forbidden");
include $root . "/layout/top.php";
if (isset($_SESSION["utente"])) {
$sub_message = __("Non si dispone dei permessi necessari");
} else {
$sub_message = __("Assicurarsi di aver eseguito il login prima di accedere al file");
$sub_message .= "<br><br><a href=\"/accesso.php\" title=\"". __("Accedi ora") ."\">". __("Accedi ora") ."</a>";
}
?>
<div class="card">
<div class="card-body h3 text-center">
<?= alertManager::printAlertBox(__("Impossibile accedere"), $sub_message); ?>
</div>
</div>
<?
include $root . "/layout/bottom.php";
die();
}
?>