gestione gare pubbliche
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.
 
 
 
 
 

38 righe
1.1 KiB

<?
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php";
include_once($configPath);
$error = true;
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->isSupportoOrRoot() && !empty($_GET["codice"])) {
$contratto = stipula::init($_GET["codice"]);
if (!empty($contratto)) {
$stati = stipula::getStati();
$previous = "";
$record = $contratto->info;
foreach($stati AS $id => $stato) {
if ($id == $record["stato"]) { break; }
$previous = $id;
}
if ($previous !== "") {
$salva = new salva();
$salva->debug = false;
$salva->nome_tabella = "b_contratti";
$salva->operazione = "UPDATE";
$salva->oggetto = ["codice"=>$record["codice"],"stato"=>$previous];
$codice = $salva->save();
if ($codice !== false) {
$error = false;
?>
<script>
window.location.reload();
</script>
<?
}
}
}
}
if ($error) {
header('HTTP/1.0 403 Forbidden');
die();
}
?>