Your IP : 3.136.23.84
<?php
\Bitrix\Main\Loader::includeModule('iblock');
\Bitrix\Main\Loader::includeModule('catalog');
\Bitrix\Main\Loader::includeModule('sale');
\Bitrix\Main\Loader::includeModule('rusklimat.exchange');
\Bitrix\Main\Loader::includeModule('rusklimat.b2b');
function order_interview_email(){
return true;
}
require_once($_SERVER["DOCUMENT_ROOT"] . '/local/lib/vendor/autoload.php');
include __DIR__ . "/kd/dis/include.php";
include($_SERVER["DOCUMENT_ROOT"].'/local/php_interface/BankController.php');
//include($_SERVER["DOCUMENT_ROOT"].'/local/php_interface/classes/crm_provider.php');
include_once(__DIR__.'/include/constants.php');
include_once(__DIR__.'/include/functions.php');
include_once(__DIR__.'/include/settings.php');
include_once(__DIR__.'/include/events.php');
include_once(__DIR__.'/include/agents.php');
include_once(__DIR__.'/.rk.config.php');
spl_autoload_register(function($class){
$path = __DIR__.'/../classes/'.strtr($class, array('\\' => '/')).'.php';
if(!file_exists($path)){
return;
}
/** @noinspection PhpIncludeInspection */
require_once($path);
});
// редирект с верхнего регистра на нижний #46152
// в htaccess не получилось, т.к. надо добавить настройки Апача
if (
$_SERVER['REQUEST_URI'] != strtolower( $_SERVER['REQUEST_URI']) &&
strpos($_SERVER['REQUEST_URI'], "bitrix") === false &&
strpos($_SERVER['REQUEST_URI'], "?") === false &&
strpos($_SERVER['REQUEST_URI'], ".") === false
) {
$http_host_without_port = $_SERVER['HTTP_HOST'];
if(strpos($http_host_without_port, ":") !== false)
$http_host_without_port = explode(":", $http_host_without_port)[0];
header('Location: '.$_SERVER['REQUEST_SCHEME'].'://'.$http_host_without_port . strtolower($_SERVER['REQUEST_URI']), true, 301);
exit();
}
if (!function_exists('GetUserField'))
{
function GetUserField($entity_id, $value_id, $uf_id) //считывание значения
{
$arUF = $GLOBALS["USER_FIELD_MANAGER"]->GetUserFields($entity_id, $value_id);
return $arUF[$uf_id]["VALUE"];
}
}
function getOnlinePayByGeo($cityId = 0)
{
$result = [];
if(!empty($cityId))
{
$ob = CIBlockElement::GetList(
Array(),
Array(
"IBLOCK_ID" => 123,
"ACTIVE" => "Y",
"PROPERTY_KUST_CITY_ID" => $cityId
),
false,
false,
Array(
'NAME',
'PROPERTY_kust_city_id',
'PROPERTY_login',
'PROPERTY_password',
'PROPERTY_bank_url',
'PROPERTY_money'
)
)->GetNextElement();
if(!empty($ob))
{
$arFields = $ob->GetFields();
$result['city_name'] = $arFields['NAME'];
$result['city_id'] = $arFields['PROPERTY_KUST_CITY_ID_VALUE'];
$result['login'] = $arFields['PROPERTY_LOGIN_VALUE'];
$result['password'] = $arFields['PROPERTY_PASSWORD_VALUE'];
$result['url'] = $arFields['PROPERTY_BANK_URL_VALUE'];
$result['money'] = $arFields['PROPERTY_MONEY_VALUE'];
}
}
return $result;
}
function IsBigSize($items)
{
$is_big_size = false;
if(!empty($items))
{
$res = CIBlockElement::GetList(
Array(),
[
"IBLOCK_ID" => COption::GetOptionInt( "rusklimat.exchange", 'RK_EXCHANGE_CATALOG_IBLOCK_ID'),
"ACTIVE" => "Y",
"ID" => $items
],
false,
false,
[
"ID", "NAME", "PROPERTY_IS_BIG_SIZE"
]
);
while($ob = $res->GetNextElement())
{
$arFields = $ob->GetFields();
$is_big_size = $is_big_size || $arFields['PROPERTY_IS_BIG_SIZE_VALUE'];
if($is_big_size)
break;
}
}
return $is_big_size;
}
if(!function_exists('pre'))
{
function pre($value, $die = false, $bHtml = false)
{
if(is_bool($value))
$value = 'bool: '.($value == true ? 'true' : 'false');
$sReturn = print_r($value, true);
$debug_backtrace = debug_backtrace();
if (defined("STDIN")) /* php-cli */
{
//echo "\r\n==========\r\n".$sReturn."\r\n==========\r\n";
if (substr(ltrim($sReturn), 0, 1) === "*")
{
$pos = strpos($sReturn, "*");
echo "\r".str_repeat(" ", 40);
echo "\r".substr($sReturn, 0, $pos).substr($sReturn, $pos+1);
}
else
{
echo "\r\n".$sReturn;
}
ob_flush();
}
else
{
if ($bHtml)
$sReturn = htmlspecialchars($sReturn);
echo "<pre data-source=\"".substr($debug_backtrace[1]["file"], strlen($_SERVER["DOCUMENT_ROOT"])).":".$debug_backtrace[1]["line"]."\" style=\"overflow:auto; color: #000; background-color: white; border: 1px solid #CCC; padding: 5px; font-size: 12px;\">".$sReturn."</pre>";
}
if($die)
{
ob_get_flush();
die();
}
}
}