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.
78 righe
3.0 KiB
78 righe
3.0 KiB
<? |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"public_html/"))."config.php"; |
|
include_once($configPath); |
|
$error = true; |
|
$id_modulo = "atti"; |
|
$cmd_info = attiCPN::getInfoModulo($id_modulo); |
|
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($cmd_info["modulo_riferimento"]) && $_SESSION["utente"]->permission($radice,$_GET["codice_cpn"],$id_modulo)) { |
|
$cpn = attiCPN::init($_GET["codice_cpn"]); |
|
$lock = $cpn->checkLock($id_modulo); |
|
if (!empty($cpn)) { |
|
$atto = $cpn->getAtti($_GET["codice"])[0] ?? null; |
|
if (!empty($atto)) { |
|
$error = false; |
|
if (!$lock) { |
|
?> |
|
<form rel="validate" method="post" action="/backend/cpn/atti/upload.php" id="edit-form"> |
|
<input id="token" type="hidden" name="token" value="<?= tokenGen() ?>"> |
|
<input id="codice" type="hidden" name="codice_cpn" value="<?= $cpn->info["codice"] ?>"> |
|
<input id="codice" type="hidden" name="codice" value="<?= $atto["codice"] ?>"> |
|
<? |
|
$cpn->printSuggerimenti(); |
|
filesManager::printForm("public"); |
|
?> |
|
<? } ?> |
|
<? |
|
filesManager::printList($atto["codice"],"cpn-public","A",0,!$lock); |
|
?> |
|
<? |
|
$refs = $cpn->getAllegati($atto["codice"])["refs"] ?? null; |
|
if (!empty($refs)) { |
|
?> |
|
<div class="card my-2"> |
|
<div class="card-header"> |
|
<strong class="card-title"><?= __("Importati") ?></strong> |
|
</div> |
|
<div class="card-body m-0 p-0"> |
|
<table class="table table-striped"> |
|
<thead> |
|
<tr> |
|
<th><?= __("Allegato") ?></th> |
|
<th width="10"></th> |
|
</tr> |
|
</thead> |
|
<tbody> |
|
<? |
|
foreach($refs AS $allegato) { |
|
?> |
|
<tr id="attach-ref-<?= $allegato["codice_relazione"] ?>"> |
|
<td> |
|
<a href="<?= $allegato["href"] ?>"><?= $allegato["titolo"] ?></a> |
|
</td> |
|
<td> |
|
<? if (!$lock) { ?><button type="button" title="<?= __("elimina") ?>" class="btn btn-sm btn-danger" onclick="elimina('<?= $allegato["codice_relazione"] ?>','cpn/atti/attach','codice_cpn=<?= $atto["codice_cpn"] ?>');"><span class='fa fa-times'></span></button><? } ?> |
|
</td> |
|
</tr> |
|
<? |
|
} |
|
?> |
|
</tbody> |
|
</table> |
|
</div> |
|
</div> |
|
<? |
|
} |
|
?> |
|
<? if (!$lock) { ?> |
|
<button class="btn btn-block btn-primary"><span class="fa fa-save"></span> <?= __("Salva") ?></button> |
|
</form> |
|
<? |
|
} |
|
} |
|
} |
|
} |
|
if ($error) { |
|
header('HTTP/1.0 403 Forbidden'); |
|
die(); |
|
} |
|
?>
|
|
|