/home/bitrix/www/local/components/firstbit/regions.list/class.php
/**
* подготавливает входные параметры
* @param array $arParams
* @return array
*/
public function onPrepareComponentParams($params)
{
$result = array(
'CACHE_TIME' => intval($params['CACHE_TIME']) > 0 ? intval($params['CACHE_TIME']) : 86400,
);
return $result;
}
protected function getUserCity(){
$cookieRegion=unserialize($this->request->getCookie("DomainInfo"));
if(empty($cookieRegion)) {
$ipAddress = GeoIp\Manager::getRealIp();
$geoIpData = \Bitrix\Main\Service\GeoIp\Manager::getDataResult($ipAddress, LANGUAGE_ID);
$cityName = $geoIpData->getGeoData()->cityName;
if (empty($cityName)) {
$cityName = 'Москва';
}
}else{
$cityName=$cookieRegion['UF_NAME'];
}
return $cityName;
}
protected function setUserCity(){
if(!empty($this->request->get('setCity'))){
$cityName=$this->request->get('setCity');
}else {
$cityName = $this->getUserCity();
}
foreach ($this->arResult['REGIONS'] as $region){
if ($region['UF_NAME']==$cityName){
$curCity=$region;
Arguments
"Call to a member function getGeoData() on null"
/home/bitrix/www/local/components/firstbit/regions.list/class.php
$ipAddress = GeoIp\Manager::getRealIp();
$geoIpData = \Bitrix\Main\Service\GeoIp\Manager::getDataResult($ipAddress, LANGUAGE_ID);
$cityName = $geoIpData->getGeoData()->cityName;
if (empty($cityName)) {
$cityName = 'Москва';
}
}else{
$cityName=$cookieRegion['UF_NAME'];
}
return $cityName;
}
protected function setUserCity(){
if(!empty($this->request->get('setCity'))){
$cityName=$this->request->get('setCity');
}else {
$cityName = $this->getUserCity();
}
foreach ($this->arResult['REGIONS'] as $region){
if ($region['UF_NAME']==$cityName){
$curCity=$region;
}
if ($region['UF_MAIN']=='Y'){
$mainDomain=$region;
}
}
if(empty($curCity)){
$curCity=$mainDomain;
}
$cookie = new \Bitrix\Main\Web\Cookie("DomainInfo", serialize($curCity), time()+86400*30);
$this->arResult["CURRENT_REGION"]=$curCity;
$GLOBALS["CURRENT_CITY"] = $curCity;
$this->context->getResponse()->addCookie($cookie);
if ($this->arParams['AJAX'] == 'Y')
$this->context->getResponse()->flush( "" );
/home/bitrix/www/local/components/firstbit/regions.list/class.php
protected function getResult()
{
$this->arResult['REGIONS'] = $this->getRegionsList();
$this->arResult['SORTED_REGIONS'] = $this->sortRegions($this->arResult['REGIONS']);
}
/**
* выполняет логику работы компонента
*/
public function executeComponent()
{
global $APPLICATION;
$this->checkModules();
$this->setContext();
if ($this->arParams['AJAX'] == 'Y')
$APPLICATION->RestartBuffer();
$this->getResult();
$this->setUserCity();
$this->includeComponentTemplate();
if ($this->arParams['AJAX'] == 'Y')
die();
return $this->returned;
}
}
?>
/home/bitrix/www/bitrix/modules/main/classes/general/component.php
$keysToExport = $component->listKeysSignedParameters();
if($keysToExport)
{
$component->storeSignedParameters(array_intersect_key($arParams, array_combine($keysToExport, $keysToExport)));
}
$component->arParams = $component->onPrepareComponentParams($arParams);
$component->__prepareComponentParams($component->arParams);
$componentFrame = new \Bitrix\Main\Composite\Internals\AutomaticArea($component);
$componentFrame->start();
if($returnResult)
{
$component->executeComponent();
$result = $component->arResult;
}
else
{
$result = $component->executeComponent();
}
$this->__arIncludeAreaIcons = $component->__arIncludeAreaIcons;
$frameMode = $component->getFrameMode();
$componentFrame->end();
}
else
{
$this->includeComponentLang();
$this->__prepareComponentParams($arParams);
$this->arParams = $arParams;
$componentFrame = new \Bitrix\Main\Composite\Internals\AutomaticArea($this);
$componentFrame->start();
if($returnResult)
{
$this->__IncludeComponent();
$result = $this->arResult;
/home/bitrix/www/bitrix/modules/main/classes/general/main.php
$bDrawIcons = ((!isset($arFunctionParams["HIDE_ICONS"]) || $arFunctionParams["HIDE_ICONS"] <> "Y") && $APPLICATION->GetShowIncludeAreas());
if($bDrawIcons)
echo $this->IncludeStringBefore();
$result = null;
$bComponentEnabled = (!isset($arFunctionParams["ACTIVE_COMPONENT"]) || $arFunctionParams["ACTIVE_COMPONENT"] <> "N");
$component = new CBitrixComponent();
if($component->InitComponent($componentName))
{
$obAjax = null;
if($bComponentEnabled)
{
if(($arParams['AJAX_MODE'] ?? '') == 'Y')
$obAjax = new CComponentAjax($componentName, $componentTemplate, $arParams, $parentComponent);
$this->__componentStack[] = $component;
$result = $component->IncludeComponent($componentTemplate, $arParams, $parentComponent, $returnResult);
array_pop($this->__componentStack);
}
if($bDrawIcons)
{
$panel = new CComponentPanel($component, $componentName, $componentTemplate, $parentComponent, $bComponentEnabled);
$arIcons = $panel->GetIcons();
echo $s = $this->IncludeStringAfter($arIcons["icons"], $arIcons["parameters"]);
}
if($bComponentEnabled && $obAjax)
{
$obAjax->Process();
}
}
if($bShowDebug)
echo $debug->Output($componentName, "/bitrix/components".$componentRelativePath."/component.php", ($arParams["CACHE_TYPE"] ?? '') . ($arParams["MENU_CACHE_TYPE"] ?? ''));
Arguments
""
array:1 [
"CACHE_TYPE" => "A"
]
null
false
/home/bitrix/www/local/templates/1bitcloud/header.php
} elseif (SITE_ID == 's2') {
$poopupPath = '/en/';
}
?>
<?/*<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-TDJPLZP"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->*/?>
<div class="site">
<div class="top_header">
<div class="top_header_wr">
<div class="top_header_col1">
<div class="logo-1bit"><img
src="<?=SITE_TEMPLATE_PATH ?>/images/logo-1bit.svg" alt="Первый Бит"></div>
</div>
<div class="top_header_col2">
<? $APPLICATION->IncludeComponent(
"firstbit:regions.list",
'',
array()
);?>
</div>
</div>
</div>
<div class="header
<?php
if (($APPLICATION->GetCurDir() == "/it-autsorsing/")||($APPLICATION->GetCurDir() == "/it-autsorsing/pc-service/")||($APPLICATION->GetCurDir() == "/it-autsorsing/obsluzhivanie-serverov/")||($APPLICATION->GetCurDir() == "/it-autsorsing/obsluzhivanie-orgtekhniki/")||($APPLICATION->GetCurDir() == "/it-autsorsing/migraciya-it/")||($APPLICATION->GetCurDir() == "/it-autsorsing/obsluzhivanie-servera-1c/")) {echo 'it';}
?>
">
<div class="header__bg">
<div class="header_wr">
<a class="logo" href="/"></a>
<? $APPLICATION->IncludeComponent(
"bitrix:search.form",
"custom",
Array(
"USE_SUGGEST" => "N",
Arguments
"firstbit:regions.list"
""
[]
/home/bitrix/www/bitrix/modules/main/include/prolog_after.php
elseif (($siteClosed = getLocalPath("php_interface/include/site_closed.php", BX_PERSONAL_ROOT)) !== false)
{
include($_SERVER["DOCUMENT_ROOT"] . $siteClosed);
}
else
{
include($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/site_closed.php");
}
die();
}
$sPreviewFile = $_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/tmp/templates/__bx_preview/header.php";
if (defined("SITE_TEMPLATE_PREVIEW_MODE") && file_exists($sPreviewFile))
{
include_once($sPreviewFile);
}
else
{
\Bitrix\Main\Page\Asset::getInstance()->startTarget('TEMPLATE');
include_once($_SERVER["DOCUMENT_ROOT"] . SITE_TEMPLATE_PATH . "/header.php");
\Bitrix\Main\Page\Asset::getInstance()->startTarget('PAGE');
}
/* Draw edit menu for whole content */
global $BX_GLOBAL_AREA_EDIT_ICON;
$BX_GLOBAL_AREA_EDIT_ICON = false;
if ($APPLICATION->GetShowIncludeAreas())
{
$aUserOpt = CUserOptions::GetOption("global", "settings", []);
if ($aUserOpt["page_edit_control_enable"] != "N")
{
$documentRoot = CSite::GetSiteDocRoot(SITE_ID);
if (isset($_SERVER["REAL_FILE_PATH"]) && $_SERVER["REAL_FILE_PATH"] != "")
{
$currentFilePath = $_SERVER["REAL_FILE_PATH"];
}
else
{
$currentFilePath = $APPLICATION->GetCurPage(true);
Arguments
"/home/bitrix/www/local/templates/1bitcloud/header.php"
/home/bitrix/www/bitrix/modules/main/include/prolog.php
<?php
require_once(__DIR__ . "/../bx_root.php");
if (file_exists($_SERVER["DOCUMENT_ROOT"].BX_PERSONAL_ROOT."/html_pages/.enabled"))
{
require_once(__DIR__ . "/../lib/composite/responder.php");
Bitrix\Main\Composite\Responder::respond();
}
require_once(__DIR__ . "/prolog_before.php");
require($_SERVER["DOCUMENT_ROOT"].BX_ROOT."/modules/main/include/prolog_after.php");
Arguments
"/home/bitrix/www/bitrix/modules/main/include/prolog_after.php"
/home/bitrix/www/bitrix/header.php
<?require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog.php");?>
Arguments
"/home/bitrix/www/bitrix/modules/main/include/prolog.php"
/home/bitrix/www/blog/index.php
<?
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php");
$APPLICATION->SetTitle("Блог");
$APPLICATION->SetPageProperty("description", "Блог сайта 1bitcloud.ru: полезные советы и подробные инструкции по работе с 1С в облаке.");
?><?$APPLICATION->IncludeComponent(
"bitrix:news",
"blog",
Array(
"ADD_ELEMENT_CHAIN" => "Y",
"ADD_SECTIONS_CHAIN" => "N",
"AJAX_MODE" => "N",
"AJAX_OPTION_ADDITIONAL" => "",
"AJAX_OPTION_HISTORY" => "N",
"AJAX_OPTION_JUMP" => "N",
"AJAX_OPTION_STYLE" => "Y",
"ALSO_ITEMS_POSITION" => "side",
"BLOG_TITLE" => "Комментарии",
"BROWSER_TITLE" => "-",
"CACHE_FILTER" => "Y",
"CACHE_GROUPS" => "N",
"CACHE_TIME" => "100000",
"CACHE_TYPE" => "A",
"CHECK_DATES" => "Y",
"COLOR_NEW" => "3E74E6",
"COLOR_OLD" => "C0C0C0",
"COMMENTS_COUNT" => "10",
"COMPOSITE_FRAME_MODE" => "A",
"COMPOSITE_FRAME_TYPE" => "AUTO",
"DETAIL_ACTIVE_DATE_FORMAT" => "j F Y G:i",
"DETAIL_BLOG_EMAIL_NOTIFY" => "Y",
"DETAIL_BLOG_URL" => "catalog_comments",
"DETAIL_BLOG_USE" => "Y",
"DETAIL_DISPLAY_BOTTOM_PAGER" => "Y",
"DETAIL_DISPLAY_TOP_PAGER" => "N",
"DETAIL_FB_APP_ID" => "",
"DETAIL_FB_USE" => "Y",
"DETAIL_FIELD_CODE" => array("TAGS","PREVIEW_TEXT","DETAIL_TEXT","DETAIL_PICTURE","DATE_ACTIVE_FROM","SHOW_COUNTER",""),
"DETAIL_PAGER_SHOW_ALL" => "Y",
"DETAIL_PAGER_TEMPLATE" => "",
Arguments
"/home/bitrix/www/bitrix/header.php"
/home/bitrix/www/bitrix/modules/main/include/urlrewrite.php
if (($urlTmp7 == "upload/" || ($urlTmp7 == "bitrix/" && mb_substr($urlTmp, 0, 16) != "bitrix/services/" && mb_substr($urlTmp, 0, 18) != "bitrix/groupdavphp")))
continue;
$ext = strtolower(GetFileExtension($url));
if ($ext != "php")
continue;
// D7 response is not available here
if(stristr(php_sapi_name(), "cgi") !== false && (!defined("BX_HTTP_STATUS") || BX_HTTP_STATUS == false))
{
header("Status: 200 OK");
}
else
{
header($_SERVER["SERVER_PROTOCOL"]." 200 OK");
}
$_SERVER["REAL_FILE_PATH"] = $url;
include_once($io->GetPhysicalName($_SERVER['DOCUMENT_ROOT'].$url));
die();
}
}
}
//admin section 404
if(mb_strpos($requestUri, "/bitrix/admin/") === 0)
{
$_SERVER["REAL_FILE_PATH"] = "/bitrix/admin/404.php";
include($_SERVER["DOCUMENT_ROOT"]."/bitrix/admin/404.php");
die();
}
define("BX_CHECK_SHORT_URI", true);
Arguments
"/home/bitrix/www/blog/index.php"
/home/bitrix/www/bitrix/urlrewrite.php
<?
include_once($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/urlrewrite.php');
if(file_exists($_SERVER['DOCUMENT_ROOT'].'/404.php'))
include_once($_SERVER['DOCUMENT_ROOT'].'/404.php');
?>
Arguments
"/home/bitrix/www/bitrix/modules/main/include/urlrewrite.php"