permission("programmazione-art21",$_GET["codice"]) && !empty($_GET["scheda"]) && !empty($_GET["format"])) { $programma = Programma::init($_GET["codice"]); if (!empty($programma->info["codice"])) { $schede = Programma::getSchedeProgramma($programma->info["tipologia"]); if (!empty($schede[$_GET["scheda"]])) { $idScheda = $_GET["scheda"]; $pathScheda = __DIR__."/{$programma->info["tipologia"]}/{$idScheda}.php"; if (file_exists($pathScheda)) { $idRiferimento = $programma->getIdEditorScheda($idScheda); $editor = new editorManager("programmazione-art21",$idRiferimento); $content = $editor->latest(); if (!empty($content)) { ob_start(); ?> <?= __("Export") ?> "; if ($_GET["format"] == "pdf") { $pdf = documentConverter::getPDFWithWKHTML($html,"A3","landscape"); $error = false; header("Content-type: application/pdf"); header("Content-Disposition: inline; filename=export.pdf"); echo $pdf; } else if ($_GET["format"] == "odt") { documentConverter::generateODT($html); } } } } } } ?>