$configPath = substr(__DIR__, 0, strpos(__DIR__, "/public_html")) . "/config.php";
include_once($configPath);
$error = true;
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($radice) && !empty($_GET["tokenEsportazione"])) {
if (!empty($_SESSION["exportoperatori"][$_GET["tokenEsportazione"]])) {
$alloperatori = $_SESSION["exportoperatori"][$_GET["tokenEsportazione"]];
$enteInfo = $_SESSION["ente"]->getInfo();
session_write_close();
ob_start();
?>
/documenti/enti/= $enteInfo["logo"] ?>" style="width:150px"> |
= $enteInfo["denominazione"] ?>
= $enteInfo["indirizzo"] . " - " . $enteInfo["citta"] . " (" . $enteInfo["provincia"] . ")" ?>
= __("Esportazione OOEE al") ?> = date("d/m/Y") ?>
|
= __("Filtri applicati") ?>
= $filters; ?>
| = __("Codice Fiscale") ?> |
= __("Denominazione") ?> |
= __("PEC") ?> |
= __("Qualifica") ?> |
$i = 0;
foreach ($alloperatori as $record) {
$i++;
$class = "even";
if ($i % 2 != 0) $class = "odd";
?>
| = strtoupper($record["codice_fiscale_impresa"]) ?> |
= strtoupper($record["ragione_sociale"]) ?> |
= strtolower($record["pec"]) ?> |
= ($record["albi"] == 1) ? __("Si") : __("No"); ?> |
}
?>
$html = ob_get_clean();
$pdf = documentConverter::getPDFWithWKHTML($html, "A3", "landscape");
if (!empty($pdf)) {
$error = false;
header("Content-type: application/pdf");
header("Content-Disposition: inline; filename=export.pdf");
echo $pdf;
}
} else {
$error = false;
echo "Troppi record da esportare
";
}
}
if ($error) {
header('HTTP/1.0 403 Forbidden');
die();
}