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.
118 righe
4.6 KiB
118 righe
4.6 KiB
<? |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($radice) && !empty($_GET["version"])) { |
|
$versionInfo = DGUE::versions()[$_GET["version"]] ?? null; |
|
if (!empty($versionInfo)) { |
|
$versionKey = purify($_GET["version"]); |
|
$breadcrumb = []; |
|
$breadcrumb["/impostazioni/index.php"] = __("Avanzate"); |
|
$breadcrumb["/set-dgue/index.php"] = Modulo::getInfo($radice)["titolo"]; |
|
$breadcrumb[] = $versionInfo["label"]; |
|
include_once ($beRoot."/layout/top.php"); |
|
?> |
|
<div class="container-fluid pt-5"> |
|
<div class="row"> |
|
<div class="col-12"> |
|
<p class="d-block display-4"> |
|
<?= Modulo::header($radice) ?> |
|
</p> |
|
</div> |
|
</div> |
|
</div> |
|
<div id="commands" class="mb-5"> |
|
<div class="commands container-fluid"> |
|
<div class="row"> |
|
<div class="col-12 text-right"> |
|
<button onClick="showModalWithURL('/backend/set-dgue/criteria.php?version=<?= $versionKey ?>&codice=0')" class="mr-1 btn btn-primary" title="<?= __('Aggiungi nuovo') ?>"><span class="fa fa-plus-circle mr-2"></span><?= __('Aggiungi nuovo') ?></button> |
|
</div> |
|
</div> |
|
</div> |
|
</div> |
|
<script> |
|
function check_altro(campo) { |
|
if ($("#"+campo).val() == "-altro-") { |
|
$("#"+campo+"_altro").slideDown(); |
|
} else { |
|
$("#"+campo+"_altro").slideUp(); |
|
$("#"+campo+"_altro").val(''); |
|
} |
|
} |
|
</script> |
|
<? |
|
$criteria = DGUE::getCriteria($_GET["version"] ?? DGUE::findVersion()); |
|
if (!empty($criteria)) { |
|
?> |
|
<div class="table-responsive"> |
|
<table class="table table-striped table-hover"> |
|
<thead> |
|
<tr> |
|
<th></th> |
|
<th><?= __("Codifica") ?></th> |
|
<th><?= __("Criterio") ?></th> |
|
<th><?= __("UUID") ?></th> |
|
<th width="10"></th> |
|
<th width="10"></th> |
|
<th width="10"></th> |
|
</tr> |
|
</thead> |
|
<tbody> |
|
<? |
|
foreach($criteria AS $criterio) { |
|
$stato = "bg-disabled"; |
|
$stato_label = __('disattivo'); |
|
if ($criterio["attivo"]=="S") { |
|
$stato = "bg-active"; |
|
$stato_label = __('attivo'); |
|
} |
|
?> |
|
<tr> |
|
<td> |
|
<div id="flag_<?= $criterio["codice"] ?>" class="mx-1 status_flag <?= $stato ?>"><span class="sr-only"><? $stato_label ?></span></div> |
|
</td> |
|
<td><?= $criterio["codifica_criterio"] ?></td> |
|
<td> |
|
<strong><?= $criterio["nome"] ?></strong><br> |
|
<small><?= $criterio["descrizione"] ?></small> |
|
</td> |
|
<td> |
|
<?= $criterio["uuid"] ?><br> |
|
<small><?= $criterio["taxa"] ?></small> |
|
</td> |
|
<td> |
|
<button title='<?= __("modifica") ?>' class='btn btn-block btn-sm btn-primary' onclick='showModalWithURL("criteria.php?version=<?= $criterio["version"] ?>&codice=<?= $criterio["codice"] ?>");'> |
|
<span class='fa fa-edit'></span> |
|
</button> |
|
</td> |
|
<td> |
|
<button title='<?= __("Attiva/Disattiva") ?>' class='btn btn-block btn-sm btn-warning' onclick='disabilita(<?= $criterio["codice"] ?>,"set-dgue");'> |
|
<span class='fa fa-sync'></span> |
|
</button> |
|
</td> |
|
<td> |
|
<button title='<?= __("elimina") ?>' class='btn btn-block btn-sm btn-danger' onclick='elimina(<?= $criterio["codice"] ?>,"set-dgue");'> |
|
<span class='fa fa-times'></span> |
|
</button> |
|
</td> |
|
</tr> |
|
<? |
|
} |
|
?> |
|
</tbody> |
|
</table> |
|
</div> |
|
<? |
|
} 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(); |
|
} |
|
?>
|
|
|