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.
 
 
 
 
 

31 righe
1.2 KiB

<?
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php";
include_once($configPath);
$error = true;
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($radice,$_POST["codice_contratto"],"esponenti")) {
$bind = array(":codice"=>$_POST["codice"],":codice_contratto"=>$_POST["codice_contratto"]);
$check = $pdo->go("SELECT codice FROM r_contraenti WHERE codice_contraente = :codice AND codice_contratto <> :codice_contratto LIMIT 0,1",$bind);
if ($check->rowCount() == 0) {
$bind = array(":codice"=>$_POST["codice"],":codice_gestore"=>$_SESSION["ente"]->codice);
$sql = "DELETE FROM b_contraenti WHERE codice = :codice AND codice_gestore = :codice_gestore ";
$ris = $pdo->go($sql,$bind);
if ($ris->rowCount() === 1) {
$error = false;
$codice = $_POST["codice"];
scriviLog("b_contraenti","DELETE",$pdo->getSQL(),$_POST["codice"]);
?>
refreshModalHelper();
<?
}
} else {
$error = false;
?>
swal({title:js_dict.error,html:"<?= __("L'esponente è già stato selezionato in altri contratti") ?>",type:"error"});
<?
}
}
if ($error) {
header('HTTP/1.0 403 Forbidden');
die();
}
?>