/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/catalog/index.php
<?
if (isset($_REQUEST['page'])) {
$_GET['PAGEN_1'] = $_REQUEST['page'];
}
if (isset($_REQUEST['showall'])) {
$_GET['SHOWALL_1'] = $_REQUEST['showall'];
}
require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/header.php");
$APPLICATION->SetPageProperty("keywords", "");
if ($APPLICATION->GetCurDir() == "/catalog/") {
$APPLICATION->SetPageProperty("description",
"Каталог облачных решений 1С для малого бизнеса – аренда программного обеспечения в облаке через Интернет для бизнеса");
}
$APPLICATION->SetPageProperty("title",
"Облачные сервисы для малого бизнеса в Москве – облачные решения 1С для бизнеса");
$APPLICATION->SetTitle("Каталог решений");
?>
<?
define('CATALOG_SECTION_TOP_ITEM_TITLE_LENGTH', 27); // блок TOP на странице отрасли: длина заголовка
define('CATALOG_SECTION_TOP_ITEM_TEXT_LENGTH', 70); // блок TOP на странице отрасли: длина описания
define('CATALOG_SECTION_ITEM_TEXT_LENGTH', 100); // основной блок продуктов на странице отрасли: длина описания
define('CATALOG_ELEMENT_BANNER_TEXT_LENGTH', 150); // баннер: длина описания
//TODO перенести конфиг в init.php или сделать отдельный конфиг файл
define('CATALOG_ITEM_TYPES_PROPERTY_ID', 114);
define('CATALOG_ITEM_TYPES_1BIT', 97);
define('CATALOG_ITEM_TYPES_1C', 98);
define('CATALOG_ITEM_TYPES_ANY', 99);
define('CATALOG_ITEM_TYPES_SERVICES', 106);
define('CATALOG_ITEM_TYPES', [
CATALOG_ITEM_TYPES_1BIT => 'Решения Первый Бит',
CATALOG_ITEM_TYPES_1C => 'Решения 1С',
CATALOG_ITEM_TYPES_ANY => 'Для любого бизнеса',
CATALOG_ITEM_TYPES_SERVICES => 'Сервисы 1С',
0 => 'Все решения'
]);
Arguments
"/home/bitrix/www/bitrix/header.php"