Login'; // Are we already logged in? if(is_logged_in()) { echo '

You are already logged in as '.$_SESSION['SpUserFirstName'].', please click here to go to your account page.

'; } else { if(isset($_POST['username'])) { // try to login if(log_in($_POST['username'],$_POST['password'])) { // VALID LOGIN // set the SpUser's first name so that we can welcome them setSpUserFirstName(); // Have they verified their email address ? (by responding to the email sent to them ?) if(emailVerified($_POST['username'],$_POST['password'])) // login was ok if($_SESSION['auth_security'] >= S_ADMIN_USER) echo '

You have successfully logged in. Click here to go to the admin page.

'; else echo '

You have successfully logged in. Click here to go to your account page.

'; else if($_POST['username']!=NULL) { // email address is not verified log_out(); echo '

Your username and password were entered correctly but your registration process is not yet complete. To confirm your email address and complete registration you must click on the link that we sent you by email.

'; require_once $_SERVER['DOCUMENT_ROOT'] . '/htm/globalFooter.htm'; exit; } } else // failed login, display the invalid login message error_msg(S_INVALID_LOGON); } if(!is_logged_in()) { ?>

User Name    Password    

Forgotten your password?