CRM __IncludeLang(GetLangFileName($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/intaro.intarocrm/lang/", "/export_setup_templ.php")); global $APPLICATION, $USER; ClearVars(); $strYandexError = ""; if (($ACTION == 'EXPORT_EDIT' || $ACTION == 'EXPORT_COPY') && $STEP == 1) { if (isset($arOldSetupVars['IBLOCK_ID'])) $IBLOCK_ID = $arOldSetupVars['IBLOCK_ID']; if (isset($arOldSetupVars['SETUP_FILE_NAME'])) $SETUP_FILE_NAME = str_replace(COption::GetOptionString("catalog", "export_default_path", "/bitrix/catalog_export/"),'',$arOldSetupVars['SETUP_FILE_NAME']); if (isset($arOldSetupVars['SETUP_PROFILE_NAME'])) $SETUP_PROFILE_NAME = $arOldSetupVars['SETUP_PROFILE_NAME']; if (isset($arOldSetupVars['V'])) $V = $arOldSetupVars['V']; if (isset($arOldSetupVars['XML_DATA'])) { if (get_magic_quotes_gpc()) { $XML_DATA = base64_encode(stripslashes($arOldSetupVars['XML_DATA'])); } else { $XML_DATA = base64_encode($arOldSetupVars['XML_DATA']); } } if (isset($arOldSetupVars['SETUP_SERVER_NAME'])) $SETUP_SERVER_NAME = $arOldSetupVars['SETUP_SERVER_NAME']; } if ($STEP>1) { $IBLOCK_ID = intval($IBLOCK_ID); $rsIBlocks = CIBlock::GetByID($IBLOCK_ID); if ($IBLOCK_ID<=0 || !($arIBlock = $rsIBlocks->Fetch())) { $strYandexError .= GetMessage("CET_ERROR_NO_IBLOCK1")." #".$IBLOCK_ID." ".GetMessage("CET_ERROR_NO_IBLOCK2")."
"; } else { $bRightBlock = !CIBlockRights::UserHasRightTo($IBLOCK_ID, $IBLOCK_ID, "iblock_admin_display"); if ($bRightBlock) { $strYandexError .= str_replace('#IBLOCK_ID#',$IBLOCK_ID,GetMessage("CET_ERROR_IBLOCK_PERM"))."
"; } } if (strlen($SETUP_FILE_NAME)<=0) { $strYandexError .= GetMessage("CET_ERROR_NO_FILENAME")."
"; } elseif (preg_match(BX_CATALOG_FILENAME_REG,$SETUP_FILE_NAME)) { $strYandexError .= GetMessage("CES_ERROR_BAD_EXPORT_FILENAME")."
"; } elseif ($APPLICATION->GetFileAccessPermission($SETUP_FILE_NAME) < "W") { $strYandexError .= str_replace("#FILE#", $SETUP_FILE_NAME, GetMessage('CET_YAND_RUN_ERR_SETUP_FILE_ACCESS_DENIED'))."
"; } $SETUP_SERVER_NAME = trim($SETUP_SERVER_NAME); if (strlen($strYandexError)<=0) { $bAllSections = false; $arSections = array(); if (is_array($V) && !empty($V)) { foreach ($V as $key => $value) { if (trim($value)=="0") { $bAllSections = true; break; } $value = intval($value); if ($value>0) { $arSections[] = $value; } } } if (!$bAllSections && !empty($arSections)) { $arCheckSections = array(); $rsSections = CIBlockSection::GetList(array(), array('IBLOCK_ID' => $IBLOCK_ID, 'ID' => $arSections), false, array('ID')); while ($arOneSection = $rsSections->Fetch()) { $arCheckSections[] = $arOneSection['ID']; } $arSections = $arCheckSections; } if (!$bAllSections && empty($arSections)) { $strYandexError .= GetMessage("CET_ERROR_NO_GROUPS")."
"; $V = array(); } } if (is_array($V)) { $V = array_unique(array_values($V)); $_REQUEST['V'] = $V; } $arCatalog = CCatalog::GetByIDExt($IBLOCK_ID); if ('P' == $arCatalog['CATALOG_TYPE'] || 'X' == $arCatalog['CATALOG_TYPE']) { if (strlen($XML_DATA) <= 0) { $strYandexError .= GetMessage('YANDEX_ERR_SKU_SETTINGS_ABSENT').'
'; } } if (($ACTION=="EXPORT_SETUP" || $ACTION=="EXPORT_EDIT" || $ACTION=="EXPORT_COPY") && strlen($SETUP_PROFILE_NAME)<=0) $strYandexError .= GetMessage("CET_ERROR_NO_PROFILE_NAME")."
"; if (strlen($strYandexError)>0) { $STEP = 1; } } echo ShowError($strYandexError); if ($STEP==1) { if (CModule::IncludeModule("iblock")) { ?>

'Y','MIN_PERMISSION' => 'W'), "ClearSelected(); document.getElementById('id_ifr').src='/bitrix/tools/catalog_export/yandex_util.php?IBLOCK_ID=0&'+'".bitrix_sessid_get()."';", "ClearSelected(); document.getElementById('id_ifr').src='/bitrix/tools/catalog_export/yandex_util.php?IBLOCK_ID='+this[this.selectedIndex].value+'&'+'".bitrix_sessid_get()."';", 'class="adm-detail-iblock-types"', 'class="adm-detail-iblock-list"' ); ?>




:


" size="50" />



"> ">
0) { $XML_DATA = base64_decode($XML_DATA); } $SETUP_SERVER_NAME = htmlspecialcharsbx($SETUP_SERVER_NAME); $_POST['SETUP_SERVER_NAME'] = htmlspecialcharsbx($_POST['SETUP_SERVER_NAME']); $_REQUEST['SETUP_SERVER_NAME'] = htmlspecialcharsbx($_REQUEST['SETUP_SERVER_NAME']); $FINITE = true; }