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.
138 righe
6.4 KiB
138 righe
6.4 KiB
<? |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
$id_modulo = "nuovaFase"; |
|
$cmd_info = concorso::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; |
|
$concorso = concorso::init($_GET["codice"],$codice_round); |
|
if (!empty($concorso) && !$concorso->lastRound) { |
|
$record = $concorso->info; |
|
$round = $concorso->round; |
|
$lock = $concorso->checkLock($cmd_info["id"]); |
|
$titolo_modulo = __($cmd_info["titolo"]); |
|
if (!empty($round)) { $titolo_modulo .= " - " . __("Fase") . " " . $round["numero"]; } |
|
|
|
$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"); |
|
if (!$lock) { |
|
?> |
|
<form rel="validate" method="post" action="save.php" id="edit-form"> |
|
<input id="invite-concorso" type="hidden" value="<?= $round["codice"] ?>"> |
|
<input id="token" type="hidden" name="token" value="<?= tokenGen() ?>"> |
|
<input id="codice" type="hidden" name="codice" value="<?= $record["codice"] ?>"> |
|
<input id="codice_round" type="hidden" name="codice_round" value="<?= $round["codice"] ?>"> |
|
<? } else { ?><div id="edit-form"><?} ?> |
|
<h1> |
|
<?= $titolo_modulo ?> |
|
</h1> |
|
<? |
|
$lotti = $concorso->getLotti(); |
|
$first = true; |
|
?> |
|
<div class="card mb-2"> |
|
<div class="card-header"> |
|
<h5><?= __("Riepilogo ammessi") ?></h5> |
|
<? if (count($lotti) > 1) { ?> |
|
<ul class="nav nav-pills" role="tablist"> |
|
<? foreach($lotti AS $lotto) { ?> |
|
<li role="presentation" class="nav-item"><a href="#invitati-<?= $lotto["codice"] ?>" class="nav-link <?= ($first) ? "active" : "" ?>" aria-controls="invitati-<?= $lotto["codice"] ?>" role="tab" data-toggle="tab"><?= __("Lotto") . " " . $lotto["numero"] ?></a></li> |
|
<? |
|
$first = false; |
|
} ?> |
|
</ul> |
|
<? } ?> |
|
</div> |
|
<div class="card-body"> |
|
<div class="tab-content"> |
|
<? |
|
$first = true; |
|
$continue = true; |
|
foreach($lotti AS $lotto) { |
|
if ($concorso->setLotto($lotto["codice"])) { |
|
$invitati = $concorso->getAggiudicatari(); |
|
?> |
|
<div role="tabpanel" class="tab-pane <?= ($first) ? "active" : "" ?>" id="invitati-<?= $lotto["codice"] ?>"> |
|
<? |
|
if (!empty($invitati)) {?> |
|
<strong><?= __("Lotto") . " " . $lotto["numero"] ?></strong><br> |
|
<table class="table table-condensed table-striped table-hover"> |
|
<thead> |
|
<tr> |
|
<th width="10">#</th> |
|
<th class="text-center"><?= __("ID") ?></th> |
|
</tr> |
|
</thead> |
|
<tbody> |
|
<? |
|
$count = 0; |
|
if (!empty($invitati)) { |
|
foreach($invitati AS $invitato) { |
|
$count++; |
|
?> |
|
<tr> |
|
<td class="text-center"><?= $count ?></td> |
|
<td class="text-center"><?= $invitato["id"] ?></td> |
|
</tr> |
|
<? |
|
} |
|
} |
|
?> |
|
</tbody> |
|
</table> |
|
<? |
|
$first =false; |
|
} else { |
|
if ($lotto["stato"] == 95) { |
|
alertManager::printWarningBox(__("Deserto"),__("Lotto") . " " . $lotto["numero"]); |
|
} else if ($lotto["stato"] == 99) { |
|
alertManager::printWarningBox(__("Non aggiudicato"),__("Lotto") . " " . $lotto["numero"]); |
|
} else { |
|
$continue = false; |
|
alertManager::printAlertBox(__("Ammessi mancanti"),__("Lotto") . " " . $lotto["numero"]); |
|
break; |
|
} |
|
} |
|
?> |
|
</div> |
|
<? |
|
} else { |
|
$continue = false; |
|
alertManager::printAlertBox(__("Errore inizializzazione"),__("Lotto") . " " . $lotto["numero"]); |
|
break; |
|
} |
|
} |
|
$concorso->lotto = null; |
|
?> |
|
</div> |
|
</div> |
|
</div> |
|
<? |
|
if (!$lock && $continue) { |
|
?> |
|
<div class="d-flex"> |
|
<div class="col"> |
|
<button class="btn btn-block btn-lg btn-info"> |
|
<?= __("Avvia fase successiva") ?> |
|
</button> |
|
</div> |
|
</div> |
|
</form> |
|
<? } else { ?> |
|
</div> |
|
<script>$(":input").not(".ignore-lock").attr("disabled","disabled").trigger("chosen:updated");</script> |
|
<? } |
|
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(); |
|
} |
|
?>
|
|
|