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.
 
 
 
 
 

129 righe
5.2 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;
$concorso = publicConcorso::init($_GET["codice"],$codice_round);
}
}
if (!empty($concorso) && $concorso->showPanel() && !$concorso->partecipazioneAttiva()) {
$error = false;
if ($concorso->sedutaAperta()) {
$partecipanti = $concorso->getPartecipantiSeduta();
if (!isset($buste)) {
$buste = [];
$tipiBuste = concorso::tipologieBusta();
foreach($tipiBuste AS $id_busta => $busta) {
$tmp = $concorso->getRichieste($id_busta);
if (!empty($tmp)) {
$buste[$id_busta] = ["info"=>$busta,"richieste"=>$tmp];
}
}
}
}
}
if (!empty($partecipanti)) {
if ($_SESSION["ente"]->hasModulo("conference")) {
$status = conferenceManager::checkStatus("concorsi",$concorso->info["codice"],"seduta",$concorso->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">
<thead>
<tr>
<th><?= __("ID") ?></th>
<?
foreach($buste AS $id_busta => $busta) {
?>
<th class="text-center" width="15%"><?= $busta["info"]["titolo"] ?></th>
<?
}
if ($concorso->showPunteggiTecnici()) {
?>
<th class="text-center" width="15%">
<?= __("Punteggio Tecnico") ?>
</th>
<?
}
?>
</tr>
</thead>
<tbody>
<?
$checkBusta = $pdo->prepare("SELECT MIN(b_concorsi_buste.timestamp_decrypt) AS firstOpen
FROM b_concorsi_buste JOIN b_concorsi_richieste ON b_concorsi_buste.codice_richiesta = b_concorsi_richieste.codice
WHERE b_concorsi_buste.open = 'S' AND b_concorsi_buste.codice_partecipante = :partecipante AND b_concorsi_richieste.busta = :busta
GROUP BY b_concorsi_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["escluso"] == "S") ? ("<span class='fa fa-times'></span> " . __("Escluso")) . "<br>" : "" ?>
<?= $obj["id"] ?>
</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 ($concorso->showPunteggiTecnici()) {
?>
<td class="text-center" width="15%">
<?= $obj["totale"] ?>
</td>
<?
}
?>
</tr>
<?
}
?>
</tbody>
</table>
</div>
</div>
<script>
setTimeout(
function() {
$("#sedutaPubblica").load('/concorsi/partecipa/seduta.php?codice=<?= $concorso->info["codice"] ?>&codice_round=<?= $concorso->round["codice"] ?>');
}, 60000);
</script>
<?
}
if (isset($error) && $error) {
header('HTTP/1.0 403 Forbidden');
die();
}