" " && $_SESSION['sessionUserID']){ $fid = $_REQUEST['fid'] ; // check if not in network $SelectStr = "select * from privacy where (privacy.deleted = 0) AND ((privacy.user_id = '" . $_REQUEST['fid'] . "') and (privacy.friend_id = '" . $_SESSION["sessionUserID"] . "'))"; $result = mysql_query($SelectStr) or die(mysql_error()); if($myrow=MySQL_fetch_array($result)){ $friendok = 'y'; } else { $friendok = 'n'; } $SelectStr1 = "SELECT * FROM users where ID = '$fid'"; $result1 = mysql_query($SelectStr1) or die(mysql_error()); if($myrow1=MySQL_fetch_array($result1)){ $Email=$myrow1["Email"] ; $First_Name=ucfirst($myrow1["First_Name"]) ; $Last_Name=ucfirst($myrow1["Last_Name"]) ; $friendID = $myrow1["ID"]; } if($friendok == 'n' ){ $rand_key= rand(0,999999999); $invitDate = date(Y-m-d) ; $InsertStr = "INSERT INTO invitations (Invite_Date,is_Member,USER_ID, EMAIL, Invited, Random_Key, Fname ) VALUES ('$invitDate', 'Y','" . $_SESSION['sessionUserID'] . "' , '" . $Email . "', 'Y', '$rand_key', '" . $First_Name . "')"; $result = mysql_query($InsertStr) or die(mysql_error()); $lastInvId=mysql_insert_id() ; //************************************************************************************************************************ //* see if user is already a yada member - if so then dont sent the registration email - just put a message in their box //************************************************************************************************************************ //see if user is on the dont send email list $lookupEmail = $Email; include "doNotSend.php"; //end of email lookup - result will be $OkToSendEmail = Y or N $dateSent=date("Y-m-d") ; $timeSent = date("H:i") ; $invID = $lastInvId; $proNoun = "their"; if ( $_SESSION["sessionGender"] == "m" ){ $proNoun = "his"; } if ( $_SESSION["sessionGender"] == "f" ){ $proNoun = "her"; } $sqlInsert = "INSERT INTO messages (From_ID, To_ID, Date_Sent, Time_Sent, Mark_As_Read, The_Text)" ; $sqlInsert = $sqlInsert . " VALUES ('" . $_SESSION["sessionUserID"] . "','$friendID','$dateSent','$timeSent','N','011')" ; $result3 = mysql_query($sqlInsert) or die(mysql_error()); $lastMsgId=mysql_insert_id() ; $msgTitle = "Invitation from ".$_SESSION["sessionFname"] . " " . $_SESSION["sessionLname"] ; $message = $_SESSION["sessionFname"] . " " . $_SESSION["sessionLname"] . " has invited you to join $proNoun network.
Click here to accept or reject this invitation."; $SQL3 = "UPDATE messages SET Reply_ID='$lastMsgId', The_Text = '$message' WHERE To_ID ='$friendID' and ID = '$lastMsgId' and The_Text='011' and From_ID = '" . $_SESSION["sessionUserID"]. "'"; $result3 = mysql_query($SQL3) or die(mysql_error()); //***and send and email $to = $Email; $fromName = $_SESSION["sessionFname"] . " " . $_SESSION["sessionLname"]; $from = "$fromName "; $fromNamePoss = $_SESSION["sessionFname"] . "'s"; include "emailTerms.php"; $subject = "From $fromName: Join my network!"; $greeting = ""; if ( $First_Name > " "){ $subject = $First_Name . ", join my network!"; $greeting = "Hi " . $First_Name . ",

"; } //begin email message $message = "$subject
advertisement
" . $greeting . "I just added you as a friend to my network!

Just sign into your fridge and click on your messages where you will be able to accept the invitation! Here's the link to sign in: YadaHome.com

$fromName




-----------------------------------------------------
$emailTerms




"; //end of message $headers = "From: $from\r\n"; $headers .= "Content-type: text/html\r\n"; //options to send to cc+bcc //$headers .= "Cc: [email]maa@p-i-s.cXom[/email]"; //$headers .= "Bcc: [email]email@maaking.cXom[/email]"; // now lets send the email. if( $OkToSendEmail == "Y"){ mail($to, $subject, $message, $headers); } } } else { if($_SERVER['HTTP_REFERER'] > " "){ $backPage =$_SERVER['HTTP_REFERER'] ; } else { $backPage ="networkFriends.php" ; } header("Location: $backPage"); exit ; } ?> YadaHome | My Family
yada home
my fridge
 
   

A friend request has been sent to .
Return to My Fridge

Video Game Rentals Delivered 

free profile