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.
32 righe
1.4 KiB
32 righe
1.4 KiB
<? |
|
$error = true; |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
$id_modulo = "partecipanti"; |
|
$cmd_info = AlboFornitori::getInfoModulo($id_modulo); |
|
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($radice,$_GET["codice"],$id_modulo) && $_SESSION["utente"]->permission($cmd_info["modulo_riferimento"])) { |
|
$elenco = AlboFornitori::init($_GET["codice"]); |
|
if (!empty($elenco)) { |
|
$busta = $elenco->getVersionContentBusta($_GET["codice_partecipante"],$_GET["codice_richiesta"],$_GET["codice_versione"]); |
|
if (!empty($busta)) { |
|
if(!empty($busta["content"])) { |
|
$elenco->addToLog("DOWNLOAD","Partecipante #{$_GET["codice_partecipante"]} - Richiesta #{$_GET["codice_richiesta"]} - {$busta["nomeFile"]} - Versione {$busta["codice"]}"); |
|
header('Content-Description: File Transfer'); |
|
header('Content-Disposition: attachment; filename=' . str_replace("-",".",$busta["nomeFile"])); |
|
header('Content-Type: ' . $busta["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'); |
|
echo $busta["content"]; |
|
$error = false; |
|
} |
|
} |
|
} |
|
} |
|
if ($error) { |
|
header('HTTP/1.0 403 Forbidden'); |
|
die(); |
|
} |
|
?>
|
|
|