<?php require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php"; ini_set('display_errors', 1); require_once $_SERVER["DOCUMENT_ROOT"] . "/service/contract/c_search_form.php"; global $APPLICATION; ///$APPLICATION->ShowHeadStrings(); //$APPLICATION->ShowHead(); /* */ // $APPLICATION -> AddHeadScript ( '/js/service/event-listner-message.js', false ); $arShowFields = array("act_type_tc", "act_count_to"); $arHiddenFields = array("act_type_tc"); CModule::IncludeModule('iblock'); $res = CIBlock::GetProperties(32, array(), array("ID" => $_REQUEST["show"])); $SrcPropID = "NAME"; /*if($res_arr = $res->Fetch()) { $SrcPropID = $res_arr["CODE"]; } else $SrcPropID = "NAME";*/ try { echo ChoiceForm::HtmlForm(32, $arShowFields, $SrcPropID, true, $arHiddenFields); //array("vhcl_type"=>$_GET["model"]) ); } catch (Exception $e) { echo $e->getMessage(); } require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_after.php";
<?php require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php"; ini_set('display_errors', 1); require_once $_SERVER["DOCUMENT_ROOT"] . "/service/contract/c_search_form.php"; global $APPLICATION; $arShowFields = array("client_full_name", "client_short_name", "client_region", "client_town", "client_inn"); CModule::IncludeModule('iblock'); $res = CIBlock::GetProperties(22, array(), array("ID" => $_REQUEST["show"])); if ($res_arr = $res->Fetch()) { $SrcPropID = $res_arr["CODE"]; } else { $SrcPropID = "client_inn"; } try { echo ChoiceForm::HtmlForm(22, $arShowFields, $SrcPropID); } catch (Exception $e) { echo $e->getMessage(); } require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_after.php";
$res = CIBlock::GetProperties(IBLOCK_SK_CHASSIS_ID, array(), array("ID" => $_REQUEST["show"])); /* // update 18/08/2015 task CAR_BY_ACTION $SrcPropID = "vhcl_chassis"; if($res_arr = $res->Fetch()){ $SrcPropID = $res_arr["CODE"]; }else{ $SrcPropID = "vhcl_chassis"; } */ if ($res_arr = $res->Fetch()) { //$SrcPropID = $res_arr["CODE"]; array_unshift($SrcPropID, $res_arr["CODE"]); } $sub_filter = array(); // Получаю Ид Т/С с активными договорами $carIDs = array(); $db = CIBlockElement::GetList(array(), array("IBLOCK_ID" => IBLOCK_SK_CONTRACT_ID, "ACTIVE" => "Y", "!%PROPERTY_cntrct_status" => array(18, 19)), false, false, array("IBLOCK_ID", "ID", "PROPERTY_cntrct_tc")); while ($obElements = $db->GetNextElement()) { $arFields = $obElements->getFields(); $carIDs = array_merge($carIDs, $arFields["PROPERTY_CNTRCT_TC_VALUE"]); } if (!empty($carIDs)) { $sub_filter['!%ID'] = $carIDs; } try { echo ChoiceForm::HtmlForm(IBLOCK_SK_CHASSIS_ID, $arShowFields, $SrcPropID, true, $arHiddenFields, $sub_filter); //array("vhcl_type"=>$_GET["model"]) ); } catch (Exception $e) { echo $e->getMessage(); } require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_after.php";