0) { $sql = "SELECT `id`, `name`, `pid` FROM `{$cfg['db']['prefix']}_tree` WHERE `is_vis`='1' AND `pid`=".$id." ORDER BY `sort_map` ASC, `sort` ASC "; $pageid = $db->getAll($sql); $count = count($pageid); if ($count > 0) { $pageidr.=''; foreach ($pageid as $pageid_item) { $pageidr.='
  • '.$pageid_item['name'].'
  • '; } } } return $pageidr; } $tree_map=''; $s1psite=''; $sql = "SELECT `id`, `name`, `pid`, `is_pid_map` FROM `{$cfg['db']['prefix']}_tree` WHERE `is_vis`=1 "; if(!empty($psite)&&($psite==205||$psite==206)) { $sql .= " AND `pid`=".$psite." AND `id` not in (".$pid205.") "; $s1psite='&psite='.$psite; } else { $sql .= " AND `pid`=0 AND `id`<>205 AND `id`<>206 "; } $sql .= " ORDER BY `sort_map` ASC, `topbot` DESC, `sort` ASC "; $maps = $db->getAll($sql); $count = count($maps); if ($count > 0) { $tree_map .= ''; $tpl->assign('MAPITEMS', $tree_map); } $tpl->parse('HTML.MAP'); ?> СРО «РОДОС»: Проектирование дорог, дорожные проекты, дорожные изыскания