navi_user_group)) { array_push($navi_in, $navigation->id); } } if (sizeof($navi_in)) { $sql = " SELECT * FROM " . PREFIX . "_navigation_items WHERE status = '1' AND navigation_id IN(" . implode(',', $navi_in) . ") ORDER BY navigation_id ASC, position ASC "; } else { return; } } $nav_items = array(); $sql = $AVE_DB->Query($sql); while ($row_nav_item = $sql->FetchAssocArray()) { $nav_items[$row_nav_item['parent_id']][] = $row_nav_item; } $sitemap = ''; if (sizeof($nav_items)) { printSitemap($nav_items, $sitemap); } echo $sitemap; } /** * Рекурсивная функция формирования карты сайта * * @param int $nav_items * @param string $sitemap * @param int $parent */ function printSitemap(&$nav_items, &$sitemap = '', $parent = 0) { $sitemap .= empty($sitemap) ? '