From 0ac96eecd2a0c7210dad5c91733f379b1a3fb9ce Mon Sep 17 00:00:00 2001 From: "yvan.calatayud" Date: Tue, 21 Nov 2023 17:11:04 +0100 Subject: [PATCH] style : design ++ --- Website/controllers/ControllerUser.php | 12 ++++++++- Website/templates/addquestions.twig | 1 - Website/templates/adminAdministrators.twig | 29 +++++++++++----------- Website/templates/adminChapters.twig | 28 +++++++++++---------- Website/templates/adminQuestions.twig | 28 +++++++++++---------- Website/templates/home.twig | 13 +++++++--- Website/templates/loginAdmin.twig | 7 +++++- Website/templates/loginPlayer.twig | 7 +++++- Website/templates/themeChoice.twig | 8 +++--- Website/templates/userStatus.twig | 5 ++++ 10 files changed, 88 insertions(+), 50 deletions(-) diff --git a/Website/controllers/ControllerUser.php b/Website/controllers/ControllerUser.php index 181bab2..00c7bcf 100644 --- a/Website/controllers/ControllerUser.php +++ b/Website/controllers/ControllerUser.php @@ -49,7 +49,9 @@ class ControllerUser function home() { - echo $this->twig->render($this->vues["home"]); + echo $this->twig->render($this->vues["home"], [ + 'idPlayerConnected' => $_SESSION["idPlayerConnected"] + ]); } function error() @@ -78,6 +80,10 @@ class ControllerUser function loginAdmin() { + if ($_SESSION["idAdminConnected"] != null){ + header("Location:/admin/administrators"); + } + echo $this->twig->render($this->vues["loginAdmin"], [ 'error' => $_SESSION["error"], ]); @@ -87,6 +93,10 @@ class ControllerUser function loginPlayer() { + if ($_SESSION["idPlayerConnected"] != null){ + header("Location:/userStatus"); + } + echo $this->twig->render($this->vues["loginPlayer"], [ 'error' => $_SESSION["error"], ]); diff --git a/Website/templates/addquestions.twig b/Website/templates/addquestions.twig index a6854eb..10dcc28 100644 --- a/Website/templates/addquestions.twig +++ b/Website/templates/addquestions.twig @@ -1,6 +1,5 @@ - diff --git a/Website/templates/adminAdministrators.twig b/Website/templates/adminAdministrators.twig index 228865d..a982a62 100644 --- a/Website/templates/adminAdministrators.twig +++ b/Website/templates/adminAdministrators.twig @@ -5,32 +5,33 @@ - - + - -
+ +
+ + Retour + +
+

Liste des administrators

-
- - +
+ ← Questions + + Chapitres →
diff --git a/Website/templates/adminChapters.twig b/Website/templates/adminChapters.twig index 934f0aa..10e4d53 100644 --- a/Website/templates/adminChapters.twig +++ b/Website/templates/adminChapters.twig @@ -6,31 +6,33 @@ - + - -
+ +
+ + Retour + +
+

Liste des chapitres

-
- - +
+ ← Administrateur + + Questions →
diff --git a/Website/templates/adminQuestions.twig b/Website/templates/adminQuestions.twig index 9faa79f..9d7e345 100644 --- a/Website/templates/adminQuestions.twig +++ b/Website/templates/adminQuestions.twig @@ -6,31 +6,33 @@ - + - -
+ + +

Liste des questions

-
- - +
+ ← Chapitres + + Administrateurs →
diff --git a/Website/templates/home.twig b/Website/templates/home.twig index 545af64..4bcb86c 100644 --- a/Website/templates/home.twig +++ b/Website/templates/home.twig @@ -1,6 +1,5 @@ - @@ -11,7 +10,15 @@
- CONNEXION + {% if idPlayerConnected == null %} + + CONNEXION + + {% else %} + + PROFIL + + {% endif %}
@@ -22,7 +29,7 @@
- +

MULTIJOUEUR diff --git a/Website/templates/loginAdmin.twig b/Website/templates/loginAdmin.twig index 76b8f60..bf15da8 100644 --- a/Website/templates/loginAdmin.twig +++ b/Website/templates/loginAdmin.twig @@ -6,7 +6,12 @@ - + +
diff --git a/Website/templates/loginPlayer.twig b/Website/templates/loginPlayer.twig index 2d3cf8d..29d8a75 100644 --- a/Website/templates/loginPlayer.twig +++ b/Website/templates/loginPlayer.twig @@ -6,7 +6,12 @@ - + +
diff --git a/Website/templates/themeChoice.twig b/Website/templates/themeChoice.twig index ece9297..1619111 100644 --- a/Website/templates/themeChoice.twig +++ b/Website/templates/themeChoice.twig @@ -11,9 +11,11 @@ - - Retour - +

Difficulte :

diff --git a/Website/templates/userStatus.twig b/Website/templates/userStatus.twig index 199b039..cbcfccc 100644 --- a/Website/templates/userStatus.twig +++ b/Website/templates/userStatus.twig @@ -8,6 +8,11 @@ +

test