$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; include_once($configPath); if (!empty($_SESSION["utente"]) && !empty($_SESSION["utente"]->oe)) { if (!empty($_POST["modulo"])) { $_GET = $_POST; } if (!empty($_GET["modulo"]) && !empty($_GET["codice_elemento"])) { $dgue = new DGUE($_GET["modulo"],$_GET["codice_elemento"]); if (!empty($dgue)) { $dgue->checkAdminPermission(); $pannello = !empty($_GET["pannello"]); $breadcrumb["/{$dgue->modulo}/"] = Modulo::getInfo($dgue->modulo)["titolo"]; $breadcrumb = $dgue->getBreadcrumb($breadcrumb,$pannello); $breadcrumb[""] = __("DGUE"); include_once ($root."/layout/top.php"); $content = []; $compilato = $dgue->getMyDGUE()[0] ?? NULL; $printForm = $_GET["printForm"] ?? NULL; $setGeneral = true; if (!empty($compilato) && empty($_GET["codice"]) && empty($_GET["filechunk"])) { if (!isset($printForm)) { $printForm = true; } $compilato = DGUE::staticgetMyDGUE("","",["codice"=>$compilato["codice"]])[0] ?? null; $setGeneral = false; } else { if (!empty($_GET["filechunk"])) { if (strpos($_GET["filechunk"], "../")===false) { $chunkPath = $config["chunk_folder"]."/".$_SESSION["utente"]->codice."/".$_GET["filechunk"]; $content = DGUE::getDGUEFromXML(file_get_contents($chunkPath)); } } else if (!empty($_GET["codice"])) { $compilato = DGUE::staticgetMyDGUE("","",["codice"=>$_GET["codice"]])[0] ?? null; } } ?>