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.
106 righe
4.3 KiB
106 righe
4.3 KiB
<? |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
$error = true; |
|
if (isset($_SESSION["ente"]) && $_SESSION["ente"]->hasModulo("albi_commissione") && !empty($_GET["modulo"]) && !empty($_GET["elemento"])) { |
|
$managerCommissione = new Commissione ($_GET["modulo"],$_GET["elemento"],"commissione"); |
|
if (!empty($managerCommissione)) { |
|
$estrazione = $managerCommissione->getEstrazioniCommissione($_GET["codice"]); |
|
if (!empty($estrazione)) { |
|
$elenco = AlboCommissione::init($estrazione["codice_albo"]); |
|
$relazioni = $pdo->go("SELECT * FROM r_estrazioni_commissioni WHERE codice_estrazione = :codice ORDER BY escluso ASC, identificativo ",[":codice"=>$estrazione["codice"]])->fetchAll(PDO::FETCH_ASSOC); |
|
ob_start(); |
|
?><h1><?= __("Verbale Estrazione") ?> - <?= mysql2datetime($estrazione["timestamp"]) ?></h1> |
|
<table width="100%" class="table table-striped table-bordered"> |
|
<tr> |
|
<th><?= __("Componenti richiesti") ?></th> |
|
<td><?= $estrazione["componenti"] ?></td> |
|
</tr> |
|
<tr> |
|
<th><?= __("Sequenza") ?></th> |
|
<td><?= $estrazione["sequenza"] ?></td> |
|
</tr> |
|
<tr> |
|
<th><?= __("Elenco") ?></th> |
|
<td><?= $elenco->info["oggetto"] ?></td> |
|
</tr> |
|
</table> |
|
<br> |
|
<table style="width:100%" class="table table-striped table-condensed"> |
|
<thead> |
|
<tr style="text-align:center"> |
|
<th width="10">#</th> |
|
<th width="200"><?= __("Codice fiscale") ?></th> |
|
<th><?= __("Denominazione") ?></th> |
|
<th width="200"><?= __("Esito") ?></th> |
|
<th width="10"><?= __("Conteggio Rotazione") ?></th> |
|
</tr> |
|
</thead> |
|
<tbody> |
|
<? |
|
$i = 0; |
|
foreach($relazioni AS $relazione) { |
|
$i++; |
|
$class= "even"; |
|
if ($i%2!=0) { $class = "odd"; } |
|
$stato = ""; |
|
$style = ""; |
|
if ($relazione["escluso"] == "S") { |
|
$stato = "Escluso"; |
|
$style = "style='background-color:#C00; color:#FFF'"; |
|
} else { |
|
if ($relazione["selezionato"] == "A") { |
|
$stato = "Selezionato automaticamente"; |
|
$style = "style='background-color:#04F; color:#FFF'"; |
|
} else if ($relazione["selezionato"] == "S") { |
|
$stato = "Selezionato"; |
|
$style = "style='background-color:#0C0; color:#FFF'"; |
|
} |
|
} |
|
$utente = Utente::getInfoFromID($relazione["codice_commissario"]); |
|
?> |
|
<tr class="<?= $class ?>" <?= $style ?>> |
|
<td width="10"><?= $relazione["identificativo"] ?></td> |
|
<td width="200"> |
|
<?= $utente["cf"] ?></span> |
|
</td> |
|
<td> |
|
<?= $utente["cognome"] ?> |
|
<?= $utente["nome"] ?> |
|
</td> |
|
<td width="200" style="text-align:center"><?= $stato ?></td> |
|
<td width="10" style="text-align:center"><?= $relazione["conteggio"] ?></td> |
|
</tr> |
|
<? |
|
} |
|
?> |
|
</tbody> |
|
</table><? |
|
$html = ob_get_clean(); |
|
if (!empty(trim($html))) { |
|
$error = false; |
|
if (!isset($_GET["export"])) { |
|
echo $html; |
|
?> |
|
<a target="_blank" class="btn btn-danger btn-block btn-lg my-2" href="/backend/common/commissioni/albi/report.php?modulo=<?= $managerCommissione->modulo ?>&elemento=<?= $managerCommissione->elemento ?>&codice=<?= $estrazione["codice"] ?>&export=1"> |
|
<span class="fa fa-file"></span> <?= __("Esporta PDF") ?> |
|
</a> |
|
<? |
|
} else { |
|
$pdf = documentConverter::getPDFWithWKHTML($html); |
|
if (!empty($pdf)) { |
|
$error = false; |
|
header("Content-type: application/pdf"); |
|
header("Content-Disposition: inline; filename=export.pdf"); |
|
echo $pdf; |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
if ($error) { |
|
header('HTTP/1.0 403 Forbidden'); |
|
die(); |
|
} |
|
?>
|