Fixed some email things, added whois.

git-svn-id: http://svn.automattic.com/wordpress/trunk@6 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2003-04-07 06:12:32 +00:00
parent d57110c996
commit bf50c8f3cc
1 changed files with 13 additions and 12 deletions

View File

@ -92,24 +92,25 @@ if ($ok) {
$query = "INSERT INTO $tablecomments VALUES ('0','$comment_post_ID','$author','$email','$url','$user_ip','$now','$comment','0')";
$result = mysql_query($query);
if (!$result)
die ("There is an error with the database, it can't store your comment...<br>Contact the <a href=\"mailto:$admin_email\">webmaster</a>");
die ("There is an error with the database, it can't store your comment...<br />Contact the <a href=\"mailto:$admin_email\">webmaster</a>");
if ($comments_notify) {
$notify_message = "New comment on your post #$comment_post_ID.\r\n\r\n";
$notify_message .= "author : $comment_author (IP: $user_ip , $user_domain)\r\n";
$notify_message .= "e-mail : $comment_author_email\r\n";
$notify_message .= "url : $comment_author_url\r\n";
$notify_message .= "comment: \n".stripslashes($original_comment)."\r\n\r\n";
$notify_message .= "You can see all comments on this post there: \r\n";
$notify_message .= $siteurl.'/'.$blogfilename.$querystring_start.'p'.$querystring_equal.$comment_post_ID.$querystring_separator.'c'.$querystring_equal.'1'."\r\n\r\n";
$notify_message = "New comment on your post #$comment_post_ID ".stripslashes($postdata['Title'])."\r\n\r\n";
$notify_message .= "Author : $comment_author (IP: $user_ip , $user_domain)\r\n";
$notify_message .= "E-mail : $comment_author_email\r\n";
$notify_message .= "URL : $comment_author_url\r\n";
$notify_message .= "Whois : http://ws.arin.net/cgi-bin/whois.pl?queryinput=$user_ip";
$notify_message .= "Comment: \n".stripslashes($original_comment)."\r\n\r\n";
$notify_message .= "You can see all comments on this post here: \r\n";
$notify_message .= comments_link('', false);
$postdata = get_postdata($comment_post_ID);
$authordata = get_userdata($postdata["Author_ID"]);
$recipient = $authordata["user_email"];
$subject = "comment on post #$comment_post_ID \"".$postdata["Title"]."\"";
$authordata = get_userdata($postdata['Author_ID']);
$recipient = $authordata['user_email'];
$subject = "[$blogname] Comment: \"".stripslashes($postdata['Title']).'"';
@mail($recipient, $subject, $notify_message, "From: b2@".$HTTP_SERVER_VARS['SERVER_NAME']."\r\n"."X-Mailer: b2 $b2_version - PHP/" . phpversion());
@mail($recipient, $subject, $notify_message, "From: \"$comment_author\" <$comment_author_email>\r\n"."X-Mailer: wordpress $b2_version with PHP/".phpversion());
}