From 4b0d5cf65919d61b20b838b374c0e1ff31cf0f01 Mon Sep 17 00:00:00 2001 From: Jan BELLON Date: Fri, 8 Mar 2024 22:11:32 +0000 Subject: [PATCH] Update file functions.php --- include/functions.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/functions.php b/include/functions.php index c3d4c8c2..2b2a5a95 100644 --- a/include/functions.php +++ b/include/functions.php @@ -11,10 +11,14 @@ if(!isset($_SESSION['role'])) { if(isset($_GET['theme'])) { setcookie('theme', (int)$_GET['theme'] % 2, time()+10*60*60); + $theme_dark = $themes_dark[$_GET['theme']]; + $theme_light = $themes_light[$_GET['theme']]; +} else { + $theme_dark = $themes_dark[$_COOKIE['theme']]; + $theme_light = $themes_light[$_COOKIE['theme']]; } -$theme_dark = $themes_dark[$_COOKIE['theme']]; -$theme_light = $themes_light[$_COOKIE['theme']]; + function nav($nav) {