%PDF- %PDF-
Server IP : 37.220.80.31 / Your IP : 3.149.247.223 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/php_interface/include/esol.importexportexcel/ |
Upload File : |
<? if(!defined("B_PROLOG_INCLUDED")) { @set_time_limit(0); if(!defined('NOT_CHECK_PERMISSIONS')) define('NOT_CHECK_PERMISSIONS', true); if(!defined('NO_AGENT_CHECK')) define('NO_AGENT_CHECK', true); if(!defined('BX_CRONTAB')) define("BX_CRONTAB", true); if(!defined('ADMIN_SECTION')) define("ADMIN_SECTION", true); if(!ini_get('date.timezone') && function_exists('date_default_timezone_set')){@date_default_timezone_set("Europe/Moscow");} $_SERVER["DOCUMENT_ROOT"] = realpath(dirname(__FILE__).'/../../../..'); if(!array_key_exists('REQUEST_URI', $_SERVER)) $_SERVER["REQUEST_URI"] = substr(__FILE__, strlen($_SERVER["DOCUMENT_ROOT"])); require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php"); } @set_time_limit(0); $moduleId = 'esol.importexportexcel'; $moduleRunnerClass = 'CEsolImpExpExcelRunner'; \Bitrix\Main\Loader::includeModule("iblock"); \Bitrix\Main\Loader::includeModule('catalog'); \Bitrix\Main\Loader::includeModule("currency"); \Bitrix\Main\Loader::includeModule($moduleId); $PROFILE_ID = htmlspecialcharsbx($argv[1]); /*Close session*/ $sess = $_SESSION; session_write_close(); $_SESSION = $sess; /*/Close session*/ /*Remove old dirs*/ CKDAExportUtils::RemoveTmpFiles(0); /*/Remove old dirs*/ $arProfiles = array_map('trim', explode(',', $PROFILE_ID)); foreach($arProfiles as $PROFILE_ID) { if(strlen($PROFILE_ID)==0) { echo date('Y-m-d H:i:s').": profile id is not set\r\n"; continue; } $oProfile = CKDAExportProfile::getInstance(); $arProfileFields = $oProfile->GetFieldsByID($PROFILE_ID); if($arProfileFields['ACTIVE']=='N') { echo date('Y-m-d H:i:s').": profile is not active\r\n"."Profile id = ".$PROFILE_ID."\r\n\r\n"; continue; } $arParams = $oProfile->GetProccessParamsFromPidFile($PROFILE_ID); if($arParams===false) { echo date('Y-m-d H:i:s').": export in process\r\n"."Profile id = ".$PROFILE_ID."\r\n\r\n"; continue; } $SETTINGS_DEFAULT = $SETTINGS = $EXTRASETTINGS = null; $oProfile->Apply($SETTINGS_DEFAULT, $SETTINGS, $PROFILE_ID); $oProfile->ApplyExtra($EXTRASETTINGS, $PROFILE_ID); $params = array_merge($SETTINGS_DEFAULT, $SETTINGS); $params['MAX_EXECUTION_TIME'] = 0; $arParams = array('EXPORT_MODE'=>'CRON'); $arResult = $moduleRunnerClass::ExportIblock($params, $EXTRASETTINGS, $arParams, $PROFILE_ID); echo date('Y-m-d H:i:s').": export complete\r\n"."Profile id = ".$PROFILE_ID."\r\n".CUtil::PhpToJSObject($arResult)."\r\n\r\n"; } ?>