From b84c8a1733ec5553765785a526b899fcdf24786a Mon Sep 17 00:00:00 2001 From: ycharbi Date: Mon, 10 Jan 2022 12:07:29 +0100 Subject: [PATCH] =?UTF-8?q?D=C3=A9placement=20des=20fichiers=20deconnexion?= =?UTF-8?q?.php=20et=20parametres.php=20+=20ajout=20d'un=20lien=20vers=20l?= =?UTF-8?q?es=20param=C3=A8tres=20dans=20la=20barre=20de=20menu=20+=20chan?= =?UTF-8?q?gement=20de=20la=20redirection=20apr=C3=A8s=20connexion=20vers?= =?UTF-8?q?=20la=20page=20d'accueil?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inclusions/barre_menu.php | 3 ++- pages/gestion/administration.php | 6 +++++- pages/gestion/parametres.php | 16 ---------------- services/gestion/parametres.php | 7 +++++++ .../utilisateurs}/deconnexion.php | 0 .../traitements/utilisateurs/identification.php | 4 ++-- 6 files changed, 16 insertions(+), 20 deletions(-) delete mode 100644 pages/gestion/parametres.php create mode 100644 services/gestion/parametres.php rename services/{fonctions/sessions => traitements/utilisateurs}/deconnexion.php (100%) diff --git a/inclusions/barre_menu.php b/inclusions/barre_menu.php index c2203e2..b10895d 100644 --- a/inclusions/barre_menu.php +++ b/inclusions/barre_menu.php @@ -18,7 +18,8 @@ if (testPrivileges()=="administrateur") { _HEREDOC_; } echo <<<_HEREDOC_ - Déconnexion + Paramètres + Déconnexion diff --git a/pages/gestion/administration.php b/pages/gestion/administration.php index ea671f2..b8bd5ff 100644 --- a/pages/gestion/administration.php +++ b/pages/gestion/administration.php @@ -40,7 +40,11 @@ if (isset($_GET['page']) && !empty($_GET['page'])) { case 'listes_noires': require_once($_SERVER["DOCUMENT_ROOT"]."/services/gestion/listes_noires.php"); break; - default: + case 'parametres': + require_once($_SERVER["DOCUMENT_ROOT"]."/services/gestion/parametres.php"); + break; + + default: echo "

Cette page n'existe pas.

"; break; } diff --git a/pages/gestion/parametres.php b/pages/gestion/parametres.php deleted file mode 100644 index 884ba78..0000000 --- a/pages/gestion/parametres.php +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/services/gestion/parametres.php b/services/gestion/parametres.php new file mode 100644 index 0000000..320a1ef --- /dev/null +++ b/services/gestion/parametres.php @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/services/fonctions/sessions/deconnexion.php b/services/traitements/utilisateurs/deconnexion.php similarity index 100% rename from services/fonctions/sessions/deconnexion.php rename to services/traitements/utilisateurs/deconnexion.php diff --git a/services/traitements/utilisateurs/identification.php b/services/traitements/utilisateurs/identification.php index 6b5f428..9e52245 100644 --- a/services/traitements/utilisateurs/identification.php +++ b/services/traitements/utilisateurs/identification.php @@ -24,11 +24,11 @@ if (isset($_POST['identifiant']) && isset($_POST['mdp']) && !empty($_POST['ident $_SESSION['privilege_utilisateur'] = $result[0]['privilege']; if (isset($_SESSION['pseudo_utilisateur']) && !empty($_SESSION['pseudo_utilisateur']) && $_SESSION['privilege_utilisateur']=="administrateur") { - header ("location: /pages/gestion/administration.php?message=bienvenue&page=alias"); + header ("location: /pages/gestion/administration.php?message=bienvenue&page=accueil"); die(); } elseif (isset($_SESSION['pseudo_utilisateur']) && !empty($_SESSION['pseudo_utilisateur']) && $_SESSION['privilege_utilisateur']=="utilisateur") { - header ("location: /pages/gestion/administration.php?message=bienvenue&page=alias"); + header ("location: /pages/gestion/administration.php?message=bienvenue&page=accueil"); die(); } else {