user_login;
$UserName=$current_user->user_login;
//echo “UserName”, $UserName;
}
if ($UserName!=””)
{
if($UserName==”jpizzolato”)
{
$subject2=”Subject Logging In”;
$Message.=”Subject is Logging In on $Today
”
$Message.=” “;
$Message.=” “;
//send_mail($from,$to,$subject,$LMessage);
$headers=””;
$headers = “MIME-Version: 1.0\r\n”;
$headers .= “Content-type: text/html; charset=iso-8859-1\r\n”;
$headers .= “Content-type: text/html;\r\n”;
$headers .= “From: “.$from.”\r\n”;
mail($to, $subject2, $Message, $headers, ‘-fwebsite@maineventsocialclub.com’);
}
$SelectUserQuery=”select * from wp_users where user_login=’$UserName'”;
$SelectUserResult=mysql_query($SelectUserQuery);
$UserRows=mysql_fetch_array($SelectUserResult);
$SelectUserNumRows=mysql_num_rows($SelectUserResult);
$ID=$UserRows[‘ID’];
$SelectCustQuery=”select * from customer where wp_user_id=’$ID'”;
$SelectCustResult=mysql_query($SelectCustQuery);
$CustRows=mysql_fetch_array($SelectCustResult);
$SelectCustNumRows=mysql_num_rows($SelectCustResult);
If ($SelectCustNumRows>0)
{
$Cid=$CustRows[‘CidSTATIC’];
$ScreenName=$CustRows[‘ScreenName’];
$FirstName=$CustRows[‘FirstNameVALIDATE’];
$LastName=$CustRows[‘LastNameVALIDATE’];
$ScreenName=$CustRows[‘ScreenName’];
$Status=$CustRows[‘Status’];
$InsertLogin=”insert into login(CidSTATIC,FirstName,LastName,ScreenName)Values(‘$Cid’,’$FirstName’,’$LastName’,’$ScreenName’)”;
$InsertResult=mysql_query($InsertLogin);
if($InsertResult)
{
$LoginOK=”Y”;
}
else
{
$LMessage.=”$FirstName$space$LastName login insert failed
“;
$LMessage.=$InsertLogin;
//send_mail($from,$to,$subject,$LMessage);
$headers=””;
$headers = “MIME-Version: 1.0\r\n”;
$headers .= “Content-type: text/html; charset=iso-8859-1\r\n”;
$headers .= “Content-type: text/html;\r\n”;
$headers .= “From: “.$from.”\r\n”;
mail($to, $subject, $LMessage, $headers, ‘-fwebsite@maineventsocialclub.com’);
}
$SelectSurveyQuery=”select * from survey4results where ScreenName=’$ScreenName'”;
$SelectSurveyResult=mysql_query($SelectSurveyQuery);
$SurveyRows=mysql_fetch_array($SelectSurveyResult);
$SelectSurveyNumRows=mysql_num_rows($SelectSurveyResult);
echo “status $Status”;
If ($SelectSurveyNumRows>0)
{
require_once(“scripts/playerregister2.php”); //Did take the survey, return profile
}
elseif(($Status==”Active”) and ($Cid!=”262″))
{
require_once(“scripts/survey4.php”);//Did not take the survey, return survey screen.
}
else
{
require_once(“scripts/playerregister2.php”); //Did take the survey, return profile
}
}
ELSE
{
$LMessage.=”$FirstName$space$LastName customer retrieval failed – Social Club
“;
$LMessage.=$SelectCustQuery;
//send_mail($from,$to,$subject,$LMessage);
$headers=””;
$headers = “MIME-Version: 1.0\r\n”;
$headers .= “Content-type: text/html; charset=iso-8859-1\r\n”;
$headers .= “Content-type: text/html;\r\n”;
$headers .= “From: “.$from.”\r\n”;
mail($to, $subject, $LMessage, $headers, ‘-fwebsite@maineventsocialclub.com’);
}
}
else
{
echo “login screen, You must be logged in. If you are not registered – click on the JOIN link on the menu to register”;
}
?>