-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathrecover.php
69 lines (47 loc) · 1.23 KB
/
recover.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
<?php
include'core/init.php';
redirect_index();
include'includes/overall/header.php';?>
<h1>Recover</h1>
<?php
if(isset($_GET['success'])===true&& empty($_GET['success'])===true){
?>
<p>Thanks, We Have Emailed you.Check your inbox and spam folder too.</p>
<?php
}
else{
$mode_allowed=array('username','password');
if(isset($_GET['mode'])===true && in_array($_GET['mode'],$mode_allowed)===true){
if(isset($_POST['email'])===true && empty($_POST['email'])===false){
if(email_exists($_POST['email'])==1){
$flag_recovery=recover($_GET['mode'],$_POST['email']);
if($flag_recovery==1){
header('Location:recover.php?success');
}
exit();
}
else{
echo '<p>Oops, we couldn\'t find that email address! </p>';
}
}
?>
<form action="" method="post">
<ul><li>Please Enter your email address:<br></li>
<li><input type="email" name="email" required="required"
class="tfield" id="email" placeholder="Email Id">
</li><br>
<li><br>
<input type="submit" value="Submit Email">
</li><br>
</ul>
</form>
<?php
}
else{
header('Location:index.php');
exit();
}
}
?>
<?php include 'includes/overall/footer.php';
?>