IntaroCRM __IncludeLang(GetLangFileName($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/intaro.intarocrm/lang/", "/export_setup_templ.php")); global $APPLICATION; $arSetupErrors = array(); if (($ACTION == 'EXPORT_EDIT' || $ACTION == 'EXPORT_COPY') && $STEP == 1) { if (isset($arOldSetupVars['YANDEX_EXPORT'])) $YANDEX_EXPORT = $arOldSetupVars['YANDEX_EXPORT']; if (isset($arOldSetupVars['SETUP_FILE_NAME'])) $SETUP_FILE_NAME = $arOldSetupVars['SETUP_FILE_NAME']; if (isset($arOldSetupVars['SETUP_PROFILE_NAME'])) $SETUP_PROFILE_NAME = $arOldSetupVars['SETUP_PROFILE_NAME']; if (isset($arOldSetupVars['SETUP_SERVER_NAME'])) $SETUP_SERVER_NAME = $arOldSetupVars['SETUP_SERVER_NAME']; } if ($STEP>1) { if (!is_array($YANDEX_EXPORT) || count($YANDEX_EXPORT)<=0) { $arSetupErrors[] = GetMessage("CET_ERROR_NO_IBLOCKS"); } if (strlen($SETUP_FILE_NAME)<=0) { $arSetupErrors[] = GetMessage("CET_ERROR_NO_FILENAME"); } elseif (preg_match(BX_CATALOG_FILENAME_REG,$SETUP_FILE_NAME)) { $arSetupErrors[] = GetMessage("CES_ERROR_BAD_EXPORT_FILENAME"); } elseif ($APPLICATION->GetFileAccessPermission($SETUP_FILE_NAME) < "W") { $arSetupErrors[] = str_replace("#FILE#", $SETUP_FILE_NAME, GetMessage('CET_YAND_RUN_ERR_SETUP_FILE_ACCESS_DENIED')); } if (($ACTION=="EXPORT_SETUP" || $ACTION == 'EXPORT_EDIT' || $ACTION == 'EXPORT_COPY') && strlen($SETUP_PROFILE_NAME)<=0) { $arSetupErrors[] = GetMessage("CET_ERROR_NO_PROFILE_NAME"); } if (!empty($arSetupErrors)) { $STEP = 1; } } if (!empty($arSetupErrors)) echo ShowError(implode('
', $arSetupErrors)); if ($STEP==1) { if (CModule::IncludeModule("iblock")) { // Get IBlock list ?>
"ASC", "NAME"=>"ASC"),array('CHECK_PERMISSIONS' => 'Y','MIN_PERMISSION' => 'W')); while ($res = $db_res->Fetch()) { if ($ar_res1 = CCatalog::GetByID($res["ID"])) { $arSiteList = array(); $rsSites = CIBlock::GetSite($res["ID"]); while ($arSite = $rsSites->Fetch()) { $arSiteList[] = $arSite["SITE_ID"]; } $boolYandex = (in_array($res['ID'],$YANDEX_EXPORT)); $arIBlockList[] = array( 'ID' => $res['ID'], 'NAME' => $res['NAME'], 'IBLOCK_TYPE_ID' => $res['IBLOCK_TYPE_ID'], 'YANDEX_EXPORT' => $boolYandex, 'SITE_LIST' => '('.implode(' ',$arSiteList).')', ); if ($boolYandex) $intCountChecked++; $intCountAvailIBlock++; } } if ($intCountChecked == $intCountAvailIBlock) $boolAll = true; ?> $arIBlock) { ?> " checked>
" size="50">

4.   

  "> ">