$error = true;
if (!isset($root)) {
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php";
include_once($configPath);
if (!empty($_SESSION["utente"]) && !empty($_GET["codice_ente"])) {
$codice_ente = $_GET["codice_ente"];
$dotazione["codice_immobile"] = $_GET["codice_immobile"] ?? "";
}
} else {
$error = false;
}
if (!empty($codice_ente)) {
$error = false;
$immobili = progetto::getImmobili($codice_ente);
?>
if (!empty($immobili)) {
foreach($immobili AS $option) {
$selected = (!empty($dotazione["codice_immobile"]) && $option["codice"] == $dotazione["codice_immobile"]) ? "selected" : "";
?>
}
}
?>
}
if ($error) {
header('HTTP/1.0 403 Forbidden');
die();
}
?>