getPagesItems(); if (empty($pagesItems)) { $pagesItems = []; } else { ksort($pagesItems); } $pages = []; foreach ($pagesItems as $page => $data) { $pages[$page] = $data['name']; } } else { $pages = menu_get_sec_pages($sec, $menu_hash); } $pages = menu_pepare_acl_select_data($pages, $sec); echo json_encode($pages); return; } if ($get_sec_pages2) { $sec2 = get_parameter('sec2'); $sec = get_parameter('sec'); $menu_hash = get_parameter('menu_hash'); $pages = menu_get_sec2_pages($sec, $sec2, $menu_hash); echo json_encode($pages); return; }