-
Notifications
You must be signed in to change notification settings - Fork 8
/
password_reset.php
107 lines (96 loc) · 4.75 KB
/
password_reset.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<?php
require 'settings/tracy-2.6.2/src/tracy.php';
use Tracy\Debugger;
////////get settings ///////
if(!isset($isGetSetting)){
require 'get_setting_data.php';
}
$appMode = getSetting("", "appMode");
if($appMode == "0"){
//Debug mode
Debugger::enable();
}
require 'settings/database.login.php';
$message = "";
$isValidLink = false;
$verifyCod = "";
if(isset($_GET['verify_code']) && $_GET['verify_code'] != ""){
$query = "SELECT * FROM users WHERE forgot_verify = :verified_code";
$statement = $conn->prepare($query);
$statement->execute(array(':verified_code'=>$_GET['verify_code']));
$count = $statement->rowCount();
if($count > 0){
$isValidLink = true;
$verifyCod = $_GET['verify_code'];
$message = '<label class="text-success">valid Link</label>';
}else{
$message = '<label class="text-danger">Invalid Link</label>';
}
}else{
$message = '<label class="text-danger">Invalid Link</label>';
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Reset Password</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--===============================================================================================-->
<link rel="icon" type="image/png" href="images/icons/favicon.ico"/>
<!--===============================================================================================-->
<link rel="stylesheet" href="./include/bootstrap/css/bootstrap.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="./include/fonts/font-awesome-4.7.0/css/font-awesome.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="css/util.css">
<link rel="stylesheet" type="text/css" href="css/main.css">
<!--===============================================================================================-->
</head>
<body>
<?php if(!$isValidLink){ ?>
<div class="limiter">
<div class="container-login100" style="background-image: url('images/bg05.jpg');">
<div class="wrap-login100 p-b-100">
<h1>Reset Password</h1>
<?php if(!empty($message)): ?>
<p class=" p-t-20 p-b-20" style = "text-align:center;background-color:white;"><?= $message ?></p>
<?php endif; ?>
</div>
</div>
</div>
<?php }else{ ?>
<div class="limiter">
<div class="container-login100" style="background-image: url('images/bg05.jpg');">
<div class="wrap-login100 p-b-100">
<h1>Reset Password</h1>
<form class="login100-form validate-form" action="rest_password_process.php" method="POST">
<input type="hidden" name="verifycode" value="<?php echo $verifyCod; ?>" />
<div class="wrap-input100 validate-input m-b-10" data-validate = "password">
<input class="input100 main_password" type="password" name="password" placeholder="password">
<span class="focus-input100"></span>
<span class="symbol-input100">
<i class="fa fa-lock"></i>
</span>
</div>
<div class="wrap-input100 validate-input m-b-10" data-validate = "confirm password - Passwords Don't Match">
<input class="input100" type="password" name="confirm_password" placeholder="confirm password">
<span class="focus-input100"></span>
<span class="symbol-input100">
<i class="fa fa-lock"></i>
</span>
</div>
<div class="container-login100-form-btn p-t-10">
<input type="submit" class="login100-form-btn" value="submit" />
</div>
</form>
</div>
</div>
</div>
<!--===============================================================================================-->
<script src="./include/jquery/jquery-1.12.4.min.js"></script>
<!--===============================================================================================-->
<script src="js/main.js"></script>
<?php }?>
</body>
</html>