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.
 
 
 
 
 

148 righe
5.8 KiB

<?
if (!isset($root)) {
$error = true;
$ajax = true;
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php";
include_once($configPath);
if (!empty($_SESSION["utente"]) && !empty($_GET["codice"])) {
$codice_round = $_GET["codice_round"] ?? NULL;
$gara = publicGara::init($_GET["codice"],$codice_round);
}
}
if (!empty($gara) && $gara->showPanel() && !$gara->partecipazioneAttiva()) {
$error = false;
if ($gara->sedutaAperta()) {
$partecipanti = $gara->getPartecipantiSeduta();
if (!isset($buste)) {
$buste = [];
$tipiBuste = gara::tipologieBusta();
foreach($tipiBuste AS $id_busta => $busta) {
$tmp = $gara->getRichieste($id_busta);
if (!empty($tmp)) {
$buste[$id_busta] = ["info"=>$busta,"richieste"=>$tmp];
}
}
}
}
}
if (!empty($partecipanti)) {
if ($_SESSION["ente"]->hasModulo("conference")) {
$status = conferenceManager::checkStatus("gare",$gara->info["codice"],"seduta",$gara->round["codice"]);
if ($status["esito"] === 1 && !empty($status["url"])) {
?>
<a id="avviaConferenza" href="<?= $status["url"] ?>" target="_blank" class="my-3 btn btn-block btn-primary">
<span class="fa fa-video"></span> <?= __("Avvia teleconferenza") ?>
</a>
<?
if (empty($ajax)) {
conferenceManager::printPingScript($status["codice"]);
}
}
}
?>
<div class="card mt-3">
<div class="card-header">
<h3 class="card-title m-0"><?= __("Seduta pubblica") ?></h3>
</div>
<div class="card-body p-0">
<table class="table table-hover table-striped m-0">
<thead>
<tr>
<th width="10"><?= __("Stato") ?></th>
<th><?= __("Ragione Sociale") ?></th>
<?
foreach($buste AS $id_busta => $busta) {
?>
<th class="text-center" width="15%"><?= $busta["info"]["titolo"] ?></th>
<?
}
?>
<?
if ($gara->showPunteggiTecnici()) {
?>
<th class="text-center" width="15%">
<?= __("Punteggio Tecnico") ?>
</th>
<?
}
if ($gara->showPunteggiEconomici()) {
?>
<th class="text-center" width="15%">
<?= __("Punteggio Economico") ?>
</th>
<?
}
?>
</tr>
</thead>
<tbody>
<?
$checkBusta = $pdo->prepare("SELECT MIN(b_gare_buste.timestamp_decrypt) AS firstOpen
FROM b_gare_buste JOIN b_gare_richieste ON b_gare_buste.codice_richiesta = b_gare_richieste.codice
WHERE b_gare_buste.open = 'S' AND b_gare_buste.codice_partecipante = :partecipante AND b_gare_richieste.busta = :busta
GROUP BY b_gare_buste.codice_partecipante ");
foreach($partecipanti AS $obj) {
$checkBusta->bindValue(":partecipante",$obj["codice"]);
$class = "";
if ($obj["escluso"] == "S") { $class="bg-danger text-white"; }
?>
<tr class="<?= $class ?>">
<td><?= $obj["stato"] ?></td>
<td>
<?= ($obj["escluso"] == "S") ? ("<span class='fa fa-times'></span> " . __("Escluso")) . "<br>" : "" ?>
<?= $gara->listPartecipantiSeduta($obj["codice"]) ?>
</td>
<?
foreach($buste AS $id_busta => $busta) {
$info = "<h5><span class=\"badge badge-warning\"><span class='fa fa-lock'></span> " . __("Chiusa") . "</span></h5>";
$checkBusta->bindValue(":busta",$id_busta);
$checkBusta->execute();
if ($checkBusta->rowCount() === 1) {
$firstOpen = $checkBusta->fetch(PDO::FETCH_ASSOC)["firstOpen"];
$info = "<h5><span class=\"badge badge-success\"><span class='fa fa-unlock'></span> " . __("Aperta") . "<br><small>" . mysql2datetime($firstOpen) . "</small></span></h5>";
} else {
if ($obj["escluso"] == "S") {
$info = "<h5><span class=\"badge badge-danger\"><span class='fa fa-times'></span> " . __("Non ammesso alla fase") . "</span></h5>";
}
}
?>
<td class="text-center"><?= $info ?></td>
<?
}
?>
<?
if ($gara->showPunteggiTecnici()) {
?>
<td class="text-center" width="15%">
<?= $obj["totaleTecnico"] ?>
</td>
<?
}
if ($gara->showPunteggiEconomici()) {
?>
<td class="text-center" width="15%">
<?= $obj["totaleEconomico"] ?>
</td>
<?
}
?>
</tr>
<?
}
?>
</tbody>
</table>
</div>
</div>
<script>
setTimeout(
function() {
$("#sedutaPubblica").load('/gare/partecipa/seduta.php?codice=<?= $gara->info["codice"] ?>&codice_round=<?= $gara->round["codice"] ?>');
}, 60000);
</script>
<?
}
if (isset($error) && $error) {
header('HTTP/1.0 403 Forbidden');
die();
}