'$adayagostring' AND msgfrom='$_SESSION[username]'"); $this = mysql_result($query, 0, totalcrap); } if(strlen($_SESSION[username]) < 2) die; /* Reply Function */ if(isset($replyto)) { $testresult = mysql_query("SELECT * FROM messages WHERE id = $replyto"); if(mysql_result($testresult, 0, msgto) == $_SESSION[username]) { $id = mysql_result($testresult, 0, msgfromid); $subject = "Re: ".mysql_result($testresult, 0, subject); $message = "\n\n\n\nOriginal Message Follows:\n-------------------------\n\n".mysql_result($testresult, 0, message); } } /* Check Passed Username is Genuine */ $testuserresult = mysql_query("SELECT * FROM members WHERE id = \"$id\""); if(mysql_numrows($testuserresult) != 1) { include("header.php"); echo "


Error!

An error occurred when looking up the member you wanted to contact!

back"; include("footer.php"); exit; } else{ $query = "SELECT username FROM members WHERE id = $id"; $result = mysql_query($query) or die("Couldnt access members table: ".mysql_error()); $user = mysql_result($result, 0, username); } /* Check 'n' Send */ if($sendit == "yes") { $errorstring = ""; if($_SESSION[username] != 'admin') { $messagelimit = 100; if($this > $messagelimit) { $errorstring .= "Your messaging sending limit has been exceeded for today. Please try again in 24 hours time when this value will be reset.
"; } } $subject = trim(str_replace(";", ":", strip_tags($subject))); $subject= eregi_replace("(([[:alnum:]][-a-zA-Z0-9_%\.]*)?[[:alnum:]]@[[:alnum:]][-a-zA-Z0-9%\>.]*\.[[:alpha:]]{2,})", "***removed***", $subject); $subject = trim(str_replace(";", ":", strip_tags($subject))); $subject = trim(str_replace("co dot uk", " ", $subject)); $subject = trim(str_replace("CO DOT UK", " ", $subject)); $subject = trim(str_replace("dot com", " ", $subject)); $subject = trim(str_replace("DOT COM", " ", $subject)); $subject = trim(str_replace("www", " ", $subject)); $subject = trim(str_replace("WWW", " ", $subject)); $subject = trim(str_replace("http://", " ", $subject)); $subject = trim(str_replace("HTTP://", " ", $subject)); $subject = trim(str_replace("http", " ", $subject)); $subject = trim(str_replace("HTTP", " ", $subject)); $subject = trim(str_replace(".com", " ", $subject)); $subject = trim(str_replace(".COM", " ", $subject)); $subject = trim(str_replace("org dot uk", " ", $subject)); $subject = trim(str_replace("ORG DOT UK", " ", $subject)); $subject = trim(str_replace("org.uk", " ", $subject)); $subject = trim(str_replace("ORG.UK", " ", $subject)); $subject = trim(str_replace("co-dot-uk", " ", $subject)); $subject = trim(str_replace("CO-DOT-UK", " ", $subject)); $subject = trim(str_replace("dot-com", " ", $subject)); $subject = trim(str_replace("DOT-COM", " ", $subject)); $subject = trim(str_replace("org-dot-uk", " ", $subject)); $subject = trim(str_replace("ORG-DOT-UK", " ", $subject)); $subject = trim(str_replace("co,dot,uk", " ", $subject)); $subject = trim(str_replace("CO,DOT,UK", " ", $subject)); $subject = trim(str_replace("dot,com", " ", $subject)); $subject = trim(str_replace("DOT,COM", " ", $subject)); $subject = trim(str_replace("org,dot,uk", " ", $subject)); $subject = trim(str_replace("ORG,DOT,UK", " ", $subject)); $subject = trim(str_replace("co_dot_uk", " ", $subject)); $subject = trim(str_replace("CO_DOT_UK", " ", $subject)); $subject = trim(str_replace("dot_com", " ", $subject)); $subject = trim(str_replace("DOT_COM", " ", $subject)); $subject = trim(str_replace("org_dot_uk", " ", $subject)); $subject = trim(str_replace("ORG_DOT_UK", " ", $subject)); $message= eregi_replace("(([[:alnum:]][-a-zA-Z0-9_%\.]*)?[[:alnum:]]@[[:alnum:]][-a-zA-Z0-9%\>.]*\.[[:alpha:]]{2,})", "***removed***", $message); $message = trim(str_replace(";", ":", strip_tags($message))); $message = trim(str_replace("co dot uk", " ", $message)); $message = trim(str_replace("CO DOT UK", " ", $message)); $message = trim(str_replace("dot com", " ", $message)); $message = trim(str_replace("DOT COM", " ", $message)); $message = trim(str_replace("www", " ", $message)); $message = trim(str_replace("WWW", " ", $message)); $message = trim(str_replace("http://", " ", $message)); $message = trim(str_replace("HTTP://", " ", $message)); $message = trim(str_replace("http", " ", $message)); $message = trim(str_replace("HTTP", " ", $message)); $message = trim(str_replace(".com", " ", $message)); $message = trim(str_replace(".COM", " ", $message)); $message = trim(str_replace("org dot uk", " ", $message)); $message = trim(str_replace("ORG DOT UK", " ", $message)); $message = trim(str_replace("org.uk", " ", $message)); $message = trim(str_replace("ORG.UK", " ", $message)); $message = trim(str_replace("co-dot-uk", " ", $message)); $message = trim(str_replace("CO-DOT-UK", " ", $message)); $message = trim(str_replace("dot-com", " ", $message)); $message = trim(str_replace("DOT-COM", " ", $message)); $message = trim(str_replace("org-dot-uk", " ", $message)); $message = trim(str_replace("ORG-DOT-UK", " ", $message)); $message = trim(str_replace("co,dot,uk", " ", $message)); $message = trim(str_replace("CO,DOT,UK", " ", $message)); $message = trim(str_replace("dot,com", " ", $message)); $message = trim(str_replace("DOT,COM", " ", $message)); $message = trim(str_replace("org,dot,uk", " ", $message)); $message = trim(str_replace("ORG,DOT,UK", " ", $message)); $message = trim(str_replace("co_dot_uk", " ", $message)); $message = trim(str_replace("CO_DOT_UK", " ", $message)); $message = trim(str_replace("dot_com", " ", $message)); $message = trim(str_replace("DOT_COM", " ", $message)); $message = trim(str_replace("org_dot_uk", " ", $message)); $message = trim(str_replace("ORG_DOT_UK", " ", $message)); if(strlen($subject) < 1) $errorstring .= "You must enter a message subject.
"; elseif(strlen($subject) > 128) $errorstring .= "Message subject must be a maximum of 128 characters long.
"; if(strlen($message) < 1) $errorstring .= "You must enter a message body.
"; $noautomationcode = $HTTP_SESSION_VARS["noautomationcode"]; $code = trim($HTTP_POST_VARS["code"]); if($code != $noautomationcode){ $errorstring .= "You confirmation code did not match, please try again.
"; } if(strlen($errorstring) == 0) { $datestring = date("YmdHi"); $query = "INSERT INTO messages(msgfrom, msgfromid, msgto, msgtoid, subject, message, sent, folder, msgread) VALUES (\"$_SESSION[username]\", \"$_SESSION[useridS]\", \"$user\", \"$id\", \"$subject\", \"$message\", $datestring, \"inbox\", 0)"; $temp1 = mysql_query("UPDATE members SET maxmessage = 0 WHERE username='$_SESSION[username]'"); $mailresult = mysql_query($query); $temp = mysql_query("UPDATE members SET msgmsg = 0 WHERE username=\"$user\""); /* Check if recipient wants notification email */ $testresult = mysql_query("SELECT * FROM members WHERE username = \"$user\""); if(mysql_result($testresult, 0, newmailnotify) == "yes") { $recipientemail = mysql_result($testresult, 0, email); $mailmessage = "Dear $user,\n\nYou have just received new email from another member at Love-Personals.co.uk. To read it, please log into the site and go to \"your mailbox\".\n\nIf you no longer want to receive these notification emails please log into your account and change your profile settings.\n\nKind regards,\nThe Love-Personals.co.uk Team"; mail($recipientemail, "You have new mail at Love-Personals.co.uk!", $mailmessage, "FROM: do-not-reply@love-personals.co.uk"); } include("header.php"); echo "


Your message to $user has been sent.

home"; include("footer.php"); exit; } } include("header.php"); ?>


$messagelimit) && ($_SESSION[username] != 'admin')) { echo "
\"error!\"Error(s) Found:

Your messaging sending limit has been exceeded for today. Please try again in 24 hours time when this value will be reset.


"; $message = "Max message limit reached for user $_SESSION[username]. Please log in and make sure they are not sending spam!"; $temp1 = mysql_query("SELECT maxmessage FROM members WHERE username='$_SESSION[username]'"); $maxmessage = mysql_result($temp1, 0, maxmessage); if($maxmessage == 0) { $sent = mail($adminemail, "Max message limit reached for user $_SESSION[username]...", $message, "FROM: do-not-reply@love-personals.co.uk"); $temp1 = mysql_query("UPDATE members SET maxmessage = 1 WHERE username='$_SESSION[username]'"); } echo "


back
"; } else { ?> Fill in the form below to send an email to .


0) echo "
\"error!\"Error(s) Found:

$errorstring


"; ?>
To:
From:
Subject:>
Message:
Confirmation:
Copy the code here:
EHTML; echo($html_form); ?>
>
>  >

back