From 9a58eaae53bdd2a4fcdd66b1eb852c7db7970de9 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Sun, 8 Jun 2025 01:37:19 +0400 Subject: feat: moderation system --- public/index.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'public/index.php') diff --git a/public/index.php b/public/index.php index 580a186..7df2ce1 100644 --- a/public/index.php +++ b/public/index.php @@ -3,6 +3,8 @@ include_once $_SERVER['DOCUMENT_ROOT'] . '/../config.php'; include_once $_SERVER['DOCUMENT_ROOT'] . '/../lib/partials.php'; include_once $_SERVER['DOCUMENT_ROOT'] . '/../lib/utils.php'; +session_start(); + if (FILE_CATALOG_RANDOM && isset($_GET['random'])) { $files = glob(FILE_UPLOAD_DIRECTORY . "/*.*"); $file = $files[random_int(0, count($files) - 1)]; @@ -46,8 +48,6 @@ if (FILE_CATALOG_FANCY_VIEW && $file_id) { $file = json_decode(file_get_contents($meta_path), true); if (isset($file['views'])) { - session_start(); - $viewed_file_ids = $_SESSION['viewed_file_ids'] ?? []; if (!in_array($file['id'], $viewed_file_ids)) { @@ -156,6 +156,11 @@ $privacy_exists = is_file($_SERVER['DOCUMENT_ROOT'] . '/static/PRIVACY.txt');
+ + + + + @@ -303,7 +308,7 @@ $privacy_exists = is_file($_SERVER['DOCUMENT_ROOT'] . '/static/PRIVACY.txt'); - + - +