-
Notifications
You must be signed in to change notification settings - Fork 5
/
reset_password.php
79 lines (42 loc) · 2.35 KB
/
reset_password.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
71
72
73
74
75
76
77
78
79
<!--header-->
<?php require_once 'includes/header.php'; ?>
<!--navbar-->
<?php require_once 'includes/navbar.php'; ?>
<div class="container">
<div class="row">
<div class="col-md-6 mx-auto">
<div class='card card-body bg-light mt-2 mb-5'>
<h2>Reset your Password</h2>
<p>Please fill in credentials to Reset Password.</p>
<?php
if(!isset($_SESSION['reset_code'])){
setMsg('msg_notify', 'You can not access this page', 'warning');
redirect('login.php');
exit();
}
$err = getMsg('errors');
$data = getMsg('form_data');
?>
<form action="<?php echo(URLROOT) ?>/process/reset_password.php" method='POST'>
<div class="form-group">
<label for='password'>Password: <sup>*</sup></label>
<input type='password' name="password" value="<?php echo($data['password']); ?>" class="form-control form-control-lg <?php echo(isset($err['password_err'])) ? 'is-invalid' : ''; ?>">
<span class="invalid-feedback"><?php echo($err['password_err']); ?></span>
</div>
<div class="form-group">
<label for='confirm_password'>Confirm Password: <sup>*</sup></label>
<input type='password' name="confirm_password" value="<?php echo($data['confirm_password']); ?>" class="form-control form-control-lg <?php echo(isset($err['confirm_password_err'])) ? 'is-invalid' : ''; ?>">
<span class="invalid-feedback"><?php echo($err['confirm_password_err']); ?></span>
</div>
<div class="row">
<div class='col'>
<input type='submit' name='reset_password' value='Reset Password' class='btn btn-block color-set'>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<!--footer-->
<?php require_once 'includes/footer.php'; ?>