Retire clé export et ajoute demo

This commit is contained in:
Johnnybegood90
2026-03-15 03:08:16 +01:00
parent 16abfab05b
commit bdf3b4797d
4 changed files with 34 additions and 3 deletions
+5 -1
View File
@@ -3,6 +3,10 @@
require_once __DIR__ . '/common.php';
function gridtv_require_admin(array $config, string $page_title = 'Admin'): array {
if (gridtv_is_demo_mode()) {
return ['unlocked' => true, 'error' => '', 'demo' => true];
}
if (session_status() !== PHP_SESSION_ACTIVE) {
session_start();
}
@@ -12,7 +16,7 @@ function gridtv_require_admin(array $config, string $page_title = 'Admin'): arra
$error = '';
if ($admin_key !== '' && hash_equals($admin_key, (string) $session_key)) {
return ['unlocked' => true, 'error' => ''];
return ['unlocked' => true, 'error' => '', 'demo' => false];
}
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['admin_key_input'])) {