$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; include_once($configPath); $error = true; if (!empty($_SESSION["utente"]) && tokenVerify() && !$_SESSION["utente"]->isSupporto()) { $concorso = publicConcorso::init($_POST["codice"]); if (!empty($concorso)) { $record = $concorso->info; $round = $concorso->round; if ($concorso->sopralluogoAperti()) { $array = array(); $array["codice_round"] = $round["codice"]; $array["richiesta"] = $_POST["richiesta"]; $array["utente_richiesta"] = $_SESSION["utente"]->codice; $array["timestamp_richiesta"] = date('Y-m-d H:i:s'); $array["attivo"] = "P"; $array["codice_richiedente"] = $_SESSION["utente"]->oe["codice"]; $salva = new salva(); $salva->debug = false; $salva->nome_tabella = "b_concorsi_sopralluogo"; $salva->operazione = "INSERT"; $salva->oggetto = $array; $codice = $salva->save(); if ($codice !== false) { $concorso->updateBadges(); if (isset($_POST["allegato-sopralluogo"])) { foreach($_POST["allegato-sopralluogo"] as $allegato) { filesManager::saveFile($allegato["filename"],$codice,"concorsi-ric-sopr",$allegato["nome"]); } } $corpo = "