$arProperty_Offers[$arr["CODE"]] = "[" . $arr["CODE"] . "] " . $arr["NAME"]; } } } $arPrice = array(); if (CModule::IncludeModule("catalog")) { $rsPrice = CCatalogGroup::GetList($v1 = "sort", $v2 = "asc"); while ($arr = $rsPrice->Fetch()) { $arPrice[$arr["NAME"]] = "[" . $arr["NAME"] . "] " . $arr["NAME_LANG"]; } } else { $arPrice = $arProperty_N; } $arAscDesc = array("asc" => GetMessage("IBLOCK_SORT_ASC"), "desc" => GetMessage("IBLOCK_SORT_DESC")); $arComponentParameters = array("GROUPS" => array("FILTER_SETTINGS" => array("NAME" => GetMessage("T_IBLOCK_DESC_FILTER_SETTINGS")), "REVIEW_SETTINGS" => array("NAME" => GetMessage("T_IBLOCK_DESC_REVIEW_SETTINGS")), "COMPARE_SETTINGS" => array("NAME" => GetMessage("T_IBLOCK_DESC_COMPARE_SETTINGS")), "PRICES" => array("NAME" => GetMessage("IBLOCK_PRICES")), "TOP_SETTINGS" => array("NAME" => GetMessage("T_IBLOCK_DESC_TOP_SETTINGS")), "SECTIONS_SETTINGS" => array("NAME" => GetMessage("CP_BC_SECTIONS_SETTINGS")), "LIST_SETTINGS" => array("NAME" => GetMessage("T_IBLOCK_DESC_LIST_SETTINGS")), "DETAIL_SETTINGS" => array("NAME" => GetMessage("T_IBLOCK_DESC_DETAIL_SETTINGS")), "LINK" => array("NAME" => GetMessage("IBLOCK_LINK")), "ALSO_BUY_SETTINGS" => array("NAME" => GetMessage("T_IBLOCK_DESC_ALSO_BUY_SETTINGS")), "STORE_SETTINGS" => array("NAME" => GetMessage("T_IBLOCK_DESC_STORE_SETTINGS")), "OFFERS_SETTINGS" => array("NAME" => GetMessage("CP_BC_OFFERS_SETTINGS"))), "PARAMETERS" => array("VARIABLE_ALIASES" => array("SECTION_ID" => array("NAME" => GetMessage("SECTION_ID_DESC")), "ELEMENT_ID" => array("NAME" => GetMessage("ELEMENT_ID_DESC"))), "AJAX_MODE" => array(), "SEF_MODE" => array("sections" => array("NAME" => GetMessage("SECTIONS_TOP_PAGE"), "DEFAULT" => "", "VARIABLES" => array()), "section" => array("NAME" => GetMessage("SECTION_PAGE"), "DEFAULT" => "#SECTION_ID#/", "VARIABLES" => array("SECTION_ID" => "SID")), "element" => array("NAME" => GetMessage("DETAIL_PAGE"), "DEFAULT" => "#SECTION_ID#/#ELEMENT_ID#/", "VARIABLES" => array("ELEMENT_ID" => "EID")), "compare" => array("NAME" => GetMessage("COMPARE_PAGE"), "DEFAULT" => "compare.php?action=#ACTION_CODE#", "VARIABLES" => array("action" => "action"))), "IBLOCK_TYPE" => array("PARENT" => "BASE", "NAME" => GetMessage("IBLOCK_TYPE"), "TYPE" => "LIST", "VALUES" => $arIBlockType, "REFRESH" => "Y"), "IBLOCK_ID" => array("PARENT" => "BASE", "NAME" => GetMessage("IBLOCK_IBLOCK"), "TYPE" => "LIST", "ADDITIONAL_VALUES" => "Y", "VALUES" => $arIBlock, "REFRESH" => "Y"), "USE_FILTER" => array("PARENT" => "FILTER_SETTINGS", "NAME" => GetMessage("T_IBLOCK_DESC_USE_FILTER"), "TYPE" => "CHECKBOX", "DEFAULT" => "N", "REFRESH" => "Y"), "USE_REVIEW" => array("PARENT" => "REVIEW_SETTINGS", "NAME" => GetMessage("T_IBLOCK_DESC_USE_REVIEW"), "TYPE" => "CHECKBOX", "DEFAULT" => "N", "REFRESH" => "Y"), "USE_COMPARE" => array("PARENT" => "COMPARE_SETTINGS", "NAME" => GetMessage("T_IBLOCK_DESC_USE_COMPARE"), "TYPE" => "CHECKBOX", "DEFAULT" => "N", "REFRESH" => "Y"), "SHOW_TOP_ELEMENTS" => array("PARENT" => "TOP_SETTINGS", "NAME" => GetMessage("NC_P_SHOW_TOP_ELEMENTS"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y", "REFRESH" => "Y"), "SECTION_COUNT_ELEMENTS" => array("PARENT" => "SECTIONS_SETTINGS", "NAME" => GetMessage('CP_BC_SECTION_COUNT_ELEMENTS'), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "SECTION_TOP_DEPTH" => array("PARENT" => "SECTIONS_SETTINGS", "NAME" => GetMessage('CP_BC_SECTION_TOP_DEPTH'), "TYPE" => "STRING", "DEFAULT" => "2"), "PAGE_ELEMENT_COUNT" => array("PARENT" => "LIST_SETTINGS", "NAME" => GetMessage("IBLOCK_PAGE_ELEMENT_COUNT"), "TYPE" => "STRING", "DEFAULT" => "30"), "LINE_ELEMENT_COUNT" => array("PARENT" => "LIST_SETTINGS", "NAME" => GetMessage("IBLOCK_LINE_ELEMENT_COUNT"), "TYPE" => "STRING", "DEFAULT" => "3"), "ELEMENT_SORT_FIELD" => array("PARENT" => "LIST_SETTINGS", "NAME" => GetMessage("IBLOCK_ELEMENT_SORT_FIELD"), "TYPE" => "LIST", "VALUES" => array("shows" => GetMessage("IBLOCK_SORT_SHOWS"), "sort" => GetMessage("IBLOCK_SORT_SORT"), "timestamp_x" => GetMessage("IBLOCK_SORT_TIMESTAMP"), "name" => GetMessage("IBLOCK_SORT_NAME"), "id" => GetMessage("IBLOCK_SORT_ID"), "active_from" => GetMessage("IBLOCK_SORT_ACTIVE_FROM"), "active_to" => GetMessage("IBLOCK_SORT_ACTIVE_TO")), "ADDITIONAL_VALUES" => "Y", "DEFAULT" => "sort"), "ELEMENT_SORT_ORDER" => array("PARENT" => "LIST_SETTINGS", "NAME" => GetMessage("IBLOCK_ELEMENT_SORT_ORDER"), "TYPE" => "LIST", "VALUES" => $arAscDesc, "DEFAULT" => "asc", "ADDITIONAL_VALUES" => "Y"), "LIST_PROPERTY_CODE" => array("PARENT" => "LIST_SETTINGS", "NAME" => GetMessage("IBLOCK_PROPERTY"), "TYPE" => "LIST", "MULTIPLE" => "Y", "ADDITIONAL_VALUES" => "Y", "VALUES" => $arProperty_LNS, "ADDITIONAL_VALUES" => "Y"), "INCLUDE_SUBSECTIONS" => array("PARENT" => "LIST_SETTINGS", "NAME" => GetMessage("CP_BC_INCLUDE_SUBSECTIONS"), "TYPE" => "LIST", "VALUES" => array("Y" => GetMessage('CP_BC_INCLUDE_SUBSECTIONS_ALL'), "A" => GetMessage('CP_BC_INCLUDE_SUBSECTIONS_ACTIVE'), "N" => GetMessage('CP_BC_INCLUDE_SUBSECTIONS_NO')), "DEFAULT" => "Y"), "LIST_META_KEYWORDS" => array("PARENT" => "LIST_SETTINGS", "NAME" => GetMessage("CP_BC_LIST_META_KEYWORDS"), "TYPE" => "LIST", "MULTIPLE" => "N", "ADDITIONAL_VALUES" => "N", "VALUES" => $arUserFields_S), "LIST_META_DESCRIPTION" => array("PARENT" => "LIST_SETTINGS", "NAME" => GetMessage("CP_BC_LIST_META_DESCRIPTION"), "TYPE" => "LIST", "MULTIPLE" => "N", "ADDITIONAL_VALUES" => "N", "VALUES" => $arUserFields_S), "LIST_BROWSER_TITLE" => array("PARENT" => "LIST_SETTINGS", "NAME" => GetMessage("CP_BC_LIST_BROWSER_TITLE"), "TYPE" => "LIST", "MULTIPLE" => "N", "DEFAULT" => "-", "VALUES" => array_merge(array("-" => " ", "NAME" => GetMessage("IBLOCK_FIELD_NAME")), $arUserFields_S)), "DETAIL_PROPERTY_CODE" => array("PARENT" => "DETAIL_SETTINGS", "NAME" => GetMessage("IBLOCK_PROPERTY"), "TYPE" => "LIST", "MULTIPLE" => "Y", "ADDITIONAL_VALUES" => "Y", "VALUES" => $arProperty_LNS), "DETAIL_META_KEYWORDS" => array("PARENT" => "DETAIL_SETTINGS", "NAME" => GetMessage("CP_BC_DETAIL_META_KEYWORDS"), "TYPE" => "LIST", "MULTIPLE" => "N", "ADDITIONAL_VALUES" => "N", "VALUES" => array_merge(array("-" => " "), $arProperty_LNS)), "DETAIL_META_DESCRIPTION" => array("PARENT" => "DETAIL_SETTINGS", "NAME" => GetMessage("CP_BC_DETAIL_META_DESCRIPTION"), "TYPE" => "LIST", "MULTIPLE" => "N", "ADDITIONAL_VALUES" => "N", "VALUES" => array_merge(array("-" => " "), $arProperty_LNS)), "DETAIL_BROWSER_TITLE" => array("PARENT" => "DETAIL_SETTINGS", "NAME" => GetMessage("CP_BC_DETAIL_BROWSER_TITLE"), "TYPE" => "LIST", "MULTIPLE" => "N", "DEFAULT" => "-", "VALUES" => array_merge(array("-" => " ", "NAME" => GetMessage("IBLOCK_FIELD_NAME")), $arProperty_LNS)), "BASKET_URL" => array("PARENT" => "URL_TEMPLATES", "NAME" => GetMessage("IBLOCK_BASKET_URL"), "TYPE" => "STRING", "DEFAULT" => "/personal/basket.php"), "ACTION_VARIABLE" => array("PARENT" => "URL_TEMPLATES", "NAME" => GetMessage("IBLOCK_ACTION_VARIABLE"), "TYPE" => "STRING", "DEFAULT" => "action"), "PRODUCT_ID_VARIABLE" => array("PARENT" => "URL_TEMPLATES", "NAME" => GetMessage("IBLOCK_PRODUCT_ID_VARIABLE"), "TYPE" => "STRING", "DEFAULT" => "id"), "SECTION_ID_VARIABLE" => array("PARENT" => "URL_TEMPLATES", "NAME" => GetMessage("IBLOCK_SECTION_ID_VARIABLE"), "TYPE" => "STRING", "DEFAULT" => "SECTION_ID"), "PRODUCT_QUANTITY_VARIABLE" => array("PARENT" => "URL_TEMPLATES", "NAME" => GetMessage("CP_BC_PRODUCT_QUANTITY_VARIABLE"), "TYPE" => "STRING", "DEFAULT" => "quantity"), "CACHE_TIME" => array("DEFAULT" => 36000000), "CACHE_FILTER" => array("PARENT" => "CACHE_SETTINGS", "NAME" => GetMessage("IBLOCK_CACHE_FILTER"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "CACHE_GROUPS" => array("PARENT" => "CACHE_SETTINGS", "NAME" => GetMessage("CP_BC_CACHE_GROUPS"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "SET_TITLE" => array(), "SET_STATUS_404" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("CP_BC_SET_STATUS_404"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "PRICE_CODE" => array("PARENT" => "PRICES", "NAME" => GetMessage("IBLOCK_PRICE_CODE"), "TYPE" => "LIST", "MULTIPLE" => "Y", "VALUES" => $arPrice), "USE_PRICE_COUNT" => array("PARENT" => "PRICES", "NAME" => GetMessage("IBLOCK_USE_PRICE_COUNT"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "SHOW_PRICE_COUNT" => array("PARENT" => "PRICES", "NAME" => GetMessage("IBLOCK_SHOW_PRICE_COUNT"), "TYPE" => "STRING", "DEFAULT" => "1"), "PRICE_VAT_INCLUDE" => array("PARENT" => "PRICES", "NAME" => GetMessage("IBLOCK_VAT_INCLUDE"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "PRICE_VAT_SHOW_VALUE" => array("PARENT" => "PRICES", "NAME" => GetMessage("IBLOCK_VAT_SHOW_VALUE"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "USE_PRODUCT_QUANTITY" => array("PARENT" => "PRICES", "NAME" => GetMessage("CP_BC_USE_PRODUCT_QUANTITY"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "LINK_IBLOCK_TYPE" => array("PARENT" => "LINK", "NAME" => GetMessage("IBLOCK_LINK_IBLOCK_TYPE"), "TYPE" => "LIST", "ADDITIONAL_VALUES" => "Y", "VALUES" => $arIBlockType, "REFRESH" => "Y"), "LINK_IBLOCK_ID" => array("PARENT" => "LINK", "NAME" => GetMessage("IBLOCK_LINK_IBLOCK_ID"), "TYPE" => "LIST", "ADDITIONAL_VALUES" => "Y", "VALUES" => $arIBlock_LINK, "REFRESH" => "Y"), "LINK_PROPERTY_SID" => array("PARENT" => "LINK", "NAME" => GetMessage("IBLOCK_LINK_PROPERTY_SID"), "TYPE" => "LIST", "ADDITIONAL_VALUES" => "Y", "VALUES" => $arProperty_LINK), "LINK_ELEMENTS_URL" => array("PARENT" => "LINK", "NAME" => GetMessage("IBLOCK_LINK_ELEMENTS_URL"), "TYPE" => "STRING", "DEFAULT" => "link.php?PARENT_ELEMENT_ID=#ELEMENT_ID#"), "USE_ALSO_BUY" => array("PARENT" => "ALSO_BUY_SETTINGS", "NAME" => GetMessage("T_IBLOCK_DESC_USE_ALSO_BUY"), "TYPE" => "CHECKBOX", "DEFAULT" => "N", "REFRESH" => "Y"), "USE_STORE" => array("PARENT" => "STORE_SETTINGS", "NAME" => GetMessage("T_IBLOCK_DESC_USE_STORE"), "TYPE" => "CHECKBOX", "DEFAULT" => "N", "REFRESH" => "Y"), "USE_ELEMENT_COUNTER" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage('CP_BC_USE_ELEMENT_COUNTER'), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"))); CIBlockParameters::AddPagerSettings($arComponentParameters, GetMessage("T_IBLOCK_DESC_PAGER_CATALOG"), true, true); if ($arCurrentValues["USE_COMPARE"] == "Y") { $arComponentParameters["PARAMETERS"]["COMPARE_NAME"] = array("PARENT" => "COMPARE_SETTINGS", "NAME" => GetMessage("IBLOCK_COMPARE_NAME"), "TYPE" => "STRING", "DEFAULT" => "CATALOG_COMPARE_LIST"); $arComponentParameters["PARAMETERS"]["COMPARE_FIELD_CODE"] = CIBlockParameters::GetFieldCode(GetMessage("IBLOCK_FIELD"), "COMPARE_SETTINGS"); $arComponentParameters["PARAMETERS"]["COMPARE_PROPERTY_CODE"] = array("PARENT" => "COMPARE_SETTINGS", "NAME" => GetMessage("IBLOCK_PROPERTY"), "TYPE" => "LIST", "MULTIPLE" => "Y", "VALUES" => $arProperty_LNS, "ADDITIONAL_VALUES" => "Y"); if ($OFFERS_IBLOCK_ID) { $arComponentParameters["PARAMETERS"]["COMPARE_OFFERS_FIELD_CODE"] = CIBlockParameters::GetFieldCode(GetMessage("CP_BC_COMPARE_OFFERS_FIELD_CODE"), "COMPARE_SETTINGS"); $arComponentParameters["PARAMETERS"]["COMPARE_OFFERS_PROPERTY_CODE"] = array("PARENT" => "COMPARE_SETTINGS", "NAME" => GetMessage("CP_BC_COMPARE_OFFERS_PROPERTY_CODE"), "TYPE" => "LIST", "MULTIPLE" => "Y", "VALUES" => $arProperty_Offers, "ADDITIONAL_VALUES" => "Y"); } $arComponentParameters["PARAMETERS"]["COMPARE_ELEMENT_SORT_FIELD"] = array("PARENT" => "COMPARE_SETTINGS", "NAME" => GetMessage("CP_BC_COMPARE_ELEMENT_SORT_FIELD"), "TYPE" => "LIST", "VALUES" => array("shows" => GetMessage("IBLOCK_SORT_SHOWS"), "sort" => GetMessage("IBLOCK_SORT_SORT"), "timestamp_x" => GetMessage("IBLOCK_SORT_TIMESTAMP"), "name" => GetMessage("IBLOCK_SORT_NAME"), "id" => GetMessage("IBLOCK_SORT_ID"), "active_from" => GetMessage("IBLOCK_SORT_ACTIVE_FROM"), "active_to" => GetMessage("IBLOCK_SORT_ACTIVE_TO")), "ADDITIONAL_VALUES" => "Y", "DEFAULT" => "sort"); $arComponentParameters["PARAMETERS"]["COMPARE_ELEMENT_SORT_ORDER"] = array("PARENT" => "COMPARE_SETTINGS", "NAME" => GetMessage("CP_BC_COMPARE_ELEMENT_SORT_ORDER"), "TYPE" => "LIST", "VALUES" => $arAscDesc, "DEFAULT" => "asc", "ADDITIONAL_VALUES" => "Y"); $arComponentParameters["PARAMETERS"]["DISPLAY_ELEMENT_SELECT_BOX"] = array("PARENT" => "COMPARE_SETTINGS", "NAME" => GetMessage("T_IBLOCK_DESC_ELEMENT_BOX"), "TYPE" => "CHECKBOX", "DEFAULT" => "N", "REFRESH" => "Y"); if ($arCurrentValues["DISPLAY_ELEMENT_SELECT_BOX"] == "Y") { $arComponentParameters["PARAMETERS"]["ELEMENT_SORT_FIELD_BOX"] = array("PARENT" => "COMPARE_SETTINGS", "NAME" => GetMessage("IBLOCK_ELEMENT_SORT_FIELD_BOX"), "TYPE" => "LIST", "VALUES" => array("shows" => GetMessage("IBLOCK_SORT_SHOWS"), "sort" => GetMessage("IBLOCK_SORT_SORT"), "timestamp_x" => GetMessage("IBLOCK_SORT_TIMESTAMP"), "name" => GetMessage("IBLOCK_SORT_NAME"), "id" => GetMessage("IBLOCK_SORT_ID"), "active_from" => GetMessage("IBLOCK_SORT_ACTIVE_FROM"), "active_to" => GetMessage("IBLOCK_SORT_ACTIVE_TO")), "ADDITIONAL_VALUES" => "Y", "DEFAULT" => "name"); $arComponentParameters["PARAMETERS"]["ELEMENT_SORT_ORDER_BOX"] = array("PARENT" => "COMPARE_SETTINGS", "NAME" => GetMessage("IBLOCK_ELEMENT_SORT_ORDER_BOX"), "TYPE" => "LIST", "VALUES" => $arAscDesc, "DEFAULT" => "asc", "ADDITIONAL_VALUES" => "Y"); }
die; } if (!CModule::IncludeModule("iblock")) { return; } $arTypes = CIBlockParameters::GetIBlockTypes(); $arIBlocks = array(); $db_iblock = CIBlock::GetList(array("SORT" => "ASC"), array("SITE_ID" => $_REQUEST["site"], "TYPE" => $arCurrentValues["IBLOCK_TYPE"] != "-" ? $arCurrentValues["IBLOCK_TYPE"] : "")); while ($arRes = $db_iblock->Fetch()) { $arIBlocks[$arRes["ID"]] = $arRes["NAME"]; } $arProperty_LNS = array(); $rsProp = CIBlockProperty::GetList(array("sort" => "asc", "name" => "asc"), array("ACTIVE" => "Y", "IBLOCK_ID" => isset($arCurrentValues["IBLOCK_ID"]) ? $arCurrentValues["IBLOCK_ID"] : $arCurrentValues["ID"])); while ($arr = $rsProp->Fetch()) { $arProperty[$arr["CODE"]] = "[" . $arr["CODE"] . "] " . $arr["NAME"]; if (in_array($arr["PROPERTY_TYPE"], array("L", "N", "S"))) { $arProperty_LNS[$arr["CODE"]] = "[" . $arr["CODE"] . "] " . $arr["NAME"]; } } $arUGroupsEx = array(); $dbUGroups = CGroup::GetList($by = "c_sort", $order = "asc"); while ($arUGroups = $dbUGroups->Fetch()) { $arUGroupsEx[$arUGroups["ID"]] = $arUGroups["NAME"]; } $arComponentParameters = array("GROUPS" => array(), "PARAMETERS" => array("AJAX_MODE" => array(), "IBLOCK_TYPE" => array("PARENT" => "BASE", "NAME" => GetMessage("T_IBLOCK_DESC_LIST_TYPE"), "TYPE" => "LIST", "VALUES" => $arTypes, "DEFAULT" => "news", "REFRESH" => "Y"), "IBLOCK_ID" => array("PARENT" => "BASE", "NAME" => GetMessage("T_IBLOCK_DESC_LIST_ID"), "TYPE" => "LIST", "VALUES" => $arIBlocks, "DEFAULT" => '', "ADDITIONAL_VALUES" => "Y", "REFRESH" => "Y"), "ELEMENT_ID" => array("PARENT" => "BASE", "NAME" => GetMessage("CP_BND_ELEMENT_ID"), "TYPE" => "STRING", "DEFAULT" => '={$_REQUEST["ELEMENT_ID"]}'), "ELEMENT_CODE" => array("PARENT" => "BASE", "NAME" => GetMessage("CP_BND_ELEMENT_CODE"), "TYPE" => "STRING", "DEFAULT" => ''), "CHECK_DATES" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("T_IBLOCK_DESC_CHECK_DATES"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "FIELD_CODE" => CIBlockParameters::GetFieldCode(GetMessage("IBLOCK_FIELD"), "DATA_SOURCE"), "PROPERTY_CODE" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("T_IBLOCK_PROPERTY"), "TYPE" => "LIST", "MULTIPLE" => "Y", "VALUES" => $arProperty_LNS, "ADDITIONAL_VALUES" => "Y"), "IBLOCK_URL" => CIBlockParameters::GetPathTemplateParam("LIST", "IBLOCK_URL", GetMessage("T_IBLOCK_DESC_LIST_PAGE_URL"), "", "URL_TEMPLATES"), "DETAIL_URL" => CIBlockParameters::GetPathTemplateParam("DETAIL", "DETAIL_URL", GetMessage("CP_BND_DETAIL_URL"), "", "URL_TEMPLATES"), "SET_TITLE" => array(), "SET_CANONICAL_URL" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("CP_BND_SET_CANONICAL_URL"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "SET_BROWSER_TITLE" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("CP_BND_SET_BROWSER_TITLE"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y", "REFRESH" => "Y"), "BROWSER_TITLE" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("CP_BND_BROWSER_TITLE"), "TYPE" => "LIST", "MULTIPLE" => "N", "DEFAULT" => "-", "VALUES" => array_merge(array("-" => " ", "NAME" => GetMessage("IBLOCK_FIELD_NAME")), $arProperty_LNS), "HIDDEN" => isset($arCurrentValues['SET_BROWSER_TITLE']) && $arCurrentValues['SET_BROWSER_TITLE'] == 'N' ? 'Y' : 'N'), "SET_META_KEYWORDS" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("CP_BND_SET_META_KEYWORDS"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y", "REFRESH" => "Y"), "META_KEYWORDS" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("T_IBLOCK_DESC_KEYWORDS"), "TYPE" => "LIST", "MULTIPLE" => "N", "DEFAULT" => "-", "VALUES" => array_merge(array("-" => " "), $arProperty_LNS), "HIDDEN" => isset($arCurrentValues['SET_META_KEYWORDS']) && $arCurrentValues['SET_META_KEYWORDS'] == 'N' ? 'Y' : 'N'), "SET_META_DESCRIPTION" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("CP_BND_SET_META_DESCRIPTION"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y", "REFRESH" => "Y"), "META_DESCRIPTION" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("T_IBLOCK_DESC_DESCRIPTION"), "TYPE" => "LIST", "MULTIPLE" => "N", "DEFAULT" => "-", "VALUES" => array_merge(array("-" => " "), $arProperty_LNS), "HIDDEN" => isset($arCurrentValues['SET_META_DESCRIPTION']) && $arCurrentValues['SET_META_DESCRIPTION'] == 'N' ? 'Y' : 'N'), "SET_LAST_MODIFIED" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("CP_BND_SET_LAST_MODIFIED"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "INCLUDE_IBLOCK_INTO_CHAIN" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("T_IBLOCK_DESC_INCLUDE_IBLOCK_INTO_CHAIN"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "ADD_SECTIONS_CHAIN" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("T_IBLOCK_DESC_ADD_SECTIONS_CHAIN"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "ADD_ELEMENT_CHAIN" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("T_IBLOCK_DESC_ADD_ELEMENT_CHAIN"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "ACTIVE_DATE_FORMAT" => CIBlockParameters::GetDateFormat(GetMessage("T_IBLOCK_DESC_ACTIVE_DATE_FORMAT"), "ADDITIONAL_SETTINGS"), "USE_PERMISSIONS" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("T_IBLOCK_DESC_USE_PERMISSIONS"), "TYPE" => "CHECKBOX", "DEFAULT" => "N", "REFRESH" => "Y"), "GROUP_PERMISSIONS" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("T_IBLOCK_DESC_GROUP_PERMISSIONS"), "TYPE" => "LIST", "VALUES" => $arUGroupsEx, "DEFAULT" => array(1), "MULTIPLE" => "Y"), "CACHE_TIME" => array("DEFAULT" => 36000000), "CACHE_GROUPS" => array("PARENT" => "CACHE_SETTINGS", "NAME" => GetMessage("CP_BND_CACHE_GROUPS"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"))); CIBlockParameters::AddPagerSettings($arComponentParameters, GetMessage("T_IBLOCK_DESC_PAGER_PAGE"), false, true, true, $arCurrentValues["PAGER_BASE_LINK_ENABLE"] === "Y"); unset($arComponentParameters["PARAMETERS"]["PAGER_SHOW_ALWAYS"]); CIBlockParameters::Add404Settings($arComponentParameters, $arCurrentValues); if ($arCurrentValues["USE_PERMISSIONS"] != "Y") { unset($arComponentParameters["PARAMETERS"]["GROUP_PERMISSIONS"]); }
"TYPE" => "CHECKBOX", "DEFAULT" => "N", ), "CACHE_GROUPS" => array( "PARENT" => "CACHE_SETTINGS", "NAME" => GetMessage("CP_BCS_CACHE_GROUPS"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y", ), ), ); CIBlockParameters::AddPagerSettings( $arComponentParameters, GetMessage("T_IBLOCK_DESC_PAGER_CATALOG"), //$pager_title true, //$bDescNumbering true, //$bShowAllParam true, //$bBaseLink $arCurrentValues["PAGER_BASE_LINK_ENABLE"]==="Y" //$bBaseLinkEnabled ); CIBlockParameters::Add404Settings($arComponentParameters, $arCurrentValues); if ($arCurrentValues["SEF_MODE"] == "Y") { $arComponentParameters["PARAMETERS"]["SECTION_CODE_PATH"] = array( "NAME" => GetMessage("CP_BCS_SECTION_CODE_PATH"), "TYPE" => "STRING", "DEFAULT" => "", ); }
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) { die; } if (!CModule::IncludeModule("iblock")) { return; } $arTypesEx = array("-" => " "); $db_iblock_type = CIBlockType::GetList(array("SORT" => "ASC")); while ($arRes = $db_iblock_type->Fetch()) { if ($arIBType = CIBlockType::GetByIDLang($arRes["ID"], LANG)) { $arTypesEx[$arRes["ID"]] = $arIBType["NAME"]; } } $arIBlocks = array(); $db_iblock = CIBlock::GetList(array("SORT" => "ASC"), array("SITE_ID" => $_REQUEST["site"], "TYPE" => $arCurrentValues["IBLOCK_TYPE"] != "-" ? $arCurrentValues["IBLOCK_TYPE"] : "")); while ($arRes = $db_iblock->Fetch()) { $arIBlocks[$arRes["ID"]] = $arRes["NAME"]; } $arSorts = array("ASC" => GetMessage("T_IBLOCK_DESC_ASC"), "DESC" => GetMessage("T_IBLOCK_DESC_DESC")); $arSortFields = array("ID" => GetMessage("T_IBLOCK_DESC_FID"), "NAME" => GetMessage("T_IBLOCK_DESC_FNAME"), "ACTIVE_FROM" => GetMessage("T_IBLOCK_DESC_FACT"), "SORT" => GetMessage("T_IBLOCK_DESC_FSORT"), "TIMESTAMP_X" => GetMessage("T_IBLOCK_DESC_FTSAMP")); $arProperty_LNS = array(); $rsProp = CIBlockProperty::GetList(array("sort" => "asc", "name" => "asc"), array("ACTIVE" => "Y", "IBLOCK_ID" => isset($arCurrentValues["IBLOCK_ID"]) ? $arCurrentValues["IBLOCK_ID"] : $arCurrentValues["ID"])); while ($arr = $rsProp->Fetch()) { $arProperty[$arr["CODE"]] = "[" . $arr["CODE"] . "] " . $arr["NAME"]; if (in_array($arr["PROPERTY_TYPE"], array("L", "N", "S"))) { $arProperty_LNS[$arr["CODE"]] = "[" . $arr["CODE"] . "] " . $arr["NAME"]; } } $arComponentParameters = array("GROUPS" => array(), "PARAMETERS" => array("AJAX_MODE" => array(), "IBLOCK_TYPE" => array("PARENT" => "BASE", "NAME" => GetMessage("T_IBLOCK_DESC_LIST_TYPE"), "TYPE" => "LIST", "VALUES" => $arTypesEx, "DEFAULT" => "library", "REFRESH" => "Y"), "IBLOCK_ID" => array("PARENT" => "BASE", "NAME" => GetMessage("T_IBLOCK_DESC_LIST_ID"), "TYPE" => "LIST", "VALUES" => $arIBlocks, "DEFAULT" => '={$_REQUEST["ID"]}', "ADDITIONAL_VALUES" => "Y", "REFRESH" => "Y"), "DOCS_COUNT" => array("PARENT" => "BASE", "NAME" => GetMessage("T_IBLOCK_DESC_LIST_CONT"), "TYPE" => "STRING", "DEFAULT" => "20"), "SORT_BY1" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("T_IBLOCK_DESC_IBORD1"), "TYPE" => "LIST", "DEFAULT" => "ACTIVE_FROM", "VALUES" => $arSortFields, "ADDITIONAL_VALUES" => "Y"), "SORT_ORDER1" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("T_IBLOCK_DESC_IBBY1"), "TYPE" => "LIST", "DEFAULT" => "DESC", "VALUES" => $arSorts), "FILTER_NAME" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("T_IBLOCK_FILTER"), "TYPE" => "STRING", "DEFAULT" => ""), "FIELD_CODE" => CIBlockParameters::GetFieldCode(GetMessage("IBLOCK_FIELD"), "DATA_SOURCE"), "PROPERTY_CODE" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("T_IBLOCK_PROPERTY"), "TYPE" => "LIST", "MULTIPLE" => "Y", "VALUES" => $arProperty_LNS, "ADDITIONAL_VALUES" => "Y"), "DETAIL_URL" => array("PARENT" => "URL_TEMPLATES", "NAME" => GetMessage("T_IBLOCK_DESC_DETAIL_PAGE_URL"), "TYPE" => "STRING", "DEFAULT" => "doc_detail.php?ID=#ELEMENT_ID#"), "PREVIEW_TRUNCATE_LEN" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("T_IBLOCK_DESC_PREVIEW_TRUNCATE_LEN"), "TYPE" => "STRING", "DEFAULT" => ""), "ACTIVE_DATE_FORMAT" => CComponentUtil::GetDateFormatField(GetMessage("T_IBLOCK_DESC_ACTIVE_DATE_FORMAT"), "ADDITIONAL_SETTINGS"), "DISPLAY_PANEL" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("T_IBLOCK_DESC_DOCS_PANEL"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "SET_TITLE" => array(), "INCLUDE_IBLOCK_INTO_CHAIN" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("T_IBLOCK_DESC_INCLUDE_IBLOCK_INTO_CHAIN"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "ADD_SECTIONS_CHAIN" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("T_IBLOCK_DESC_ADD_SECTIONS_CHAIN"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "HIDE_LINK_WHEN_NO_DETAIL" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("T_IBLOCK_DESC_HIDE_LINK_WHEN_NO_DETAIL"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "PARENT_SECTION" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("IBLOCK_SECTION_ID"), "TYPE" => "STRING", "DEFAULT" => ''), "CACHE_TIME" => array("DEFAULT" => 3600), "CACHE_FILTER" => array("PARENT" => "CACHE_SETTINGS", "NAME" => GetMessage("IBLOCK_CACHE_FILTER"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"))); CIBlockParameters::AddPagerSettings($arComponentParameters, GetMessage("T_IBLOCK_DESC_PAGER_DOCS"));
} Loc::loadMessages(__FILE__); try { ComponentParameters::includeModules(['iblock']); $iblockTypes = CIBlockParameters::GetIBlockTypes([0 => '']); $iblocks = [0 => '']; $sections = [0 => '']; $elementProperties = []; if (isset($arCurrentValues['IBLOCK_TYPE']) && strlen($arCurrentValues['IBLOCK_TYPE'])) { $rsIblocks = Iblock\IblockTable::getList(['order' => ['SORT' => 'ASC', 'NAME' => 'ASC'], 'filter' => ['IBLOCK_TYPE_ID' => $arCurrentValues['IBLOCK_TYPE'], 'ACTIVE' => 'Y'], 'select' => ['ID', 'NAME']]); while ($iblock = $rsIblocks->fetch()) { $iblocks[$iblock['ID']] = $iblock['NAME']; } } if (isset($arCurrentValues['IBLOCK_ID']) && strlen($arCurrentValues['IBLOCK_ID'])) { $rsSections = Iblock\SectionTable::getList(['order' => ['SORT' => 'ASC', 'NAME' => 'ASC'], 'filter' => ['IBLOCK_ID' => $arCurrentValues['IBLOCK_ID'], 'ACTIVE' => 'Y'], 'select' => ['ID', 'NAME']]); while ($arSection = $rsSections->fetch()) { $sections[$arSection['ID']] = $arSection['NAME']; } $rsProperties = CIBlockProperty::GetList(['sort' => 'asc', 'name' => 'asc'], ['ACTIVE' => 'Y', 'IBLOCK_ID' => $arCurrentValues['IBLOCK_ID']]); while ($property = $rsProperties->Fetch()) { $elementProperties[$property['CODE']] = '[' . $property['CODE'] . '] ' . $property['NAME']; } } $paramElementsFields = CIBlockParameters::GetFieldCode(Loc::getMessage('ELEMENTS_LIST_FIELDS'), 'BASE'); $sortOrders = ['ASC' => Loc::getMessage('ELEMENTS_LIST_SORT_ORDER_ASC'), 'DESC' => Loc::getMessage('ELEMENTS_LIST_SORT_ORDER_DESC')]; $arComponentParameters = ['GROUPS' => ['AJAX' => ['NAME' => Loc::getMessage('ELEMENTS_LIST_GROUP_AJAX')], 'SEO' => ['NAME' => Loc::getMessage('ELEMENTS_LIST_GROUP_SEO')], 'OTHERS' => ['NAME' => Loc::getMessage('ELEMENTS_LIST_GROUP_OTHERS')]], 'PARAMETERS' => ['IBLOCK_TYPE' => ['PARENT' => 'BASE', 'NAME' => Loc::getMessage('ELEMENTS_LIST_IBLOCK_TYPE'), 'TYPE' => 'LIST', 'VALUES' => $iblockTypes, 'DEFAULT' => '', 'REFRESH' => 'Y'], 'IBLOCK_ID' => ['PARENT' => 'BASE', 'NAME' => Loc::getMessage('ELEMENTS_LIST_IBLOCK_ID'), 'TYPE' => 'LIST', 'VALUES' => $iblocks, 'REFRESH' => 'Y'], 'SECTION_ID' => ['PARENT' => 'BASE', 'NAME' => Loc::getMessage('ELEMENTS_LIST_SECTION_ID'), 'TYPE' => 'LIST', 'VALUES' => $sections], 'SECTION_CODE' => ['PARENT' => 'BASE', 'NAME' => Loc::getMessage('ELEMENTS_LIST_SECTION_CODE'), 'TYPE' => 'STRING'], 'INCLUDE_SUBSECTIONS' => ['PARENT' => 'BASE', 'NAME' => Loc::getMessage('ELEMENTS_LIST_INCLUDE_SUBSECTIONS'), 'TYPE' => 'CHECKBOX', 'DEFAULT' => 'N'], 'SORT_BY_1' => ['PARENT' => 'BASE', 'NAME' => Loc::getMessage('ELEMENTS_LIST_SORT_BY_1'), 'TYPE' => 'LIST', 'VALUES' => CIBlockParameters::GetElementSortFields()], 'SORT_ORDER_1' => ['PARENT' => 'BASE', 'NAME' => Loc::getMessage('ELEMENTS_LIST_SORT_ORDER_1'), 'TYPE' => 'LIST', 'VALUES' => $sortOrders], 'SORT_BY_2' => ['PARENT' => 'BASE', 'NAME' => Loc::getMessage('ELEMENTS_LIST_SORT_BY_2'), 'TYPE' => 'LIST', 'VALUES' => CIBlockParameters::GetElementSortFields()], 'SORT_ORDER_2' => ['PARENT' => 'BASE', 'NAME' => Loc::getMessage('ELEMENTS_LIST_SORT_ORDER_2'), 'TYPE' => 'LIST', 'VALUES' => $sortOrders], 'SELECT_FIELDS' => $paramElementsFields, 'SELECT_PROPS' => ['PARENT' => 'BASE', 'NAME' => Loc::getMessage('ELEMENTS_LIST_PROPERTIES'), 'TYPE' => 'LIST', 'MULTIPLE' => 'Y', 'VALUES' => $elementProperties, 'ADDITIONAL_VALUES' => 'Y'], 'RESULT_PROCESSING_MODE' => ['PARENT' => 'BASE', 'NAME' => Loc::getMessage('ELEMENTS_LIST_RESULT_PROCESSING_MODE'), 'TYPE' => 'LIST', 'VALUES' => ['DEFAULT' => Loc::getMessage('ELEMENTS_LIST_RESULT_PROCESSING_MODE_DEFAULT'), 'EXTENDED' => Loc::getMessage('ELEMENTS_LIST_RESULT_PROCESSING_MODE_EXTENDED')]], 'EX_FILTER_NAME' => ['PARENT' => 'BASE', 'NAME' => Loc::getMessage('ELEMENTS_LIST_EX_FILTER_NAME'), 'TYPE' => 'STRING', 'DEFAULT' => ''], 'PAGER_SAVE_SESSION' => ['PARENT' => 'PAGER_SETTINGS', 'NAME' => Loc::getMessage('ELEMENTS_LIST_NAV_SAVE_SESSION'), 'TYPE' => 'CHECKBOX', 'DEFAULT' => 'N'], 'ELEMENTS_COUNT' => ['PARENT' => 'PAGER_SETTINGS', 'NAME' => Loc::getMessage('ELEMENTS_LIST_ELEMENTS_COUNT'), 'TYPE' => 'STRING', 'DEFAULT' => '10'], 'USE_AJAX' => ['PARENT' => 'AJAX', 'NAME' => Loc::getMessage('ELEMENTS_LIST_USE_AJAX'), 'TYPE' => 'CHECKBOX', 'DEFAULT' => 'Y'], 'AJAX_TYPE' => ['PARENT' => 'AJAX', 'NAME' => Loc::getMessage('ELEMENTS_LIST_AJAX_TYPE'), 'TYPE' => 'LIST', 'VALUES' => ['DEFAULT' => Loc::getMessage('ELEMENTS_LIST_AJAX_TYPE_DEFAULT'), 'JSON' => Loc::getMessage('ELEMENTS_LIST_AJAX_TYPE_JSON')]], 'AJAX_HEAD_RELOAD' => ['PARENT' => 'AJAX', 'NAME' => Loc::getMessage('ELEMENTS_LIST_AJAX_HEAD_RELOAD'), 'TYPE' => 'CHECKBOX', 'DEFAULT' => 'N'], 'AJAX_TEMPLATE_PAGE' => ['PARENT' => 'AJAX', 'NAME' => Loc::getMessage('ELEMENTS_LIST_AJAX_TEMPLATE_PAGE'), 'TYPE' => 'STRING', 'DEFAULT' => ''], 'AJAX_COMPONENT_ID' => ['PARENT' => 'AJAX', 'NAME' => Loc::getMessage('ELEMENTS_LIST_AJAX_COMPONENT_ID'), 'TYPE' => 'STRING', 'DEFAULT' => ''], 'SET_SEO_TAGS' => ['PARENT' => 'SEO', 'NAME' => Loc::getMessage('ELEMENTS_LIST_SET_SEO_TAGS'), 'TYPE' => 'CHECKBOX', 'DEFAULT' => 'Y'], 'ADD_SECTIONS_CHAIN' => ['PARENT' => 'SEO', 'NAME' => Loc::getMessage('ELEMENTS_LIST_ADD_SECTIONS_CHAIN'), 'TYPE' => 'CHECKBOX', 'DEFAULT' => 'Y'], 'SET_404' => ['PARENT' => 'OTHERS', 'NAME' => Loc::getMessage('ELEMENTS_LIST_SET_404'), 'TYPE' => 'CHECKBOX', 'DEFAULT' => 'N'], 'CHECK_PERMISSIONS' => ['PARENT' => 'OTHERS', 'NAME' => Loc::getMessage('ELEMENTS_LIST_CHECK_PERMISSIONS'), 'TYPE' => 'CHECKBOX', 'DEFAULT' => 'Y'], 'DATE_FORMAT' => CIBlockParameters::GetDateFormat(Loc::getMessage('ELEMENTS_LIST_DATE_FORMAT'), 'OTHERS'), 'CACHE_GROUPS' => ['PARENT' => 'CACHE_SETTINGS', 'NAME' => Loc::getMessage('ELEMENTS_LIST_CACHE_GROUPS'), 'TYPE' => 'CHECKBOX', 'DEFAULT' => 'N'], 'CACHE_TIME' => ['DEFAULT' => 360000]]]; CIBlockParameters::AddPagerSettings($arComponentParameters, Loc::getMessage('ELEMENTS_LIST_NAV_TITLE'), true, true); } catch (Exception $e) { ShowError($e->getMessage()); }
"TYPE" => "CHECKBOX", "DEFAULT" => "N", "REFRESH" => "Y", ); $PARAMETERS ["GROUP_PERMISSIONS"] = array( "PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("PR_RECRM_C_GROUP_PERMISSIONS"), "TYPE" => "LIST", "VALUES" => $arUGroupsEx, "DEFAULT" => array(1), "MULTIPLE" => "Y", ); /* Groups */ $arComponentParameters = array( "GROUPS" => array( "G_PARAMS_CARD" => array( "NAME" => GetMessage("PR_RECRM_C_G_PARAMS_CARD"), "SORT" => "202", ), ), "PARAMETERS" => $PARAMETERS, ); /* Pager */ CIBlockParameters::AddPagerSettings($arComponentParameters, GetMessage("PR_RECRM_C_PAGER_TEXT"), false, true); unset($arComponentParameters["PARAMETERS"]["PAGER_SHOW_ALWAYS"]); /* Permis */ if($arCurrentValues["USE_PERMISSIONS"] != "Y") unset($arComponentParameters["PARAMETERS"]["GROUP_PERMISSIONS"]);