StartResultCache(60*60*24, md5(var_export($_POST, true)))) { if(CModule::IncludeModule('iblock')) { $sort = Array("SORT" => "ASC", "NAME" => "ASC"); $filter = Array("ACTIVE" => "Y", "IBLOCK_ID" => IBLOCK_ID_PROGRAMS, "PROPERTY_PREAPPROVAL_VALUE" => "Да" ); $options = false; $arResult['PROGRAMS'] = []; $programs_res = CIBlockElement::GetList($sort, $filter, false, []); while ($programs_ob_element = $programs_res->GetNextElement()) { $programs_ar_res = $programs_ob_element->GetFields(); $programs_ar_res['PROPERTIES'] = $programs_ob_element->GetProperties(); $arResult['PROGRAMS'][] = [ "CODE" => $programs_ar_res['PROPERTIES']['CODE']['VALUE'], "NAME" => $programs_ar_res['PROPERTIES']['PREAPPROVAL_NAME']['VALUE'] ]; } $this->IncludeComponentTemplate(); } }