-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchangepassword.php
More file actions
executable file
·82 lines (75 loc) · 4.17 KB
/
changepassword.php
File metadata and controls
executable file
·82 lines (75 loc) · 4.17 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
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
80
81
82
<?php
require_once dirname(__FILE__).'/include/header.php';
require_once dirname(__FILE__).'/include/api.php';
require_once dirname(__FILE__).'/include/navbar.php';
$message = "Change Password";
if (isset($_POST['btnChangePassword']))
{
$password = $_POST['inputPassword'];
$newPassword = $_POST['inputNewPassword'];
$confirmPassword = $_POST['inputConfirmPassword'];
if ($newPassword!=$confirmPassword)
{
$message = "New Password Not Matched";
}
elseif (strlen($password)<8)
$message = "Wrong Password";
elseif (strlen($newPassword)<8 || strlen($confirmPassword)<8)
$message = "Password Should Be Greater Than 8 Character";
else
{
$api = new Api;
$response = $api->updatePassword($password,$newPassword);
$message = $response->message;
}
}
?>
<div class="socialcodia">
<div class="row">
<div class="col l12 s12 m12" >
<div class="row">
<div class="col s12 l3 m4">
<div class="collection">
<a href="settings" class="collection-item ">Home</a>
<a href="changepassword" class="collection-item active blue">Change Password</a>
<a href="#!" class="collection-item">Comming Soon</a>
<a href="#!" class="collection-item">Comming Soon</a>
<a href="#!" class="collection-item">Comming Soon</a>
<a href="#!" class="collection-item">Comming Soon</a>
</div>
</div>
<div class="col s12 l9 m8">
<div class="card z-depth-0">
<div class="card-title center blue white-text" style="padding: 14px; font-weight: bold">
<?php echo $message; ?>
</div>
<div class="card-content">
<form method="POST" action="">
<div class="input-field">
<i class="material-icons prefix red-text"><img src="src/icons/password.png" width="35" height="35"></i>
<input type="password" required="required" name="inputPassword" id="inputPassword">
<label for="inputPassword">Enter Old Password</label>
</div>
<div class="input-field">
<i class="material-icons prefix red-text"><img src="src/icons/password.png" width="35" height="35"></i>
<input type="password" required="required" name="inputNewPassword" id="inputNewPassword">
<label for="inputNewPassword">Enter New Password</label>
</div>
<div class="input-field">
<i class="material-icons prefix red-text"><img src="src/icons/password.png" width="35" height="35"></i>
<input type="password" required="required" name="inputConfirmPassword" id="inputConfirmPassword">
<label for="inputConfirmPassword">Enter Confirm Password</label>
</div>
</div>
<div class="card-action blue" style="padding: 0px; margin: 0px; height: 60px;">
<input class="btn blue" style="width:100%; height: 100%" value="Change Password" type="submit" name="btnChangePassword" id="btnChangePassword">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<?php require_once dirname(__FILE__).'/include/sidenav.php'; ?>
<?php require_once dirname(__FILE__).'/include/footer.php'; ?>