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.
90 righe
3.9 KiB
90 righe
3.9 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"])) { |
|
$programma = Programma::init($_GET["codice"]); |
|
if (!empty($programma->info["codice"])) { |
|
$schede = Programma::getSchedeProgramma($programma->info["tipologia"]); |
|
if (!empty($schede[$_GET["scheda"]])) { |
|
$idScheda = $_GET["scheda"]; |
|
$scheda = $schede[$_GET["scheda"]]; |
|
$breadcrumb = []; |
|
$breadcrumb["/{$radice}/index.php"] = __("Progetti"); |
|
$breadcrumb["/{$radice}/programmazione/index.php"] = __("Programmazione"); |
|
$breadcrumb[] = $scheda; |
|
include_once($beRoot."/layout/top.php"); |
|
?> |
|
<div class="container-fluid pt-5 pb-3"> |
|
<div class="row"> |
|
<div class="col-12"> |
|
<h1> |
|
<?= $scheda ?> |
|
<br><small><?= $programma->getTitolo(); ?></small> |
|
</h1> |
|
</div> |
|
</div> |
|
</div> |
|
<? |
|
$pathScheda = __DIR__."/{$programma->info["tipologia"]}/{$idScheda}.php"; |
|
if (file_exists($pathScheda)) { |
|
$idRiferimento = $programma->getIdEditorScheda($idScheda); |
|
$editor = new editorManager("programmazione-art21",$idRiferimento); |
|
$editor->exportFormat = "landscape"; |
|
$editor->exportSize = "A3"; |
|
$ids = $editor->getIDS(); |
|
?> |
|
<form rel="validate" method="post" action="save.php" id="edit-form"> |
|
<div id="commands" class="mb-5"> |
|
<div class="commands container-fluid"> |
|
<div class="row"> |
|
<div class="col-12 text-right"> |
|
<button class="btn btn-sm btn-warning"><span class="fa fa-save"></span> <?= __("Salva") ?></button> |
|
<? |
|
if (!empty($ids["index"])) { |
|
?> |
|
<button type="button" onclick="elimina('<?= $programma->info["codice"] ?>','progetti/programmazione/pdf','token=<?= tokenGen() ?>&scheda=<?= $idScheda ?>')" class="btn btn-sm btn-danger"><span class="fa fa-times"></span> <?= __("Rielabora documento") ?></button> |
|
<? |
|
} |
|
$editor->printVersionButton(); |
|
?> |
|
</div> |
|
</div> |
|
</div> |
|
</div> |
|
<input id="token" type="hidden" name="token" value="<?= tokenGen() ?>"> |
|
<input id="codice" type="hidden" name="codice" value="<?= $programma->info["codice"] ?>"> |
|
<input id="scheda" type="hidden" name="scheda" value="<?= $idScheda ?>"> |
|
<? |
|
if (!empty($editor->latest())) { |
|
$editor->edit(); |
|
} else { |
|
include($pathScheda); |
|
if (!empty($content)) { |
|
$enteBeneficiario = Ente::getInfoFromID($programma->info["codice_ente"])[0]["denominazione"] ?? ""; |
|
$content = "<h1 style=\"text-align:center\">SCHEDA " . strtoupper("{$idScheda} {$programma->getTitolo()}") . "</h1><h2 style=\"text-align:center\">{$enteBeneficiario}</h2>" . $content; |
|
editorManager::printEditor($content,"editorStandard","landscape","A3"); |
|
} else { |
|
alertManager::printWarningBox(__("Errore nell'elaborazione")); |
|
} |
|
} |
|
?> |
|
</form> |
|
<? |
|
} else { |
|
alertManager::printAlertBox(__("Scheda non prevista")); |
|
} |
|
|
|
include_once ($beRoot."/layout/bottom.php"); |
|
} else { |
|
echo '<meta http-equiv="refresh" content="0;URL=/index.php">'; |
|
die(); |
|
} |
|
} else { |
|
echo '<meta http-equiv="refresh" content="0;URL=/index.php">'; |
|
die(); |
|
} |
|
} else { |
|
echo '<meta http-equiv="refresh" content="0;URL=/index.php">'; |
|
die(); |
|
} |
|
?>
|
|
|