Changeset 7 for trunk/b2comments.post.php
- Timestamp:
- 04/07/2003 06:55:21 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/b2comments.post.php
r6 r7 93 93 $result = mysql_query($query); 94 94 if (!$result) 95 die ("There is an error with the database, it can 't store your comment...<br />Contact the <a href=\"mailto:$admin_email\">webmaster</a>");95 die ("There is an error with the database, it can’t store your comment...<br />Contact the <a href=\"mailto:$admin_email\">webmaster</a>."); 96 96 97 97 if ($comments_notify) { … … 101 101 $notify_message .= "E-mail : $comment_author_email\r\n"; 102 102 $notify_message .= "URL : $comment_author_url\r\n"; 103 $notify_message .= "Whois : http://ws.arin.net/cgi-bin/whois.pl?queryinput=$user_ip ";103 $notify_message .= "Whois : http://ws.arin.net/cgi-bin/whois.pl?queryinput=$user_ip\r\n"; 104 104 $notify_message .= "Comment: \n".stripslashes($original_comment)."\r\n\r\n"; 105 105 $notify_message .= "You can see all comments on this post here: \r\n"; … … 115 115 } 116 116 117 if ($email == "") {118 $email = " "; // this to make sure a cookie is set for 'no email'117 if ($email == '') { 118 $email = ' '; // this to make sure a cookie is set for 'no email' 119 119 } 120 if ($url == "") {121 $url = " "; // this to make sure a cookie is set for 'no url'120 if ($url == '') { 121 $url = ' '; // this to make sure a cookie is set for 'no url' 122 122 } 123 setcookie("comment_author", $author, time()+30000000);124 setcookie("comment_author_email", $email, time()+30000000);125 setcookie("comment_author_url", $url, time()+30000000);123 setcookie("comment_author", $author, time()+30000000); 124 setcookie("comment_author_email", $email, time()+30000000); 125 setcookie("comment_author_url", $url, time()+30000000); 126 126 127 header( "Expires: Mon, 26 Jul 1997 05:00:00 GMT");128 header( "Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");129 header( "Cache-Control: no-cache, must-revalidate");130 header( "Pragma: no-cache");127 header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); 128 header('Last-Modified: ' . gmdate("D, d M Y H:i:s") . ' GMT'); 129 header('Cache-Control: no-cache, must-revalidate'); 130 header('Pragma: no-cache'); 131 131 $location = (!empty($HTTP_POST_VARS['redirect_to'])) ? $HTTP_POST_VARS['redirect_to'] : $HTTP_SERVER_VARS["HTTP_REFERER"]; 132 132 header("Location: $location"); 133 133 134 134 } else { 135 die( "Sorry, you can only post a new comment every 30 seconds");135 die('Sorry, you can only post a new comment once every 30 seconds.'); 136 136 } 137 137
Note: See TracChangeset
for help on using the changeset viewer.