%PDF- %PDF- 403WebShell
403Webshell
Server IP : 37.220.80.31  /  Your IP : 3.147.86.6
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/catalog/load/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/modules/catalog/load/ebay_mip_run.php
<?
use \Bitrix\Main\SystemException;

//<title>Ebay</title>

IncludeModuleLangFile($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/catalog/export_yandex.php');
set_time_limit(0);

global $USER;

$bTmpUserCreated = false;

if (!CCatalog::IsUserExists())
{
	$bTmpUserCreated = true;

	if (isset($USER))
		$USER_TMP = $USER;
	$USER = new CUser();
}

CCatalogDiscountSave::Disable();

$arRunErrors = array();

$IBLOCK_ID = (int)$IBLOCK_ID;

if ($XML_DATA && CheckSerializedData($XML_DATA))
{
	$XML_DATA = unserialize(stripslashes($XML_DATA), ['allowed_classes' => false]);

	if (!is_array($XML_DATA))
		$XML_DATA = array();
}

if (!empty($XML_DATA['PRICE']))
{
	if ((int)$XML_DATA['PRICE'] > 0)
	{
		$rsCatalogGroups = CCatalogGroup::GetGroupsList(array('CATALOG_GROUP_ID' => $XML_DATA['PRICE'],'GROUP_ID' => 2));

		if (!($arCatalogGroup = $rsCatalogGroups->Fetch()))
			$arRunErrors[] = GetMessage('EBAY_ERR_BAD_PRICE_TYPE');
	}
	else
	{
		$arRunErrors[] = GetMessage('EBAY_ERR_BAD_PRICE_TYPE');
	}
}

if ($SETUP_FILE_NAME == '')
	$arRunErrors[] = GetMessage("CATI_NO_SAVE_FILE");
elseif (preg_match(BX_CATALOG_FILENAME_REG,$SETUP_FILE_NAME))
	$arRunErrors[] = GetMessage("CES_ERROR_BAD_EXPORT_FILENAME");
else
	$SETUP_FILE_NAME = Rel2Abs("/", $SETUP_FILE_NAME);

if (empty($arRunErrors))
{
	CheckDirPath($_SERVER["DOCUMENT_ROOT"].$SETUP_FILE_NAME);

	if (!$fp = @fopen($_SERVER["DOCUMENT_ROOT"].$SETUP_FILE_NAME, "wb"))
	{
		$arRunErrors[] = str_replace('#FILE#', $_SERVER["DOCUMENT_ROOT"].$SETUP_FILE_NAME, GetMessage('EBAY_ERR_FILE_OPEN_WRITING'));
	}
	else
	{
		if (!@fwrite($fp, '<?xml version="1.0" encoding="utf-8"?>'))
		{
			$arRunErrors[] = str_replace('#FILE#', $_SERVER["DOCUMENT_ROOT"].$SETUP_FILE_NAME, GetMessage('EBAY_ERR_SETUP_FILE_WRITE'));
			@fclose($fp);
		}
		else
		{
			@fwrite($fp, "\n<ListingArray>\n");
		}
	}
}

if (empty($arRunErrors))
{
	try
	{
		$offers = \Bitrix\Catalog\Ebay\ExportOfferCreator::getOfferObject(
			array(
				"IBLOCK_ID" => $IBLOCK_ID,
				"PRODUCT_GROUPS" => $V,
				"XML_DATA" => $XML_DATA,
				"SETUP_SERVER_NAME" => $SETUP_SERVER_NAME
			)
		);
	}
	catch(SystemException $e)
	{
		$arRunErrors[] = $e->getMessage();
	}

	foreach($offers as $offerId => $offer)
	{
		$strXmlProduct = "\t<Listing>\n";
		$strXmlProduct .= "\t\t<Product>\n";
		$strXmlProduct .= "\t\t\t<SKU>".$offer["PROPERTIES"]["ARTNUMBER"]["VALUE"]."</SKU>\n";
		$strXmlProduct .= "\t\t\t<ProductInformation>\n";
		$strXmlProduct .= "\t\t\t\t<Title>".$offer["NAME"]."</Title>\n";
		$strXmlProduct .= "\t\t\t\t<Description>\n";
		$strXmlProduct .= "\t\t\t\t\t<ProductDescription><![CDATA[".$offer["DESCRIPTION"]."!]]</ProductDescription>\n";
		$strXmlProduct .= "\t\t\t\t</Description>\n";
		$strXmlProduct .= "\t\t\t\t<PictureUrls>\n";
		$strXmlProduct .= "\t\t\t\t<PictureUrl>".($offer["DETAIL_PICTURE"] <> '' ? $offer["DETAIL_PICTURE"] : $offer["PREVIEW_PICTURE"] )."</PictureUrl>\n";
		$strXmlProduct .= "\t\t\t\t\t</PictureUrls>\n";
		$strXmlProduct .= "\t\t\t\t<Categories>\n";
		$strXmlProduct .= "\t\t\t\t<Category>".($offer["DETAIL_PICTURE"] <> '' ? $offer["DETAIL_PICTURE"] : $offer["PREVIEW_PICTURE"] )."</Category>\n";
		$strXmlProduct .= "\t\t\t\t\t</Categories>\n";
		$strXmlProduct .= "\t\t\t</ProductInformation>\n";
		$strXmlProduct .= "\t\t</Product>\n";
		$strXmlProduct .= "\t</Listing>\n";

		if(SITE_CHARSET !=  "UTF-8")
			$strXmlProduct = $GLOBALS['APPLICATION']->ConvertCharset($strXmlProduct, SITE_CHARSET, "UTF-8");

		@fwrite($fp, $strXmlProduct);
	}

	@fwrite($fp, '</ListingArray>');
	@fclose($fp);
}

CCatalogDiscountSave::Enable();

if (!empty($arRunErrors))
	$strExportErrorMessage = implode('<br />',$arRunErrors);

if ($bTmpUserCreated)
{
	if (isset($USER_TMP))
	{
		$USER = $USER_TMP;
		unset($USER_TMP);
	}
}

die();

Youez - 2016 - github.com/yon3zu
LinuXploit