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) {