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.
27 righe
1.0 KiB
27 righe
1.0 KiB
<? |
|
if (!empty($_GET["ref"])) { |
|
$ignoreLog = true; |
|
$ignoreRedirectManutenzione = true; |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
$logo = $pdo->go("SELECT * FROM b_enti WHERE logo = :nome_file ",[":nome_file"=>$_GET["ref"]]); |
|
if ($logo->rowCount() === 1) { |
|
$allegato = $logo->fetch(PDO::FETCH_ASSOC); |
|
$filename = $allegato["riferimento"]; |
|
if (!empty($filename)) { |
|
$path = "/enti/" . $filename; |
|
if (file_exists($config["mediaFolder"].$path)) { |
|
$type = getTypeAndExtension($config["mediaFolder"]."/".$path); |
|
header('Content-Disposition: inline'); |
|
header('Content-Type: ' . $type["type"]); |
|
header('Content-Transfer-Encoding: binary'); |
|
header('Expires: 0'); |
|
header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); |
|
header('Pragma: public'); |
|
readfile($config["mediaFolder"].$path); |
|
die(); |
|
} |
|
} |
|
} |
|
} |
|
?>
|