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.
113 righe
4.9 KiB
113 righe
4.9 KiB
<? |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
$id_modulo = "contratti"; |
|
$cmd_info = gara::getInfoModulo($id_modulo); |
|
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($radice,$_GET["codice"],$id_modulo) && $_SESSION["utente"]->permission($cmd_info["modulo_riferimento"])) { |
|
$codice_round = $_GET["codice_round"] ?? NULL; |
|
$gara = gara::init($_GET["codice"],$codice_round); |
|
if (!empty($gara)) { |
|
$record = $gara->info; |
|
$round = $gara->round; |
|
$titolo_modulo = __($cmd_info["titolo"]); |
|
$breadcrumb = array(); |
|
$breadcrumb["/".$radice."/"] = Modulo::getInfo($radice)["titolo"]; |
|
$breadcrumb["/".$radice."/panel.php?codice=".$record["codice"]."&codice_round=".$round["codice"]] = __("Pannello"); |
|
$breadcrumb[""] = $titolo_modulo; |
|
|
|
include_once ($beRoot."/layout/top.php"); |
|
?> |
|
<h1><?= $titolo_modulo ?></h1> |
|
<? |
|
$gara->printSelectLottiConditions = ["hasAggiudicatari"]; |
|
if ($gara->chooseLotto($_GET["codice_lotto"] ?? false,"{$_SERVER["PHP_SELF"]}?codice=".$record["codice"]."&codice_round=".$round["codice"])) { |
|
$lotto = $gara->lotto; |
|
$lock = $gara->checkLock($cmd_info["id"]); |
|
$contratti = $gara->getContratti(); |
|
if (!$lock) { |
|
?> |
|
<div id="commands" class="mb-5"> |
|
<div class="commands container-fluid"> |
|
<div class="row"> |
|
<div class="col-12 text-right"> |
|
<? if (!$lock) { ?> |
|
<button onClick="showModalWithURL('listOe.php?codice_gara=<?= $record["codice"] ?>&codice_round=<?= $round["codice"] ?>&codice_lotto=<?= $lotto["codice"] ?>')" class="btn btn-success" title="<?= __('Aggiungi nuovo') ?>"><span class="fa fa-plus-circle"></span> <?= __('Aggiungi nuovo') ?></button> |
|
<? } ?> |
|
</div> |
|
</div> |
|
</div> |
|
</div> |
|
<? |
|
} |
|
if (!empty($contratti)) { |
|
?> |
|
<div class="card card-body"> |
|
<table class="table table-striped table-hover" id="tab-data" width="100%"> |
|
<thead> |
|
<tr> |
|
<th width="10"></th> |
|
<th width="150"></th> |
|
<th width="10"><?= __("ID") ?></th> |
|
<th><?= __("Oggetto") ?></th> |
|
<th><?= __("Valore totale") ?></th> |
|
<th width="300"><?= __("Operatori economici") ?></th> |
|
<th width="5"></th> |
|
</tr> |
|
</thead> |
|
<tbody> |
|
<? |
|
$stati = stipula::getStati(); |
|
foreach($contratti AS $contratto) { |
|
$stato = $stati[$contratto["stato"]]; |
|
$operatori = ""; |
|
if (!empty($contratto["operatori"])) { |
|
$explode = explode("-_-",$contratto["operatori"]); |
|
if (!is_array($explode)) { $explode = [$explode]; } |
|
ob_start(); |
|
foreach($explode AS $oe) { |
|
$oe = explode(":",$oe,2); |
|
if (!empty($oe[0])) { ?> |
|
<a href="#" title="<?= __("visualizza") ?>" onclick="showCompany(<?= $oe[0] ?>); return false"> |
|
<? } ?> |
|
<strong> |
|
<?= $oe[1] ?> |
|
</strong> |
|
<? if (!empty($oe[0])) { ?> |
|
</a> |
|
<? } ?> |
|
<br> |
|
<? |
|
} |
|
$operatori = ob_get_clean(); |
|
} |
|
?> |
|
<tr> |
|
<td><?= '<div id="flag_'.$contratto["codice"].'" class="status_flag" style="background-color:'.$stato["color"].'"></div>' ?></td> |
|
<td><?= __($stato["titolo"]) ?></td> |
|
<td><?= $contratto["id"] ?></td> |
|
<td><?= "<strong>" . $contratto["oggetto"] . "</strong>" ?></td> |
|
<td><?= number_format($contratto["importo_totale"],2,",",".") ?></td> |
|
<td><?= $operatori ?></td> |
|
<td><?= "<a href='/backend/contratti/panel.php?codice=".$contratto["codice"]."' title='".__("gestisci")."' class='btn-info btn-sm'><span class='fa fa-th'></span></a>" ?></td> |
|
</tr> |
|
<? |
|
} |
|
?> |
|
</tbody> |
|
</table> |
|
</div> |
|
<? |
|
} else { |
|
alertManager::printWarningBox(__("Nessun risultato")); |
|
} |
|
} |
|
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(); |
|
} |
|
?>
|
|
|