diff options
Diffstat (limited to 'pages/post.php')
-rwxr-xr-x | pages/post.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pages/post.php b/pages/post.php index fd826a5..3f728c8 100755 --- a/pages/post.php +++ b/pages/post.php | |||
@@ -21,7 +21,8 @@ | |||
21 | if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);} | 21 | if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);} |
22 | 22 | ||
23 | require('headerproc.php'); | 23 | require('headerproc.php'); |
24 | require('includes/securimage/securimage.php'); | 24 | |
25 | include('includes/recaptchalib.php'); | ||
25 | 26 | ||
26 | if (!isset($_POST['id'])) | 27 | if (!isset($_POST['id'])) |
27 | { | 28 | { |
@@ -39,11 +40,10 @@ if (!isset($_POST['id'])) | |||
39 | } else { | 40 | } else { |
40 | if (preg_match('/^[A-Za-z0-9!#$&\'*+-\/=?^_`{|}~]+@[-A-Za-z0-9]+(\.[-A-Za-z0-9]+)+[A-Za-z]$/', $_POST['email'])) | 41 | if (preg_match('/^[A-Za-z0-9!#$&\'*+-\/=?^_`{|}~]+@[-A-Za-z0-9]+(\.[-A-Za-z0-9]+)+[A-Za-z]$/', $_POST['email'])) |
41 | { | 42 | { |
42 | $img = new Securimage; | 43 | $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); |
43 | 44 | if (!$resp->is_valid) | |
44 | if ($img->check($_POST['code']) == false) | ||
45 | { | 45 | { |
46 | die('The CAPTCHA wasn\'t entered correctly. Go back and try it again.'); | 46 | die('The reCAPTCHA wasn\'t entered correctly. Go back and try it again.'); |
47 | } else { | 47 | } else { |
48 | $getanon = "SELECT * FROM anon_commenters WHERE username = \"" . $_POST['username'] . "\""; | 48 | $getanon = "SELECT * FROM anon_commenters WHERE username = \"" . $_POST['username'] . "\""; |
49 | $getanon2 = mysql_query($getanon); | 49 | $getanon2 = mysql_query($getanon); |