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


PHP CIBlock::GetArrayByID方法代码示例

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


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

示例1: GetLinkElement

 protected function GetLinkElement($intElementID, $intIBlockID)
 {
     static $cache = array();
     $arResult = false;
     $intIBlockID = intval($intIBlockID);
     if (0 >= $intIBlockID) {
         $intIBlockID = 0;
     }
     $intElementID = intval($intElementID);
     if (0 >= $intElementID) {
         return false;
     }
     if (!array_key_exists($intElementID, $cache)) {
         $arFilter = array();
         if (0 < $intIBlockID) {
             $arFilter['IBLOCK_ID'] = $intIBlockID;
         }
         $arFilter['ID'] = $intElementID;
         $arFilter['SHOW_HISTORY'] = 'Y';
         $rsElements = CIBlockElement::GetList(array(), $arFilter, false, false, array('IBLOCK_ID', 'ID', 'NAME'));
         if ($arElement = $rsElements->GetNext(true, true)) {
             $arResult = array('ID' => $arElement['ID'], 'NAME' => $arElement['NAME'], '~NAME' => $arElement['~NAME'], 'IBLOCK_ID' => $arElement['IBLOCK_ID'], 'IBLOCK_TYPE_ID' => CIBlock::GetArrayByID($arElement['IBLOCK_ID'], 'IBLOCK_TYPE_ID'));
             $cache[$intElementID] = $arResult;
         } else {
             $cache[$intElementID] = false;
         }
     }
     return $cache[$intElementID];
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:29,代码来源:prop_element_auto.php

示例2: GetFilter

	function GetFilter()
	{
		$arFilter = array();
		$res = CIBlock::GetList(
			Array(),
			Array(
				'ACTIVE'=>'Y',
			)
		);

		while($ar_res = $res->Fetch())
		{
			$arIblock = CIBlock::GetArrayByID($ar_res['ID']);
			if (
				$arIblock["FIELDS"]["LOG_SECTION_ADD"]["IS_REQUIRED"] == "Y"
				|| $arIblock["FIELDS"]["LOG_SECTION_EDIT"]["IS_REQUIRED"] == "Y"
				|| $arIblock["FIELDS"]["LOG_SECTION_DELETE"]["IS_REQUIRED"] == "Y"
				|| $arIblock["FIELDS"]["LOG_ELEMENT_ADD"]["IS_REQUIRED"] == "Y"
				|| $arIblock["FIELDS"]["LOG_ELEMENT_EDIT"]["IS_REQUIRED"] == "Y"
				|| $arIblock["FIELDS"]["LOG_ELEMENT_DELETE"]["IS_REQUIRED"] == "Y"
			)
			{
				$arFilter[$ar_res["ID"]] = $ar_res["NAME"]." (".$ar_res["LID"].")";
			}
		}

		if (COption::GetOptionString("iblock", "event_log_iblock", "N") === "Y")
			$arFilter["IBLOCK"] = GetMessage("LOG_IBLOCK_FILTER");

		return  $arFilter;
	}
开发者ID:ASDAFF,项目名称:open_bx,代码行数:31,代码来源:iblock_event_list.php

示例3: onPrepareComponentParams

 public function onPrepareComponentParams($params)
 {
     $this->arIBlock = CIBlock::GetArrayByID($params["IBLOCK_ID"]);
     $this->arResult["IBLOCK"] = htmlspecialcharsex($this->arIBlock);
     $this->arResult["IBLOCK_ID"] = $this->arIBlock["ID"];
     $this->arResult["GRID_ID"] = "lists_list_elements_" . $this->arResult["IBLOCK_ID"];
     $this->arResult["ANY_SECTION"] = isset($_GET["list_section_id"]) && strlen($_GET["list_section_id"]) == 0;
     $this->arResult["SECTIONS"] = array();
     $this->arResult["SECTION_ID"] = false;
     $this->arResult["LIST_SECTIONS"] = array();
     if (isset($_GET["list_section_id"])) {
         $sectionId = intval($_GET["list_section_id"]);
     } else {
         $sectionId = intval($params["SECTION_ID"]);
     }
     $rsSections = CIBlockSection::GetList(array("left_margin" => "asc"), array("IBLOCK_ID" => $this->arIBlock["ID"], "GLOBAL_ACTIVE" => "Y", "CHECK_PERMISSIONS" => "Y"));
     while ($arSection = $rsSections->GetNext()) {
         $this->arResult["SECTIONS"][$arSection["ID"]] = array("ID" => $arSection["ID"], "NAME" => $arSection["NAME"]);
         if ($arSection["ID"] == $sectionId) {
             $this->arResult["SECTION"] = $arSection;
             $this->arResult["SECTION_ID"] = $arSection["ID"];
         }
         $this->arResult["LIST_SECTIONS"][$arSection["ID"]] = str_repeat(" . ", $arSection["DEPTH_LEVEL"]) . $arSection["NAME"];
     }
     $this->arResult["IS_SOCNET_GROUP_CLOSED"] = false;
     if (intval($params["~SOCNET_GROUP_ID"]) > 0 && CModule::IncludeModule("socialnetwork")) {
         $arSonetGroup = CSocNetGroup::GetByID(intval($params["~SOCNET_GROUP_ID"]));
         if (is_array($arSonetGroup) && $arSonetGroup["CLOSED"] == "Y" && !CSocNetUser::IsCurrentUserModuleAdmin() && ($arSonetGroup["OWNER_ID"] != $GLOBALS["USER"]->GetID() || COption::GetOptionString("socialnetwork", "work_with_closed_groups", "N") != "Y")) {
             $this->arResult["IS_SOCNET_GROUP_CLOSED"] = true;
         }
     }
     return $params;
 }
开发者ID:Satariall,项目名称:izurit,代码行数:33,代码来源:class.php

示例4: onPrepareComponentParams

 public function onPrepareComponentParams($params)
 {
     $this->arIBlock = CIBlock::GetArrayByID($params["IBLOCK_ID"]);
     $this->arResult["IBLOCK"] = htmlspecialcharsex($this->arIBlock);
     $this->arResult["IBLOCK_ID"] = $this->arIBlock["ID"];
     $this->arResult["GRID_ID"] = "lists_list_elements_" . $this->arResult["IBLOCK_ID"];
     $this->arResult["ANY_SECTION"] = isset($_GET["list_section_id"]) && strlen($_GET["list_section_id"]) == 0;
     $this->arResult["SECTIONS"] = array();
     $this->arResult["SECTION_ID"] = false;
     $this->arResult["LIST_SECTIONS"] = array();
     if (isset($_GET["list_section_id"])) {
         $sectionId = intval($_GET["list_section_id"]);
     } else {
         $sectionId = intval($params["SECTION_ID"]);
     }
     $rsSections = CIBlockSection::GetList(array("left_margin" => "asc"), array("IBLOCK_ID" => $this->arIBlock["ID"], "GLOBAL_ACTIVE" => "Y", "CHECK_PERMISSIONS" => "Y"));
     while ($arSection = $rsSections->GetNext()) {
         $this->arResult["SECTIONS"][$arSection["ID"]] = array("ID" => $arSection["ID"], "NAME" => $arSection["NAME"]);
         if ($arSection["ID"] == $sectionId) {
             $this->arResult["SECTION"] = $arSection;
             $this->arResult["SECTION_ID"] = $arSection["ID"];
         }
         $this->arResult["LIST_SECTIONS"][$arSection["ID"]] = str_repeat(" . ", $arSection["DEPTH_LEVEL"]) . $arSection["NAME"];
     }
     return $params;
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:26,代码来源:class.php

示例5: _getIBlockMode

 function _getIBlockMode($ib, $object = false, $object_id = false)
 {
     if ($object === false) {
         $arIBlock = CIBlock::GetArrayByID($ib);
         if ($arIBlock["WORKFLOW"] == "Y") {
             return "WF";
         } elseif ($arIBlock["BIZPROC"] == "Y") {
             return "BP";
         } else {
             return "";
         }
     } else {
         $arFilter = array("IBLOCK_ID" => $ib, "SOCNET_GROUP_ID" => false, "CHECK_PERMISSIONS" => "N", "SECTION_ID" => 0);
         if ($object == "user") {
             $arFilter["CREATED_BY"] = $object_id;
         } else {
             $arFilter["SOCNET_GROUP_ID"] = $object_id;
         }
         $arLibrary = array();
         $db_res = CIBlockSection::GetList(array(), $arFilter, false, array("ID", "UF_USE_BP"));
         if ($db_res && ($arLibrary = $db_res->GetNext())) {
             return $arLibrary["UF_USE_BP"] == "N" ? "" : "BP";
         } else {
             return "";
         }
     }
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:27,代码来源:functions.php

示例6: __wd_get_root_section

 function __wd_get_root_section($IBLOCK_ID, $object, $object_id)
 {
     $result = CIBlockWebdavSocnet::GetSectionID($IBLOCK_ID, $object, $object_id);
     if (intval($result) > 0) {
         return $result;
     } else {
         __wd_check_uf_use_bp_property($arParams["IBLOCK_ID"]);
         $arFields = array("IBLOCK_ID" => $IBLOCK_ID, "ACTIVE" => "Y", "SOCNET_GROUP_ID" => false, "IBLOCK_SECTION_ID" => 0, "UF_USE_BP" => "N");
         if ($object == "user") {
             $dbUser = CUser::GetByID($object_id);
             $arUser = $dbUser->Fetch();
             $arFields["NAME"] = trim($arUser['LAST_NAME'] . " " . $arUser['FIRST_NAME']);
             $arFields["NAME"] = trim(!empty($arFields["NAME"]) ? $arFields["NAME"] : $arUser['LOGIN']);
             $arFields['CREATED_BY'] = $arUser['ID'];
             $arFields['MODIFIED_BY'] = $arUser['ID'];
             if (CIBlock::GetArrayByID($IBLOCK_ID, "RIGHTS_MODE") === "E") {
                 $arTasks = CWebDavIblock::GetTasks();
                 $arFields['RIGHTS'] = array('n0' => array('GROUP_CODE' => 'U' . $object_id, 'TASK_ID' => $arTasks['X']));
             }
         } else {
             /*		$res = CSocNetGroup::GetByID($arResult["VARIABLES"]["group_id"]);
             				if (!$res)
             				{
             					$arParams["ERROR_MESSAGE"] = GetMessage("SONET_GROUP_NOT_EXISTS");
             					return 0;
             				} */
             $arFields["SOCNET_GROUP_ID"] = $object_id;
             //$arGroup = CSocNetGroup::GetByID($object_id);
             $arFields["NAME"] = GetMessage("SONET_GROUP_PREFIX") . $object_id;
             $dbGroup = CSocNetGroup::GetList(array(), array("ID" => (int) $object_id), false, false, array("ID", "SITE_ID", "NAME"));
             if ($arGroup = $dbGroup->Fetch()) {
                 $arFields["NAME"] = GetMessage("SONET_GROUP_PREFIX") . $arGroup["NAME"];
             }
             if (CIBlock::GetArrayByID($IBLOCK_ID, "RIGHTS_MODE") === "E") {
                 $arTasks = CWebDavIblock::GetTasks();
                 $arFields['RIGHTS'] = array('n0' => array('GROUP_CODE' => 'SG' . $arFields["SOCNET_GROUP_ID"] . '_A', 'TASK_ID' => $arTasks['X']), 'n1' => array('GROUP_CODE' => 'SG' . $arFields["SOCNET_GROUP_ID"] . '_E', 'TASK_ID' => $arTasks['W']), 'n2' => array('GROUP_CODE' => 'SG' . $arFields["SOCNET_GROUP_ID"] . '_K', 'TASK_ID' => $arTasks['W']));
             }
         }
         if (\Bitrix\Main\Config\Option::get('disk', 'successfully_converted', false) && CModule::includeModule('disk')) {
             \Bitrix\Disk\Driver::getInstance()->addGroupStorage($arFields["SOCNET_GROUP_ID"]);
         }
         $GLOBALS["UF_USE_BP"] = $arFields["UF_USE_BP"];
         $GLOBALS["USER_FIELD_MANAGER"]->EditFormAddFields("IBLOCK_" . $IBLOCK_ID . "_SECTION", $arFields);
         $bs = new CIBlockSection();
         $sectionID = $bs->Add($arFields);
         if (!$sectionID) {
             $arParams["ERROR_MESSAGE"] = $bs->LAST_ERROR;
             return 0;
         }
         WDClearComponentCache(array("webdav.element.edit", "webdav.element.hist", "webdav.element.upload", "webdav.element.view", "webdav.menu", "webdav.section.edit", "webdav.section.list"));
         return true;
         /*
         	if ($ob->workflow == 'bizproc')
         	{
         		__wd_create_default_bp_user_and_groups($arBizProcParameters);
         	}
         */
     }
 }
开发者ID:webgksupport,项目名称:alpina,代码行数:59,代码来源:webdav_settings.php

示例7: prepareData

 protected function prepareData()
 {
     $elementIblock = CIBlock::GetArrayByID((int) $this->arParams["listId"]);
     $this->arResult['ENTITY_NAME'] = $elementIblock['ELEMENT_NAME'];
     $this->arResult["FIELDS"] = $this->getElementFields($this->arParams['listId'], $this->arParams['elementId']);
     foreach ($this->arResult['FIELDS'] as $fieldId => &$field) {
         if ($field['TYPE'] == 'NAME') {
             $this->arResult['ENTITY_TITLE'] = $field['VALUE'];
         }
         $field['HTML'] = $this->renderField($field);
         if ($field['SETTINGS']['SHOW_FIELD_PREVIEW'] !== 'Y') {
             unset($this->arResult['FIELDS'][$fieldId]);
             continue;
         }
     }
 }
开发者ID:webgksupport,项目名称:alpina,代码行数:16,代码来源:class.php

示例8: getSnapshot

 /**
  * @param $id
  * @param null $dbVersion
  * @return array|mixed
  */
 public function getSnapshot($id, $dbVersion = null)
 {
     if (!$id) {
         return false;
     }
     $dbVersion && ($id = $this->getCurrentVersionId($id, $dbVersion));
     !$dbVersion && !$this->hasCurrentReference($id) && $this->registerCurrentVersionId($id);
     $iblock = \CIBlock::GetArrayByID($id);
     if (!$iblock) {
         return false;
     }
     $iblock['~reference'] = $this->getReferenceValue($id);
     $type = \CIBlockType::GetByID($iblock['IBLOCK_TYPE_ID'])->Fetch();
     $rsTypeLangs = TypeLanguageTable::getList(array('filter' => array('IBLOCK_TYPE_ID' => $iblock['IBLOCK_TYPE_ID'])));
     while ($lang = $rsTypeLangs->fetch()) {
         $type['LANG'][$lang['LANGUAGE_ID']] = $lang;
     }
     return array('iblock' => $iblock, 'type' => $type);
 }
开发者ID:ASDAFF,项目名称:bitrix-module-migrations,代码行数:24,代码来源:iblockhandler.php

示例9: create

 /**
  * @inheritdoc
  */
 public function create(ParameterDictionary $parameters)
 {
     $iblockId = (int) $parameters->get('ID');
     $queryBuilder = new Entity\Query(Iblock\IblockTable::getEntity());
     $iblockData = $queryBuilder->setSelect(array('ID', 'NAME'))->setFilter(array('ID' => $iblockId))->setOrder(array())->exec()->fetch();
     if (empty($iblockData)) {
         throw new BuilderException(sprintf('Not found iblock with id = %d', $iblockId));
     }
     // Get settings iblock
     $iblockDataFields = \CIBlock::GetArrayByID($iblockData['ID']);
     $queryBuilder = new Entity\Query(Iblock\PropertyTable::getEntity());
     $propertyResult = $queryBuilder->setSelect(array('*'))->setFilter(array('IBLOCK_ID' => $iblockData['ID']))->setOrder(array())->exec();
     $propertyList = array();
     while ($property = $propertyResult->fetch()) {
         if (!empty($property['USER_TYPE_SETTINGS'])) {
             $property['USER_TYPE_SETTINGS'] = ($unserialize = @unserialize($property['USER_TYPE_SETTINGS'])) === false ? $property['USER_TYPE_SETTINGS'] : $unserialize;
         }
         $propertyList[$property['CODE']] = $property;
     }
     $this->iblockProperty = $propertyList;
     $this->setElementValue();
     $this->setSectionValue();
     $this->setEnumValue();
     $sectionValueList = array();
     if (in_array($iblockData['ID'], $this->getListByType('G'))) {
         foreach ($this->iblockProperty as $field) {
             if ($field['PROPERTY_TYPE'] == 'G' && $field['LINK_IBLOCK_ID'] == $iblockData['ID']) {
                 $sectionValueList = isset($field['VALUE_LIST']) ? $field['VALUE_LIST'] : array();
                 break;
             }
         }
     } else {
         $queryBuilder = new Entity\Query(Iblock\SectionTable::getEntity());
         $sectionValueList = $queryBuilder->setSelect(array('ID', 'NAME'))->setFilter(array('IBLOCK_ID' => $iblockData['ID']))->setOrder(array())->exec()->fetchAll();
     }
     $upperLevel[] = array('ID' => 0, 'NAME' => GetMessage('IBLOCK_UPPER_LEVEL'));
     $sectionValueList = $upperLevel + $sectionValueList;
     return array('DATA' => $iblockData, 'DEFAULT_FIELDS' => $this->getDefaultFields($iblockDataFields, $sectionValueList), 'FIELDS' => $this->iblockProperty);
 }
开发者ID:ASDAFF,项目名称:citfact.form,代码行数:42,代码来源:IBlockBuilder.php

示例10: Add

 public static function Add($iblock_id, $arFields)
 {
     if ($iblock_id > 0) {
         $arIBlockFields = CIBlock::GetArrayByID($iblock_id, "FIELDS");
         $arIBlockFields[$arFields["TYPE"]] = $arFields;
         CIBlock::SetFields($iblock_id, $arIBlockFields);
         $GLOBALS["stackCacheManager"]->Clear("b_iblock");
     }
     return new CListElementField($iblock_id, $arFields["TYPE"], $arFields["NAME"], $arFields["SORT"]);
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:10,代码来源:listfield.php

示例11: Update


//.........这里部分代码省略.........
  * изменяется базовый тип свойства, то все текущие значения свойств
  * у существующих элементов очищаются.</p> <br><a name="examples"></a>
  *
  *
  * @static
  * @link http://dev.1c-bitrix.ru/api_help/iblock/classes/ciblockproperty/update.php
  * @author Bitrix
  */
 public function Update($ID, $arFields, $bCheckDescription = false)
 {
     global $DB;
     $ID = IntVal($ID);
     if (is_set($arFields, "ACTIVE") && $arFields["ACTIVE"] != "Y") {
         $arFields["ACTIVE"] = "N";
     }
     if (is_set($arFields, "SEARCHABLE") && $arFields["SEARCHABLE"] != "Y") {
         $arFields["SEARCHABLE"] = "N";
     }
     if (is_set($arFields, "FILTRABLE") && $arFields["FILTRABLE"] != "Y") {
         $arFields["FILTRABLE"] = "N";
     }
     if (is_set($arFields, "MULTIPLE") && $arFields["MULTIPLE"] != "Y") {
         $arFields["MULTIPLE"] = "N";
     }
     if (is_set($arFields, "LIST_TYPE") && $arFields["LIST_TYPE"] != "C") {
         $arFields["LIST_TYPE"] = "L";
     }
     if (!$this->CheckFields($arFields, $ID)) {
         $Result = false;
         $arFields["RESULT_MESSAGE"] =& $this->LAST_ERROR;
     } elseif (!$this->_Update($ID, $arFields, $bCheckDescription)) {
         $Result = false;
         $arFields["RESULT_MESSAGE"] =& $this->LAST_ERROR;
     } else {
         if (isset($arFields["USER_TYPE"])) {
             $arUserType = CIBlockProperty::GetUserType($arFields["USER_TYPE"]);
             if (array_key_exists("ConvertToDB", $arUserType)) {
                 $arValue = array("VALUE" => $arFields["DEFAULT_VALUE"]);
                 $arValue = call_user_func_array($arUserType["ConvertToDB"], array($arFields, $arValue));
                 if (is_array($arValue) && isset($arValue["VALUE"]) && strlen($arValue["VALUE"])) {
                     $arFields["DEFAULT_VALUE"] = $arValue["VALUE"];
                 } else {
                     $arFields["DEFAULT_VALUE"] = false;
                 }
             }
             if (array_key_exists("PrepareSettings", $arUserType)) {
                 $arFieldsResult = call_user_func_array($arUserType["PrepareSettings"], array($arFields));
                 if (is_array($arFieldsResult) && array_key_exists('USER_TYPE_SETTINGS', $arFieldsResult)) {
                     $arFields = array_merge($arFields, $arFieldsResult);
                     $arFields["USER_TYPE_SETTINGS"] = serialize($arFields["USER_TYPE_SETTINGS"]);
                 } else {
                     $arFields["USER_TYPE_SETTINGS"] = serialize($arFieldsResult);
                 }
             } else {
                 $arFields["USER_TYPE_SETTINGS"] = false;
             }
         }
         unset($arFields["ID"]);
         unset($arFields["VERSION"]);
         unset($arFields["TIMESTAMP_X"]);
         $strUpdate = $DB->PrepareUpdate("b_iblock_property", $arFields);
         if (strlen($strUpdate) > 0) {
             $strSql = "UPDATE b_iblock_property SET " . $strUpdate . " WHERE ID=" . $ID;
             $DB->QueryBind($strSql, array("USER_TYPE_SETTINGS" => $arFields["USER_TYPE_SETTINGS"]));
         }
         if (is_set($arFields, "VALUES")) {
             $this->UpdateEnum($ID, $arFields["VALUES"]);
         }
         if (array_key_exists("IBLOCK_ID", $arFields) && CIBlock::GetArrayByID($arFields["IBLOCK_ID"], "SECTION_PROPERTY") === "Y") {
             if (!array_key_exists("SECTION_PROPERTY", $arFields) || $arFields["SECTION_PROPERTY"] !== "N") {
                 $arLink = array("SMART_FILTER" => $arFields["SMART_FILTER"]);
                 if (array_key_exists("DISPLAY_TYPE", $arFields)) {
                     $arLink["DISPLAY_TYPE"] = $arFields["DISPLAY_TYPE"];
                 }
                 if (array_key_exists("DISPLAY_EXPANDED", $arFields)) {
                     $arLink["DISPLAY_EXPANDED"] = $arFields["DISPLAY_EXPANDED"];
                 }
                 if (array_key_exists("FILTER_HINT", $arFields)) {
                     $arLink["FILTER_HINT"] = $arFields["FILTER_HINT"];
                 }
                 CIBlockSectionPropertyLink::Set(0, $ID, $arLink);
             } else {
                 CIBlockSectionPropertyLink::Delete(0, $ID);
             }
         }
         global $BX_IBLOCK_PROP_CACHE;
         if (is_set($arFields, "IBLOCK_ID")) {
             unset($BX_IBLOCK_PROP_CACHE[$arFields["IBLOCK_ID"]]);
         } else {
             $BX_IBLOCK_PROP_CACHE = array();
         }
         $Result = true;
     }
     $arFields["ID"] = $ID;
     $arFields["RESULT"] =& $Result;
     foreach (GetModuleEvents("iblock", "OnAfterIBlockPropertyUpdate", true) as $arEvent) {
         ExecuteModuleEventEx($arEvent, array(&$arFields));
     }
     return $Result;
 }
开发者ID:andy-profi,项目名称:bxApiDocs,代码行数:101,代码来源:iblockproperty.php

示例12: Rel2Abs

}
$DATA_FILE_NAME = "";
if (strlen($URL_DATA_FILE) > 0) {
    $URL_DATA_FILE = Rel2Abs("/", $URL_DATA_FILE);
    if (file_exists($_SERVER["DOCUMENT_ROOT"] . $URL_DATA_FILE) && is_file($_SERVER["DOCUMENT_ROOT"] . $URL_DATA_FILE)) {
        $DATA_FILE_NAME = $URL_DATA_FILE;
    }
}
if (strlen($DATA_FILE_NAME) <= 0) {
    $strImportErrorMessage .= GetMessage("CATI_NO_DATA_FILE") . "<br>";
}
$IBLOCK_ID = intval($IBLOCK_ID);
if ($IBLOCK_ID <= 0) {
    $strImportErrorMessage .= GetMessage("CATI_NO_IBLOCK") . "<br>";
} else {
    $arIBlock = CIBlock::GetArrayByID($IBLOCK_ID);
    if (false === $arIBlock) {
        $strImportErrorMessage .= GetMessage("CATI_NO_IBLOCK") . "<br>";
    }
}
if ('' == $strImportErrorMessage) {
    $bWorkflow = CModule::IncludeModule("workflow") && $arIBlock["WORKFLOW"] != "N";
    $bIBlockIsCatalog = false;
    $arSku = false;
    $rsCatalogs = CCatalog::GetList(array(), array('IBLOCK_ID' => $IBLOCK_ID), false, false, array('IBLOCK_ID', 'PRODUCT_IBLOCK_ID', 'SKU_PROPERTY_ID'));
    if ($arCatalog = $rsCatalogs->Fetch()) {
        $bIBlockIsCatalog = true;
        $arCatalog['IBLOCK_ID'] = (int) $arCatalog['IBLOCK_ID'];
        $arCatalog['PRODUCT_IBLOCK_ID'] = (int) $arCatalog['PRODUCT_IBLOCK_ID'];
        $arCatalog['SKU_PROPERTY_ID'] = (int) $arCatalog['SKU_PROPERTY_ID'];
        if (0 < $arCatalog['PRODUCT_IBLOCK_ID'] && 0 < $arCatalog['SKU_PROPERTY_ID']) {
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:csv_new_run.php

示例13: IndexIBlockSection

 function IndexIBlockSection($arFields, $entity_id, $entity_type, $feature, $operation, $path_template)
 {
     $rSection = CIBlockSection::GetByID($arFields['ID']);
     $arSection = $rSection->Fetch();
     $path = array();
     $rsPath = CIBlockSection::GetNavChain($arFields["IBLOCK_ID"], $arFields['ID']);
     while ($arPath = $rsPath->Fetch()) {
         $path[] = $arPath['NAME'];
     }
     $path = implode("/", array_slice($path, 1));
     $ID = intval($arFields["ID"]);
     $IBLOCK_ID = intval($arFields["IBLOCK_ID"]);
     $arItem = array();
     if ($entity_type == "G") {
         $url = str_replace(array("#group_id#", "#user_alias#", "#section_id#", "#element_id#", "#action#", "#task_id#", "#name#", "#path#"), array($entity_id, "group_" . $entity_id, $arFields["IBLOCK_SECTION"], $arFields["ID"], "view", $arFields["ID"], urlencode($arFields["NAME"]), $path), $path_template);
     } else {
         $url = str_replace(array("#user_id#", "#user_alias#", "#section_id#", "#element_id#", "#action#", "#task_id#", "#path#"), array($entity_id, "user_" . $entity_id, $arFields["IBLOCK_SECTION"], $arFields["ID"], "view", $arFields["ID"], $path), $path_template);
     }
     $body = "";
     $title = $arFields["NAME"];
     $arPermissions = $this->GetSearchGroups($entity_type, $entity_id, $feature, $operation);
     if (CIBlock::GetArrayByID($IBLOCK_ID, "RIGHTS_MODE") == "E") {
         $obSectionRights = new CIBlockSectionRights($IBLOCK_ID, $arFields["ID"]);
         $arPermissions = $obSectionRights->GetGroups(array("section_read"));
     }
     $arSearchIndexParams = $this->GetSearchParams($entity_type, $entity_id, $feature, $operation);
     CSearch::Index("socialnetwork", 'S' . $ID, array("LAST_MODIFIED" => ConvertTimeStamp(time() + CTimeZone::GetOffset(), "FULL"), "TITLE" => $title, "BODY" => $body, "SITE_ID" => array(SITE_ID => $url), "PARAM1" => CIBlock::GetArrayByID($IBLOCK_ID, "IBLOCK_TYPE_ID"), "PARAM2" => $IBLOCK_ID, "PARAM3" => $feature, "TAGS" => "", "PERMISSIONS" => $arPermissions, "PARAMS" => $arSearchIndexParams), true);
     if (defined("BX_COMP_MANAGED_CACHE")) {
         $GLOBALS["CACHE_MANAGER"]->ClearByTag("sonet_search_" . $entity_type . "_" . $entity_id);
     }
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:search.php

示例14: array

				$UrlDeleteSectionButton = $arSection["SECTION_PAGE_URL"];
			}

			if(empty($UrlDeleteSectionButton))
			{
				$url_template = CIBlock::GetArrayByID($arParams["IBLOCK_ID"], "LIST_PAGE_URL");
				$arIBlock = CIBlock::GetArrayByID($arParams["IBLOCK_ID"]);
				$arIBlock["IBLOCK_CODE"] = $arIBlock["CODE"];
				$UrlDeleteSectionButton = CIBlock::ReplaceDetailURL($url_template, $arIBlock, true, false);
			}

			$arReturnUrl = array(
				"add_section" => (
					strlen($arParams["SECTION_URL"])?
					$arParams["SECTION_URL"]:
					CIBlock::GetArrayByID($arParams["IBLOCK_ID"], "SECTION_PAGE_URL")
				),
				"delete_section" => $UrlDeleteSectionButton,
			);
			$arButtons = CIBlock::GetPanelButtons(
				$arParams["IBLOCK_ID"],
				0,
				$arResult["ID"],
				array("RETURN_URL" =>  $arReturnUrl, "CATALOG"=>true)
			);

			if($APPLICATION->GetShowIncludeAreas())
				$this->AddIncludeAreaIcons(CIBlock::GetComponentMenu($APPLICATION->GetPublicShowMode(), $arButtons));

			if(
				is_array($arButtons["intranet"])
开发者ID:ASDAFF,项目名称:bitrix-5,代码行数:31,代码来源:component.php

示例15: array

<?endif?>

<div class="recrm_list">

	<?if($arParams["DISPLAY_TOP_PAGER"]):?>
		<?php 
echo $arResult["NAV_STRING"];
?>
<br />
	<?endif;?>
	
	<div class="items">
		<?foreach($arResult["ITEMS"] as $arItem):?>
		<?
		$this->AddEditAction($arItem['ID'], $arItem['EDIT_LINK'], CIBlock::GetArrayByID($arItem["IBLOCK_ID"], "ELEMENT_EDIT"));
		$this->AddDeleteAction($arItem['ID'], $arItem['DELETE_LINK'], CIBlock::GetArrayByID($arItem["IBLOCK_ID"], "ELEMENT_DELETE"), array("CONFIRM" => GetMessage('CT_BNL_ELEMENT_DELETE_CONFIRM')));
		?>
		<div class="item<?php 
echo $arParams['LIST_COVER_PHOTO'] == "Y" ? " item_photo" : "";
?>
" id="recrm_el_<?php 
echo $arItem['ID'];
?>
">

			<?if($arParams['LIST_COVER_PHOTO'] == "Y"):?>
				<?if($arItem['COVER_PHOTO']):?>
				<a href="<?php 
echo $arItem['DETAIL_PAGE_URL'];
?>
" class="photo" style="width: <?php 
开发者ID:ASDAFF,项目名称:bitrix-pr.recrm,代码行数:31,代码来源:template.php


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