'.$site_location.' '.$home['modified_date'].' monthly 1 '; $content_list = getrow("SELECT * FROM `menu` WHERE `parent`='0' and `published`='1' and `portal`='1' and `type`!='hme'", true); $submenscount = 1; foreach ( $content_list as $subsm ) { $mainside .= printsitemap ( $subsm, $submenscount ); } $top .= $mainside; if ($top) { print $top; } function printsitemap($subsm, $pcount = 1){ global $site_location; $page_link = $site_location.createMenuLink($subsm['id']); if($subsm['type']=="menu_link"){ $link = getrow("SELECT * FROM `txtcontent` WHERE `parent`='$subsm[id]'"); $page_link = $link['descr']; } $subsm['modified_date'] = date("Y-m-d",strtotime($subsm['modified_date'])); if(!empty($page_link)){ $smap .= ' '.$page_link.' '.$subsm['modified_date'].' monthly '.round((1*(((100-$pcount*10)-(.8*($pcount*10)))/100)),2).' '; } $subs = getrow ( "SELECT menu.* FROM menu WHERE menu.parent='$subsm[id]' AND menu.published = '1' AND (menu.portal='1' || menu.portal='3') order by ord ASC", true ); if ($subs) { $subscount = $pcount + 1; foreach ( $subs as $sb ) { $subselect .= printsitemap ( $sb, $subscount ); } $smap .= $subselect; } return $smap; } print ' '; ?>