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/modules/ui/lib/Helpdesk/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/ui/lib/Helpdesk/Domain.php
<?php

namespace Bitrix\UI\Helpdesk;

use Bitrix\Main;

class Domain
{
	private const HELPDESK_DOMAIN = [
		'en' => 'https://helpdesk.bitrix24.com',
		'br' => 'https://helpdesk.bitrix24.com.br',
		'de' => 'https://helpdesk.bitrix24.de',
		'es' => 'https://helpdesk.bitrix24.es',
		'fr' => 'https://helpdesk.bitrix24.fr',
		'it' => 'https://helpdesk.bitrix24.it',
		'pl' => 'https://helpdesk.bitrix24.pl',
		'ru' => 'https://helpdesk.bitrix24.ru',
	];

	public function __construct(private bool $useLicenseRegion = false)
	{
	}

	public function get(): string
	{
		return $this->useLicenseRegion ? $this->getByLicense() : $this->getByInterfaceLanguage();
	}

	public function getList(): array
	{
		return array_values(static::HELPDESK_DOMAIN);
	}

	public function isLicenseRegionUsed(): bool
	{
		return $this->useLicenseRegion;
	}

	private function getByInterfaceLanguage(): string
	{
		return $this->getByLanguageCode(LANGUAGE_ID);
	}

	private function getByLicense(): string
	{
		$lang = Main\Application::getInstance()->getLicense()->getRegion();

		return $this->getByLanguageCode($lang);
	}

	private function getByLanguageCode(string $languageCode): string
	{
		return match ($languageCode)
		{
			'ru', 'by', 'kz' => static::HELPDESK_DOMAIN['ru'],
			'de' => static::HELPDESK_DOMAIN['de'],
			'br' => static::HELPDESK_DOMAIN['br'],
			'fr' => static::HELPDESK_DOMAIN['fr'],
			'la' => static::HELPDESK_DOMAIN['es'],
			'pl' => static::HELPDESK_DOMAIN['pl'],
			'it' => static::HELPDESK_DOMAIN['it'],
			default => static::HELPDESK_DOMAIN['en'],
		};
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit