本文整理汇总了PHP中CCaptcha::GetSID方法的典型用法代码示例。如果您正苦于以下问题:PHP CCaptcha::GetSID方法的具体用法?PHP CCaptcha::GetSID怎么用?PHP CCaptcha::GetSID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCaptcha
的用法示例。
在下文中一共展示了CCaptcha::GetSID方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CaptchaGetCode
function CaptchaGetCode()
{
include_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/classes/general/captcha.php";
$cpt = new CCaptcha();
$cpt->SetCode();
return $cpt->GetSID();
}
示例2: array
$cpt->SetLinesNumber($result["numLines"]);
$cpt->SetLineColorRGB($result["arLineColor_1"], $result["arLineColor_2"]);
$cpt->SetTextWriting($result["textAngel_1"], $result["textAngel_2"], $result["textStartX"], $result["textDistance_1"], $result["textDistance_2"], $result["textFontSize"]);
$cpt->SetTextColorRGB($result["arTextColor_1"], $result["arTextColor_2"]);
$cpt->SetWaveTransformation($result["bWaveTransformation"] === "Y");
$cpt->SetEmptyText($result["bEmptyText"] === "Y");
$cpt->SetBorderColorRGB($result["arBorderColor"]);
$cpt->SetTTFFonts($result["arTTFFiles"]);
$arChars = array();
$l = strlen($result["letters"]);
for ($i = 0; $i < $l; $i++) {
$arChars[] = substr($result["letters"], $i, 1);
}
$cpt->SetCodeChars($arChars);
$cpt->SetCode();
if ($cpt->InitCode($cpt->GetSID())) {
$cpt->Output();
} else {
$cpt->OutputError();
}
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_after.php";
die;
}
$APPLICATION->SetTitle(GetMessage("MAIN_ADM_CAPTCHA_PAGE_TITLE"));
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
$CAPTCHA_CODE = htmlspecialcharsbx($APPLICATION->CaptchaGetCode());
$tabControl->Begin();
?>
<script>
<?php
foreach ($arSettings as $key => $value) {
示例3: svg
<input name="company" type="text">
<label>Ваш e-mail</label>
<input name="email" type="email" required>
<label>телефон для связи с вами</label>
<input name="phone" type="text" data-parsley-pattern="/^((8|\+7)[\- ]?)?(\(?\d{3}\)?[\- ]?)?[\d\- ]{7,10}/" data-parsley-trigger="change">
<label>ваше сообщение</label>
<textarea required name="message"></textarea>
<div class="row">
<div class="col-xs-4">
<label class="left">введите данный код</label>
<?php
include_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/classes/general/captcha.php";
$cpt = new CCaptcha();
$cpt->SetCodeLength(4);
$cpt->SetCode();
$code = $cpt->GetSID();
?>
<div class="captcha" style="background-image:url(/include/captcha.php?captcha_sid=<?php
echo $code;
?>
)"></div>
</div>
<div class="col-xs-2 no-padding">
<input type="hidden" name="captcha_code" value="<?php
echo $code;
?>
">
<a href="#" class="captcha_refresh">
<?php
echo svg('refresh');