-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathforgotpass.php
More file actions
79 lines (75 loc) · 2.64 KB
/
forgotpass.php
File metadata and controls
79 lines (75 loc) · 2.64 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
<?php
$title = 'Quên mật khẩu';
include 'inc/header.php'; ?>
<?php
include 'vendor/autoload.php';
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['submit'])) {
$forgotpass = $cs->forgotpass($_POST);
}
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['change'])) {
$email = $_GET['email'];
$changepass = $cs->changepass($_POST, $email);
}
?>
</div>
<div class="container">
<div class="row">
<?php
$get_display = $display->show_display();
if ($get_display) {
while ($result = $get_display->fetch_assoc()) {
?>
<div class="col-2">
<img src="admin/uploads/<?php echo $result['imgbanner'] ?>">
</div>
<?php
}
}
?>
<div class="col-2">
<?php
if (!isset($_GET['email']) || $_GET['email'] == NULL) {
?>
<div class="form-container">
<div class="form-btn">
<span style="text-align: center;">Lấy lại mật khẩu</span>
<hr id="Indicator2">
</div>
<div class="clearfix"></div>
<?php
if (isset($forgotpass)) {
echo $forgotpass;
}
?>
<form method="post" action="">
<input id="email" name="email" type="email" placeholder="Tài khoản">
<button style="margin-top: 20px;" type="submit" name="submit">Gửi</button>
</form>
</div>
<?php
} else {
$email = $_GET['email'];
$token = $_GET['token'];
?>
<div class="form-container">
<span class="title">Lấy lại mật khẩu</span>
<div class="clearfix"></div>
<?php
if (isset($changepass)) {
echo $changepass;
}
?>
<form method="post" action="">
<input name="password" type="password" placeholder="Mật khẩu">
<input name="re_password" type="password" placeholder="Nhập lại mật khẩu">
<button style="margin-top: 20px;" type="submit" name="change">Đổi mật khẩu</button>
</form>
</div>
<?php
}
?>
</div>
</div>
</div>
<!-- ------------footer----------- -->
<?php include 'inc/footer.php' ?>