Added options page

This commit is contained in:
2025-10-23 00:54:43 +01:00
parent 0a5637f12a
commit 26b9785ba3
8 changed files with 576 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
<?php
session_start();
if (empty($_SESSION['is_admin'])) exit(json_encode(['error'=>'Not authorized']));
$cacheDir = __DIR__.'/../../cache';
header('Content-Type: application/json');
if(!is_dir($cacheDir)){
echo json_encode(['error'=>'Cache folder not found']); exit;
}
$files = glob($cacheDir.'/*');
foreach($files as $f){ if(is_file($f)) unlink($f); }
echo json_encode(['message'=>'Cache cleared']);