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.
78 righe
2.8 KiB
78 righe
2.8 KiB
<? |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
if (isset($_SESSION["utente"]) && isset($_GET["modulo"]) && isset($_GET["codice_elemento"]) && $_SESSION["utente"]->permission($_GET["modulo"],$_GET["codice_elemento"])) { |
|
|
|
$manager = new registriManager($_GET["modulo"],$_GET["codice_elemento"]); |
|
$risultati = $manager->getLog(); |
|
if (!empty($risultati)) { |
|
$enteInfo = $_SESSION["ente"]->getInfo(); |
|
$data = []; |
|
ob_start(); |
|
?> |
|
<html> |
|
<style> |
|
body { font-size:10px; } |
|
td, th { padding:5px; } |
|
tr.odd { background-color: #DDD; } |
|
table { width:100% } |
|
</style> |
|
<body> |
|
<table> |
|
<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><br> |
|
<h2 style="margin:5px;padding:0px"><?= __("Registro procedura") ?></h2> |
|
<strong><?= $manager->getInfo()["oggetto"] ?></strong> |
|
</td> |
|
</tr> |
|
</table> |
|
<table style="width:100%"> |
|
<thead> |
|
<tr> |
|
<th style="width:10%"><?= __("Operazione") ?></th> |
|
<th style="width:55%"><?= __("Descrizione") ?></th> |
|
<th style="width:20%"><?= __("Utente") ?></th> |
|
<th style="width:15%"><?= __("Data e ora") ?></th> |
|
</tr> |
|
</thead> |
|
<tbody> |
|
<? |
|
$i = 0; |
|
foreach($risultati AS $record) { |
|
$i++; |
|
$class= "even"; |
|
if ($i%2!=0) { $class = "odd"; } |
|
$utente = Utente::getInfoFromID($record["utente_modifica"]); |
|
?> |
|
<tr class="<?= $class ?>"> |
|
<td style="text-align:center"><?= strtoupper($record["operazione"]); ?></td> |
|
<td><?= $record["oggetto"]; ?></td> |
|
<td style="text-align:center"><?= $utente["cognome"] . " " . $utente["nome"]; ?></td> |
|
<td style="text-align:right"><?= $record["timestamp"]; ?></td> |
|
</tr> |
|
<? |
|
} |
|
?> |
|
</tbody> |
|
</table> |
|
</body> |
|
</html> |
|
<? |
|
$html = ob_get_clean(); |
|
$pdf = documentConverter::getPDFWithWKHTML($html,"A4","landscape"); |
|
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(); |
|
} |
|
?>
|
|
|