diff --git a/docs/_layouts/post.html b/docs/_layouts/post.html
index 62bcb4f..92c8b8f 100644
--- a/docs/_layouts/post.html
+++ b/docs/_layouts/post.html
@@ -185,11 +185,11 @@
Post a comment
var comtext = document.getElementById("commentmsg").value;
// Construct URL with parameters
- var url = "{{site.url}}/commentsubmitcopy.php";
- url += "?compostid=" + encodeURIComponent(compostid);
+ var url = "{{site.url}}/process_comment.html";
+ url += "?post_id=" + encodeURIComponent(compostid);
url += "&comreturnurl=" + encodeURIComponent(comreturnurl);
- url += "&comname=" + encodeURIComponent(comname);
- url += "&comtext=" + encodeURIComponent(comtext);
+ url += "&name=" + encodeURIComponent(comname);
+ url += "&comment=" + encodeURIComponent(comtext);
location.href = url;
}
diff --git a/docs/process_comment.html b/docs/process_comment.html
new file mode 100644
index 0000000..31cb088
--- /dev/null
+++ b/docs/process_comment.html
@@ -0,0 +1,43 @@
+---
+layout: default
+---
+
+Processing Comment...
+
+ $value) {
+ if (strstr($value, "\n") != "") {
+ $value = str_replace("\n", "\n ", $value);
+ }
+ $value = "'" . str_replace("'", "''", $value) . "'";
+ $msg .= "$key: $value\n";
+}
+
+if (mail($EMAIL_ADDRESS, $SUBJECT, $msg))
+{
+ echo 'Comment Received!
';
+ echo 'Thank you for your comment. It will be reviewed and published shortly.
'
+ $return_url = $_GET['comreturnurl'];
+ $return_delay = 5; //Number of seconds
+ echo "";
+ echo 'You will be redirected to the original post in 5 seconds. Click the link below if you are not redirected automatically.
';
+ echo ''.$return_url.'
';
+}
+else
+{
+ echo 'Error!
'
+ echo 'There was a problem sending the comment. Please contact the site's owner.
';
+}
+
+?>