include $_SERVER["DOCUMENT_ROOT"] . '/swift/core/init.php'; f_protect_page(); include $_SERVER["DOCUMENT_ROOT"] . '/swift/includes/overall/header.php'; if (empty($_POST) === false) { $required_fields = array('f_fname', 'f_lname', 'f_mailid'); foreach ($_POST as $key => $value) { if (empty($value) && in_array($key, $required_fields) === true) { $errors[] = 'All the fields are required'; break 1; } } if (empty($errors) === true) { if (filter_var($_POST['f_mailid'], FILTER_VALIDATE_EMAIL) === false) { $errors[] = 'Please enter a valid email address'; } if (f_email_exists($_POST['f_mailid']) === true && $f_data['f_mailid'] !== $_POST['f_mailid']) { $errors[] = 'Sorry, the email is already in use'; } if (!preg_match('/^[a-z]{2,30}$/i', $_POST['f_fname'])) { $errors[] = 'Your first name can contain only alphabets'; } if (!preg_match('/^[a-z]{2,30}$/i', $_POST['f_lname'])) { $errors[] = 'Your last name can contain only alphabets'; } } } ?> <h3>Settings</h3> <?php
if (strlen($_POST['f_password']) < 6) { $errors[] = 'Your password must be atleast 6 characters!'; } if (strlen($_POST['f_uname']) < 6) { $errors[] = 'Your username must be atleast 6 characters!'; } if ($_POST['f_password'] !== $_POST['f_password_again']) { $errors[] = 'Your passwords do no match!'; } /* if(!preg_match('/@gmail\.com$/i', $_POST['faculty_mailid'])) { $errors[] = 'You can sign up only with a gmail id'; } */ if (filter_var($_POST['f_mailid'], FILTER_VALIDATE_EMAIL) === false) { $errors[] = 'Not a valid email address!'; } if (f_email_exists($_POST['f_mailid']) === true) { $errors[] = 'Sorry, such an email id has already been taken by another user!'; } } } ?> <div class="row"> <div class="col-lg-4"> <div class="well bs-component"> <?php if (isset($_GET['success']) && empty($_GET['success'])) { echo 'You have been registered to Swift Airlines successfully! Please check your Email ID for activation link!'; } else { if (empty($_POST) === false && empty($errors) === true) {
<?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 {