Email confirm and password change now use messagepage function.

This commit is contained in:
Marijn Jansen
2017-01-26 12:05:28 +01:00
parent 6a882bf78d
commit 44f86a4fbb
4 changed files with 77 additions and 59 deletions

View File

@@ -0,0 +1,23 @@
<?php
function messagePage(string $content) {
$webpage = ("
<!DOCTYPE html>
<html>
<head>
<style>
@import url(styles/main.css);
@import url(styles/settings.css);
@import url(styles/resetpassword.css);
</style>
</head>
<body>
<div class='password-change'>
<div class='top-logo'><a href='login.php'><img src='img/top-logo.png' alt='MyHyvesbook+'/></a></div>
<div class='item-box platform'>$content</div>
</div>
</body>
</html>
");
echo $webpage;
}

View File

@@ -1,47 +1,38 @@
<!DOCTYPE html>
<html>
<head>
<style>
@import url(styles/main.css);
@import url(styles/settings.css);
@import url(styles/resetpassword.css);
</style>
</head>
<body>
<div class='password-change'>
<div class="top-logo"><img src="img/top-logo.png" alt="MyHyvesbook+"/></div>
<form class='settings platform item-box' method='post'>
<h5>Voer een nieuw wachtwoord in</h5>
<input type="hidden"
name="u"
value="<?=$_GET["u"]?>"
>
<input type="hidden"
name="h"
value="<?=$_GET["h"]?>"
>
<ul>
<li>
<label>Nieuw wachtwoord</label>
<input type='password'
name='password'
placeholder='Nieuw wachtwoord'
>
</li>
<li>
<label>Bevestig wachtwoord</label>
<input type='password'
name='password-confirm'
placeholder='Bevestig wachtwoord'
>
</li>
<li>
<label></label>
<button type='submit'>Verander wachtwoord</button>
</li>
</ul>
</form>
</div>
</body>
</html>
<?php
function passwordResetFields() {
$username = $_GET['u'];
$hash = $_GET['h'];
$content ="
<form class='settings' method = 'post' >
<h5 > Voer een nieuw wachtwoord in </h5 >
<input type = 'hidden'
name = 'u'
value = '$username'
>
<input type = 'hidden'
name = 'h'
value = '$hash'
>
<ul >
<li >
<label > Nieuw wachtwoord </label >
<input type = 'password'
name = 'password'
placeholder = 'Nieuw wachtwoord'
>
</li >
<li >
<label > Bevestig wachtwoord </label >
<input type = 'password'
name = 'password-confirm'
placeholder = 'Bevestig wachtwoord'
>
</li >
<li >
<label ></label >
<button type = 'submit' > Verander wachtwoord </button >
</li >
</ul >
</form >";
return $content;
}