$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; include_once($configPath); $error = true; if (!empty($_SESSION["utente"])) { $manager = new richiesteOE($_GET["modulo"],$_GET["codice_elemento"],$_GET["sub"]); if ($manager->checkAdminPermission()) { $infoModulo = richiesteOE::moduliAbilitati()[$manager->getModuloRiferimento()] ?? null; $infoUtente = (!empty($infoModulo["riferimento_partecipante"]) && $infoModulo["riferimento_partecipante"] == "utente"); $tipologie = $manager->tipologie(); if (!empty($_GET["codice"])) { $tmp = $manager->getRichieste("N",["codice"=>$_GET["codice"]]); if (!empty($tmp)) { $richiesta = $tmp[0]; } } else { $richiesta = get_campi("b_richieste_oe"); if (!empty($_GET["codice_derivazione"])) { $derivazione = $manager->getRichieste("N",["codice"=>$_GET["codice_derivazione"]])[0] ?? false; if (!empty($derivazione)) { $richiesta["codice_derivazione"] = $derivazione["codice"]; $richiesta["tipologia"] = $derivazione["tipologia"]; $richiesta["firma"] = $derivazione["firma"]; $richiesta["titolo"] = $derivazione["titolo"]; $richiesta["testo"] = $derivazione["testo"]; $richiesta["scadenza"] = date("Y-m-d",strtotime("+10 days")) . " 14:00:00"; } } else { $suggestion = $manager->getObject()->info["oggetto"] ?? ""; $richiesta["scadenza"] = date("Y-m-d",strtotime("+10 days")) . " 14:00:00"; } if (!empty($_GET["quickCreate"])) { if (!empty($_GET["tipologia"])) { if (isset($tipologie[$_GET["tipologia"]])) { $richiesta["tipologia"] = $_GET["tipologia"]; } } if (!empty($_GET["codice_operatore"])) { $quickOperatore = $_GET["codice_operatore"]; } } } if (!empty($richiesta) && !empty($manager->partecipanti)) { $error = false; ?>
} } } if ($error) { header('HTTP/1.0 403 Forbidden'); die(); } ?>