From df3413c69dcf3976e24e010520e4f9606d4ffda1 Mon Sep 17 00:00:00 2001 From: cbo Date: Sat, 16 Mar 2024 13:25:15 +0000 Subject: [PATCH] C --- config/global.ini | 10 ++++++---- content/articles/12.md | 21 +++++++++++++-------- include/init.php | 11 ++++++----- include/panels.php | 4 ---- 4 files changed, 25 insertions(+), 21 deletions(-) diff --git a/config/global.ini b/config/global.ini index 687913c2..b24b1c99 100755 --- a/config/global.ini +++ b/config/global.ini @@ -32,9 +32,11 @@ footerText = "© Jan BELLON - E59 v1.3" 3 = '' [darkThemes] -0 = '--text: hsl(0, 0%, 80%);--background: hsl(0, 0%, 15%);--panel-background: hsl(0, 0%, 10%);--buttons: hsl(0, 0%, 5%)' -1 = '--text: hsl(208, 100%, 96%); --background: hsl(215, 21%, 11%); --panel-background: hsl(216, 28%, 7%); --buttons: hsl(216, 28%, 7%)' +0 = '.body {--text: hsl(0, 0%, 80%); --background: hsl(0, 0%, 15%); --panel-background: hsl(0, 0%, 10%); --buttons: hsl(0, 0%, 5%)}' +1 = '.body {--text: hsl(208, 100%, 96%); --background: hsl(215, 21%, 11%); --panel-background: hsl(216, 28%, 7%); --buttons: hsl(216, 28%, 7%)}' +2 = '.body {--text: hsl(160, 65%, 95%); --background: hsl(160, 65%, 3%); --panel-background: hsl(160, 65%, 3%); --buttons: hsl(160, 65%, 3%)} .text-input, .file-input input, .select-input, .select-input select, textarea, .button, button, .form {border:1px solid var(--text)}' [lightThemes] -0 = '--text: hsl(0, 0%, 20%);--background: hsl(0, 0%, 100%);--panel-background: hsl(0, 0%, 100%);--buttons: hsl(0, 0%, 100%)' -1 = '--text: hsl(208, 100%, 0%); --background: hsl(215, 21%, 100%); --panel-background: hsl(216, 28%, 95%); --buttons: hsl(216, 28%, 95%)' +0 = '.body {--text: hsl(0, 0%, 20%); --background: hsl(0, 0%, 100%); --panel-background: hsl(0, 0%, 100%); --buttons: hsl(0, 0%, 100%)}' +1 = '.body {--text: hsl(208, 100%, 0%); --background: hsl(215, 21%, 100%); --panel-background: hsl(216, 28%, 95%); --buttons: hsl(216, 28%, 95%)}' +2 = '.body {--text: hsl(160, 65%, 20%); --background: hsl(160, 30%, 98%); --panel-background: hsl(160, 30%, 98%); --buttons: hsl(160, 30%, 98%)} .text-input, .file-input input, .select-input, .select-input select, textarea, .button, button, .form {border:1px solid var(--text)}' \ No newline at end of file diff --git a/content/articles/12.md b/content/articles/12.md index 3c6b4e3c..8c9d21dd 100755 --- a/content/articles/12.md +++ b/content/articles/12.md @@ -1,8 +1,13 @@ -#Changelog Update 1.2 - -- Interface utilisateur améliorée -- Liens des pages modifiés -- Code source mieux compréhensible -- Failles de sécurité corrigées -- Transmission de la propriété des articles à Deleted_User lors de la suppression du compte -- Insersion d'émojis possible \ No newline at end of file +#Changelog Update 1.2
+
+- Interface utilisateur améliorée
+- Liens des pages modifiés
+- Code source mieux compréhensible
+- Failles de sécurité corrigées
+- Transmission de la propriété des articles à Deleted_User lors de la suppression du compte
+- Insersion d'émojis possible
+- Ajout de la recherche utilisateurs dans la barre de recherche news.
+- Certification modifiée avec une forme unique pour chaque role.
+ - Membre du club : Bleu Clair
+ - Responsable : Violet
+ - Directeur/Admin : Orange
diff --git a/include/init.php b/include/init.php index 24a4f88a..edfaf68b 100755 --- a/include/init.php +++ b/include/init.php @@ -8,19 +8,20 @@ if (!isset($_SESSION['userAccreditation']) || !isset($_SESSION['userLevel'])) { } if (!isset($_COOKIE['theme'])) { - setcookie('theme', 0, time()+10*60*60, "/", ".e59.fr"); - $darkTheme = $darkThemes[0]; - $lightTheme = $lightThemes[0]; + $theme = random_int(0, 2); + setcookie('theme', $theme, time()+10*60*60, "/", ".e59.fr"); + $darkTheme = $darkThemes[$theme]; + $lightTheme = $lightThemes[$theme]; } if (isset($_GET['theme'])) { - $newTheme = (int)$_GET['theme'] % 2; + $newTheme = (int)$_GET['theme'] % 3; setcookie('theme', $newTheme, time()+10*60*60, "/", ".e59.fr"); // % 2 => Number of different themes $darkTheme = $darkThemes[$newTheme]; $lightTHeme = $lightThemes[$newTheme]; } else if (isset($_COOKIE['theme'])) { - $theme = (int)$_COOKIE['theme'] % 2; + $theme = (int)$_COOKIE['theme'] % 3; $darkTheme = $darkThemes[$theme]; $lightTheme = $lightThemes[$theme]; } diff --git a/include/panels.php b/include/panels.php index 74ec810d..263eeb39 100755 --- a/include/panels.php +++ b/include/panels.php @@ -10,16 +10,12 @@ function fillHead($rootPageURL, $pageTitle, $darkTheme, $lightTheme) { echo ('');