session_start(); require_once 'DB.php'; include("../includes/mySQLpref.php"); include("../includes/functions.php"); header("Cache-control: private"); // ie 6 fix for hitting back buttons.. $errorCode=""; $email=$_GET['id']; ////////////////////////// AUTHENTICATE USER ////////////////////////////// $sessionID=session_id(); if (chkLoggedIn()) { header('Location:http://admin.precisionseo.com/'); exit; } /////////////////////////////////////////////////////////////////////////// if (array_key_exists('form_complete',$HTTP_POST_VARS)) { $error=""; // Check if all variables are good. $password=$_POST['password']; $email=$_POST['email']; if (! preg_match('/@.+\..+$/',$email)) { $error="yes"; } if ($password=="") { $error="yes"; } // All good; if ($error!="yes") { unset($errorCode); //authUser function goes ahead and calls logInStatus($userID) function to set auth & loggedIn session vars to "yes" $errorCode=authUser($email,$password); if (!isset($errorCode)) { header('Location:http://admin.precisionseo.com'); exit; } } else { $errorCode="Please fill in your email address and password"; } } ?>