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.
 
 
 
 
 

99 righe
4.0 KiB

<?
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php";
include_once($configPath);
$error = true;
$id_modulo = "anomalie";
$cmd_info = gara::getInfoModulo($id_modulo);
if (!empty($_GET) && !empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($radice,$_GET["codice_gara"],$id_modulo)) {
$gara = gara::init($_GET["codice_gara"]);
if (!empty($gara)) {
$lock = $gara->checkLock($cmd_info["id"]);
if ($gara->setLotto($_GET["codice_lotto"])) {
$partecipante = $gara->getPartecipante($_GET["codice"]);
if (!empty($partecipante)) {
$error = false;
$managerRichieste = $gara->getManagerRichieste();
$tutte = $managerRichieste->getRichieste("S",["tipologia"=>"anomalie"]);
$richieste = [];
if (!empty($tutte)) {
foreach($tutte AS $richiesta) {
if (!empty($managerRichieste->getOE($richiesta["codice"],$partecipante["codice_operatore"]))) {
$richieste[] = $richiesta;
}
}
}
if (!empty($richieste)) {
?>
<table class="table table-striped table-hover">
<thead>
<tr>
<th><?= __("Richiesta") ?></th>
<th><?= __("Data") ?></th>
<th></th>
</tr>
</thead>
<tbody>
<?
foreach($richieste AS $richiesta) {
?>
<tr>
<td><?= $richiesta["titolo"] ?></td>
<td width="150"><?= mysql2datetime($richiesta["data"]) ?></td>
<td width="10">
<button title="<?= __("visualizza") ?>" class='btn btn-block btn-sm btn-info'
onclick='showModalWithURL("/backend/common/richiesteOE/view.php?codice=<?= $richiesta["codice"] ?>&modulo=gare&codice_elemento=<?= $gara->info["codice"] ?>&sub=<?= $gara->lotto["codice"] ?>");'>
<span class='fa fa-search'></span>
</button>
</td>
</tr>
<?
}
?>
</tbody>
</table>
<?
} else {
alertManager::printAlertBox("Nessuna richiesta presente");
}
if (!$lock) { ?>
<button class="btn btn-block btn-info" onClick="showModalWithURL('/backend/common/richiesteOE/edit.php?codice=0&modulo=gare&codice_elemento=<?= $gara->info["codice"] ?>&sub=<?= $gara->lotto["codice"] ?>&quickCreate=1&tipologia=anomalie&codice_operatore=<?= $partecipante["codice_operatore"] ?>');">
<span class="fa fa-plus"></span> <?= __("Crea richiesta") ?>
</button>
<script>
function confirmSubmitRichiesta(status) {
$("#stato-richiesta").val(status);
if (status != "N") {
if (status == "S") {
msg = "<?= __("Procedendo la richiesta sarà immediatamente disponibile per gli Operatori Economici selezionati") ?>";
}
Swal({
title: js_dict["sei-sicuro"],
text: msg,
type: "warning",
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: js_dict.conferma,
cancelButtonText: js_dict.annulla,
closeOnConfirm: true
}).then((result) => {
if (result.value) {
$("#submit-richiesta-form").submit();
}
});
} else {
$("#submit-richiesta-form").submit();
}
}
</script>
<? }
}
}
}
}
if ($error) {
header('HTTP/1.0 403 Forbidden');
die();
}
?>