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.
23 righe
791 B
23 righe
791 B
<?php |
|
|
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once $configPath; |
|
|
|
$fileName = sanitize_string($_POST["filename"], [], '-', false); |
|
|
|
if (!empty($_POST) && !empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($radice,$_POST["sourceID"],"changelogs") && tokenVerify()) { |
|
$sourceId = empty($_POST["sourceID"]) ? "-1" : $_POST["sourceID"]; |
|
$saved = filesManager::saveFile( |
|
$_POST["filename"], |
|
$sourceId, |
|
"changelogs", |
|
"", |
|
"A", |
|
"" |
|
); |
|
echo json_encode([ |
|
"url" => url(filesManager::getAttachURL(["codice" => $saved, "name" => $fileName],$sourceId,"changelogs", empty($_SESSION["ente"]) ? 0 : 1)) |
|
]); |
|
die(); |
|
} |
|
http_response_code(403);
|
|
|