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.
58 righe
2.4 KiB
58 righe
2.4 KiB
<? |
|
$error = true; |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
$id_modulo = "inviti"; |
|
$cmd_info = gara::getInfoModulo($id_modulo); |
|
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($cmd_info["modulo_riferimento"]) && $_SESSION["utente"]->permission($radice,$_POST["codice_gara"],$id_modulo)) { |
|
$gara = gara::init($_POST["codice_gara"]); |
|
$lock = $gara->checkLock($cmd_info["id"]); |
|
if (!empty($gara) && !$lock) { |
|
$estrazione = oeManager::getEstrazione("gare",$_POST["codice_gara"],$_POST["codice_lotto"]); |
|
if (!empty($_POST["codice_lotto"])) { |
|
$estrazioneGenerale = oeManager::getEstrazione("gare",$_POST["codice_gara"],"0"); |
|
} |
|
if (empty($estrazione) && empty($estrazioneGenerale)) { |
|
|
|
$filters = []; |
|
if (!empty($_POST["filtriApplicati"])) { parse_str(str_replace("&","&",$_POST["filtriApplicati"]), $filters); } |
|
if (!empty($filters["elenco"])) { |
|
$filtroElenco = explode("|",$filters["elenco"]); |
|
if (count($filtroElenco) == 2) { |
|
$sources = oeManager::tipiElenco(); |
|
$tabellePartecipanti = oeManager::tabelleElenco(); |
|
if (in_array($filtroElenco[0],array_keys($sources)) !== false && !empty($tabellePartecipanti[$filtroElenco[0]])) { |
|
$tipo_elenco = $filtroElenco[0]; |
|
$codice_elenco = $filtroElenco[1]; |
|
$gara->saveExtraInfo("tipo_elenco_invito",$tipo_elenco,"round"); |
|
$gara->saveExtraInfo("codice_elenco_invito",$codice_elenco,"round"); |
|
} |
|
} |
|
} |
|
|
|
if(valid_json($_POST["invitati"], $selected, true)) { |
|
$error = false; |
|
$gara->inviteOE($selected, $_POST["codice_lotto"] ?? null, $_POST["invito-manuale"] ?? null, true); |
|
} |
|
|
|
if (!empty($_POST["premialita"])) { |
|
foreach($_POST["premialita"] AS $oe) { |
|
vendorRating::savePremialita($oe,$gara->info["codice"]); |
|
} |
|
} |
|
|
|
if(!empty($_POST['marketplace']) && $_POST['marketplace'] == true ){ |
|
return ['save' => true]; |
|
}else{ |
|
?> |
|
swal({title:js_dict["success-msg"],type:"success"}).then(function(){ window.location.href="/backend/gare/panel.php?codice=<?= $gara->info["codice"] ?>&codice_round=<?= $gara->round["codice"] ?>"; }); |
|
<? |
|
} |
|
} |
|
} |
|
} |
|
if ($error) { |
|
header('HTTP/1.0 403 Forbidden'); |
|
die(); |
|
} |
|
?>
|
|
|