-
Notifications
You must be signed in to change notification settings - Fork 0
/
changePassword.php
70 lines (66 loc) · 3.28 KB
/
changePassword.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PMMS | Reset Password</title>
<?php include_once('./styles.php');?>
<style>
html, body {min-height: 100%;}
body {
background-size: cover;
background-repeat: no-repeat;
}
</style>
</head>
<body class="mt-5 pt-lg-5 pt-md-3 h-100 w-100" style="background: linear-gradient(to top right, #870000, #4a00e0, #190a05);">
<div class="container row w-100 h-100 mx-auto pt-5">
<?php
if( (isset($_GET['selector']) && isset($_GET['validator'])) && (!empty($_GET['selector']) && !empty($_GET['validator'])))
{
$selector = $_GET['selector'];
$validator = $_GET['validator'];
if( !ctype_xdigit($selector) && !ctype_xdigit($validator) )
{
// If Url values are valid then show form
?>
<!-- Reset Password Form -->
<div class="card col-10 col-lg-6 mx-auto p-0">
<h5 class="card-header web-theme">Reset Password Form</h5>
<div class="card-body">
<form method="post" id="resetPass-form">
<!-- Hidden inputs to validate reset password request-->
<input type="hidden" name="resetSelector" value="<?php echo $selector?>">
<input type="hidden" name="resetValidator" value="<?php echo $validator?>">
<!-- New Password -->
<div class="form-group row">
<label for="newPassReset" class="col-sm-3 col-form-label">New Password</label>
<div class="col-sm-9">
<input type="password" name="resetNewPass" class="form-control" id="newPassReset" placeholder="Enter New Password" required autocomplete="off">
</div>
</div>
<!-- Repeat Password -->
<div class="form-group row">
<label for="repeatPassReset" class="col-sm-3 col-form-label">Repeat Password</label>
<div class="col-sm-9">
<input type="password" name="resetRepeatPass" class="form-control" id="repeatPassReset" placeholder="Enter Repeat Password" required autocomplete="off">
</div>
</div>
<!-- Reset Password Submit Button -->
<button type="submit" name="resetPass-submit" class="btn btn-success w-100 mt-2">Reset Password</button>
</form>
</div>
</div>
<?php
}
}
else
{
header("Location: ./");
exit();
}
?>
</div>
<?php include_once('./scripts.php');?>
</body>
</html>