Problem with theme solved

This commit is contained in:
cbo 2024-03-15 15:33:12 +01:00
parent a7614ed66f
commit c40b871fd3

View File

@ -8,14 +8,14 @@ if (!isset($_SESSION['userAccreditation']) || !isset($_SESSION['userLevel'])) {
}
if (!isset($_COOKIE['theme'])) {
setcookie('theme', 0, time()+10*60*60);
setcookie('theme', 0, time()+10*60*60, "/", ".e59.fr");
$darkTheme = $darkThemes[0];
$lightTheme = $lightThemes[0];
}
if (isset($_GET['theme'])) {
$newTheme = (int)$_GET['theme'] % 2;
setcookie('theme', $newTheme); // % 2 => Number of different themes
setcookie('theme', $newTheme, time()+10*60*60, "/", ".e59.fr"); // % 2 => Number of different themes
$darkTheme = $darkThemes[$newTheme];
$lightTHeme = $lightThemes[$newTheme];