require_once("front_global.php"); require_once ("classes/tools/debug.php"); require_once ("classes/tools/arrs.php"); start_page ("lib", "candidates", 0); include ('header.php'); include ('footer.php'); //do login the user if (!empty($_POST['do'])) { $user=Registry::get('user'); $auth=$user->do_login(0, $_POST['uname'], $_POST['pass'], $_POST['casa']); if ($auth=='ok') { header ("location: /profile.php"); //$ref=$HTTP_REFERER; //$goto=getenv('HTTP_REFERER'); die(); } } //show login page if (!isset($auth)) $auth=''; front_page_start('Login'); //die("Offline For Maintenance"); if ($auth=='wrong_pass') { error_msg('Wrong password', 'This is not the correct password for this username!'); } elseif ($auth=='no_user') { error_msg('No such user!', "Check if you entered your username correctly!"); } ?>