diff --git a/intaro.intarocrm/install/export/intarocrm_run.php b/intaro.intarocrm/install/export/intarocrm_run.php new file mode 100644 index 00000000..23091100 --- /dev/null +++ b/intaro.intarocrm/install/export/intarocrm_run.php @@ -0,0 +1,18 @@ +IntaroCRM +set_time_limit(0); + +global $APPLICATION; +if (!CModule::IncludeModule("iblock")) + return; +if (!CModule::IncludeModule("catalog")) + return; +if (!CModule::IncludeModule("intaro.intarocrm")) + return; + +$loader = new ICMLLoader(); +$loader->iblocks = $IBLOCK_EXPORT; +$loader->articleProperties = $IBLOCK_PROPERTY_ARTICLE; +$loader->filename = $SETUP_FILE_NAME; +$loader->application = $APPLICATION; +$loader->Load(); \ No newline at end of file diff --git a/intaro.intarocrm/install/export/intarocrm_setup.php b/intaro.intarocrm/install/export/intarocrm_setup.php new file mode 100644 index 00000000..60eee5bd --- /dev/null +++ b/intaro.intarocrm/install/export/intarocrm_setup.php @@ -0,0 +1,256 @@ +IntaroCRM + +if(!check_bitrix_sessid()) return; + +__IncludeLang(GetLangFileName($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/intaro.intarocrm/lang/", "/icml_export_setup.php")); + +if (($ACTION == 'EXPORT_EDIT' || $ACTION == 'EXPORT_COPY') && $STEP == 1) +{ + 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 ($STEP>1) +{ + + if (strlen($SETUP_FILE_NAME)<=0) + { + $arSetupErrors[] = GetMessage("CET_ERROR_NO_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) +{ + + +?> +
+

+ "ASC", "NAME"=>"ASC"),array('CHECK_PERMISSIONS' => 'Y','MIN_PERMISSION' => 'W')); + while ($res = $db_res->Fetch()) + { + if ($arCatalog = CCatalog::GetByIDExt($res["ID"])) + { + if($arCatalog['CATALOG_TYPE'] == "D" || $arCatalog['CATALOG_TYPE'] == "X" || $arCatalog['CATALOG_TYPE'] == "P") + { + $arSiteList = array(); + $rsSites = CIBlock::GetSite($res["ID"]); + while ($arSite = $rsSites->Fetch()) + { + $arSiteList[] = $arSite["SITE_ID"]; + } + $db_properties = CIBlock::GetProperties($res['ID'], Array()); + + $properties = Array(); + while($prop = $db_properties->Fetch()) + $properties[] = $prop; + + + $boolExport = (in_array($res['ID'],$IBLOCK_EXPORT)); + $arIBlockList[] = array( + 'ID' => $res['ID'], + 'NAME' => $res['NAME'], + 'IBLOCK_TYPE_ID' => $res['IBLOCK_TYPE_ID'], + 'IBLOCK_EXPORT' => $boolExport, + 'PROPERTIES' => $properties, + 'SITE_LIST' => '('.implode(' ',$arSiteList).')', + ); + + if ($boolExport) + $intCountChecked++; + $intCountAvailIBlock++; + } + } + } + if ($intCountChecked == $intCountAvailIBlock) + $boolAll = true; + + ?> + + + + + + + + + + + + + + + + + + $arIBlock) + { + ?> + + + + + + + +
+
+
+
+   +
+
+
+
+ + + > + + +   +
+ + + + " + + onclick="checkOne(this,);" + > + + + +
+ +
+
+
+ +

+ + +
+
+
+ + + +

+ +
+
+
+ + + + + + + + + + + + "> + + + + "> + + +
+ + \ No newline at end of file diff --git a/intaro.intarocrm/install/step4.php b/intaro.intarocrm/install/step4.php index 81178e93..d3bfc7ea 100644 --- a/intaro.intarocrm/install/step4.php +++ b/intaro.intarocrm/install/step4.php @@ -155,9 +155,9 @@ __IncludeLang(GetLangFileName($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/intaro.


-
+

-
+


  @@ -166,7 +166,7 @@ __IncludeLang(GetLangFileName($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/intaro.

-