From 0c7cf2c836944fdea32ee39fc496330da18ca3d6 Mon Sep 17 00:00:00 2001 From: Jan BELLON Date: Fri, 8 Mar 2024 20:29:00 +0000 Subject: [PATCH] Update file functions.php --- include/functions.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/functions.php b/include/functions.php index e7b8ba96..b1af8669 100644 --- a/include/functions.php +++ b/include/functions.php @@ -9,7 +9,11 @@ if(!isset($_SESSION['role'])) { $_SESSION['role'] = 0; } -$theme = isset($_GET['theme']) ? $themes[$_GET['theme']] : $themes[0]; +if(isset($_GET['theme'])) { + $_SESSION['theme'] = (int)$_GET['theme'] % 2; +} + +$theme = $themes[$_SESSION['theme']]; function nav($nav) {