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.
 
 
 
 
 

94 righe
4.0 KiB

<?
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php";
include_once($configPath);
$id_modulo = "buste";
$cmd_info = concorso::getInfoModulo($id_modulo);
$error = true;
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($cmd_info["modulo_riferimento"]) && $_SESSION["utente"]->permission($radice,$_GET["codice_concorso"],$id_modulo)) {
$codice_round = $_GET["codice_round"] ?? NULL;
$concorso = concorso::init($_GET["codice_concorso"],$codice_round);
if (!empty($concorso)) {
$record = $concorso->info;
$round = $concorso->round;
$lock = $concorso->checkLock($cmd_info["id"]);
$hasSub = false;
$richiesta = $concorso->getRichiesta($_GET["codice"]);
if (!empty($richiesta)) {
if ($richiesta["locked"] == "S") {
$lock = true;
}
$lotti = $concorso->getLotti();
if (!empty($lotti)) {
$all = false;
$selezionati = $concorso->getLottiFromRichiesta($richiesta["codice"]);
if (!empty($selezionati) && empty($selezionati[0])) {
$all = true;
}
$error = false;
if (empty($lock)) { ?>
<form rel="validate" method="post" action="bind.php" id="edit-form">
<input id="token" type="hidden" name="token" value="<?= tokenGen() ?>">
<input id="codice" type="hidden" name="codice" value="<?= $richiesta["codice"] ?>">
<input id="codice_concorso" type="hidden" name="codice_concorso" value="<?= $record["codice"] ?>">
<input id="codice_round" type="hidden" name="codice_round" value="<?= $round["codice"] ?>">
<? } else { ?><div id="edit-form"><?} ?>
<strong class="h5"><?= $richiesta["titolo"] ?></strong><br>
<div class="card card-body" id="elencoLotti">
<div class="table-responsive">
<table class="table table-condensed table-striped table-hover">
<thead>
<tr>
<th width="10">#</th>
<th><?= __("Lotto") ?></th>
<th width="200" class="text-center"><input type="checkbox" name="all" <?= ($all) ? "checked" : "" ?> onchange="$('.checkBoxLotto').slideToggle()"></th>
</tr>
</thead>
<tbody>
<? foreach($lotti as $lotto) {
if ($lotto["stato"] != 95 && $lotto["stato"] != 99) { ?>
<tr>
<th class="text-center"><?= $lotto["numero"] ?></th>
<th><?= $lotto["oggetto"] ?></th>
<th class="text-center">
<div class="checkBoxLotto <?= ($all) ? "collapse" : "" ?>">
<input type="checkbox" <?= (in_array($lotto["codice"],$selezionati) !== false) ? "checked" : "" ?> name="lotti[]" value="<?= $lotto["codice"] ?>" class="checkLotto">
</div>
<div class="checkBoxLotto <?= (!$all) ? "collapse" : "" ?>">
<span class="fa fa-check text-success"></span>
</div>
</th>
</tr>
<? }
} ?>
</tbody>
</table>
</div>
</div>
<? if (empty($_GET["_disableRefresh"])) { ?>
<script>
$('#modal-helper').on('hidden.bs.modal', function (e) {
modalURL = [];
window.location.reload();
})
</script>
<? } ?>
<? if (empty($lock)) { ?>
<button class="btn btn-success btn-block mt-2"><span class="fa fa-save"></span> <?= __("Salva") ?></button>
</form>
<?
} else {
?>
<script>
$(":input","#edit-form").not(".ignore-lock").attr("disabled","disabled").trigger("chosen:updated");
</script>
<?
}
}
}
}
}
if ($error) {
header('HTTP/1.0 403 Forbidden');
die();
}
?>