$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();
?>
/documenti/enti/= $enteInfo["logo"] ?>" style="width:150px"> |
= $enteInfo["denominazione"] ?>
= $enteInfo["indirizzo"] . " - " . $enteInfo["citta"] . " (" . $enteInfo["provincia"] . ")" ?>
= __("Registro procedura") ?>
= $manager->getInfo()["oggetto"] ?>
|
| = __("Operazione") ?> |
= __("Descrizione") ?> |
= __("Utente") ?> |
= __("Data e ora") ?> |
$i = 0;
foreach($risultati AS $record) {
$i++;
$class= "even";
if ($i%2!=0) { $class = "odd"; }
$utente = Utente::getInfoFromID($record["utente_modifica"]);
?>
| = strtoupper($record["operazione"]); ?> |
= $record["oggetto"]; ?> |
= $utente["cognome"] . " " . $utente["nome"]; ?> |
= $record["timestamp"]; ?> |
}
?>
$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();
}
?>