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.
92 righe
3.7 KiB
92 righe
3.7 KiB
<? |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"public_html/"))."config.php"; |
|
include_once($configPath); |
|
$id_modulo = "schede"; |
|
$cmd_info = anac::getInfoModulo($id_modulo); |
|
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($cmd_info["modulo_riferimento"]) && $_SESSION["utente"]->permission($radice,$_GET["codice_simog"],$id_modulo)) { |
|
$anac = anac::init($_GET["codice_simog"]); |
|
if (!empty($anac)) { |
|
$codice_lotto = $_GET["codice_lotto"]; |
|
$lotto = $anac->getLotti($codice_lotto); |
|
$titolo_modulo = __($cmd_info["titolo"]); |
|
$breadcrumb = array(); |
|
$breadcrumb["/".$radice."/"] = Modulo::getInfo($radice)["titolo"]; |
|
$breadcrumb = $anac->getBreadcrumb($breadcrumb); |
|
$breadcrumb["/".$radice."/panel.php?codice=".$anac->info["codice"]] = __("Pannello"); |
|
$breadcrumb["/".$radice."/lotti/panel.php?codice_simog=".$anac->info["codice"]."&codice_lotto=".$codice_lotto] = __("Lotto"); |
|
$breadcrumb[""] = $titolo_modulo; |
|
|
|
include_once ($beRoot."/layout/top.php"); |
|
|
|
?> |
|
<h1> |
|
<?= $titolo_modulo ?> |
|
</h1> |
|
<? |
|
$riepilogo = []; |
|
$schede = $anac->getSchede($codice_lotto); |
|
$tipologie = $anac->listSchede(null,true); |
|
if (!empty($schede)) { |
|
foreach($schede AS $scheda) { |
|
if ($scheda["stato"] === "1") { |
|
if (!isset($riepilogo[$scheda["tipologia"]])) { $riepilogo[$scheda["tipologia"]] = 0; } |
|
$riepilogo[$scheda["tipologia"]]++; |
|
} |
|
} |
|
} |
|
if (!empty($riepilogo)) { |
|
?> |
|
<table class="table table-striped table-hover"> |
|
<thead> |
|
<tr> |
|
<th><?= __("Scheda") ?></th> |
|
<th width = "100"><?= __("Numero") ?></th> |
|
</tr> |
|
</thead> |
|
<tbody> |
|
<? foreach($tipologie AS $idScheda => $scheda) { |
|
if (!empty($riepilogo[$idScheda])) { ?> |
|
<tr> |
|
<td> |
|
<?= $scheda["titolo"] ?> |
|
<? if (!empty($scheda["derived"])) { |
|
if ($scheda["derived"] == "#APPALTOTYPE#") { |
|
$appaltoType = strtolower(anac::getAppaloType($lotto)); |
|
$scheda["derived"] = "appalto-{$appaltoType}"; |
|
} |
|
$schedaCollegata = $tipologie[$scheda["derived"]] ?? null; |
|
if (!empty($schedaCollegata)) { |
|
?> |
|
<small><span class="badge badge-info p-2"><span class="fa fa-link"></span> <?= __("Collegato a scheda") ?>: <?= $schedaCollegata["titolo"] ?></span></small> |
|
<? |
|
} |
|
?> |
|
<? } ?> |
|
</td> |
|
<td class="text-center"> |
|
<?= $riepilogo[$idScheda] ?> |
|
</td> |
|
</tr> |
|
<? } |
|
} ?> |
|
</tbody> |
|
</table> |
|
<button class="btn btn-block btn-success" onClick="showModalWithURL('/backend/anac/send.php?token=<?= tokenGen() ?>&method=sendSchede&codice=<?= $anac->info["codice"] ?>&codice_lotto=<?= $codice_lotto ?>');"> |
|
<span class="fa fa-paper-plane"></span> <?= __("Invia a SIMOG") ?> |
|
</button> |
|
<? |
|
} else { |
|
alertManager::printWarningBox(__("Nessun risultato")); |
|
echo "<meta http-equiv=\"refresh\" content=\"0;URL=/backend/anac/lotti/panel.php?codice_simog={$anac->info["codice"]}&codice_lotto={$codice_lotto}\">"; |
|
die(); |
|
} |
|
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(); |
|
} |
|
?>
|