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.domain_rename/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

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

use \Bitrix\Landing\Manager;

\CBitrixComponent::includeComponentClass('bitrix:landing.site_edit');

class LandingDomainRenameComponent extends LandingSiteEditComponent
{
	/**
	 * Returns postfix for domain.
	 * @return string
	 */
	protected function getPostFix()
	{
		$zone = Manager::getZone();
		$postfix = '.bitrix24.site';

		if ($this->arParams['TYPE'] == 'STORE')
		{
			$postfix = ($zone == 'by')
				? '.bitrix24shop.by'
				: '.bitrix24.shop';
		}
		else if ($zone == 'by')
		{
			$postfix = '.bitrix24site.by';
		}
		else if ($zone == 'ua')
		{
			$postfix = '.bitrix24site.ua';
		}

		return $postfix;
	}

	/**
	 * Base executable method.
	 * @return void
	 */
	public function executeComponent()
	{
		$init = $this->init();

		if ($init)
		{
			// params
			$this->checkParam('TYPE', '');
			$this->checkParam('FIELD_NAME', 'DOMAIN_ID');
			$this->checkParam('FIELD_ID', 'domain_id');
			$this->checkParam('DOMAIN_NAME', '');
			$this->checkParam('DOMAIN_ID', 0);
			$this->arResult['POSTFIX'] = $this->getPostFix();
			$puny = new \CBXPunycode;

			// template data
			$this->arResult['IP_FOR_DNS'] = $this->getIpForDNS();
			$this->arResult['DOMAINS'] = $this->getDomains();

			// domain name
			if ($this->arParams['DOMAIN_NAME'])
			{
				$this->arResult['DOMAIN_NAME'] = $this->arParams['DOMAIN_NAME'];
			}
			else
			{
				$this->arResult['DOMAIN_NAME'] = isset($this->arResult['DOMAINS'][$this->arParams['DOMAIN_ID']]['DOMAIN'])
					? $this->arResult['DOMAINS'][$this->arParams['DOMAIN_ID']]['DOMAIN']
					: '';
			}
			$this->arResult['DOMAIN_NAME_ORIGINAL'] = $this->arResult['DOMAIN_NAME'];
			$this->arResult['DOMAIN_NAME'] = $puny->decode($this->arResult['DOMAIN_NAME']);
		}

		parent::executeComponent();
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit