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.
 
 
 
 
 

204 righe
9.0 KiB

<?
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php";
include_once($configPath);
$id_modulo = "partecipanti";
$cmd_info = concorso::getInfoModulo($id_modulo);
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($radice,$_GET["codice"],$id_modulo) && $_SESSION["utente"]->permission($cmd_info["modulo_riferimento"])) {
$codice_round = $_GET["codice_round"] ?? NULL;
$concorso = concorso::init($_GET["codice"],$codice_round);
if (!empty($concorso)) {
$record = $concorso->info;
$round = $concorso->round;
$lock = $concorso->checkLock($cmd_info["id"]);
$titolo_modulo = __($cmd_info["titolo"]);
$breadcrumb = array();
$breadcrumb["/".$radice."/"] = Modulo::getInfo($radice)["titolo"];
$breadcrumb["/".$radice."/panel.php?codice=".$record["codice"]."&codice_round=".$round["codice"]] = __("Pannello");
$breadcrumb[""] = $titolo_modulo;
include_once ($beRoot."/layout/top.php");
$concorso->printSelectLottiConditions = ["hasPartecipanti"];
if ($concorso->chooseLotto($_GET["codice_lotto"] ?? false,"{$_SERVER["PHP_SELF"]}?codice=".$record["codice"]."&codice_round=".$round["codice"])) {
$lotto = $concorso->lotto;
$partecipanti = $concorso->getPartecipanti();
?>
<h1><?= $titolo_modulo ?></h1>
<?
$print = true;
if (!empty($partecipanti)) {
foreach($partecipanti AS $partecipante) {
if ($partecipante["flagEncrypted"] == "S" && $partecipante["escluso"] == "N") {
$print = false;
if ($concorso->canDecryptInfo()) {
?>
<form rel="validate" method="post" action="decripta.php" id="edit-form">
<input type="hidden" name="token" value="<?= tokenGen() ?>">
<input type="hidden" name="codice_concorso" value="<?= $record["codice"] ?>">
<input type="hidden" name="codice" value="<?= $lotto["codice"] ?>">
<input type="hidden" name="codice_round" value="<?= $round["codice"] ?>">
<div class="confirmMSG">
<?
alertManager::printAlertBox(__("Informazioni partecipanti criptate"));
?>
<button type="button" onclick="$('.confirmMSG').slideToggle()" class="btn btn-block btn-lg btn-warning"><?= __("Decripta") ?></button>
</div>
<div class="confirmMSG collapse">
<? alertManager::printWarningBox(__("Attenzione, stai per decriptare i dati dei partecipanti"),__("Vuoi proseguire?")); ?>
<div class="row">
<div class="col-12 col-lg-6">
<button type="button" onclick="$('.confirmMSG').slideToggle()" class="btn btn-block btn-lg btn-danger"><?= __("Annulla") ?></button>
</div>
<div class="col-12 col-lg-6">
<button type="submit" class="btn btn-block btn-lg btn-warning"><?= __("Decripta") ?></button>
</div>
</div>
</div>
</form>
<?
} else {
$printShuffle = true;
}
break;
}
}
}
if ($printShuffle) {
alertManager::printInfoBox(__("In questa fase sono mostrati solo i nominativi in ordine sparso dei partecipanti per consentire di individuare eventuali incompatibilità nella commissione ai sensi della delibera Anac n. 358 del 20.07.2023."));
?>
<div class="card card-body p-0">
<div class="table-responsive m-0">
<table class="table m-0 table-striped table-hover" id="tab-data" width="100%">
<thead>
<tr>
<th width="10"><?= __("Codice Fiscale") ?></th>
<th><?= __("Ragione Sociale") ?></th>
</tr>
</thead>
<tbody>
<?php foreach($partecipanti AS $partecipante) :
if (!empty($partecipante["codice_operatore"])):
$oe = oeManager::getOE($partecipante["codice_operatore"]) ?? null;
if (!empty($oe)):
?>
<tr>
<td>
<?= $oe["codice_fiscale_impresa"] ?>
</td>
<td>
<?= $oe["ragione_sociale"] ?>
</td>
</tr>
<?php
endif;
endif;
endforeach; ?>
</tbody>
</table>
</div>
</div>
<?php
} else if ($print) {
if (!empty($partecipanti)) { ?>
<?
if ($concorso->lastRound) {
if (empty($concorso->pubblicaPartecipanti())) {
alertManager::printWarningCompact(__("I partecipanti alla procedura non sono stati pubblicati"));
$labelPartecipanti = "Pubblica partecipanti";
$btnPartecipanti = "btn-primary";
} else {
$labelPartecipanti = "Nascondi partecipanti";
$btnPartecipanti = "btn-danger";
}
?>
<script>
function visualizzaPartecipanti() {
Swal({
title: js_dict["sei-sicuro"],
text: js_dict["msg-conferma"],
type: "warning",
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: js_dict.conferma,
cancelButtonText: js_dict.annulla,
closeOnConfirm: true
}).then((result) => {
if (result.value) {
data = "codice_concorso=<?= $concorso->info["codice"] ?>&codice_lotto=<?= $concorso->lotto["codice"] ?>&codice_round=<?= $concorso->round["codice"] ?>";
$.ajax({
type: "POST",
url: "/backend/concorsi/partecipanti/showPartecipanti.php",
data: data,
dataType: "script",
success: function(result) {
result;
},
error: function() {
swal(js_dict["error-retry"]);
}
});
}
});
}
</script>
<div id="commands" class="mb-5">
<div class="commands container-fluid">
<div class="row">
<div class="col-12">
<button type="button" onClick="visualizzaPartecipanti()" class="btn float-right <?= $btnPartecipanti ?>" title="<?= $labelPartecipanti ?>"><span class="fa fa-users"></span> <?= $labelPartecipanti ?></button>
</div>
</div>
</div>
</div>
<?
}
?>
<div class="card card-body p-0">
<div class="table-responsive m-0">
<table class="table m-0 table-striped table-hover" id="tab-data" width="100%">
<thead>
<tr>
<th width="10">#</th>
<th width="10"><?= __("Codice Fiscale") ?></th>
<th><?= __("Ragione Sociale") ?></th>
<th></th>
<th width="10"></th>
<th style="width: 150px"></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<script>
var tabPartecipanti = $("#tab-data").DataTable({
"processing": true,
"serverSide": true,
"sort": false,
"info": false,
"filter": false,
"paginate": false,
"language": {
"url": "/dictionary/datatables/<?= $_SESSION["language"] ?>.lang"
},
"ajax": "table.php?codice=<?= $record["codice"] ?>&codice_round=<?= $round["codice"] ?>&codice_lotto=<?= $lotto["codice"] ?>"
});
</script>
<? } else {
alertManager::printWarningBox(__("Nessun risultato"));
}
}
}
include_once ($beRoot."/layout/bottom.php");
} else {
echo '<meta http-equiv="refresh" content="0;URL=/index.php">';
die();
}
} else {
echo '<meta http-equiv="refresh" content="0;URL=/index.php">';
die();
}
?>