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.
 
 
 
 
 

26 righe
984 B

<?
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php";
include_once($configPath);
$error = true;
if (!empty($_GET) && !empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($radice,$_GET["codice_modello"])) {
$compilatore = Compilatore::init($_GET["codice_modello"]);
if (!empty($compilatore->info) && (!empty($_POST["paragrafo"]))) {
$error = false;
$compilatore->edit = true;
$sql = "UPDATE b_compilatore_paragrafi SET ordinamento = :posizione WHERE codice = :codice;";
$ris = $pdo->prepare($sql);
foreach($_POST["paragrafo"] AS $codice => $ordinamento) {
$paragrafo = $compilatore->paragrafi($codice);
if (!empty($paragrafo)) {
$ris->bindValue(":codice",$codice,PDO::PARAM_INT);
$ris->bindValue(":posizione",$ordinamento,PDO::PARAM_INT);
$ris->execute();
}
}
}
}
if ($error) {
header('HTTP/1.0 403 Forbidden');
die();
}
?>