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.
123 righe
6.7 KiB
123 righe
6.7 KiB
<? |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
$error = true; |
|
if (!empty($_SESSION["utente"])) { |
|
$manager = new richiesteOE($_GET["modulo"],$_GET["codice_elemento"],$_GET["sub"]); |
|
if ($manager->checkAdminPermission()) { |
|
$infoModulo = richiesteOE::moduliAbilitati()[$manager->getModuloRiferimento()] ?? null; |
|
$infoUtente = (!empty($infoModulo["riferimento_partecipante"]) && $infoModulo["riferimento_partecipante"] == "utente"); |
|
if (!empty($_GET["codice"])) { |
|
$tmp = $manager->getRichieste("N",["codice"=>$_GET["codice"]]); |
|
if (!empty($tmp)) { |
|
$richiesta = $tmp[0]; |
|
$error = false; |
|
?> |
|
<div class="text-right"> |
|
<button onClick="showModalWithURL('/backend/common/richiesteOE/edit.php?codice=<?= $richiesta["codice"] ?>&modulo=<?= $manager->modulo ?>&codice_elemento=<?= $manager->elemento ?>&sub=<?= $manager->sub ?>')" class="btn btn-warning" title="<?= __('Modifica') ?>"><span class="fa fa-pencil-alt"></span> <?= __('Modifica') ?></button> |
|
<? if (!empty($richiesta["codice_derivazione"])) { ?> |
|
<button onClick="showModalWithURL('/backend/common/richiesteOE/view.php?codice=<?= $richiesta["codice_derivazione"] ?>&modulo=<?= $manager->modulo ?>&codice_elemento=<?= $manager->elemento ?>&sub=<?= $manager->sub ?>')" class="btn btn-info" title="<?= __('Modifica') ?>"><span class="fa fa-history"></span> <?= __('Versione precedente') ?></button> |
|
<? } ?> |
|
</div> |
|
<? |
|
include($beRoot."/common/richiesteOE/generalInfo.php"); |
|
$destinatari = $manager->getOE($richiesta["codice"]); |
|
if (!empty($destinatari)) { ?> |
|
<div class="card my-2"> |
|
<div class="card-header"> |
|
<h3 class="card-title m-0" data-target="#destinatari-richiesta"><?= __("Destinatari") ?></h3> |
|
</div> |
|
<div class="card-body" id="destinatari-richiesta"> |
|
<div class="text-right mb-1"> |
|
<span class="fa fa-search"></span> <input type="text" onkeyup="filtra($(this).val(),'#richiesta-table','tr');" class="input-sm" placeholder="<?= __("Cerca") ?>"> |
|
</div> |
|
<table class="table table-striped" width="100%"> |
|
<thead> |
|
<tr> |
|
<? if ($infoUtente) { ?> |
|
<th width="10"><?= __("Codice fiscale") ?></th> |
|
<th><?= __("Nominativo") ?></th> |
|
<? } else if ($manager->modulo != "concorsi") { ?> |
|
<th width="10"><?= __("Partita IVA") ?></th> |
|
<th><?= __("Ragione Sociale") ?></th> |
|
<? } else { ?> |
|
<th><?= __("Partecipante") ?></th> |
|
<? } ?> |
|
<th width="20%"></th> |
|
</tr> |
|
</thead> |
|
<tbody id="richiesta-table"> |
|
<? |
|
if ($manager->modulo == "concorsi") { |
|
$partecipanti = $manager->getObject()->getPartecipanti(TRUE); |
|
} |
|
foreach($destinatari AS $int) { |
|
if ($infoUtente) { |
|
$info = utente::getInfoFromID($int["codice_operatore"]); |
|
} else { |
|
$info = oeManager::getOE($int["codice_operatore"]); |
|
} |
|
?> |
|
<tr> |
|
<? if ($infoUtente) { ?> |
|
<td width="120"><?= $info["cf"] ?></td> |
|
<td> |
|
<strong> |
|
<?= $info["cognome"] . " " . $info["nome"] ?> |
|
</strong> |
|
</td> |
|
<? } else if ($manager->modulo != "concorsi") { ?> |
|
<td width="120"><?= (!empty($info["partita_iva"])) ? $info["partita_iva"] : $info["codice_fiscale_impresa"] ?></td> |
|
<td> |
|
<a href="#" title="<?= __("visualizza") ?>" onclick="showCompany(<?= $int["codice_operatore"] ?>); return false"> |
|
<strong> |
|
<?= $info["ragione_sociale"] ?> |
|
</strong> |
|
</a> |
|
</td> |
|
<? } else { |
|
$partecipante = null; |
|
if (!empty($partecipanti)) { |
|
foreach($partecipanti AS $tmp) { |
|
if ($tmp["codice_operatore"] == $info["codice"]) { |
|
$partecipante = $tmp; |
|
break; |
|
} |
|
} |
|
} ?> |
|
<td><?= $partecipante["id"] ?? "" ?></td> |
|
<? } ?> |
|
|
|
<td class="text-right"> |
|
<? if (!empty($int["timestamp_trasmissione"])) { |
|
if (strtotime($richiesta["apertura"]) < time() || empty($richiesta["apertura"])) { |
|
?> |
|
<a class="btn btn-primary" target="_blank" href="/backend/common/richiesteOE/download.php?codice=<?= $int["codice"] ?>&codice_richiesta=<?= $richiesta["codice"] ?>&modulo=<?= $manager->modulo ?>&codice_elemento=<?= $manager->elemento ?>&sub=<?= $manager->sub ?>&token=<?= tokenGen() ?>"> |
|
<span class="fa fa-search"></span> <?= __("Visualizza") ?> |
|
</a> |
|
<? } else { ?> |
|
<span class="h5"><span class="badge badge-warning"><span class="fa fa-hourglass"></span> <?= __("Termini apertura non raggiunti") ?></span></span> |
|
<? } ?> |
|
<br> |
|
<small><span class="fa fa-paper-plane"></span> <?= mysql2datetime($int["timestamp_trasmissione"]); ?></small> |
|
<? } else { ?> |
|
<span class="h5"><span class="badge badge-danger"><span class="fa fa-exclamation-triangle"></span> <?= __("Risposta non ricevuta") ?></span></span> |
|
<? } ?> |
|
</td> |
|
</tr> |
|
<? } ?> |
|
</tbody> |
|
</table> |
|
</div> |
|
</div> |
|
<? |
|
} |
|
} |
|
} |
|
} |
|
} |
|
if ($error) { |
|
header('HTTP/1.0 403 Forbidden'); |
|
die(); |
|
} |
|
?>
|
|
|