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.
62 righe
2.2 KiB
62 righe
2.2 KiB
<? |
|
|
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
$error = true; |
|
$id_modulo = "cig"; |
|
$cmd_info = progetto::getInfoModulo($id_modulo); |
|
if (!empty($_GET) && !empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($radice,$_GET["codice"],$id_modulo)) { |
|
$progetto = progetto::init($_GET["codice"]); |
|
if (!empty($progetto)) { |
|
$cigs = $progetto->suggerimenti()["cigs"] ?? []; |
|
if (!empty($cigs)) { |
|
$procedure = $progetto->getCIG(); |
|
if (!empty($procedure)) { |
|
foreach($procedure AS $pr) { |
|
if (!empty($cigs[$pr["cig"]])) { |
|
unset($cigs[$pr["cig"]]); |
|
} |
|
} |
|
} |
|
if (!empty($cigs)) { |
|
$error = false |
|
?> |
|
<form rel="validate" method="post" action="import.php" id="edit-form"> |
|
<input id="token" type="hidden" name="token" value="<?= tokenGen() ?>"> |
|
<input id="codice_progetto" type="hidden" name="codice_progetto" value="<?= $progetto->info["codice"] ?>"> |
|
<table class="table table-striped"> |
|
<thead> |
|
<tr> |
|
<th width="10"></th> |
|
<th width="10">CIG</th> |
|
<th><?= __("Oggetto") ?></th> |
|
<th width="200"><?= __("Importo") ?></th> |
|
</tr> |
|
</thead> |
|
<tbody> |
|
<? |
|
foreach($cigs AS $cig => $info) { |
|
?> |
|
<tr> |
|
<td><input type="checkbox" checked value="<?= $cig ?>" name="cig[]"></td> |
|
<td><?= $cig ?></td> |
|
<td><?= $info["oggetto"] ?></td> |
|
<td class="text-right">€ <?= number_format($info["importo"],2,",",".") ?></td> |
|
</tr> |
|
<? |
|
} |
|
?> |
|
</tbody> |
|
</table> |
|
<button class="btn btn-success btn-block mt-2"><span class="fa fa-download"></span> <?= __("Importa") ?></button> |
|
</form> |
|
<? |
|
} |
|
} |
|
} |
|
} |
|
if ($error) { |
|
header('HTTP/1.0 403 Forbidden'); |
|
die(); |
|
} |
|
?>
|
|
|