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.
227 righe
10 KiB
227 righe
10 KiB
<? |
|
$cookie = array_keys($_COOKIE); |
|
foreach($cookie AS $key) { |
|
if (strpos($key,"selectedCardTab") === 0) { |
|
setcookie($key, null, -1, '/'); |
|
} |
|
} |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
if (empty($_SESSION["utente"]) || ! $_SESSION["utente"]->permission($radice)) { |
|
header('Location: /'); |
|
die(); |
|
} else { |
|
include_once "{$beRoot}/layout/top.php"; |
|
?> |
|
<div class="container-fluid pt-5"> |
|
<div class="row"> |
|
<div class="col-12"> |
|
<p class="d-block display-4"> |
|
<?= Modulo::header($radice) ?> |
|
</p> |
|
</div> |
|
</div> |
|
</div> |
|
<? |
|
$tokenEsportazione = base64_encode(generateStrongPassword()) . "-" . time(); |
|
$operatoreAndDisponibile = (settingsManager::getValue("operatoreAndIndirizzario") == "S"); |
|
?> |
|
<div class="text-right mb-2"> |
|
<div class="btn-group"> |
|
<button data-toggle="modal" id="show-filter" data-target="#modal-filter" class="btn btn-warning"> |
|
<span class="fa fa-filter"></span> |
|
<?= __("filtra"); ?> |
|
</button> |
|
<button id="oe-filter-button" onClick="window.location.reload();" class="btn btn-danger collapse"><span class="fa fa-times"></span></button> |
|
</div> |
|
<button data-toggle="modal" id="show-tools" data-target="#modal-tools" class="btn btn-info"> |
|
<span class="fa fa-toolbox"></span> <?= __("Strumenti") ?> |
|
</button> |
|
<?php if(ElenchiAPI::getEndpoints()["count"] > 0): ?> |
|
<a href="/backend/elenchi_api/index.php?modulo_riferimento=albo" class="btn btn-primary"> |
|
<span class="fa fa-network-wired"></span> <?= __("Elenchi remoti") ?> |
|
</a> |
|
<?php endif; ?> |
|
<? if ($_SESSION["utente"]->permission('albo.consip')) { ?> |
|
<button onClick="showModalWithURL('/backend/albo/consip/index.php');" class="btn btn-info"> |
|
<span class="fa fa-search"></span> <?= __("Fornitori CONSIP") ?> |
|
</button> |
|
<? } ?> |
|
<? if ($_SESSION["utente"]->isSupportoOrRoot()) : ?> |
|
<button class="btn btn-warning" onClick="showModalWithURL('/backend/enti/settings.php?gruppo=albo'); return false"> |
|
<span class="fa fa-cogs"></span> <?= __("Impostazioni") ?> |
|
</button> |
|
<?php endif; ?> |
|
</div> |
|
<div class="card"> |
|
<div class="card-header"> |
|
<div id="oeManager-showfiltriApplicati" class="text-right"> |
|
|
|
</div> |
|
</div> |
|
<div class="card-body"> |
|
<? |
|
$oeManager = new oeManager; |
|
$oe = $oeManager->getOERelations($_SESSION["ente"]->codice); |
|
?> |
|
<div class="table-responsive"> |
|
<table class="table table-striped table-hover table-condensed" id="tab-data" width="100%"> |
|
<thead> |
|
<tr> |
|
<th width="10">#</th> |
|
<th></th> |
|
<th width="110"><?= __("Codice Fiscale") ?></th> |
|
<th width="110"><?= __("Partita IVA") ?></th> |
|
<th><?= __("Denominazione") ?></th> |
|
<th><?= __("Tipologia") ?></th> |
|
<th width="150"><?= __("Data iscrizione") ?></th> |
|
<th width="10"><?= __("Inviti") ?></th> |
|
<th width="10"><?= __("Inviti") ?> <?= date("Y") ?></th> |
|
<th width="10"><span class="fa fa-list"></span></th> |
|
<th width="10"><span class="fa fa-star"></span></th> |
|
<th width="10"></th> |
|
<th width="10"> |
|
<button class="btn btn-sm btn-warning" onClick="showModalWithURL('/backend/comunicazioni/form.php?sezione=albo&codice_elemento=-1&destinatari=token:<?= $tokenEsportazione ?>')" title="<?= __("Comunicazione a tutti") ?>"><span class="fa fa-paper-plane"></span></button> |
|
</th> |
|
</tr> |
|
</thead> |
|
<tbody> |
|
</tbody> |
|
</table> |
|
</div> |
|
<script> |
|
var table = $("#tab-data").DataTable({ |
|
"processing": true, |
|
"serverSide": true, |
|
"language": { |
|
"url": "/dictionary/datatables/<?= $_SESSION["language"] ?>.lang" |
|
}, |
|
"ajax": { |
|
"url": "table.php", |
|
"method": "POST", |
|
"data": function (d) { |
|
d.filters = $("#filtriTabella").serialize(), |
|
<?php |
|
if ($operatoreAndDisponibile) : |
|
echo <<<JAVASCRIPT |
|
d.filters += "&logicOperator="+$("#operatoreFiltriOE").val(), |
|
JAVASCRIPT; |
|
endif; |
|
?> |
|
d.token = "<?= $tokenEsportazione ?>"; |
|
} |
|
}, |
|
"order": [[4,'asc']], |
|
"lengthMenu": [[25, 50, 100], [25, 50, 100]], |
|
"columns": [ |
|
{ "orderable": true, "class": 'fit-width' }, |
|
{ "orderable": false, "class": 'fit-width' }, |
|
{ "orderable": true, "class": 'fit-width' }, |
|
{ "orderable": true, "class": 'fit-width' }, |
|
{ "orderable": true, "class": 'fit-width' }, |
|
{ "orderable": false, "class": 'fit-width' }, |
|
{ "orderable": true, "class": 'fit-width' }, |
|
{ "orderable": true, "class": 'fit-width text-center' }, |
|
{ "orderable": true, "class": 'fit-width text-center' }, |
|
{ "orderable": true, "class": 'fit-width text-center' }, |
|
{ "orderable": true, "class": 'fit-width text-center' }, |
|
{ "orderable": false, "class": 'fit-width' }, |
|
{ "orderable": false, "class": 'fit-width' } |
|
] |
|
}); |
|
</script> |
|
</div> |
|
</div> |
|
<!-- Modal --> |
|
<div class="modal fade" id="modal-tools" tabindex="-1" role="dialog" aria-hidden="true"> |
|
<div class="modal-dialog modal-xl" role="document"> |
|
<div class="modal-content"> |
|
<div class="modal-header"> |
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> |
|
<span aria-hidden="true">×</span> |
|
</button> |
|
</div> |
|
<div class="modal-body"> |
|
<div class="card card-body mb-3"> |
|
<div class="card-title"><span class="fa fa-download"></span> <?= __("Esporta elenco") ?></div> |
|
<div class="row"> |
|
<div class="col-12 col-lg-3"> |
|
<a target="_blank" href="/backend/albo/exportPDF.php?tokenEsportazione=<?= $tokenEsportazione ?>" class="btn btn-block btn-danger"> |
|
<span class="far fa-file-pdf"></span> <?= __("Esporta PDF") ?> |
|
</a> |
|
</div> |
|
<div class="col-12 col-lg-3"> |
|
<a target="_blank" href="/backend/albo/exportCSV.php?tokenEsportazione=<?= $tokenEsportazione ?>" class="btn btn-block btn-success"> |
|
<span class="far fa-file-excel"></span> <?= __("Esporta CSV") ?> |
|
</a> |
|
</div> |
|
<div class="col-12 col-lg-3"> |
|
<a target="_blank" href="/backend/albo/exportCSV.php?extended=1&tokenEsportazione=<?= $tokenEsportazione ?>" class="btn btn-block btn-info"> |
|
<span class="far fa-file-excel"></span> <?= __("Esporta CSV estesa") ?> |
|
</a> |
|
</div> |
|
<div class="col-12 col-lg-3"> |
|
<a target="_blank" href="/backend/albo/exportZIP.php?tokenEsportazione=<?= $tokenEsportazione ?>" class="btn btn-block btn-warning"> |
|
<span class="far fa-file-archive"></span> <?= __("Esporta ZIP") ?> |
|
</a> |
|
</div> |
|
</div> |
|
</div> |
|
<?php if (!$_SESSION["utente"]->readOnly) { ?> |
|
<div class="card card-body"> |
|
<div class="card-title"> |
|
<span class="fa fa-random"></span> <?= __("Sorteggio") ?> |
|
<button class="btn btn-sm btn-info float-right" onClick="showModalWithURL('/backend/albo/listEstrazioni.php');"> |
|
<span class="fa fa-history"></span> <?= __("Storico") ?> |
|
</button> |
|
</div> |
|
<? |
|
oeManager::printSetEstrazione($tokenEsportazione,"/backend/albo/estrazioneOOEE.php","albo"); |
|
?> |
|
</div> |
|
<? } ?> |
|
</div> |
|
</div> |
|
</div> |
|
</div> |
|
<!-- Modal --> |
|
<div class="modal fade" id="modal-filter" tabindex="-1" role="dialog" aria-hidden="true"> |
|
<div class="modal-dialog modal-xl" role="document"> |
|
<div class="modal-content"> |
|
<div class="modal-header"> |
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> |
|
<span aria-hidden="true">×</span> |
|
</button> |
|
</div> |
|
<div class="modal-body"> |
|
<form id="filtriTabella"> |
|
<? |
|
include("{$beRoot}/operatori_economici/filter/form.php"); |
|
?> |
|
</form> |
|
<script> |
|
printFilterList('oeManager-showfiltriApplicati','<?= $tokenEsportazione ?>'); |
|
</script> |
|
</div> |
|
<div class="modal-footer"> |
|
<?php if ($operatoreAndDisponibile) : ?> |
|
<div> |
|
<div class="form-group text-right mb-0"> |
|
<label class="form-label" for="operatoreFiltriOE"><?= __("Modalità applicazione filtri") ?> <label> |
|
<select id="operatoreFiltriOE" class="form-control"> |
|
<option value="OR"><?= __("Almeno un filtro per gruppo soddisfatto") ?></option> |
|
<option value="AND"><?= __("Tutti i filtri soddisfatti") ?></option> |
|
</select> |
|
</div> |
|
</div> |
|
<?php endif; ?> |
|
<button type="button" data-dismiss="modal" class="btn btn-block btn-success" onClick="table.draw(); printFilterList('oeManager-showfiltriApplicati','<?= $tokenEsportazione ?>'); $('#oe-filter-button').slideDown();"><?= __("Applica filtro") ?></button> |
|
</div> |
|
</div> |
|
</div> |
|
</div> |
|
<? |
|
$__ignoreReadOnly = true; |
|
include_once "{$beRoot}/layout/bottom.php"; |
|
} |
|
?>
|
|
|