-
Notifications
You must be signed in to change notification settings - Fork 33
/
activate.php
39 lines (36 loc) · 1.06 KB
/
activate.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
<?php
$title = 'Swift Airlines | Account Activation';
include $_SERVER["DOCUMENT_ROOT"].'/swift/core/init.php';
f_logged_in_redirect();
include $_SERVER["DOCUMENT_ROOT"].'/swift/includes/overall/header.php';
if(isset($_GET['success']) === true && empty($_GET['success']) === true) {
?>
<h4>You have successfully activated your account!</h4>
<?php
}
else if(isset($_GET['f_mailid'], $_GET['f_mailcode']) === true) {
$f_mailid = trim($_GET['f_mailid']);
$f_mailcode = trim($_GET['f_mailcode']);
if(f_email_exists($f_mailid) === false) {
$errors[] = 'Sorry, we couldn\'t find that Email Address';
}
else if (f_activate($f_mailid, $f_mailcode) === false){
$errors[] = 'Sorry, there was some problem activating that account';
}
if(empty($errors) === false) {
?>
<h4>Ooops...</h4>
<?php
echo output_errors($errors);
}
else {
header('Location: http://srikanthnatarajan.com/swift/activate.php?success');
exit();
}
}
else {
header('Location: index.php');
exit();
}
include $_SERVER["DOCUMENT_ROOT"].'/swift/includes/overall/footer.php';
?>