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.
51 righe
1.7 KiB
51 righe
1.7 KiB
<?php |
|
$error = true; |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
include_once __DIR__ . DIRECTORY_SEPARATOR . "class" . DIRECTORY_SEPARATOR . "FormGenerator.class.php"; |
|
include_once __DIR__ . DIRECTORY_SEPARATOR . "class" . DIRECTORY_SEPARATOR . "TedEsender.class.php"; |
|
|
|
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($radice)) { |
|
$continua = true; |
|
$inputs = ""; |
|
if (!empty($_GET["modulo"]) && !empty($_GET["codice_elemento"])) { |
|
$continua = false; |
|
if (!empty(TedEsender::moduliCollegati()[$_GET["modulo"]]) && $_SESSION["utente"]->permission($_GET["modulo"],$_GET["codice_elemento"])) { |
|
$continua = true; |
|
$modulo = purify($_GET["modulo"]); |
|
$elemento = (int) $_GET["codice_elemento"]; |
|
ob_start(); |
|
?> |
|
<input type="hidden" name="modulo" value="<?= $modulo ?>"> |
|
<input type="hidden" name="codice_elemento" value="<?= $elemento ?>"> |
|
<? |
|
$inputs = ob_get_clean(); |
|
} |
|
} |
|
if ($continua) { |
|
|
|
$error = false; |
|
$form = new FormGenerator; |
|
$select = TedEsender::listAvailableNoticeForms(); |
|
|
|
?> |
|
<div class="row"> |
|
<div class="col-12"> |
|
<h3><?= __guue("Inserimento nuova pubblicazione GUUE") ?></h3> |
|
</div> |
|
</div> |
|
<form action="/backend/guue/edit.php" method="GET" rel="validate" target="_self"> |
|
<?= $inputs ?> |
|
<input type="hidden" name="codice" value="0"> |
|
<div class="row my-4"> |
|
<?= $form->select($select) ?> |
|
<div class="col-12"> |
|
<button type="submit" class="btn btn-primary btn-block"><?= __guue("Crea un nuovo form") ?></button> |
|
</div> |
|
</div> |
|
</form> |
|
<? |
|
} |
|
} |
|
|
|
if($error) header('HTTP/1.0 403 Forbidden');
|
|
|