-
Notifications
You must be signed in to change notification settings - Fork 33
/
recover.php
52 lines (43 loc) · 1.3 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
<?php
$title = 'Swift Airlines | Recovery Process';
include $_SERVER["DOCUMENT_ROOT"].'/swift/core/init.php';
f_logged_in_redirect();
include $_SERVER["DOCUMENT_ROOT"].'/swift/includes/overall/header.php';
?>
<h4>Recovery</h4>
<?php
if(isset($_GET['success']) === true && empty($_GET['success']) === true) {
?>
<p>We have sent you the recovery details! Please check your email!</p>
<?php
}
else
{
$mode_allowed = array('f_uname','f_password');
if(isset($_GET['mode']) === true && in_array($_GET['mode'], $mode_allowed) === true) {
if(isset($_POST['f_mailid']) === true && empty($_POST['f_mailid']) === false) {
if(f_email_exists($_POST['f_mailid']) === true) {
f_recover($_GET['mode'],$_POST['f_mailid']);
header('Location: http://localhost/swift/recover.php?success');
exit();
}
else {
echo 'Sorry, we could not find that email address!';
}
}
?>
<form action="" method="POST">
<br/>
Please enter your email address:<br/>
<input type="text" name="f_mailid" /><br/><br/>
<input type="submit" class="btn btn" value="Recover" />
</form>
<?php
}
else {
header('Location: http://localhost/swift/index.php');
exit();
}
}
?>
<?php include $_SERVER["DOCUMENT_ROOT"].'/swift/includes/overall/footer.php'; ?>