当前位置: 首页>>代码示例>>PHP>>正文


PHP CCaptcha::GetCodeCrypt方法代码示例

本文整理汇总了PHP中CCaptcha::GetCodeCrypt方法的典型用法代码示例。如果您正苦于以下问题:PHP CCaptcha::GetCodeCrypt方法的具体用法?PHP CCaptcha::GetCodeCrypt怎么用?PHP CCaptcha::GetCodeCrypt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CCaptcha的用法示例。


在下文中一共展示了CCaptcha::GetCodeCrypt方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: CCaptcha

<?
define("NO_KEEP_STATISTIC", true); // Не собираем стату по действиям AJAX
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");
if ($_GET["mode"] == 'captcha_sid')
  echo $APPLICATION->CaptchaGetCode();
elseif ($_GET["mode"] == 'captcha_code')
{
    if (!$GLOBALS["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);
        echo htmlspecialchars($cpt->GetCodeCrypt());
    }
}
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/epilog_after.php");
?>
开发者ID:ASDAFF,项目名称:captcha.reload,代码行数:23,代码来源:req.php

示例2: CCaptcha

		);
	}
}

if ($arResult["CHANNEL"]["USE_CAPTCHA"] == "Y" && !$GLOBALS["USER"]->IsAuthorized())
{
	include_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/classes/general/captcha.php");
	$cpt = new CCaptcha();
	$captchaPass = COption::GetOptionString("main", "captcha_password", "");
	if (empty($captchaPass))
	{
		$captchaPass = randString(10);
		COption::SetOptionString("main", "captcha_password", $captchaPass);
	}
	$cpt->SetCodeCrypt($captchaPass);
	$arResult["CAPTCHA_CODE"] = htmlspecialcharsbx($cpt->GetCodeCrypt());
}
if (!empty($arNote)):
	$e = new CAdminException($arNote);
	$arResult["OK_MESSAGE"] = $e->GetString();
endif;
if (!empty($arError)):
	$e = new CAdminException($arError);
	$arResult["ERROR_MESSAGE"] = $e->GetString();
endif;
/********************************************************************
				/Data
********************************************************************/
unset($arQuestions);
unset($arChannel);
unset($arVote);
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:31,代码来源:component.php

示例3: CCaptcha

         if ($arParams["CACHE_TIME"] > 0) {
             $cache->EndDataCache(array("templateCachedData" => $this->GetTemplateCachedData(), "arResult" => $arResult));
         }
     }
     $arResult["MESSAGE"] = $tmp["MESSAGE"];
     $arResult["ERROR_MESSAGE"] = $tmp["ERROR_MESSAGE"];
     if ($arResult["use_captcha"]) {
         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["CaptchaCode"] = htmlspecialchars($cpt->GetCodeCrypt());
     }
 }
 if (is_array($arResult["CommentsResult"]) && count($arResult["CommentsResult"][0]) > $arParams["COMMENTS_COUNT"]) {
     $arResult["PAGE"] = $pagen;
     if ($arParams["USE_DESC_PAGING"] == "Y") {
         $v1 = floor(count($arResult["CommentsResult"][0]) / $arParams["COMMENTS_COUNT"]);
         $firstPageCount = count($arResult["CommentsResult"][0]) - ($v1 - 1) * $arParams["COMMENTS_COUNT"];
     } else {
         $v1 = ceil(count($arResult["CommentsResult"][0]) / $arParams["COMMENTS_COUNT"]);
         $firstPageCount = $arParams["COMMENTS_COUNT"];
     }
     $arResult["PAGE_COUNT"] = $v1;
     if ($arResult["PAGE"] > $arResult["PAGE_COUNT"]) {
         $arResult["PAGE"] = $arResult["PAGE_COUNT"];
     }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:component.php

示例4: CCaptcha

    	if (strlen($arResult["DATA"]["ATTACH_IMG"]) > 0)
    	{
    		$arResult["DATA"]["ATTACH_IMG_FILE"] = $arResult["MESSAGE"]["FILES"][$arResult["MESSAGE"]["ATTACH_IMG"]];
    		if ($arResult["DATA"]["ATTACH_IMG_FILE"])
    			$arResult["DATA"]["ATTACH_IMG"] = CFile::ShowImage($arResult["MESSAGE"]["ATTACH_IMG_FILE"], 200, 200, "border=0");
    	}*/
    /************** For custom component/*******************************/
}
if ($arResult["SHOW_PANEL"]["CAPTCHA"] == "Y") {
    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["DATA"]["CAPTCHA_CODE"] = $cpt->GetCodeCrypt();
}
//************* Paths **********************************************/
$arResult["URL"] = array("LIST" => CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_TOPIC_LIST"], array("FID" => $arParams["FID"], "TID" => $arParams["TID"], "UID" => $arParams["USER_ID"], "GID" => $arParams["SOCNET_GROUP_ID"])), "READ" => CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_MESSAGE"], array("FID" => $arParams["FID"], "TID" => $arParams["TID"], "UID" => $arParams["USER_ID"], "GID" => $arParams["SOCNET_GROUP_ID"], "MID" => intVal($arParams["MID"]) > 0 ? intVal($arParams["MID"]) : "s")));
/************** Submit *********************************************/
$arResult["SUBMIT"] = $arResult["INFO"]["SUBMIT"];
/********************************************************************
				/Data
********************************************************************/
foreach ($arResult["DATA"] as $key => $val) {
    $arResult["DATA"]["~" . $key] = $val;
    $arResult["DATA"][$key] = htmlspecialcharsEx($val);
}
$this->IncludeComponentTemplate();
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:component.php


注:本文中的CCaptcha::GetCodeCrypt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。