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.
83 righe
2.8 KiB
83 righe
2.8 KiB
<? |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
include_once ($beRoot."/layout/top.php"); |
|
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($radice)) { |
|
?> |
|
<? if (isset($tokenProvvisorio)) { ?> |
|
|
|
<div class="alert alert-warning"> |
|
<span class="fa fa-exclamation-triangle"></span> |
|
<?= __('msg-dati-incompleti') ?> |
|
</div> |
|
|
|
<? } ?> |
|
<div class="container-fluid pt-5 pb-3"> |
|
<div class="row"> |
|
<div class="col-12"> |
|
<h2> |
|
<?= Modulo::header($radice) ?> |
|
</h2> |
|
</div> |
|
</div> |
|
</div> |
|
<form rel="validate" method="post" action="save.php" id="edit-form"> |
|
<input id="token" type="hidden" name="token" value="<?= tokenGen() ?>"> |
|
<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-primary"><span class="fa fa-save"></span> <?= __("Salva") ?></button> |
|
</div> |
|
</div> |
|
</div> |
|
</div> |
|
<div id="body-div"> |
|
<? |
|
$sql = "SELECT * FROM b_pec WHERE codice_ente = :codice_ente AND eliminato = 'N' ORDER BY pec "; |
|
$ris = $pdo->go($sql,array(":codice_ente"=>$_SESSION["ente"]->codice)); |
|
if ($ris->rowCount() > 0) { |
|
while ($record = $ris->fetch(PDO::FETCH_ASSOC)) { |
|
include("view-row.php"); |
|
} |
|
} else { |
|
$_GET["codice"] = 0; |
|
$predefinita = true; |
|
include("edit-row.php"); |
|
} |
|
?> |
|
</div> |
|
<button onclick="aggiungi('edit-row.php?codice=0','#body-div'); return false" class="btn btn-lg btn-success btn-block"><span class="fa fa-plus-circle"></span> <?= __("Aggiungi nuovo") ?><?= (isset($tokenProvvisorio)) ? "*" : "" ?></button> |
|
<button class="btn btn-block btn-lg btn-primary"><span class="fa fa-save"></span> <?= __("Salva") ?></button> |
|
|
|
</form> |
|
<script> |
|
function prova_configurazione(id) { |
|
if (typeof id !== 'undefined') { |
|
data = $("#" + id + " :input").serialize(); |
|
$("#wait").show(); |
|
$.ajax({ |
|
type: "POST", |
|
async: false, |
|
url: "/backend/pec/test-smtp.php", |
|
data: data, |
|
dataType: "html", |
|
success: function(script) { |
|
$("#wait").hide(); |
|
swal({html:script}); |
|
}, |
|
error: function() { |
|
$("#wait").hide(); |
|
swal(js_dict["error-retry"]); |
|
} |
|
}); |
|
} |
|
} |
|
</script> |
|
<? |
|
include_once ($beRoot."/layout/bottom.php"); |
|
} else { |
|
echo '<meta http-equiv="refresh" content="0;URL=/index.php">'; |
|
die(); |
|
} |
|
?>
|
|
|