From 4f1f9fa4665f3d08169da9e2ab8ca242b66e274e Mon Sep 17 00:00:00 2001
From: Antoine Jourdain
Date: Mon, 20 Nov 2023 09:44:26 +0100
Subject: [PATCH] Fix login + css
---
Project/php/controller/AbsController.php | 4 ++--
Project/php/controller/FrontController.php | 3 +--
Project/php/templates/home.html | 16 ++++++++--------
Project/php/templates/login.html | 4 ++--
4 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/Project/php/controller/AbsController.php b/Project/php/controller/AbsController.php
index bd27757..bdca85a 100644
--- a/Project/php/controller/AbsController.php
+++ b/Project/php/controller/AbsController.php
@@ -144,7 +144,7 @@ class AbsController
if (!$this->checkLoginExist($login)) throw new Exception(("login invalide"));
$user = $model->connection($login, $password);
if ($user == null) throw new Exception("mot de passe invalide");
- $this->home();
+ FrontController::home();
}
public function checkLoginExist(string $login): bool {
@@ -155,7 +155,7 @@ class AbsController
public function disconnect(): void {
$mdl = new MdlStudent();
$mdl->deconnection();
- $this->home();
+ FrontController::home();
}
public function resultatsJeux(): void{
diff --git a/Project/php/controller/FrontController.php b/Project/php/controller/FrontController.php
index e259505..720edbd 100755
--- a/Project/php/controller/FrontController.php
+++ b/Project/php/controller/FrontController.php
@@ -87,9 +87,8 @@ class FrontController
}
}
- public function home(): void {
+ public static function home(): void {
global $twig;
echo $twig->render('home.html');
- var_dump($_SESSION['roles']);
}
}
\ No newline at end of file
diff --git a/Project/php/templates/home.html b/Project/php/templates/home.html
index 420f245..26309bd 100755
--- a/Project/php/templates/home.html
+++ b/Project/php/templates/home.html
@@ -16,7 +16,7 @@
href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
rel="stylesheet" />
-
+
@@ -64,7 +64,7 @@
-
+
@@ -74,7 +74,7 @@
-
+
@@ -88,7 +88,7 @@
-
+
@@ -107,8 +107,8 @@
Download now
Start to learn english now with the mobile app!
Available on Android & iOS.
@@ -118,7 +118,7 @@
@@ -178,7 +178,7 @@
-
+