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.
47 righe
1.8 KiB
47 righe
1.8 KiB
<? |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
$error = true; |
|
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($radice) && !empty($_POST["codice"])) { |
|
$error = false; |
|
$codice = $_POST["codice"]; |
|
if (is_numeric($_POST["codice"])) { |
|
$error = true; |
|
$bind = array(":codice"=>$_POST["codice"]); |
|
$sql = "SELECT b_gare_form.codice, b_gare_round.codice_gara, b_gare_round.codice AS codice_round FROM |
|
b_gare_form JOIN b_gare_criteri_valutazione ON b_gare_form.codice_criterio = b_gare_criteri_valutazione.codice |
|
JOIN b_gare_round ON b_gare_criteri_valutazione.codice_round = b_gare_round.codice |
|
WHERE b_gare_form.codice = :codice "; |
|
$ris = $pdo->go($sql,$bind); |
|
if ($ris->rowCount() === 1) { |
|
$articolo = $ris->fetch(PDO::FETCH_ASSOC); |
|
$gara = gara::init($articolo["codice_gara"],$articolo["codice_round"]); |
|
if (!empty($gara)) { |
|
if ($_SESSION["utente"]->permission($radice,$gara->info["codice"],"criteri")) { |
|
$bind = array(":codice"=>$_POST["codice"]); |
|
$sql = "DELETE FROM b_gare_form WHERE codice = :codice "; |
|
$ris = $pdo->go($sql,$bind); |
|
if ($ris->rowCount() === 1) { |
|
$error = false; |
|
scriviLog("b_gare_form","DELETE",$pdo->getSQL(),$_POST["codice"]); |
|
} |
|
} |
|
$gara->checkRichiesteOnEditCriteri(); |
|
} |
|
} |
|
} |
|
} |
|
if (!$error) { |
|
?> |
|
$("#input-<?= $codice ?>").slideUp('fast',function(){ |
|
$(this).remove(); |
|
if ($(".form-input-edit").length == 0) { |
|
$("#form-save").slideUp('fast'); |
|
} |
|
}); |
|
<? |
|
} else { |
|
header('HTTP/1.0 403 Forbidden'); |
|
die(); |
|
} |
|
?>
|
|
|