forked from msaad1999/KLiK-SocialMediaWebsite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
create-new-pwd.php
92 lines (71 loc) · 3.21 KB
/
create-new-pwd.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
<?php
session_start();
require 'includes/dbh.inc.php';
define('TITLE',"Reset Password | KLiK");
include 'includes/HTML-head.php';
?>
<link rel="stylesheet" type="text/css" href="css/list-page.css">
</head>
<body style="background: url('img/cover2.png');">
<main role="main" class="container mt-5">
<div class="d-flex align-items-center p-3 my-3 text-white-50 bg-purple rounded shadow-sm">
<img class="mr-3" src="img/200.png" alt="" width="48" height="48">
<div class="lh-100">
<h1 class="mb-0 text-white lh-100">Password Reset</h1>
</div>
</div>
<div class="my-3 p-3 bg-white rounded shadow-sm text-center">
<h1 class="text-primary">Reset Your Password</h1>
<p class="text-secondary">Create a new password to access your account</p>
<br>
<?php
$selector = $_GET['selector'];
$validator = $_GET['validator'];
if (empty($selector) || empty($validator))
{
echo "<h5 class='text-danger'>Could not validate your request!</h5>";
}
else
{
if (ctype_xdigit($selector) !== false && ctype_xdigit($validator))
{
?>
<form action="includes/reset-password.inc.php" method="post" id="contact-form">
<input type="hidden" name="selector" value="<?php echo $selector; ?>">
<input type="hidden" name="validator" value="<?php echo $validator; ?>">
<div class="form-row">
<div class="col">
<input class="form-control" type="password" name="pwd" placeholder="Enter a new password">
</div>
<div class="col">
<input class="form-control" type="password" name="pwd-repeat" placeholder="Confirm new password">
</div>
</div>
<br><br>
<div class="form-row">
<input class="btn btn-secondary btn-lg btn-block" type="submit" class="button next" name="reset-password-submit"
value="Reset Password">
</div>
</form>
<?php
}
}
?>
</div>
<br><br>
<div class="position-absolute login-icons text-center">
<a href="login.php">
<i class="fa fa-sign-in fa-2x social-icon" aria-hidden="true"></i>
</a>
<a href="contact.php">
<i class="fa fa-envelope fa-2x social-icon" aria-hidden="true"></i>
</a>
<a href="contact.php">
<i class="fa fa-github fa-2x social-icon" aria-hidden="true"></i>
</a>
</div>
</main>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>