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.
 
 
 
 
 

30 righe
1.0 KiB

<?php
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php";
include_once($configPath);
$error = true;
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->hasSuperPowers() && !empty($_POST["codice"]) && isset($_POST["lotto"]) && tokenVerify()) {
$gara = gara::init($_POST["codice"]);
if (!empty($gara)) {
$lotti = array_column($gara->getLotti(),null,"codice");
if (!empty($lotti[$_POST["lotto"]])) {
$lotto = $lotti[$_POST["lotto"]];
$salva = new salva();
$salva->debug = false;
$salva->nome_tabella = "b_gare_lotti";
$salva->operazione = "UPDATE";
$salva->oggetto = ["codice"=>$lotto["codice"],"stato"=>"0"];
$codice = $salva->save();
if ($codice !== false) {
$error = false;
$gara->addToLog("UPDATE",__("Sbloccato lotto") . " " . $lotto["numero"]);
?>
window.location.reload();
<?
}
}
}
}
if ($error) {
header('HTTP/1.0 403 Forbidden');
die();
}