当前位置: 首页>>代码示例>>PHP>>正文


PHP CIBlock::makeFileArray方法代码示例

本文整理汇总了PHP中CIBlock::makeFileArray方法的典型用法代码示例。如果您正苦于以下问题:PHP CIBlock::makeFileArray方法的具体用法?PHP CIBlock::makeFileArray怎么用?PHP CIBlock::makeFileArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CIBlock的用法示例。


在下文中一共展示了CIBlock::makeFileArray方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

				if ($strWarning == '')
				{
					$bs = new CIBlockElement;

					$arPREVIEW_PICTURE = CIBlock::makeFileArray(
						array_key_exists("PREVIEW_PICTURE", $_FILES)? $_FILES["PREVIEW_PICTURE"]: $_REQUEST["PREVIEW_PICTURE"],
						${"PREVIEW_PICTURE_del"} === "Y",
						${"PREVIEW_PICTURE_descr"}
					);
					if ($arPREVIEW_PICTURE["error"] == 0)
						$arPREVIEW_PICTURE["COPY_FILE"] = "Y";

					$arDETAIL_PICTURE = CIBlock::makeFileArray(
						array_key_exists("DETAIL_PICTURE", $_FILES)? $_FILES["DETAIL_PICTURE"]: $_REQUEST["DETAIL_PICTURE"],
						${"DETAIL_PICTURE_del"} === "Y",
						${"DETAIL_PICTURE_descr"}
					);
					if ($arDETAIL_PICTURE["error"] == 0)
						$arDETAIL_PICTURE["COPY_FILE"] = "Y";

					$arFields = array(
						"ACTIVE" => $_POST["ACTIVE"],
						"MODIFIED_BY" => $USER->GetID(),
						"IBLOCK_ID" => $IBLOCK_ID,
						"ACTIVE_FROM" => $_POST["ACTIVE_FROM"],
						"ACTIVE_TO" => $_POST["ACTIVE_TO"],
						"SORT" => $_POST["SORT"],
						"NAME" => $_POST["NAME"],
						"CODE" => trim($_POST["CODE"], " \t\n\r"),
						"TAGS" => $_POST["TAGS"],
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:30,代码来源:iblock_element_edit.php

示例2: array

			}

			if (array_key_exists("PREVIEW_PICTURE", $arFields))
			{
				$arFields["PREVIEW_PICTURE"] = CIBlock::makeFileArray(
					$arFields["PREVIEW_PICTURE"],
					$_REQUEST["FIELDS_del"][$TYPE.$ID]["PREVIEW_PICTURE"] === "Y",
					$_REQUEST["FIELDS_descr"][$TYPE.$ID]["PREVIEW_PICTURE"]
				);
			}

			if (array_key_exists("DETAIL_PICTURE", $arFields))
			{
				$arFields["DETAIL_PICTURE"] = CIBlock::makeFileArray(
					$arFields["DETAIL_PICTURE"],
					$_REQUEST["FIELDS_del"][$TYPE.$ID]["DETAIL_PICTURE"] === "Y",
					$_REQUEST["FIELDS_descr"][$TYPE.$ID]["DETAIL_PICTURE"]
				);
			}

			if(!is_array($arFields["PROPERTY_VALUES"]))
				$arFields["PROPERTY_VALUES"] = array();
			$bFieldProps = array();
			foreach($arFields as $k=>$v)
			{
				if(
					$k != "PROPERTY_VALUES"
					&& strncmp($k, "PROPERTY_", 9) == 0
				)
				{
					$prop_id = substr($k, 9);
开发者ID:nycmic,项目名称:bittest,代码行数:31,代码来源:iblock_list_admin.php

示例3: foreach

 foreach ($arPropertyValueCombinationResult[$imageRowId] as $srcKey => $srcValue) {
     if ($srcValue == '-1') {
         continue;
     }
     if (!isset($arFilePropertiesExt[$srcKey]) && $srcKey != 'DETAIL' && $srcKey != 'ANNOUNCE') {
         continue;
     }
     switch ($srcKey) {
         case 'ANNOUNCE':
             $arIBlockElementAdd['PREVIEW_PICTURE'] = CIBlock::makeFileArray($srcValue, false);
             if ($arIBlockElementAdd['PREVIEW_PICTURE']['error'] == 0) {
                 $arIBlockElementAdd['PREVIEW_PICTURE']['COPY_FILE'] = 'Y';
             }
             break;
         case 'DETAIL':
             $arIBlockElementAdd['DETAIL_PICTURE'] = CIBlock::makeFileArray($srcValue, false);
             if ($arIBlockElementAdd['DETAIL_PICTURE']['error'] == 0) {
                 $arIBlockElementAdd['DETAIL_PICTURE']['COPY_FILE'] = 'Y';
             }
             break;
         default:
             if (is_array($srcValue)) {
                 $arPropertySaveValues[$srcKey] = array();
                 foreach ($srcValue as $fileID => $fileValue) {
                     $arPropertySaveValues[$srcKey][$fileID] = CIBlock::makeFilePropArray($srcValue[$fileID], false);
                 }
             } else {
                 $arPropertySaveValues[$srcKey] = CIBlock::makeFilePropArray($srcValue, false);
             }
             break;
     }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:iblock_subelement_generator.php


注:本文中的CIBlock::makeFileArray方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。