gestione gare pubbliche
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.
 
 
 
 
 

212 righe
10 KiB

<?php
if (isset($this) && is_a($this,"busteOE")) {
global $root;
$getVariables = $_GET;
?>
<div id="confirm-repeat"></div>
<?
if (!empty($this->buste)) {
$col = 12 / count($this->buste);
if ($this->submit) {
if ($this->raggruppamentoPossibile) {
$raggruppamento = $this->raggruppamento;
include $root . "/common/raggruppamenti/form.php";
}
if ($this->avvalimentoPossibile) {
$avvalimento = $this->avvalimento;
// Workaround orribile
?> <span id="ragione_sociale_parent" class="d-none"><?= $this->partecipante["ragione_sociale"] ?? $_SESSION["utente"]->oe["ragione_sociale"] ?></span> <?php
require_once $root . "/common/avvalimenti/boilerplate.php";
include $root . "/common/avvalimenti/form.php";
}
} else {
?>
<div class="my-3 d-flex flex-row-reverse">
<?
if (method_exists($this->obj,"getManagerRichieste") && method_exists($this->obj->getManagerRichieste(),"printRequestButton")) {
ob_start();
$this->obj->getManagerRichieste()->printRequestButton();
$richiesteSA = ob_get_clean();
if (!empty($richiesteSA)) {
?>
<div class="col-12 col-lg-4">
<?= $richiesteSA ?>
</div>
<?
}
}
if (method_exists($this->obj,"getSedute")) {
$sedute = $this->obj->getSedute();
if (!empty($sedute)) {
?>
<div class="modal fade" id="modal-sedute" tabindex="-1" role="dialog" aria-labelledby="modelTitleId" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><?= __("Sedute") ?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body p-0">
<table class="table table-striped m-0">
<thead>
<tr>
<th><?= __("Busta") ?></th>
<th><?= __("Data e ora") ?></th>
</tr>
</thead>
<tbody>
<?
$next = "";
foreach($sedute as $seduta) {
$label = $this->buste[$seduta["busta"]]["info"]["titolo"];
$class_seduta = "";
if (strtotime($seduta["data"]) > time()) {
if (empty($next)) {
$next = __("Prossima Seduta") . ": " . $label . " - " . mysql2datetime($seduta["data"]);
}
} else {
$class_seduta = "bg-warning";
}
?>
<tr>
<td class="<?= $class_seduta ?>"><?= $label ?></td>
<td class="<?= $class_seduta ?> text-center"><?= mysql2datetime($seduta["data"]) ?></td>
</tr>
<?
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="col-12 col-lg-4">
<button type="button" class="btn btn-primary btn-block" data-toggle="modal" data-target="#modal-sedute">
<span class="fa fa-glasses"></span> <?= (!empty($next)) ? $next : __("Sedute") ?>
</button>
</div>
<?
}
}
?>
</div>
<?
}
$modalForLocked = [];
?>
<div class="row">
<? foreach ($this->buste as $id_busta => $busta) { ?>
<div class="col-12 px-1 col-lg-<?= $col ?>">
<div class="card border-0">
<div class="card-header text-center">
<span class="fa fa-folder fa-2x"></span><br>
<strong><?= __($busta["info"]["titolo"]) ?></strong>
</div>
<div class="card-body border-0 py-0">
<?
foreach ($busta["richieste"] as $input) {
$modal = "{$this->modalPath}{$input["codice"]}";
if ($input["locked"] == "S") {
if ($this->modalitaFirmaForm == "busta") {
$modalForLocked[$input["busta"]] = $modal;
} else if ($this->modalitaFirmaForm == "cumulativa") {
$modalForLocked["cumulativa"] = $modal;
}
}
$status = "status-border-warning";
if ($input["controllo"] != "N") {
$status = "status-border-danger";
}
$stato_label = __("Non presentata");
if ($this->submit) {
$icon = "upload";
$btn_label = "Carica";
$btn_bg = "warning";
} else {
$icon = "ban";
$btn_bg = "danger";
$btn_label = "Non presentata";
}
if (!empty($this->partecipante)) {
$caricamento = $this->obj->getBusta($this->partecipante["codice"], $input["codice"]);
if (!empty($caricamento)) {
$presentata = true;
if ($this->submit) {
$icon = "edit";
$btn_bg = "success";
$btn_label = "Modifica";
} else {
$icon = "search";
$btn_bg = "success";
$btn_label = "Visualizza";
}
if (isset($caricamento["segreta"]) && $caricamento["segreta"] == "S" && empty($this->obj->getBustaSecretata($this->partecipante["codice"], $input["codice"], "busta"))) {
$presentata = false;
$status = "status-border-danger";
$btn_bg = "danger";
$stato_label = __("Caricare copia oscurata");
}
$alertEmendamento = "";
if (method_exists($this->obj,"getEmendamento")) {
$emendamento = $this->obj->getEmendamento($this->partecipante["codice"], $input["codice"]);
if (!empty($emendamento) && $emendamento["segreta"] == "S" && empty($this->obj->getBustaSecretata($this->partecipante["codice"], $input["codice"], "emendamento"))) {
ob_start();
?>
<span class="badge badge-danger text-white"><?= __("Versione oscurata emendamento mancante") ?></span>
<?
$alertEmendamento = ob_get_clean();
}
}
if ($presentata) {
$status = "status-border-success";
$stato_label = __("Presentata");
}
}
}
?>
<div class="row border <?= $status ?> my-1 p-1">
<div class="col-9">
<span class="badge badge-<?= str_replace("status-border-","",$status) ?> text-white"><?= $stato_label ?></span>
<?= $alertEmendamento ?? "" ?>
<? if ($input["controllo"] == "S") { ?><span class="badge badge-info text-white"><span class="fa fa-exclamation-triangle"></span> <?= __("Obbligatorio") ?></span><? } ?>
<? if ($input["controllo"] == "F") { ?><span class="badge badge-info text-white"><span class="fa fa-file-signature"></span> <?= __("Obbligatorio con firma digitale") ?></span><? } ?>
<br>
<?= $input["titolo"] ?>
<? filesManager::printList($input["codice"],"{$this->modulo}-richiesta","A",0,false); ?>
</div>
<div class="col-3 p-1 text-center">
<button class="btn btn-block btn-<?= $btn_bg ?> btn-sm" type="button" <? if ($icon != "ban") { ?> onClick="showModalWithURL('<?= $modal ?>')" <? } ?>>
<span class="fa fa-<?= $icon ?>"></span>
<br>
<small><?= $btn_label ?></small>
</button>
</div>
</div>
<?
}
?>
</div>
</div>
</div>
<? } ?>
</div>
<script>
$('#modal-helper').attr("data-backdrop", "static");
<?
$modalRef = $getVariables["open"] ?? false;
if (!empty($modalRef) && !empty($modalForLocked[$modalRef])) { ?>
showModalWithURL("<?= $modalForLocked[$modalRef] ?>");
<? } ?>
</script>
<? if ($this->submit) {
if (!empty($this->partecipante) && $this->partecipante["conferma"] == "N" && $this->checkDocumentiMinimi()) {}
}
} else {
alertManager::printAlertBox(__("Non sono state configurate richieste per la gara"),__("Si prega di contattare la stazione appaltante"));
}
}
?>