|
|
@ -327,8 +327,16 @@ if (isset($_POST['delete'])) { |
|
|
|
if ($config['report_captcha']) { |
|
|
|
if ($config['captcha']['local']) { |
|
|
|
require_once '.' . $config['captcha']['provider_check']; |
|
|
|
if (!captcha_check($_POST['captcha_cookie'], $config['captcha']['extra'], $_POST['captcha_text'])) { |
|
|
|
error($config['error']['captcha']); |
|
|
|
$code = captcha_check($_POST['captcha_cookie'], $config['captcha']['extra'], $_POST['captcha_text']); |
|
|
|
|
|
|
|
if ($code !== 1) { |
|
|
|
if ($code === 2) { |
|
|
|
error($config['error']['captcha_incorrect']); |
|
|
|
} else if ($code === 3) { |
|
|
|
error($config['error']['captcha_expired']); |
|
|
|
} else { |
|
|
|
error($config['error']['captcha']); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
$ch = curl_init($config['domain'].$config['captcha']['provider_check'] . "?" . http_build_query([ |
|
|
@ -341,7 +349,13 @@ if (isset($_POST['delete'])) { |
|
|
|
$resp = curl_exec($ch); |
|
|
|
|
|
|
|
if ($resp !== '1') { |
|
|
|
error($config['error']['captcha']); |
|
|
|
if ($resp === '2') { |
|
|
|
error($config['error']['captcha_incorrect']); |
|
|
|
} else if ($resp === '3') { |
|
|
|
error($config['error']['captcha_expired']); |
|
|
|
} else { |
|
|
|
error($config['error']['captcha']); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -443,8 +457,16 @@ if (isset($_POST['delete'])) { |
|
|
|
if (($config['captcha']['enabled']) || (($post['op']) && ($config['new_thread_capt'])) ) { |
|
|
|
if ($config['captcha']['local']) { |
|
|
|
require_once '.' . $config['captcha']['provider_check']; |
|
|
|
if (!captcha_check($_POST['captcha_cookie'], $config['captcha']['extra'], $_POST['captcha_text'])) { |
|
|
|
error($config['error']['captcha']); |
|
|
|
$code = captcha_check($_POST['captcha_cookie'], $config['captcha']['extra'], $_POST['captcha_text']); |
|
|
|
|
|
|
|
if ($code !== 1) { |
|
|
|
if ($code === 2) { |
|
|
|
error($config['error']['captcha_incorrect']); |
|
|
|
} else if ($code === 3) { |
|
|
|
error($config['error']['captcha_expired']); |
|
|
|
} else { |
|
|
|
error($config['error']['captcha']); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
$ch = curl_init($config['domain'].$config['captcha']['provider_check'] . "?" . http_build_query([ |
|
|
@ -457,8 +479,13 @@ if (isset($_POST['delete'])) { |
|
|
|
$resp = curl_exec($ch); |
|
|
|
|
|
|
|
if ($resp !== '1') { |
|
|
|
error($config['error']['captcha'] . |
|
|
|
'<script>if (actually_load_captcha !== undefined) actually_load_captcha("'.$config['captcha']['provider_get'].'", "'.$config['captcha']['extra'].'");</script>'); |
|
|
|
if ($resp === '2') { |
|
|
|
error($config['error']['captcha_incorrect']); |
|
|
|
} else if ($resp === '3') { |
|
|
|
error($config['error']['captcha_expired']); |
|
|
|
} else { |
|
|
|
error($config['error']['captcha']); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|