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.
 
 
 
 
 

70 righe
2.7 KiB

<?
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php";
include_once($configPath);
$error = true;
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($radice)) {
$error = false;
$opzioni = Compilatore::listOpzioni();
?>
<button onclick="showModalWithURL('/backend/compilatore/opzioni/edit.php?codice=0');" class="btn btn-success" title="<?= __('Aggiungi nuovo') ?>"><span class="fa fa-plus"></span> <?= __('Aggiungi nuovo') ?></button>
<?
if (!empty($opzioni)) {
?>
<div class="table-responsive">
<table class="table table-striped table-hover">
<thead>
<tr>
<th></th>
<th><?= __("Titolo") ?></th>
<th width="10"></th>
<th width="10"></th>
<th width="10"></th>
</tr>
</thead>
<tbody>
<?
foreach($opzioni AS $opzione) {
$stato = "bg-disabled";
$stato_label = __('disattivo');
if ($opzione["attivo"]=="S") {
$stato = "bg-active";
$stato_label = __('attivo');
}
?>
<tr>
<td width="10">
<div id="flag_opzione_<?= $opzione["codice"] ?>" class="mx-1 status_flag <?= $stato ?>"><span class="sr-only"><? $stato_label ?></span></div>
</td>
<td><?= $opzione["titolo"] ?></td>
<td>
<button title='<?= __("modifica") ?>' class='btn btn-block btn-sm btn-primary' onclick="showModalWithURL('/backend/compilatore/opzioni/edit.php?codice=<?= $opzione["codice"] ?>')">
<span class='fa fa-edit'></span>
</button>
</td>
<td>
<button title='<?= __("Attiva/Disattiva") ?>' class='btn btn-block btn-sm btn-warning' onclick='disabilita(<?= $opzione["codice"] ?>,"compilatore/opzioni");'>
<span class='fa fa-sync'></span>
</button>
</td>
<td>
<button title='<?= __("elimina") ?>' class='btn btn-block btn-sm btn-danger' onclick='elimina(<?= $opzione["codice"] ?>,"compilatore/opzioni");'>
<span class='fa fa-times'></span>
</button>
</td>
</tr>
<?
}
?>
</tbody>
</table>
</div>
<?
} else {
alertManager::printWarningBox(__("Nessun risultato"));
}
}
if ($error) {
header('HTTP/1.0 403 Forbidden');
die();
}
?>