| Current Path : /var/www/homesaver/www/bitrix/components/skyweb24/sharebasket.get/ |
| Current File : /var/www/homesaver/www/bitrix/components/skyweb24/sharebasket.get/captcha.php |
<?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");?>
<? if ($_SERVER['HTTP_BX_AJAX'])
{
if($_POST['captcha'] == 'yes')
{
include_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/classes/general/captcha.php");
$cpt = new CCaptcha();
$captchaPass = \Bitrix\Main\Config\Option::get("main", "captcha_password", "");
if(strlen($captchaPass) <= 0)
{
$captchaPass = randString(10);
\Bitrix\Main\Config\Option::get("main", "captcha_password", $captchaPass);
}
$cpt->SetCodeCrypt($captchaPass);
$jsonData = \Bitrix\Main\Web\Json::encode(['code'=>htmlspecialchars($cpt->GetCodeCrypt())]);
echo $jsonData;
// echo htmlspecialchars($cpt->GetCodeCrypt());
}
else
die();
}
else
die();
?>
<? require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/epilog_after.php"); ?>