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.
24 righe
860 B
24 righe
860 B
<?php |
|
|
|
use Studioamica\ChangelogsWriter\Core\Changelog; |
|
|
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once $configPath; |
|
|
|
$error = true; |
|
if (!empty($_POST) && !empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($radice,$_POST["id"]) && tokenVerify()) { |
|
$changelog_writer = new Changelog(); |
|
$changelog_writer->loadConfiguration($configPath); |
|
$id = $changelog_writer->save($_SESSION["ente"]->codice ?? null, $_POST); |
|
$error = empty($id); |
|
if (!$error): |
|
?>swal({title:js_dict["success-msg"],type:"success"}).then(function(){ window.location.href="/backend/changelogs/edit.php?codice=<?= $id ?>"; });<? |
|
else: |
|
?>swal({title:js_dict.error,html:js_dict["error-generic"],type:"error"});<? |
|
endif; |
|
die(); |
|
} |
|
if ($error) { |
|
header('HTTP/1.0 403 Forbidden'); |
|
die(); |
|
}
|
|
|