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.
105 righe
4.8 KiB
105 righe
4.8 KiB
<? |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"public_html/"))."config.php"; |
|
include_once($configPath); |
|
$id_modulo = "atti"; |
|
$cmd_info = attiCPN::getInfoModulo($id_modulo); |
|
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($radice,$_GET["codice"],$id_modulo) && $_SESSION["utente"]->permission($cmd_info["modulo_riferimento"])) { |
|
$cpn = attiCPN::init($_GET["codice"]); |
|
if (!empty($cpn)) { |
|
$lock = $cpn->checkLock($id_modulo); |
|
$titolo_modulo = __($cmd_info["titolo"]); |
|
$breadcrumb = array(); |
|
$breadcrumb["/".$radice."/"] = Modulo::getInfo($radice)["titolo"]; |
|
$breadcrumb["/".$radice."/panel.php?codice=".$cpn->info["codice"]] = __("Pannello"); |
|
$breadcrumb[""] = $titolo_modulo; |
|
|
|
include_once ($beRoot."/layout/top.php"); |
|
?> |
|
<h1> |
|
<?= $titolo_modulo ?> |
|
</h1> |
|
<? |
|
$atti = $cpn->getAtti(); |
|
$suggerimenti = $cpn->suggerimenti(); |
|
?> |
|
<div id="commands" class="mb-5"> |
|
<div class="commands container-fluid text-right"> |
|
<? if (!empty($suggerimenti)) { ?> |
|
<button <? if (empty($atti)) { ?>disabled <? } else { ?> onclick="showModalWithURL('suggerimenti.php?codice=<?= $cpn->info["codice"] ?>')"<? } ?> class="btn btn-warning"> |
|
<span class="badge badge-danger"><?= count($suggerimenti) ?></span> <?= __("Suggerimenti") ?> |
|
<? if (empty($atti)) { ?> - <?= __("Inserisci un nuovo atto per procedere") ?> <? } ?> |
|
</button> |
|
<? }?> |
|
<button onclick="showModalWithURL('add.php?codice_cpn=<?= $cpn->info["codice"] ?>');" class="btn btn-success" title="<?= __('Aggiungi nuovo') ?>"><span class="fa fa-plus-circle mr-2"></span> <?= __('Aggiungi nuovo') ?></button> |
|
</div> |
|
</div> |
|
<? |
|
if (!empty($atti)) { |
|
?> |
|
<div class="card mb-2"> |
|
<div class="card-body"> |
|
<div class="table-responsive"> |
|
<table class="table table-striped table-hover m-0"> |
|
<thead> |
|
<tr> |
|
<th colspan="2"><?= __("Stato") ?></th> |
|
<th><?= __("descrizione") ?></th> |
|
<th width="10"></th> |
|
<th width="10"></th> |
|
<th width="10"></th> |
|
</tr> |
|
</thead> |
|
<tbody id="listlotti"> |
|
<? |
|
$tipologie = attiCPN::getOptions("atti"); |
|
$stati = attiCPN::getStati(); |
|
foreach ($atti as $atto) { |
|
$stato = $stati[$atto["stato"]]; |
|
$row[] = __($stato["titolo"]); |
|
$allegati = $cpn->getAllegati($atto["codice"]); |
|
?> |
|
<tr class="rowlotti"> |
|
<td width="10"> |
|
<div class="status_flag" style="background-color:<?= $stato["color"] ?>"></div> |
|
</td> |
|
<td> |
|
<?= $stato["titolo"] ?> |
|
</td> |
|
<td> |
|
<strong><?= $tipologie[$atto["tipo"]] ?></strong> |
|
</td> |
|
<td width="10"> |
|
<button onClick="showModalWithURL('edit.php?codice_cpn=<?= $cpn->info["codice"] ?>&codice=<?= $atto["codice"] ?>')" class="btn btn-block btn-sm btn-info" title="<?= __('modifica') ?>"><span class="fa fa-edit"></span></button> |
|
</td> |
|
<td <?= (empty($allegati)) ? "colspan='2'" : "" ?> width="10"> |
|
<button onClick="showModalWithURL('allegati.php?codice_cpn=<?= $cpn->info["codice"] ?>&codice=<?= $atto["codice"] ?>')" class="btn btn-block btn-sm btn-primary" title="<?= __('allegati') ?>"><span class="fa fa-paperclip"></span></button> |
|
</td> |
|
<? if (!empty($allegati)) { ?> |
|
<td> |
|
<button onClick="showModalWithURL('/backend/cpn/send.php?token=<?= tokenGen() ?>&method=sendAtto&codice_atto=<?= $atto["codice"] ?>&codice=<?= $cpn->info["codice"] ?>')" class="btn btn-block btn-sm btn-success" title="<?= __('invia') ?>"><span class="fa fa-paper-plane"></span></button> |
|
</td> |
|
<? } ?> |
|
</tr> |
|
<? |
|
} |
|
?> |
|
</tbody> |
|
</table> |
|
</div> |
|
</div> |
|
</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(); |
|
} |
|
?>
|
|
|