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.
 
 
 
 
 

253 righe
5.5 KiB

<?
if(!isset($config)){
header('HTTP/1.0 401 Unauthorized');
die();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?= __('Esportazione Elenco Comunicazioni PDF') ?></title>
<style>
@page {
margin: 0cm;
margin-top: 0.5cm;
margin-left: 1.3cm;
margin-right: 1.3cm;
margin-bottom: 0.5cm;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
padding: 30px 40px;
}
body * {
font-family: 'Lucida Grande', Helvetica, Arial, sans-serif;
}
.b-none{
border: none;
}
.w-15{
width: 15%;
}
.w-20{
width: 20%;
}
.w-35{
width: 35%;
}
.w-45{
width: 45%;
}
.w-55{
width: 55%;
}
.w-100{
width: 100%;
}
.p-0 {
padding: 0;
}
.px-3{
padding: 0 1rem
}
.p-2{
padding: .5rem
}
.p-3{
padding: 1rem
}
.p-4{
padding: 1.5rem
}
.p-5{
padding: 3rem
}
.p-10-15{
padding: 10px 15px;
}
.mb-5{
margin-bottom: 3rem;
}
.container{
width: 100%;
margin: 10px 0;
}
.label{
background: #DDD;
padding: 15px 15px;
border: solid grey;
border-width: 1px 1px 0 1px;
}
.testo{
border: solid grey;
border-width: 0px 1px 1px 1px;
}
label{
font-weight: bold;
}
.b-collapse {
border-collapse: collapse;
padding: 0;
margin: 0;
}
.b-grey{
border: 1px solid grey;
}
.table-elenco tr:nth-child(even){
background-color: #DDD;
}
table, tr, td, th, tbody, thead, tfoot {
page-break-inside: avoid !important;
}
.b-bottom{
border-bottom: 1px solid grey;
}
.b-grey > .table-internal:last-child{
border: none;
}
.table-internal{
height: 50%;
}
td, tr, th, table{
vertical-align: middle;
}
</style>
</head>
<body>
<table width="100%" class="mb-5">
<tr>
<td style="width:150px"><img src="<?= $config["link_sito"] ?>/documenti/enti/<?= $enteInfo["logo"] ?>" style="width:150px"></td>
<td>
<h1><?= $enteInfo["denominazione"] ?></h1>
<strong><?= $enteInfo["indirizzo"] . " - " . $enteInfo["citta"] . " (" . $enteInfo["provincia"] . ")" ?></strong><br>
<h2 style="margin:5px;padding:0px">
<?= __("Esportazione Elenco Comunicazioni - ") ?>
<?= date("d/m/Y") ?>
</h2>
</td>
</tr>
</table>
<table class="table-elenco b-collapse" width="100%">
<tr>
<th class="b-grey p-3"><?= __('Oggetto') ?></th>
<th class="b-grey p-3"><?= __('Destinatari') ?></th>
<th class="b-grey p-3"><?= __('ID') ?></th>
<th class="b-grey p-3"><?= __('Data') ?></th>
</tr>
<? foreach($comunicazioni as $comunicazione){ ?>
<?
$comunicazione['destinatari'] = self::getDestinatari($comunicazione['codice']);
$conta = count($comunicazione['destinatari']);
?>
<tr>
<td class="b-grey p-3 w-15"><?= $comunicazione['oggetto'] ?></td>
<td class="b-grey w-55 <?= (!empty($comunicazione['destinatari']) && count($comunicazione['destinatari']) > 1 ) ? '' : 'p-3' ?>">
<? if(!empty($comunicazione['destinatari']) && count($comunicazione['destinatari']) == 1){ ?>
<?= $comunicazione['destinatari'][0]['pec'] ?> (<?= $comunicazione['destinatari'][0]['ragione_sociale'] ?>)
<? }elseif(!empty($comunicazione['destinatari']) && count($comunicazione['destinatari']) > 1){ ?>
<? foreach($comunicazione['destinatari'] as $key => $destinatario){ ?>
<table class="table-internal b-collapse b-bottom w-100">
<tr>
<td class="p-3">
<?= $destinatario['pec'] ?> (<?= $destinatario['ragione_sociale'] ?>)
</td>
</tr>
</table>
<? } ?>
<? }else{ ?>
<?= __('Nessun Destinatario') ?>
<? } ?>
</td>
<td class="b-grey w-15">
<? foreach($comunicazione['destinatari'] as $destinatario){ ?>
<table class="table-internal b-collapse b-bottom w-100">
<tr>
<td class="p-3">
<? if(!empty($destinatario['protocollo'])){ ?>
<?= __('N. Protocollo: ') ?>
<?= $destinatario['protocollo'] ?>
<? }else{ ?>
<?= __('ID Interno: ') ?>
<?= $destinatario['protocollo_interno'] ?>
<? } ?>
</td>
</tr>
</table>
<? } ?>
</td>
<td class="b-grey w-15 <?= (empty($comunicazione['destinatari'])) ? 'p-3' : ''?>">
<? if(!empty($comunicazione['destinatari'])){ ?>
<? foreach($comunicazione['destinatari'] as $destinatario){ ?>
<table class="table-internal b-collapse b-bottom w-100">
<tr>
<td class="p-3">
<?= $destinatario['timestamp_interno'] ?>
</td>
</tr>
</table>
<? } ?>
<? }else{ ?>
<?= $comunicazione['timestamp'] ?>
<? } ?>
</td>
</tr>
<? } ?>
</table>
</body>
</html>