<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
if ($arParams["FORUM"]["USE_CAPTCHA"]=="Y" && $USER->IsAuthorized())
{
include_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/classes/general/captcha.php");
$cpt = new CCaptcha();
$captchaPass = COption::GetOptionString("main", "captcha_password", "");
if (strlen($captchaPass) <= 0)
{
$captchaPass = randString(10);
COption::SetOptionString("main", "captcha_password", $captchaPass);
}
$cpt->SetCodeCrypt($captchaPass);
$arResult["CAPTCHA_CODE"] = htmlspecialchars($cpt->GetCodeCrypt());
}
?> |