-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreset_password.php
More file actions
47 lines (47 loc) · 2 KB
/
reset_password.php
File metadata and controls
47 lines (47 loc) · 2 KB
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
<?php
include('class/User.php');
$user = new User();
$errorMessage = '';
if(!empty($_POST['resetpassword']) && $_POST['resetpassword']) {
$errorMessage = $user->savePassword();
}
include('include/header.php');
?>
<title>pdo_admin</title>
<div class="container contact">
<h2>pdo_admin</h2>
<div class="col-md-6">
<div class="panel panel-info" >
<div class="panel-heading">
<div class="panel-title">Reset Password</div>
</div>
<div style="padding-top:30px" class="panel-body" >
<?php if ($errorMessage != '') { ?>
<div id="login-alert" class="alert alert-danger col-sm-12"><?php echo $errorMessage; ?></div>
<?php } ?>
<?php if(!empty($_GET['authtoken']) && $_GET['authtoken']) { ?>
<form id="loginform" class="form-horizontal" role="form" method="POST" action="">
<div style="margin-bottom: 25px" class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
<input type="password" class="form-control" id="password" name="password" placeholder="New password..." required>
</div>
<div style="margin-bottom: 25px" class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
<input type="password" class="form-control" id="cpassword" name="cpassword" placeholder="Confirm password..." required>
</div>
<div style="margin-top:10px" class="form-group">
<div class="col-sm-12 controls">
<input type="hidden" name="authtoken" value="<?php echo $_GET['authtoken']; ?>" />
<input type="submit" name="resetpassword" value="Save" class="btn btn-info">
</div>
</div>
</div>
</form>
<?php } else { ?>
Invalid password reset request.
<?php } ?>
</div>
</div>
</div>
</div>
<?php include('include/footer.php');?>