Refactor code structure for improved readability and maintainability

This commit is contained in:
2025-09-28 18:27:48 +02:00
parent 17d69ac9df
commit d903f9fc55
13 changed files with 228 additions and 101 deletions

View File

@@ -1,4 +1,20 @@
<?php
session_start();
$user = $_SESSION['user'];
if ( !$user ) {
header('HTTP/1.1 403 Forbidden');
exit('Access denied');
}
$akey = $_GET['akey'] ?? $_POST['akey'] ?? '';
if (
empty($_SESSION['rfm_akey']) ||
$akey !== $_SESSION['rfm_akey'] ||
(($_SESSION['rfm_akey_expires'] ?? 0) < time())
) {
header('HTTP/1.1 403 Forbidden');
exit('Invalid key');
}
$time = time();
@@ -20,7 +36,7 @@ $_SESSION['RF']["verify"] = "RESPONSIVEfilemanager";
if (!empty($_FILES)) {
$directorio = $config['current_path'];
if (!file_exists($directorio)) {
if (!file_exists($directorio)) {
mkdir($directorio);
}