Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/rospirotorg.ru/bitrix/components/bitrix/landing.userconsent.selector/ |
Upload File : |
<?php if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) { die(); } use \Bitrix\Landing\Manager; use \Bitrix\Main\Loader; \CBitrixComponent::includeComponentClass('bitrix:landing.base'); class LandingUserConsentSelector extends LandingBaseComponent { /** * Preparing params array. * @return void */ protected function initParams() { $this->checkParam('ID', null); $this->checkParam('INPUT_NAME', 'AGREEMENT_ID'); $this->checkParam('ACTION_REQUEST_URL', $this->getPath() . '/ajax.php'); if (!Loader::includeModule('landing')) { return; } if (Manager::isB24()) { $baseUri = '/settings/configs/userconsent/'; $this->checkParam('PATH_TO_ADD', $baseUri . 'edit/0/'); $this->checkParam('PATH_TO_EDIT', $baseUri . 'edit/#id#/'); $this->checkParam( 'PATH_TO_CONSENT_LIST', $baseUri . 'consents/#id#/?AGREEMENT_ID=#id#&apply_filter=Y' ); } else { $baseUri = '/bitrix/admin/'; $this->checkParam('PATH_TO_ADD', $baseUri . 'agreement_edit.php?ID=0&lang=' . LANGUAGE_ID); $this->checkParam('PATH_TO_EDIT', $baseUri . 'agreement_edit.php?ID=#id#&lang=' . LANGUAGE_ID); $this->checkParam( 'PATH_TO_CONSENT_LIST', $baseUri . 'agreement_consents.php?AGREEMENT_ID=#id#&apply_filter=Y&lang=' . LANGUAGE_ID ); } } /** * Preparing result array. * @return void */ protected function prepareResult() { $this->arResult['CAN_EDIT'] = $GLOBALS['USER']->IsAdmin() || ( IsModuleInstalled('bitrix24') && $GLOBALS['USER']->CanDoOperation('bitrix24_config') ); } /** * Main executable method. * @return void */ public function executeComponent() { $this->initParams(); $this->prepareResult(); $this->includeComponentTemplate(); } }