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.
110 righe
5.2 KiB
110 righe
5.2 KiB
<? |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
$id_modulo = "partecipanti"; |
|
$cmd_info = gara::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; |
|
$gara = gara::init($_GET["codice"],$codice_round); |
|
if (!empty($gara)) { |
|
$record = $gara->info; |
|
$round = $gara->round; |
|
$lock = $gara->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"); |
|
$lotti = $gara->getLotti(); |
|
$stati = []; |
|
foreach($lotti AS $tmp) { |
|
if ($tmp["stato"] == 95) { |
|
$stati[$tmp["codice"]] = ["label"=>__("Deserto"),"class"=>"button-disabled"]; |
|
} |
|
} |
|
if ($gara->chooseLotto($_GET["codice_lotto"] ?? false,"{$_SERVER["PHP_SELF"]}?codice=".$record["codice"]."&codice_round=".$round["codice"],$stati)) { |
|
$lotto = $gara->lotto; |
|
$partecipanti = $gara->getPartecipanti(); |
|
$tokenEsportazione = base64_encode(generateStrongPassword()); |
|
?> |
|
<h1><?= $titolo_modulo ?></h1> |
|
<div id="commands" class="mb-5"> |
|
<div class="commands container-fluid"> |
|
<div class="row"> |
|
<div class="col-12 text-right"> |
|
<? if (!$gara->getModalita()["online"] && $gara->canAddOrRemovePartecipanti()) { ?> |
|
<button onClick="showModalWithURL('massive/panel.php?codice_gara=<?= $record["codice"] ?>&codice_round=<?= $round["codice"] ?>&codice_lotto=<?= $lotto["codice"] ?>')" class="btn btn-warning" title="<?= __('Caricamento massivo') ?>"><span class="fa fa-table"></span> <?= __('Caricamento massivo') ?></button> |
|
<button onClick="showModalWithURL('search.php?codice_gara=<?= $record["codice"] ?>&codice_round=<?= $round["codice"] ?>&codice_lotto=<?= $lotto["codice"] ?>')" class="btn btn-success" title="<?= __('Aggiungi nuovo') ?>"><span class="fa fa-plus-circle"></span> <?= __('Aggiungi nuovo') ?></button> |
|
<? } ?> |
|
<? if (!empty($partecipanti)) { ?> |
|
<a target="_blank" href="exportCSV.php?tokenEsportazione=<?= $tokenEsportazione ?>" class="btn btn-warning"> |
|
<span class="far fa-file-excel"></span> <?= __("Esporta CSV") ?> |
|
</a> |
|
<? } ?> |
|
</div> |
|
</div> |
|
</div> |
|
</div> |
|
<? if (!empty($partecipanti)) { ?> |
|
<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 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?token=<?= $tokenEsportazione ?>&codice=<?= $record["codice"] ?>&codice_round=<?= $round["codice"] ?>&codice_lotto=<?= $lotto["codice"] ?>" |
|
}); |
|
</script> |
|
<? } else { |
|
if ($lotto["stato"] != "95") { ?> |
|
<? alertManager::printWarningBox(__("Nessun risultato")); ?> |
|
<form rel="validate" method="post" action="deserta.php" id="edit-form"> |
|
<input id="token" type="hidden" name="token" value="<?= tokenGen() ?>"> |
|
<input id="codice_gara" type="hidden" name="codice_gara" value="<?= $record["codice"] ?>"> |
|
<input id="codice" type="hidden" name="codice" value="<?= $lotto["codice"] ?>"> |
|
<input id="codice_round" type="hidden" name="codice_round" value="<?= $round["codice"] ?>"> |
|
<button class="btn btn-block btn-lg btn-warning"><?= __("Dichiara deserta") ?></button> |
|
</form> |
|
<? |
|
} else { |
|
alertManager::printWarningBox(__("Lotto deserto")); |
|
} |
|
} |
|
} |
|
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(); |
|
} |
|
?>
|
|
|