$output .= "\n\t\t\t<h1>\n\t\t\t\t<font class=\"error\">{$lang_register['email_address_used']}</font>\n\t\t\t</h1>"; break; case 15: $output .= "\n\t\t\t<h1>\n\t\t\t\t<font class=\"error\">{$lang_register['account_needs_verified']}</font>\n\t\t\t</h1>"; break; default: $output .= "\n\t\t\t<h1>\n\t\t\t\t<font class=\"error\">{$lang_register['fill_all_fields']}</font>\n\t\t\t</h1>"; } unset($err); $output .= "</div>"; $action = isset($_GET['action']) ? $_GET['action'] : NULL; switch ($action) { case "doregister": doregister(); break; case "pass_recovery": pass_recovery(); break; case "do_pass_recovery": do_pass_recovery(); break; case "do_pass_activate": do_pass_activate(); break; default: register(); } unset($action); unset($action_permission); unset($lang_captcha); require_once "footer.php";
<?php DEFINE('INCLUDE_CHECK', 1); require_once 'lib/connections/db.php'; include 'lib/functions/functions.php'; $sitesettings = getSiteSettings(); $site_url = $sitesettings[0]['site_url']; //For password recovery // we check if everything is filled in and perform checks if (!$_POST['email']) { die(msg(0, "Please enter your email address.")); } if (validateEmail($_POST['email'])) { die(msg(0, "Invalid Email!")); } else { $res = pass_recovery($_POST['email'], $site_url); if ($res == 1) { die(msg(0, "There was an error sending your new password. Please contact the site admin.")); } if ($res == 2) { die(msg(0, "There was an error with the database. Please contact the site admin.")); } if ($res == 3) { die(msg(0, "The email entered does not match any in our database. Please <a href='register.php'>register here</a> to start using our services.")); } if ($res == 99) { die(msg(1, "Success! Check your email for more information.")); } } function msg($status, $txt) {