как сформировать капчу bitrix для рукописных форм.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
<?php include_once ($_SERVER['DOCUMENT_ROOT']."/bitrix/modules/main/classes/general/captcha.php"); $cpt= new CCAptcha(); $captchaPass=COption::GetOptionString('main',"captcha_password",""); if(strlen($capchaPass)<=0){ $captchaPass=randString(10); COption::SetOptionString('main',"captcha_password",$captchaPass); } $cpt->SetCodeCrypt($captchaPass); ?> <div class="col-30"> <input type="hidden" name="captcha_conde" <?=htmlspecialcharsbx($cpt->GetCodeCrypt()) ?> > <img src="/bitrix/tools/captcha.php?captcha_code=<?=htmlspecialcharsbx($cpt->GetCodeCrypt());?>" alt=""> <input type="text" placeholder="Введите код с картинки" name="captcha_word" type="text"> </div> |