From db6cae9045820883e6b4c7224fe68c4f4fb9c4e8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 15 Jan 2018 22:24:35 +0100 Subject: [PATCH] Fix the authenfication check. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit And some cleanups in the HTML code. Signed-off-by: Jérôme Benoit --- includes/{example.config.php => config-example.php} | 0 includes/home.php | 8 ++++---- includes/login.php | 2 +- includes/search.php | 4 ++-- lib/utils.php | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) rename includes/{example.config.php => config-example.php} (100%) diff --git a/includes/example.config.php b/includes/config-example.php similarity index 100% rename from includes/example.config.php rename to includes/config-example.php diff --git a/includes/home.php b/includes/home.php index fa15da8..058b19a 100644 --- a/includes/home.php +++ b/includes/home.php @@ -4,10 +4,10 @@ global $is_logged_in; if (!$is_logged_in) { $root_url = $configs['root_url']; - echo "\n"; - echo " S'identifier\n"; - echo " Créer un compte\n"; - echo "\n"; + echo " \n"; + echo " S'identifier\n"; + echo " Créer un compte\n"; + echo " \n"; } ?> diff --git a/includes/login.php b/includes/login.php index cc7fd92..fe5c0fa 100644 --- a/includes/login.php +++ b/includes/login.php @@ -3,7 +3,7 @@
- + diff --git a/includes/search.php b/includes/search.php index 2a1b947..366c962 100644 --- a/includes/search.php +++ b/includes/search.php @@ -5,10 +5,10 @@ - + - +
diff --git a/lib/utils.php b/lib/utils.php index bc5db9b..786c10e 100644 --- a/lib/utils.php +++ b/lib/utils.php @@ -53,7 +53,7 @@ function chk_password($email, $password) function chk_logged_in() { - if (isset($_SESSION['email'])) { + if (isset($_SESSION['email']) && isset($_SESSION['IP_address'])) { return true; } else { return false; -- 2.34.1