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 @@ - - + - -