include_once "includes/dbConnNew.php";
include_once "includes/loggedOnFridge.php";
import_request_variables("gp", "");
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
if($_REQUEST['fid'] > " " ){
$userID = $_REQUEST['fid'];
//MAKE SURE THIS USER IS SUPPOSED TO SEE THIS
$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';
$friendPhoto = $myrow["photo"] ;
$friendBlog = $myrow["blog"] ;
$friendContact = $myrow["contacts"] ;
$friendCook = $myrow["cookbook"] ;
$friendProfile = $myrow["show_profile_page"] ;
}
$SelectFr = "SELECT Photo,DATE_FORMAT(Last_Logon, '%M %d, %Y') as lastLog,First_Name,Last_Name,ID FROM users where ID = '" . $_REQUEST['fid'] . "' ";
$resultFr = MySQL($dbName,$SelectFr) or die(mysql_error());
if($myrowFr=MySQL_fetch_array($resultFr)){
$First_Name = ucfirst($myrowFr["First_Name"]);
$Last_Name = ucfirst($myrowFr["Last_Name"]);
$lastLog = $myrowFr["lastLog"] ;
}
}
if($theAction == "msg" && $_REQUEST['fid'] > " " ){
$friends = $_REQUEST['fid'] ;
$dateSent=date("Y-m-d") ;
$timeSent = date("H:i") ;
$sqlInsert = "INSERT INTO messages (From_ID, To_ID, Date_Sent, Time_Sent, Mark_As_Read, The_Text,msg_title)" ;
$sqlInsert = $sqlInsert . " VALUES ('" . $_SESSION["sessionUserID"] . "','$friends','$dateSent','$timeSent','N','" . ereg_replace("'","´",$_REQUEST['message']) . "','" . ereg_replace("'","´",$_REQUEST['$mTitle']) . "')" ;
$result2 = mysql_query($sqlInsert) or die(mysql_error());
$replyID = mysql_insert_id() ;
$sqlupdate = "Update messages Set Reply_ID='$replyID' where ID='$replyID'";
$result2 = mysql_query($sqlupdate) or die(mysql_error());
$sent = "y" ;
}
if($friendok <> 'y'){
header("Location: networkFriends.php");
exit ;
}
?>
Yada Home
include 'beforeEndHead.php'; ?>
|
|
|
 |
| include "bottomLocalSearch.php"; ?> |
|
|
include "googAna.php"; ?>