Sign In

You must be signed in to view this content.

Use the form below to sign in. Fill in your email address and your password, and click "Sign In" to continue.

eof; $newaction="signin"; include("forms/loginForm.php"); print""; break; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //login //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// case"login": if ($post->emailAddress==""){ $errors++; $msg.="You must enter your email address
"; } if($post->userPassword==""){ $errors++; $msg.="You must enter your password
"; } $cryptPass=md5($post->userPassword); $res = $db->query("SELECT * FROM users WHERE emailAddress='$post->emailAddress' AND userPassword='$cryptPass'"); if($res->numRows()==0){ $errors++; $msg.="The email address and password combination you entered did not match an account at {$config[siteName]}
"; } $res->free(); if($errors>0){ include("inc/head.php"); print<<

Error

The following error(s) occured while trying to process your request. Please review the errors, make your corrections, and click "Sign In" to continue.
$msg

eof; $row = $post; include("forms/loginForm.php"); print""; include("inc/foot.php"); exit; } // session stuff. $res=$db->query("SELECT * FROM users WHERE emailAddress='$post->emailAddress' AND userPassword='$cryptPass'"); if($res->numRows()==""){print"

What Happened

";} $res->fetchInto($row); $res->free(); session_start(); $sEmailAddress = $row->emailAddress; $sCryptPass=$cryptPass; $sFullname=$row->userFirstname." ". $row->userMiddlename." ". $row->userLastname; $sUser_id=$row->user_id; $sUserType= $row->userType; $sOnline="Yes"; $_SESSION["sEmailAddress"]=$sEmailAddress; $_SESSION["sFullname"]=$sFullname; $_SESSION["sCryptPass"]=$sCryptPass; $_SESSION["sUser_id"]=$sUser_id; $_SESSION["sOnline"]=$sOnline; $_SESSION["sUserType"]=$sUserType; $session= new objector($_SESSION); /* session_register($sEmailAddress); session_register($sFullname); session_register($sCryptpass); session_register($sUser_id); session_register($sOnline); $session= new objector($_SESSION); */ // log user.... if($post->location!=""){ header("Location: $post->location"); }else{ if($sUserType=="Administrator"){ header("Location:/admin/index.php"); }else{ header("Location:members.php"); } include("inc/loginHead.php"); print<<

Welcome

Welcome $session->sFullname. You are now signed in.

You can update your profile, add addresses, see past purchases, and apply for wholesale status by visiting your member page.

We suspect however, you would rather like to go shopping.

eof; } break; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //forgotpassword //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// case"forgotpass": print<<

Retrieve Your Password

If you've forgotten your password, we can regenerate it and email it to you. Simply enter the email address associated with your account, and click "Send Password" to continue.

Reset Password Form
Your Email Address
eof; break; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //sendpassword //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// case"sendpassword": $errors=0; $msg=""; if ($post->emailAddress==""){ $errors++; $msg.="You must enter an email address
"; } if($db->getOne("SELECT count(user_id) FROM users WHERE emailAddress='$post->emailAddress'")==0){ $errors++; $msg.="There is no account associated with that email address. Please try again
"; } if ($errors!=0){ print<<

Error

The following error(s) occured while trying to process your request. Please make your corrections and click "Send Password" to continue.

$msg

Your Email Address
eof; include("inc/foot.php"); exit; } $newPass = GenPassword(); $cryptPass = md5($newPass); $res = $db->query("SELECT * FROM users WHERE emailAddress='$post->emailAddress'"); $res->fetchInto($row); $res->free(); $db->query("UPDATE users SET userPassword='$cryptPass' WHERE emailAddress='$post->emailAddress'"); // send the email... $user = new user($db,$config); $user->user_id=$row->user_id; $emailSubject = "Password Reset"; $emailBody.=<<userFirstname $row->userLastname, Your password has been reset at {$config["siteShortURL"]}. Your new password is: $newPass You can sign in at {$config["siteLongURL"]}/login.php and change your password by clicking on your profile. If you are having problems signing in, please email us with your questions. Thanks, {$config["siteName"]} eof; $user->sendUserEmail($row->user_id,$emailSubject,$emailBody); print<<

Password Reset

Your password has been reset and emailed to $post->emailAddress. When you receive the email, you can sign in at {$config["siteLongURL"]}/login.php.

eof; break; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //onlinelogin //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// case"onlinelogin": print<<

Sign In

Registered members of {$config[siteName]} may use the form below to sign in. Fill in your email address and your password, and click "Sign In" to continue.

Not a member? No problem, simply head over to the join form, fill out our simple form, and you'll be a member.

eof; $newaction="signin"; include("forms/loginForm.php"); print""; break; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //default //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// default: print<<

Log into {$config[siteName]}

Choose the login method below.

Click here to login to your online course.

Click here to login to your hands on course.

Click here to login to your teacher profile.

eof; print""; break; break; } include("inc/foot.php"); ?>