%PDF- %PDF- 403WebShell
403Webshell
Server IP : 37.220.80.31  /  Your IP : 3.136.20.252
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64
User : www-root ( 1010)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/www-root/data/www/dev.artlot24.ru/bitrix/modules/sender/lib/access/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/modules/sender/lib/access//sectiondictionary.php
<?php
namespace Bitrix\Sender\Access;

use Bitrix\Main\Localization\Loc;
use Bitrix\Sender\Access\Permission\PermissionDictionary;
use Bitrix\Sender\Integration\Seo\Ads\MessageBase;
use Bitrix\Sender\Security\Role\Permission;

Loc::loadMessages(__FILE__);
class SectionDictionary
{
	const MAILING   = 1;
	const ADS       = 2;
	const SEGMENT   = 3;
	const RC        = 4;
	const TEMPLATE  = 5;
	const BLACKLIST = 6;
	const START     = 7;
	const SETTINGS  = 8;

	public static function getMap()
	{
		return [
			self::MAILING   => [
				PermissionDictionary::MAILING_VIEW,
				PermissionDictionary::MAILING_EMAIL_EDIT,
				PermissionDictionary::MAILING_MESSENGER_EDIT,
				PermissionDictionary::MAILING_AUDIO_CALL_EDIT,
				PermissionDictionary::MAILING_INFO_CALL_EDIT,
				PermissionDictionary::MAILING_PAUSE_START_STOP,
				PermissionDictionary::MAILING_CLIENT_VIEW,
			],
			self::ADS       => [
				PermissionDictionary::ADS_VIEW,
				PermissionDictionary::ADS_YANDEX_EDIT,
				PermissionDictionary::ADS_GOOGLE_EDIT,
				PermissionDictionary::ADS_VK_EDIT,
				PermissionDictionary::ADS_FB_INSTAGRAM_EDIT,
				PermissionDictionary::ADS_LOOK_ALIKE_VK_EDIT,
				PermissionDictionary::ADS_LOOK_ALIKE_FB_EDIT,
				PermissionDictionary::ADS_PAUSE_START_STOP,
				PermissionDictionary::ADS_CLIENT_VIEW,
				PermissionDictionary::ADS_MARKETING_FB_EDIT,
				PermissionDictionary::ADS_MARKETING_INSTAGRAM_EDIT,
			],
			self::SEGMENT   => [
				PermissionDictionary::SEGMENT_EDIT,
				PermissionDictionary::SEGMENT_VIEW,
				PermissionDictionary::SEGMENT_CLIENT_EDIT,
				PermissionDictionary::SEGMENT_CLIENT_VIEW,
				PermissionDictionary::SEGMENT_LEAD_EDIT,
				PermissionDictionary::SEGMENT_CLIENT_PERSONAL_EDIT,
				PermissionDictionary::SEGMENT_CLIENT_OWN_CATEGORY,
			],
			self::RC        => [
				PermissionDictionary::RC_EDIT,
				PermissionDictionary::RC_PAUSE_START_STOP,
				PermissionDictionary::RC_VIEW,
			],
			self::TEMPLATE  => [
				PermissionDictionary::TEMPLATE_EDIT,
				PermissionDictionary::TEMPLATE_VIEW,
			],
			self::BLACKLIST => [
				PermissionDictionary::BLACKLIST_EDIT,
				PermissionDictionary::BLACKLIST_VIEW,
			],
			self::START     => [
				PermissionDictionary::START_VIEW,
			],
			self::SETTINGS  => [
				PermissionDictionary::SETTINGS_EDIT,
//				PermissionDictionary::SETTINGS_VIEW,
			],
		];
	}

	public static function getAdsAccessMap()
	{
		return [
			PermissionDictionary::ADS_YANDEX_EDIT => MessageBase::CODE_ADS_YA,
			PermissionDictionary::ADS_VK_EDIT => MessageBase::CODE_ADS_VK,
			PermissionDictionary::ADS_LOOK_ALIKE_VK_EDIT => MessageBase::CODE_ADS_LOOKALIKE_VK,
		];
	}
	public static function getLegacyMap()
	{
		return [
			self::MAILING   => Permission::ENTITY_LETTER,
			self::ADS       => Permission::ENTITY_AD,
			self::SEGMENT   => Permission::ENTITY_SEGMENT,
			self::RC        => Permission::ENTITY_RC,
			self::TEMPLATE  => Permission::ENTITY_SEGMENT,
			self::BLACKLIST => Permission::ENTITY_BLACKLIST,
			self::START     => Permission::ENTITY_LETTER,
			self::SETTINGS  => Permission::ENTITY_SETTINGS,
		];
	}
	protected static function getClassName()
	{
		return __CLASS__;
	}

	public static function getList(): array
	{
		$class = new \ReflectionClass(__CLASS__);
		return array_flip($class->getConstants());
	}

	public static function getTitle(int $value)
	{
		$sectionsList = self::getList();

		if (!array_key_exists($value, $sectionsList))
		{
			return '';
		}
		$title = $sectionsList[$value];

		return Loc::getMessage("SENDER_CONFIG_SECTIONS_".$title) ?? '';
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit