<? 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"); ?>
); } } 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);
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"]; }
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();