function EmployeeDrawStructure($arStructure, $arSections, $key, $win_id) { foreach ($arStructure[$key] as $ID) { $arRes = $arSections[$ID]; echo '<div class="mts-section' . ($key == 0 ? '-first' : '') . '" style="padding-left: ' . ($arRes['DEPTH_LEVEL'] - 1) * 15 . 'px" onclick="document.getElementById(\'' . $win_id . '\').__object.LoadSection(\'' . $ID . '\')" id="mts_section_' . $ID . '">'; echo '<div class="mts-section-name mts-closed">' . $arRes['NAME'] . '</div>'; echo '</div>'; echo '<div style="display: none" id="bx_children_' . $arRes['ID'] . '">'; if (is_array($arStructure[$ID])) { EmployeeDrawStructure($arStructure, $arSections, $ID, $win_id); } echo '<div class="mts-list" id="mts_elements_' . $ID . '" style="margin-left: ' . $arRes['DEPTH_LEVEL'] * 15 . 'px"><i>' . GetMessage('CT_BMTS_WAIT') . '</i></div>'; echo '</div>'; } }
function EmployeeDrawStructure($arStructure, $arSections, $key) { foreach ($arStructure[$key] as $ID) { $arRes = $arSections[$ID]; echo '<div class="bx-employee-section' . ($key == 0 ? '-first' : '') . '" style="padding-left: ' . ($arRes['DEPTH_LEVEL'] - 1) * 15 . 'px" onclick="BXLoadEmployees(\'' . $ID . '\')" id="bx_employee_section_' . $ID . '">'; echo '<div class="bx-employee-section-name bx-emp-closed">' . htmlspecialcharsbx($arRes['NAME']) . '</div>'; echo '</div>'; echo '<div style="display: none" id="bx_children_' . $arRes['ID'] . '">'; if (is_array($arStructure[$ID])) { EmployeeDrawStructure($arStructure, $arSections, $ID); } echo '<div class="bx-employees-list" id="bx_employees_' . $ID . '" style="margin-left: ' . $arRes['DEPTH_LEVEL'] * 15 . 'px"><i>' . GetMessage('INTR_EMP_WAIT') . '</i></div>'; echo '</div>'; } }