0) { $content = mysql_result($result, 0, "page_Text"); $content=str_replace("`", "'", $content); $content_title = mysql_result($result, 0, "page_title"); $content_desc = mysql_result($result, 0, "page_desc"); $content_keyword = mysql_result($result, 0, "page_keywords"); } $userid=$_SESSION['KC_memberId']; if (isset($_POST['useridtemp'])){ // if (isset($_POST['preuser'])) $preuser=$_POST['preuser']; $referer=$_POST['referer']; $msgto=$_POST['facebook-demo']; $receps=explode("###", $msgto); //echo "msgto:".$msgto; $date=gmdate("Y-m-d H:i:s"); $currentUser=$_POST['useridtemp']; $subject=trim(addslashes($_POST['subject'])); $msg=trim(addslashes($_POST['msg'])); if (count($receps)>1){ for ($n=0; $n<=count($receps)-1; $n++){ $current_recep=$receps[$n]; mysql_query("INSERT INTO msgbox (msgfrm,msgto,subject,date,flag,msg) VALUES ('$currentUser','$current_recep','$subject','$date','n','$msg')", $db); $msgidQ=mysql_query("SELECT * FROM msgbox WHERE deleted='n' AND blocked='n' AND msgfrm='$currentUser' AND msgto='$current_recep' AND date='$date'", $db); $msgid_arr=mysql_fetch_assoc($msgidQ); $msgid=$msgid_arr['msgid']; $checkNotiQ=mysql_query("SELECT * FROM userinfo WHERE deleted='n' AND blocked='n' AND userid='$current_recep'", $db); $checkNoti=mysql_fetch_assoc($checkNotiQ); if ($checkNoti['noti_forum']=='y'){ $to=$checkNoti['email_noti']; $msgSub="You have received a new message from ".$currentUser; $msgBody="Hello ".$checkNoti['userid']."\n\n"; $msgBody.="You have received a new message from ".$currentUser."\n Below is what he wrote:\n\n"; $msgBody.="Subject: ".stripslashes($subject)."\n\n"; $msgBody.="Message: \"".stripslashes(str_replace($msg,'
','\n'))."\"\n\n"; $msgBody.="Check the message at http://". $_SERVER['HTTP_HOST']."/member/msg.php?id=".$msgid."\n\n"; $msgBody.="You can go to your inbox by following this link: http://". $_SERVER['HTTP_HOST']."/member/inbox.php\n\n"; $msgBody.="Send a reply to ".$currentUser." at: http://". $_SERVER['HTTP_HOST']."/member/compose.php?msgto=".$currentUser; mail($to,$msgSub,$msgBody,"From: BBB"); } } } else { $current_recep=$receps[0]; mysql_query("INSERT INTO msgbox (msgfrm,msgto,subject,date,flag,msg) VALUES ('$currentUser','$current_recep','$subject','$date','n','$msg')", $db); $msgidQ=mysql_query("SELECT * FROM msgbox WHERE deleted='n' AND blocked='n' AND msgfrm='$currentUser' AND msgto='$current_recep' AND date='$date'", $db); $msgid_arr=mysql_fetch_assoc($msgidQ); $msgid=$msgid_arr['msgid']; $checkNotiQ=mysql_query("SELECT * FROM userinfo WHERE deleted='n' AND blocked='n' AND userid='$current_recep'", $db); $checkNoti=mysql_fetch_assoc($checkNotiQ); if ($checkNoti['noti_forum']=='y'){ $to=$checkNoti['email_noti']; $msgSub="You have received a new message from ".$currentUser; $msgBody="Hello ".$checkNoti['userid']."\n\n"; $msgBody.="You have received a new message from ".$currentUser."\n Below is what he wrote:\n\n"; $msgBody.="Subject: ".stripslashes($subject)."\n\n"; $msgBody.="Message: \"".stripslashes(nl2br($msg))."\"\n\n"; $msgBody.="Check the message at http://". $_SERVER['HTTP_HOST']."/login/my-message-view.php?id=".$msgid."\n\n"; $msgBody.="You can go to your inbox by following this link: http://". $_SERVER['HTTP_HOST']."/login/my-messages.php\n\n"; $msgBody.="Send a reply to ".$currentUser." at: http://". $_SERVER['HTTP_HOST']."/login/my-message-add.php?msgto=".$currentUser; mail($to,$msgSub,$msgBody,"From: BBB"); } } $_SESSION['success']="Message sent Successfully."; } ?>

Click here to view sent messages
".$_SESSION['error']."

"; unset($_SESSION['error']); } if (isset($_SESSION['success'])){ echo "

".$_SESSION['success']."

"; unset($_SESSION['success']); } ?>
  1. Type recipients name
      0) echo "
    • ".$msgto."
    • "; } ?>