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/esol.importxml/lib/vendors/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/esol.importxml/lib/vendors/gifts.ru.php
<?php
namespace IX;

class Giftsru {
	public static function GetProductName($val)
	{
		return trim(preg_replace('/,[^,]*$/', '', $val));
	}
	
	public static function RemoveLinks($val)
	{
		return preg_replace('/<\/?a(>|\s[^>]*>)/', '', $val);
	}
	
	public static function SetFilters($obj, $url)
	{
		if(!isset($obj->stepparams['cstm_filters']))
		{
			$ob = new \Bitrix\Main\Web\HttpClient(array('disableSslVerification'=>true));
			$res = $ob->get($url);
			$xml = simplexml_load_string($res);
			$json = json_encode($xml);
			$arData = json_decode($json,TRUE);

			$arTypes = array();
			$arTypeVals = array();
			if(is_array($arData['filtertypes']['filtertype']))
			{
				foreach($arData['filtertypes']['filtertype'] as $arType)
				{
					$arTypes[$arType['filtertypeid']] = $arType['filtertypename'];
					$arTypeVals[$arType['filtertypeid']] = array();
					if(is_array($arType['filters']['filter']))
					{
						if(!array_key_exists('0', $arType['filters']['filter'])) $arType['filters']['filter'] = array($arType['filters']['filter']);
						foreach($arType['filters']['filter'] as $arTypeVal)
						{
							$arTypeVals[$arType['filtertypeid']][$arTypeVal['filterid']] = $arTypeVal['filtername'];
						}
					}
				}
			}
			$obj->stepparams['cstm_filters'] = array(
				'types' => $arTypes,
				'typevals' => $arTypeVals
			);
		}
	}
	
	public static function GetFilterNames($obj, $url, $val)
	{
		self::SetFilters($obj, $url);
		$arTypes = $obj->stepparams['cstm_filters']['types'];
		$arTypeVals = $obj->stepparams['cstm_filters']['typevals'];
		if(isset($arTypes[$val])){$val = $arTypes[$val];}else{$val = '';}
		return $val;
	}
	
	public static function GetFilterVals($obj, $url, $val, $filtertypeid)
	{
		self::SetFilters($obj, $url);
		$arTypes = $obj->stepparams['cstm_filters']['types'];
		$arTypeVals = $obj->stepparams['cstm_filters']['typevals'];
		if(isset($arTypeVals[$filtertypeid][$val])){$val = $arTypeVals[$filtertypeid][$val];}else{$val = '';}
		return $val;
	}
}
?>

Youez - 2016 - github.com/yon3zu
LinuXploit