mPageSubNavArr as $subpage) { if($_GET['pageId'] == $subpage['ID']) { if(!isset($_GET['subPageId'])) printf("", $subpage['Label']); else printf("", $subpage['Url'], $subpage['Label']); $db = new DB(); $rs = $db->query(sprintf("SELECT `Label`, `ID` FROM `%s` WHERE `ParentID`=".$subpage['ID']." ORDER BY `SortIndex`", TABLE_SITEMAP)); while($row = $db->nextRecord($rs)) { $url = sprintf("%s?pageId=%d&subPageId=%d", $row['Page'], $subpage['ID'], $row['ID']); if($_GET['subPageId'] == $row['ID']) printf("", $row['Label']); else printf("", $url, $row['Label']); } } else printf("", $subpage['Url'], $subpage['Label']); } ?>
%s
%s
%s
%s
%s