Код |
---|
$error = CForm::Check($WEB_FORM_ID, $arrVALUES); if (strlen($error)<=0) |
Код |
---|
<? $capCode = $GLOBALS["APPLICATION"]->CaptchaGetCode(); ?> <input type="hidden" name="captcha_sid" value="<?= htmlspecialchars($capCode) ?>"> <img align="left" src="/bitrix/tools/captcha.php?captcha_sid=<?= htmlspecialchars($capCode) ?>" width="180" height="40"> <input type="text" name="captcha_word" size="30" maxlength="50" value=""> |
Код |
---|
function CaptchaCheckCode($captcha_word, $captcha_sid) { include_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/classes/general/captcha.php"); $cpt = new CCaptcha(); return $cpt->CheckCode($captcha_word, $captcha_sid); } |
Код |
---|
extract($_POST, EXTR_SKIP); if (!CaptchaCheckCode($captcha_word, $captcha_sid) && ($ID == 0)) { ShowMessage('Введен неправильный регистрационный код'); } |