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.
131 righe
5.9 KiB
131 righe
5.9 KiB
<? |
|
$configPath = substr(__DIR__, 0, strpos(__DIR__, "public_html")) . "/config.php"; |
|
include_once($configPath); |
|
if (!empty($_SESSION["utente"]) && !empty($_SESSION["utente"]->oe)) { |
|
$codice_round = $_GET["codice_round"] ?? NULL; |
|
$concorso = publicConcorso::init($_GET["codice"], $codice_round); |
|
if (!empty($concorso) && $concorso->potentialAction) { |
|
$record = $concorso->info; |
|
$round = $concorso->round; |
|
$lotti = $concorso->getLotti(); |
|
$breadcrumb = array(); |
|
$breadcrumb["/" . $radice . "/"] = Modulo::getInfo($radice)["titolo"]; |
|
$breadcrumb["/" . $radice . "/dettaglio.php?codice={$record["codice"]}&codice_round={$round["codice"]}"] = __("Dettaglio"); |
|
if (!empty($_GET["codice_lotto"]) && count($lotti) > 1) { |
|
$breadcrumb["/". $radice . "/partecipa/partecipa.php?codice={$record["codice"]}&codice_round={$round["codice"]}"] = __("Scelta lotto"); |
|
} |
|
$breadcrumb[""] = __("Pannello"); |
|
|
|
include_once($root . "/layout/top.php"); |
|
|
|
if (empty($_GET["codice_lotto"]) && count($lotti) > 1) { |
|
$checkStato = $pdo->prepare("SELECT conferma FROM r_partecipanti_concorsi WHERE codice_round = :codice_round AND codice_lotto = :lotto AND codice_operatore = :operatore "); |
|
$checkStato->bindValue(":operatore",$_SESSION["utente"]->oe["codice"]); |
|
$checkStato->bindValue(":codice_round",$round["codice"]); |
|
$stati = []; |
|
foreach($lotti AS $lotto) { |
|
$stati[$lotto["codice"]] = ["label"=>"","class"=>"btn-primary"]; |
|
$checkStato->bindValue(":lotto",$lotto["codice"]); |
|
$checkStato->execute(); |
|
if ($checkStato->rowCount() > 0) { |
|
if ($checkStato->fetch(PDO::FETCH_COLUMN) == "S") { |
|
$stati[$lotto["codice"]] = ["label"=>"<span class='fa fa-check'></span> " . __("Partecipazione inviata"),"class"=>"btn-success"]; |
|
} else { |
|
$stati[$lotto["codice"]] = ["label"=>"<span class='fa fa-edit'></span> " . __("Partecipazione iniziata"),"class"=>"btn-warning"]; |
|
} |
|
} |
|
} |
|
$concorso->printSelectLottiConditions = ["hasInvito"]; |
|
?> |
|
<div class="card m-5"> |
|
<div class="card-header"> |
|
<h3 class="card-title"><?= __("Scegli il lotto") ?></h3> |
|
</div> |
|
<div class="card-body"> |
|
<? $concorso->printSelectLotto("/concorsi/partecipa/partecipa.php?codice={$record["codice"]}&codice_round={$round["codice"]}",false,$stati); ?> |
|
</div> |
|
</div> |
|
<? |
|
} else { |
|
$setLotto = $_GET["codice_lotto"] ?? $lotti[0]["codice"]; |
|
if (!empty($setLotto)) { |
|
if ($concorso->setLotto($setLotto)) { |
|
if ($concorso->hasInvito()) { |
|
$tipiBuste = concorso::tipologieBusta(); |
|
$lotto = $concorso->lotto; |
|
$submit = false; |
|
if ($concorso->partecipazioneAttiva()) { |
|
$submit = true; |
|
} |
|
?> |
|
<div class="container-fluid px-5"> |
|
<h1><?= __("concorso") ?> #<?= $record["id"] ?> - <?= $record["oggetto"] ?></h1> |
|
<h2><?= __("Lotto") ?> <?= $lotto["cig"] ?> - <?= $lotto["oggetto"] ?></h2> |
|
<? |
|
$pannello = $concorso->getManagerPartecipazione(); |
|
if (!empty($pannello) && $pannello->check()) { |
|
$pannello->printPanel(); |
|
$partecipante = $pannello->partecipante; |
|
?> |
|
<div id="sedutaPubblica"> |
|
<? include("seduta.php") ?> |
|
</div> |
|
<br> |
|
<? |
|
if ($pannello->submit) { |
|
if (!empty($partecipante) && $partecipante["conferma"] == "N" && $pannello->checkDocumentiMinimi()) { |
|
?> |
|
<div id="alert-invio"> |
|
<h1 class="alert alert-danger text-center"> |
|
<span class="fa fa-exclamation-triangle fa-2x"></span><br> |
|
<?= __("Offerta non inviata") ?> |
|
</h1> |
|
<a class="btn btn-lg btn-block btn-success" href="send.php?codice=<?= $record["codice"] ?>&codice_lotto=<?= $lotto["codice"] ?>"> |
|
<span class="fa fa-paper-plane"></span> <?= __("Invia") ?> |
|
</a> |
|
</div> |
|
<? |
|
} else if (!empty($partecipante) && $partecipante["conferma"] == "S") { ?> |
|
<div id="alert-invio"> |
|
<div class="alert alert-success text-center"> |
|
<span class="fa fa-check fa-2x"></span><br> |
|
<?= __("Offerta inviata") ?><br> |
|
<a class="btn btn-sm btn-success" href="ricevuta.php?codice=<?= $record["codice"] ?>&codice_lotto=<?= $lotto["codice"] ?>"> |
|
<span class="fa fa-download"></span> <?= __("Scarica ricevuta") ?> |
|
</a> |
|
</div> |
|
<input class="btn btn-danger btn-block" type="submit" onClick="eliminaP(<?= $record["codice"] ?>,'concorsi/partecipa','codice_lotto=<?= $lotto["codice"] ?>')" value="<?= __("Revoca") ?>"> |
|
</div> |
|
<? } ?> |
|
<script> |
|
if ($("#alert-invio").length > 0) { |
|
$("#confirm-repeat").html($("#alert-invio").html() + "<br>"); |
|
} |
|
</script> |
|
<? |
|
} |
|
} else { |
|
alertManager::printAlertBox(__("Errore applicativo"),implode("<br>",$pannello->errori)); |
|
} |
|
} else { |
|
alertManager::printAlertBox(__("Lotto non abilitato")); |
|
} |
|
} else { |
|
alertManager::printAlertBox(__("Errore inizializzaione lotto")); |
|
} |
|
} else { |
|
alertManager::printAlertBox(__("Errore selezione lotto")); |
|
} |
|
} |
|
|
|
include_once($root . "/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(); |
|
} |
|
?>
|