%PDF- %PDF-
Server IP : 37.220.80.31 / Your IP : 3.133.154.2 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/components/bitrix/landing.cookies/ |
Upload File : |
<?php if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) { die(); } use \Bitrix\Landing\Site\Cookies; \CBitrixComponent::includeComponentClass('bitrix:landing.base'); class LandingCookiesComponent extends LandingBaseComponent { /** * Returns landing site id. * @return int */ protected function getLandingSiteId(): int { if (is_callable(['LandingPubComponent', 'getMainInstance'])) { $instance = LandingPubComponent::getMainInstance(); return $instance['SITE_ID']; } return 0; } /** * Base executable method. * @return void */ public function executeComponent(): void { $init = $this->init(); $this->checkParam('SITE_ID', $this->getLandingSiteId()); $this->checkParam('AGREEMENT_ID', 0); $this->checkParam('INFORMATION', 'N'); $this->checkParam('USE', ''); $this->checkParam('COLOR_BG', ''); $this->checkParam('COLOR_TEXT', ''); $this->checkParam('POSITION', ''); $this->arResult['AGREEMENTS_CUSTOM_CODES'] = []; $this->arResult['AGREEMENT'] = []; if ($init && $this->arParams['SITE_ID']) { $this->arResult['AGREEMENT'] = Cookies::getMainAgreement( $this->arParams['AGREEMENT_ID'] ); if (!$this->arResult['AGREEMENT']) { $init = false; } else { $availableAgreements = Cookies::getAgreements($this->arParams['SITE_ID']); $availableAgreements = array_filter($availableAgreements, function($item) { return $item['ACTIVE'] == 'Y'; }); $this->arResult['AVAILABLE_AGREEMENTS'] = array_keys($availableAgreements); if (!$this->arResult['AVAILABLE_AGREEMENTS']) { $this->arParams['USE'] = 'N'; } } } if (!$init) { $this->arParams['USE'] = 'N'; } parent::executeComponent(); } }