public function CheckCode($captchaValue, $captchaId) { CModule::IncludeModule('mailru.nocaptcha'); if (CNocaptcha::GetInstance()->Check($captchaId, $captchaValue) === true) return true; return false; }
<? CModule::IncludeModule("mailru.nocaptcha"); if (isset($arParams["ID"]) && $arParams["ID"] != "") { $arResult["ID"] = $arParams["ID"]; CNocaptcha::GetInstance()->AddContainerId($arResult["ID"]); } else { $arResult["ID"] = CNocaptcha::GetInstance()->GenerateContainerId(); } $this->IncludeComponentTemplate(); ?>