include("common/header.php"); //get referrer if ($_GET["r"] != "") {$ref = $_GET["r"];} elseif ($_POST["r"] !="") {$ref = $_POST["r"];} if (empty($_POST["email"])) {$errmsg.="
} // end if errors exist
else { // else if no errors verify the user
include("common/queries/qry_getAccountInfo.php");
$row = $res->fetch_assoc();
//register the user to session
$_SESSION["user"] = $row['email'];
$_SESSION["userfname"] = $row['firstname'];
$_SESSION["userlname"] = $row['lastname'];
$_SESSION["gender"] = $row['gender'];
$_SESSION["sessionkey"] = "veena";
$_SESSION["userid"] = $row['acct_id'];
$_SESSION["lastcategory"] = $row['lastCategory'];
$_SESSION["cell"] = $row['cellphone'];
$_SESSION["carrier"] = $row['carrier'];
$_SESSION["sendtexts"] = $row['send_texts'];
$_SESSION["sendemail"] = $row['send_email'];
$_SESSION["sendinfoemail"] = $row['send_info_mail'];
$_SESSION["cellverified"] = $row['cell_verified'];
include("common/queries/qry_getProfileImage.php");
$row = $res->fetch_assoc();
if (substr($row['pic_url'], 0, 4) != "http" && substr($row['pic_url'], 0, 1) != "/") { // if local pic and doesn't start with forward slash then add the forward slash
$_SESSION["userpic"] = "/" . $row['pic_url'];
$_SESSION["userthumb"] = "/" . $row['thumb_url'];
}
else {
$_SESSION["userpic"] = $row['pic_url'];
$_SESSION["userthumb"] = $row['thumb_url'];
}
if($ref=="channel"){
echo "";
echo "Login Successful. Continue >> ";
}
elseif($_SESSION["comingFromURL"] != "") {
echo "";
echo "Login Successful. Continue >> ";
}
else {
echo "";
echo "Login Successful. Continue >> ";
}
}
?>