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.
152 righe
7.1 KiB
152 righe
7.1 KiB
<? |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"public_html/"))."config.php"; |
|
include_once($configPath); |
|
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($radice,$_GET["codice_simog"]) && !empty($_GET["codice_lotto"])) { |
|
$anac = anac::init($_GET["codice_simog"]); |
|
if ($anac !== false) { |
|
$record = $anac->getLotti($_GET["codice_lotto"])[0] ?? false; |
|
if (!empty($record)) { |
|
$codice_lotto = $record["codice"]; |
|
$breadcrumb = array(); |
|
$breadcrumb["/".$radice."/"] = Modulo::getInfo($radice)["titolo"]; |
|
$breadcrumb = $anac->getBreadcrumb($breadcrumb); |
|
$breadcrumb["/anac/panel.php?codice={$anac->info["codice"]}"] = __("Pannello"); |
|
$breadcrumb[""] = __("Lotto"); |
|
include_once ($beRoot."/layout/top.php"); |
|
$alertManager = new alertManager("anac-lotti-{$record["codice"]}"); |
|
?> |
|
<div id="commands" class="mb-5"> |
|
<div class="commands container-fluid clearfix"> |
|
<div class="btn-group flex-wrap float-right"> |
|
<? if ($_SESSION["utente"]->permission("simog")) { ?> |
|
<button type="button" class="btn btn-success" onClick="showModalWithURL('/backend/anac/lotti/sync/index.php?codice=<?= $anac->info["codice"] ?>&codice_lotto=<?= $record["codice"] ?>');"> |
|
<span class="fa fa-sync"></span> <?= __("Sincronizza da SIMOG") ?> |
|
</button> |
|
<? } ?> |
|
<? if (!empty($record["cig"]) && $record["richiesto_simog"] == "S") { ?> |
|
<button type="button" class="btn btn-info" onClick="showModalWithURL('/backend/anac/lotti/ricevuta-cig.php?codice_simog=<?= $anac->info["codice"] ?>&codice_lotto=<?= $record["codice"] ?>')"> |
|
<span class="fa fa-file"></span> <?= __("Ricevuta CIG") ?> |
|
</button> |
|
<? } ?> |
|
<? $alertManager->printAlertModalButton() ?> |
|
<button type="button" class="btn btn-primary" onClick="openChat('anac','<?= $anac->info["codice"] ?>','<?= $anac->info["codice_ente"] ?>')"> |
|
<span class="fa fa-envelope"></span> <?= __("Chat interna") ?> |
|
<? $unread = Communicator::countUnreadInitiativeChat('anac',$record["codice"]); ?> |
|
<span id="badge-chat" class="badge"><?= (!empty($unread)) ? $unread : "" ?></span> |
|
</button> |
|
</div> |
|
</div> |
|
</div> |
|
<div class="mt-5"> |
|
<h1 class="clearfix"> |
|
<?= (!empty($record["cig"])) ? "CIG: " . $record["cig"] : "Lotto #{$record["codice"]}" ?> |
|
</h1> |
|
</div> |
|
<h3><?= $record["oggetto"] ?></h3> |
|
<div class="card card-body"> |
|
<? |
|
$ris_comandi = anac::getModuli("N",$anac->info["stato"]); |
|
if (count($ris_comandi) > 0) { |
|
$schede = false; |
|
if (!empty($ris_comandi["schede"])) { |
|
|
|
$schede = true; |
|
$stati = anac::getStatiSchede(); |
|
|
|
?> |
|
<div class="row"> |
|
<div class="col-12 col-lg-6"> |
|
<? |
|
} |
|
foreach($ris_comandi AS $id_comando => $rec) { |
|
if ($rec["lotto"]) { |
|
$badge = ""; |
|
$show = true; |
|
$folder = explode("/",$rec["link"]); |
|
$temp = array_pop($folder); |
|
$folder = implode("/",$folder); |
|
if (file_exists($root.$folder."/check.php")) { include($root.$folder."/check.php"); } |
|
$hrefComando = $rec["link"]; |
|
$hrefComando .= (strpos($rec["link"], "?") === false) ? "?" : "&"; |
|
$hrefComando .= "codice_simog={$record["codice_simog"]}"; |
|
$hrefComando .= "&codice_lotto={$record["codice"]}"; |
|
$lock = $anac->checkLock($id_comando); |
|
$status = ""; |
|
if (file_exists($root.$folder."/_status.php") && $show) { |
|
include($root.$folder."/_status.php"); |
|
} |
|
if ($show && $_SESSION["utente"]->permission($rec["modulo_riferimento"],$anac->info["codice"],$id_comando)) { |
|
?> |
|
<a class="btn my-1 <?= $status ?> btn-block btn-<?=($lock==true) ? "secondary" : "info"?>" href="<?= $hrefComando ?>" title="<?= __($rec["descrizione"] ?? $rec["titolo"]) ?>"> |
|
<span class="float-left"><?= __($rec["titolo"]) ?></span> |
|
<? if ($rec["badge"] != "") { |
|
if (file_exists($root.$rec["badge"])) { include($root.$rec["badge"]); } |
|
} ?> |
|
<div class="clearfix"></div> |
|
</a> |
|
<? |
|
} |
|
} |
|
} |
|
if ($schede) { |
|
?> |
|
</div> |
|
<div class="col-12 col-lg-6"> |
|
<div class="row"> |
|
<? |
|
$schede = $anac->listSchede($record["codice"],false); |
|
if (!empty($schede)) { |
|
if (count($schede) > 6) { |
|
?><div class="col-12 col-lg-4"><? |
|
$coLimit = count($schede) / 3; |
|
} |
|
$count = 0; |
|
foreach($schede AS $idScheda => $scheda) { |
|
$count++; |
|
$hrefComando = "/backend/anac/lotti/schede/edit.php?type={$idScheda}"; |
|
$hrefComando .= "&codice_simog={$record["codice_simog"]}"; |
|
$hrefComando .= "&codice_lotto={$record["codice"]}"; |
|
$status = "#666"; |
|
include(__DIR__."/schede/_statusScheda.php"); |
|
?> |
|
<a style="border-left: 10px solid <?= $status ?>" class="btn my-1 btn-sm btn-block btn-<?=($lock==true) ? "secondary" : "info"?>" href="<?= $hrefComando ?>" title="<?= $scheda["descrizione"] ?? $scheda["titolo"] ?>"> |
|
<span class="float-left"><? echo $scheda["titolo"] ?></span> |
|
<div class="clearfix"></div> |
|
</a> |
|
<? |
|
if (isset($coLimit) && $count > $coLimit) { |
|
$count = 0; |
|
?> |
|
</div> |
|
<div class="col-12 col-lg-4"> |
|
<? |
|
} |
|
} |
|
} |
|
if (isset($coLimit)) { ?></div><? } ?> |
|
</div> |
|
</div> |
|
</div> |
|
<? |
|
} |
|
} |
|
?> |
|
</div> |
|
<? |
|
if (!empty($alertManager->alerts)) { |
|
$alertManager->printModal(); |
|
} |
|
include_once ($beRoot."/layout/bottom.php"); |
|
} else { |
|
echo '<meta http-equiv="refresh" content="0;URL=/backend/index.php">'; |
|
die(); |
|
} |
|
} else { |
|
echo '<meta http-equiv="refresh" content="0;URL=/backend/index.php">'; |
|
die(); |
|
} |
|
} else { |
|
echo '<meta http-equiv="refresh" content="0;URL=/backend/index.php">'; |
|
die(); |
|
} |
|
?>
|
|
|