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.
79 righe
3.9 KiB
79 righe
3.9 KiB
<? |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
$error = true; |
|
if (!empty($_SESSION["utente"]) && !$_SESSION["utente"]->readOnly && $_SESSION["utente"]->permission($_GET["modulo"],$_GET["codice_elemento"],"avvisi")) { |
|
$manager = new avvisiProcedura($_SESSION["ente"]->codice,$_GET["modulo"],$_GET["codice_elemento"],$_GET["sub"]); |
|
if (!empty($_GET["codice"])) { |
|
$tmp = $manager->getAvvisi("N",["codice"=>$_GET["codice"]]); |
|
if (!empty($tmp)) { $avviso = $tmp[0]; } |
|
} else { |
|
$avviso = get_campi("b_avvisi"); |
|
} |
|
if (!empty($avviso)) { |
|
$error = false; |
|
?> |
|
<form rel="validate" method="post" action="/backend/common/avvisi/save.php" id="submit-avviso-form"> |
|
<input id="token" type="hidden" name="token" value="<?= tokenGen() ?>"> |
|
<input id="modulo" type="hidden" name="modulo" value="<?= $manager->modulo ?>"> |
|
<input id="elemento" type="hidden" name="codice_elemento" value="<?= $manager->elemento ?>"> |
|
<input id="subElemento" type="hidden" name="sub" value="<?= $manager->sub ?>"> |
|
<input id="codice" type="hidden" name="codice" value="<?= $avviso["codice"] ?>"> |
|
<input id="stato-avviso" type="hidden" name="attivo" value="N"> |
|
<div class="card card-body"> |
|
<div class="row"> |
|
<div class="col-12 col-lg-6"> |
|
<div class="form-group"> |
|
<label for="data"><?= __("data pubblicazione") ?>*</label> |
|
<input type="text" id="data" class="form-control datetimepick" name="data" title="<?= __("data pubblicazione") ?>" rel="S;16;16;DT" value="<?= mysql2datetime($avviso["data"]) ?>"> |
|
</div> |
|
</div> |
|
<div class="col-12 col-lg-6"> |
|
<div class="form-group"> |
|
<label for="data_homepage"><?= __("permanenza homepage") ?></label> |
|
<input type="text" id="data_homepage" class="form-control datetimepick" name="data_homepage" title="<?= __("permanenza homepage") ?>" rel="N;16;16;DT" value="<?= mysql2datetime($avviso["data_homepage"]) ?>"> |
|
</div> |
|
</div> |
|
</div> |
|
<div class="form-group"> |
|
<label for="titolo"><?= __("titolo") ?>*</label> |
|
<input rel="S;1;0;A" type="text" class="form-control input-lg" title="<?= __("titolo") ?>" name="titolo" id="titolo" value="<?= $avviso["titolo"] ?>"> |
|
</div> |
|
<div class="form-group"> |
|
<label for="testo"><?= __("Testo") ?>*</label> |
|
<textarea title="<?= __("Testo") ?>" class="ckeditor_simple" name="testo" id="testo" rel="S;0;0;A"> |
|
<?= $avviso["testo"] ?> |
|
</textarea> |
|
</div> |
|
<div id="file-avviso"> |
|
<label><?= __("Allegati") ?></label> |
|
<div> |
|
<? |
|
if (!empty($avviso["codice"])) { |
|
filesManager::printList($avviso["codice"],"avvisi","A",0,true); |
|
} |
|
?> |
|
</div> |
|
<div> |
|
<? |
|
filesManager::printForm("avviso"); |
|
?> |
|
</div> |
|
</div> |
|
</div> |
|
<div class="btn-group btn-block"> |
|
<button type="button" onClick="confirmSubmitAvviso('N')" class="btn btn-warning btn-block mt-2"><span class="fa fa-save"></span> <?= __("Salva bozza") ?></button> |
|
<button type="button" onClick="confirmSubmitAvviso('S')" class="btn btn-success btn-block mt-2"><span class="fa fa-check"></span> <?= __("Salva e pubblica") ?></button> |
|
<? if (file_exists($beRoot.$manager->modulo."/avvisi/send.php")) { ?> |
|
<button type="button" onClick="confirmSubmitAvviso('I')" class="btn btn-info btn-block mt-2"><span class="fa fa-paper-plane"></span> <?= __("Salva e invia") ?></button> |
|
<? } ?> |
|
</div> |
|
</form> |
|
<? |
|
} |
|
} |
|
if ($error) { |
|
header('HTTP/1.0 403 Forbidden'); |
|
die(); |
|
} |
|
?>
|
|
|