gestione gare pubbliche
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.
 
 
 
 
 

36 righe
1.1 KiB

<?php
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php";
include_once($configPath);
function deleteDirectory($dirPath) {
if (is_dir($dirPath)) {
$files = scandir($dirPath);
foreach ($files as $file) {
if ($file !== '.' && $file !== '..') {
$filePath = $dirPath . '/' . $file;
if (is_dir($filePath)) {
deleteDirectory($filePath);
} else {
unlink($filePath);
}
}
}
rmdir($dirPath);
}
}
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($radice) && $_SESSION["utente"]->gerarchia <= 1) {
$dirPath = $config["mediaFolder"] . "/cache/all/Files";
if (file_exists($dirPath)) {
deleteDirectory($dirPath);
}
if (file_exists(\Studioamica\Tuttodocs\Utils\Config::get("cachePath"))) {
deleteDirectory(\Studioamica\Tuttodocs\Utils\Config::get("cachePath"));
}
?>
swal({title:js_dict["success-msg"],type:"success"});
<?
die();
}
http_response_code(403);