Current Path : /home/bitrix/ext_www/klimatlend.ua/bitrix/components/bitrix/iblock.vote/ |
Current File : /home/bitrix/ext_www/klimatlend.ua/bitrix/components/bitrix/iblock.vote/.parameters.php |
<? if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die(); if(!CModule::IncludeModule("iblock")) return; $arIBlockType = CIBlockParameters::GetIBlockTypes(); $arIBlock=array(); $rsIBlock = CIBlock::GetList(Array("sort" => "asc"), Array("TYPE" => $arCurrentValues["IBLOCK_TYPE"], "ACTIVE"=>"Y")); while($arr=$rsIBlock->Fetch()) { $arIBlock[$arr["ID"]] = "[".$arr["ID"]."] ".$arr["NAME"]; } $arComponentParameters = array( "GROUPS" => array( ), "PARAMETERS" => array( "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", ), "ELEMENT_ID" => array( "PARENT" => "BASE", "NAME" => GetMessage("IBLOCK_ELEMENT_ID"), "TYPE" => "STRING", "DEFAULT" => '={$_REQUEST["ELEMENT_ID"]}', ), "ELEMENT_CODE" => array( "PARENT" => "BASE", "NAME" => GetMessage("IBLOCK_ELEMENT_CODE"), "TYPE" => "STRING", "DEFAULT" => '={$_REQUEST["code"]}', ), "MAX_VOTE" => array( "PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("IBLOCK_MAX_VOTE"), "TYPE" => "STRING", "DEFAULT" => "5", ), "VOTE_NAMES" => array( "PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("IBLOCK_VOTE_NAMES"), "TYPE" => "STRING", "VALUES" => array(), "MULTIPLE" => "Y", "DEFAULT" => array("1","2","3","4","5"), "ADDITIONAL_VALUES" => "Y", ), "CACHE_TIME" => Array("DEFAULT"=>36000000), ), ); CIBlockParameters::Add404Settings($arComponentParameters, $arCurrentValues, true, false);