X-Git-Url: https://disinclined.org/git/?a=blobdiff_plain;f=index.php;h=516089e056816089995fced1e48f4219dea7626b;hb=5b70780eb304ed68645d48f06f65034499d7a515;hp=16a01ec0fc051c7a87a63c42fd45a12b536bca81;hpb=d4adeb654507e6cd75aac3f264ae21ed5d16bfab;p=dylansserver.git diff --git a/index.php b/index.php index 16a01ec..516089e 100644 --- a/index.php +++ b/index.php @@ -340,7 +340,14 @@ class note extends cms { $_POST["recaptcha_response_field"]); if (!$resp->is_valid) { echo "The reCAPTCHA wasn't entered correctly. Go back and try it again." . "(reCAPTCHA said: " . $resp->error . ")"; - } + } else { + $sql = ("INSERT INTO comments (date_posted, author, + email, text, note + VALUES(NOW(), ?, ?, ?, ?, ?"); + echo htmlspecialchars($_POST['author']); + echo htmlspecialchars($_POST['email']); + echo htmlspecialchars($_POST['text']); + } } private function display_note() { @@ -365,12 +372,14 @@ class note extends cms { } private function write_navigation() { - echo "
"; - echo "
"; - echo "

"; - echo "notes/"; - echo "

"; - echo "
"; + echo << +
+

+ notes/ +

+
+END_OF_NAVIGATION; } private function display_comment_link() { @@ -399,13 +408,49 @@ END_OF_COMMENT; } private function display_comment_form() { + echo << +var RecaptchaOptions = { + theme : 'custom', + custom_theme_widget: 'recaptcha_widget' + }; + +END_CAPTCHA_STYLE; + require_once('includes/recaptchalib.php'); // Trailing slash is necessary for reloads to work $url = $this->url . "verify/"; - echo "
"; - require_once('includes/recaptchalib.php'); + echo ""; + echo << + +

comment:


+
+

name:


+
+

email:


+
+ + +
+
+
Incorrect please try again
+ enter the words above: + enter the numbers you hear: +
+ + + + + +

+
+FORM; echo recaptcha_get_html($this->recaptcha_publickey); - echo ""; - echo ""; + echo << + + +END_OF_FORM; } }