Ejemplo n.º 1
0
         if ($bNeedPrices) {
             $arCatalogGroups = array_values(array_unique($arCatalogGroups));
         }
     }
     if (!$bNeedPrices) {
         $bNeedCounts = false;
         $arCountFields = array();
     }
 }
 uasort($arSortFields, '__sortCSVOrder');
 $arCacheSections = array();
 $arCacheChains = array();
 $arCacheResultSections = array();
 $arNeedFields = array_keys($arSortFields);
 if ($first_line_names) {
     $csvFile->SaveFile($_SERVER["DOCUMENT_ROOT"] . $SETUP_FILE_NAME, $arNeedFields);
 }
 $arUserTypeFormat = false;
 $dbIBlockElement = CIBlockElement::GetList(array('ID' => 'ASC'), array("IBLOCK_ID" => $IBLOCK_ID, 'CHECK_PERMISSIONS' => 'N'), false, false, $selectArray);
 while ($obIBlockElement = $dbIBlockElement->GetNextElement()) {
     $arIBlockElement = $obIBlockElement->GetFields();
     if (isset($arIBlockElement["PREVIEW_PICTURE"])) {
         if ('Y' == $export_files) {
             $arIBlockElement["~PREVIEW_PICTURE"] = __CSVExportFile($arIBlockElement['PREVIEW_PICTURE'], $strExportPath, $strFilePath);
         } else {
             $arIBlockElement["PREVIEW_PICTURE"] = CFile::GetFileArray($arIBlockElement["PREVIEW_PICTURE"]);
             if ($arIBlockElement["PREVIEW_PICTURE"]) {
                 $arIBlockElement["~PREVIEW_PICTURE"] = $arIBlockElement["PREVIEW_PICTURE"]["SRC"];
             }
         }
     }
Ejemplo n.º 2
0
					}

					$j = $field_num[$i];
					while(array_key_exists($j, $arNeedFields))
						$j++;
					$arNeedFields[$j] = $value;
				}
			}
			ksort($arNeedFields);

			if($first_line_names == "Y")
			{
				$arResFields = array();
				foreach($arNeedFields as $field_name)
					$arResFields[] = $field_name;
				$csvFile->SaveFile($_SERVER["DOCUMENT_ROOT"].$DATA_FILE_NAME, $arResFields);
			}

			$res = CIBlockElement::GetList(
				array(),
				array("IBLOCK_ID" => $IBLOCK_ID, "MIN_PERMISSION" => "W"),
				false,
				false,
				$selectArray
			);

			$arUserTypeFormat = false;

			while ($obElement = $res->GetNextElement())
			{
				$arElement = $obElement->GetFields();