From: Jérôme Benoit Date: Mon, 15 Jan 2018 21:24:35 +0000 (+0100) Subject: Fix the authenfication check. X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=db6cae9045820883e6b4c7224fe68c4f4fb9c4e8;p=Project_webapp.git Fix the authenfication check. And some cleanups in the HTML code. Signed-off-by: Jérôme Benoit --- 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;