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.
65 righe
2.6 KiB
65 righe
2.6 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 (isset($_POST["codice_cpn"]) && tokenVerify() && !empty($_POST["token-selezione"])) { |
|
$cpn = attiCPN::init($_POST["codice_cpn"]); |
|
if (!empty($cpn)) { |
|
$tokenSelezione = sanitize_string($_POST["token-selezione"]); |
|
$_SESSION["suggerimenti-cpn"][$tokenSelezione] = $_POST["suggerimento"]; |
|
?> |
|
showModalWithURL('/backend/cpn/atti/selectAtto.php?codice_cpn=<?= $cpn->info["codice"] ?>&tokenSelezione=<?= $tokenSelezione ?>') |
|
<? |
|
die(); |
|
} |
|
} |
|
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($cmd_info["modulo_riferimento"]) && $_SESSION["utente"]->permission($radice,$_GET["codice_cpn"],$id_modulo) && !empty($_SESSION["suggerimenti-cpn"][$_GET["tokenSelezione"]])) { |
|
$cpn = attiCPN::init($_GET["codice_cpn"]); |
|
if (!empty($cpn) && !$cpn->checkLock($id_modulo)) { |
|
$atti = $cpn->getAtti(); |
|
if (!empty($atti)) { |
|
$error = false; |
|
$tokenSelezione = sanitize_string($_GET["tokenSelezione"]); |
|
?> |
|
<form rel="validate" method="post" action="/backend/cpn/atti/linkAtto.php" id="edit-form"> |
|
<input id="token" type="hidden" name="token" value="<?= tokenGen() ?>"> |
|
<input id="codice_cpn" type="hidden" name="codice_cpn" value="<?= $cpn->info["codice"] ?>"> |
|
<input id="tokenSelezione" type="hidden" name="tokenSelezione" value="<?= $tokenSelezione ?>"> |
|
<input id="codice" type="hidden" name="codice" value=""> |
|
<table class="table table-striped"> |
|
<thead> |
|
<tr> |
|
<th><?= __("Atto") ?></th> |
|
<th width="10"></th> |
|
</tr> |
|
</thead> |
|
<tbody> |
|
<? |
|
$tipologie = attiCPN::getOptions("atti"); |
|
foreach ($atti AS $atto) { |
|
?> |
|
<tr> |
|
<td><?= $tipologie[$atto["tipo"]] ?></td> |
|
<td> |
|
<button type="submit" onClick="$('#codice').val('<?= $atto["codice"] ?>'); return true" class="btn btn-primary"> |
|
<span class="fa fa-check"></span> <?= __("Seleziona") ?> |
|
</button> |
|
</td> |
|
</tr> |
|
<? |
|
} |
|
?> |
|
</tbody> |
|
</table> |
|
</form> |
|
<? |
|
} |
|
} |
|
} |
|
if ($error) { |
|
header('HTTP/1.0 403 Forbidden'); |
|
die(); |
|
} |
|
?>
|
|
|