From 44f86a4fbb614f56b013c964b92662f15f680a5b Mon Sep 17 00:00:00 2001 From: Marijn Jansen Date: Thu, 26 Jan 2017 12:05:28 +0100 Subject: [PATCH] Email confirm and password change now use messagepage function. --- website/public/emailconfirm.php | 12 ++--- website/public/resetpassword.php | 16 +++--- website/views/messagepage.php | 23 +++++++++ website/views/resetpassword.php | 85 ++++++++++++++------------------ 4 files changed, 77 insertions(+), 59 deletions(-) create mode 100644 website/views/messagepage.php diff --git a/website/public/emailconfirm.php b/website/public/emailconfirm.php index 97eb2f6..2812eaa 100644 --- a/website/public/emailconfirm.php +++ b/website/public/emailconfirm.php @@ -1,5 +1,6 @@ prepare(" SELECT @@ -18,11 +19,11 @@ if (array_key_exists("u", $_GET) and array_key_exists("h", $_GET)) { if ($role == "unconfirmed") { doActivate($email); } else { - echo "Ongeldige link."; + messagePage("Ongeldige link."); } } else { - echo "Ongeldige link."; + messagePage("Ongeldige link."); } function doActivate(string $email) { @@ -39,11 +40,10 @@ function doActivate(string $email) { $confirmUser->bindParam(":userID", $_GET["u"]); $confirmUser->execute(); if ($confirmUser->rowCount()) { - echo "Email bevestigd
- U wordt automatisch doorgestuurd naar de login pagina over 5 seconden. "; - header("refresh:5;url=login.php"); + messagePage("Email bevestigd
+ Klik hier om terug te gaan naar de login pagina."); } } else { - echo "Ongeldige link."; + messagePage("Ongeldige link."); } } \ No newline at end of file diff --git a/website/public/resetpassword.php b/website/public/resetpassword.php index 54b706b..3ca2698 100644 --- a/website/public/resetpassword.php +++ b/website/public/resetpassword.php @@ -1,26 +1,30 @@ + + + + + +
+ +
$content
+
+ + + "); + + echo $webpage; + } \ No newline at end of file diff --git a/website/views/resetpassword.php b/website/views/resetpassword.php index 24d3aaf..a3107f9 100644 --- a/website/views/resetpassword.php +++ b/website/views/resetpassword.php @@ -1,47 +1,38 @@ - - - - - - -
- - -
-
Voer een nieuw wachtwoord in
- " - > - " - > -
    -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
-
-
- - \ No newline at end of file + +
Voer een nieuw wachtwoord in
+ + + + "; + return $content; +} \ No newline at end of file