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.
84 righe
2.8 KiB
84 righe
2.8 KiB
<? |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->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(); |
|
?> |
|
<!DOCTYPE html> |
|
<html> |
|
<head> |
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8" /> |
|
<title><?= __("Export") ?></title> |
|
<style type="text/css"> |
|
html, body { |
|
margin: 0px; |
|
padding: 0px; |
|
} |
|
body { |
|
font-family: "Helvetica", sans-serif; |
|
font-size: 10pt; |
|
padding: 1cm; |
|
} |
|
|
|
.card { |
|
margin:0.1cm 0.5cm; |
|
padding:0.5cm; |
|
} |
|
|
|
.text-center { |
|
text-align:center |
|
} |
|
|
|
.bg-success { |
|
background-color:#0C0; |
|
} |
|
|
|
.bg-danger { |
|
background-color:#C00; |
|
} |
|
|
|
table { |
|
width: 100%; |
|
border-spacing: 0; |
|
border-collapse: collapse; |
|
} |
|
th { |
|
background-color:#CCC; |
|
} |
|
td,th { |
|
border: 1px solid #666; |
|
margin:0; |
|
padding: 0.2cm; |
|
} |
|
|
|
</style> |
|
</head> |
|
<body> |
|
<? |
|
$html = ob_get_clean() . $content . "</body></html>"; |
|
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); |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
?>
|
|
|