Site Map
';
if($run_getMainNav){
$Menu_HTML .= 'Home';
while($m_m = mysql_fetch_assoc($run_getMainNav)){
$m_m_id = $m_m['id'];
$m_m_name = $m_m['name'];
$m_m_title = $m_m['title'];
$m_root_cat = $m_m['root_category'];
$m_section_id = $m_m['section_id'];
$m_url_link = $m_m['url'];
if($m_root_cat == 6):
$cat_append_url = '&show=cat';
else:
$cat_append_url = '';
endif;
$m_m_link = ABSOLUTE_PATH . $m_m['durl'];
if ( $m_m['url'] != '' )
$m_m_link = $m_m['url'];
$section_url_append = '§ion=' . $m_section_id;
if($m_root_cat == 1){
$sub_menu_table = "site_pages";
$firstUrl = getFirstSubMenu($m_section_id , 'stype' , 'site_pages' , 'pages/' );
$getSubNav = "select * from $sub_menu_table where stype='". $m_section_id ."' order by sort_order";
}
if($m_root_cat == 2){
$sub_menu_table = "product_categories";
$firstUrl = getFirstSubMenu($m_section_id , 'section_id' , 'product_categories' , 'shopping/' );
$getSubNav = "select * from $sub_menu_table where section_id ='" . $m_section_id . "' AND (select count(*) from products where active='yes' and category_id=product_categories.id) > 0 order by sort_order";
}
if($m_root_cat == 3){
$sub_menu_table = "article_categories";
$firstUrl = getFirstSubMenu($m_section_id , 'section_id' , 'article_categories' , 'articles/' );
$getSubNav = "select * from $sub_menu_table where section_id ='" . $m_section_id . "' order by sort_order";
}
if($m_root_cat == 4){
$sub_menu_table = "blog_categories";
$firstUrl = getFirstSubMenu($m_section_id , 'section_id' , 'blog_categories' , 'blogs/' );
$getSubNav = "select * from $sub_menu_table where section_id ='" . $m_section_id . "' order by sort_order";
}
if($m_root_cat == 5){
$sub_menu_table = "link_categories";
$firstUrl = getFirstSubMenu($m_section_id , 'section_id' , 'link_categories' , 'links/' );
$getSubNav = "select * from $sub_menu_table where section_id ='" . $m_section_id . "' ORDER BY sort_order ASC";
}
if($m_root_cat == 6){
$sub_menu_table = "gallery_category";
$firstUrl = getFirstSubMenu($m_section_id , 'section_id' , 'gallery_category' , 'gallery/' );
$getSubNav = "select * from $sub_menu_table where section_id ='" . $m_section_id . "' AND (select count( * ) from albums where gallery_cat_id = $sub_menu_table.id and albums.id IN (select album_id from album_items)) > 0 order by sort_order";
}
if($m_root_cat == 7){
$sub_menu_table = "high_end_category";
$firstUrl = getFirstSubMenu($m_section_id , 'section_id' , 'high_end_category' , 'highend/' );
$getSubNav = "select * from $sub_menu_table where section_id ='" . $m_section_id . "' order by sort_order";
}
if($m_root_cat == 8){
$sub_menu_table = "seasonal_pages";
$firstUrl = getFirstSubMenu($m_section_id , 'section_id' , 'gallery_category' , 'seasonal/' );
$getSubNav = "select * from seasonal_categories where section_id ='" . $m_section_id . "'";
}
if($m_root_cat == 9){
$sub_menu_table = "contact_pages";
$firstUrl = getFirstSubMenu($m_section_id , 'stype' , 'contact_pages' , 'contactpages/' );
$getSubNav = "select * from $sub_menu_table where stype='". $m_section_id ."' order by sort_order";
}
if($m_root_cat == 10){
$sub_menu_table = "module_categories";
$firstUrl = getFirstSubMenu($m_section_id , 'section_id' , 'module_categories' , 'designs/' );
$getSubNav = "select * from $sub_menu_table where section_id='". $m_section_id ."' order by sort_order";
}
$Menu_HTML .= ''. $m_m_title .'';
$run_getSubNav = mysql_query($getSubNav);
$subMenuTotItems = mysql_num_rows($run_getSubNav);
if($run_getSubNav){
if($sub_menu_table == 'site_pages' && $subMenuTotItems == 0):
$Menu_HTML .= ''. $m_m_title .'';
endif;
if($sub_menu_table == 'contact_pages' && $subMenuTotItems == 0):
$Menu_HTML .= ''. $m_m_title .'';
endif;
if($sub_menu_table == 'product_categories' && $subMenuTotItems == 0):
$Menu_HTML .= ''. $m_m_title .'';
endif;
if($sub_menu_table == 'article_categories' && $subMenuTotItems == 0):
$Menu_HTML .= ''. $m_m_title .'';
endif;
if($sub_menu_table == 'blog_categories' && $subMenuTotItems == 0):
$Menu_HTML .= ''. $m_m_title .'';
endif;
if($sub_menu_table == 'link_categories' && $subMenuTotItems == 0):
$Menu_HTML .= ''. $m_m_title .'';
endif;
if($sub_menu_table == 'gallery_category' && $subMenuTotItems == 0):
$Menu_HTML .= ''. $m_m_title .'';
endif;
if($sub_menu_table == 'high_end_category' && $subMenuTotItems == 0):
$Menu_HTML .= ''. $m_m_title .'';
endif;
if($sub_menu_table == 'seasonal_pages' && $subMenuTotItems == 0):
$Menu_HTML .= ''. $m_m_title .'';
endif;
if($sub_menu_table == 'no_table'):
$Menu_HTML .= ''. $m_m_title .'';
endif;
while($s_m = mysql_fetch_assoc($run_getSubNav)){
$s_m_id = $s_m['id'];
$s_m_name = $s_m['name'];
$s_m_seo_name = $s_m['seo_name'];
$s_m_title = $s_m['title'];
$s_m_image = $s_m['image'];
$s_page_title = $s_m['page_title'];
$s_m_link = $s_m['url'];
$sec_id = $s_m['section_id'];
$menu_thumb = attribValue("menu_thumbs","image"," where stype='". $m_root_cat ."' AND category_id='". $s_m_id ."'");
$menu_thumb = ( $menu_thumb != "" ) ? ABSOLUTE_PATH . "admin/images/misc/". $menu_thumb : ABSOLUTE_PATH . "images/pajero.png";
if($sub_menu_table == 'site_pages' && $subMenuTotItems > 0):
$Menu_HTML .= '
'. $s_page_title .'
';
endif;
if($sub_menu_table == 'contact_pages' && $subMenuTotItems > 0):
$Menu_HTML .= '
'. $s_page_title .'
';
endif;
if($sub_menu_table == 'product_categories'){
$Menu_HTML .= '
'. $s_m_name .'
';
}
if($sub_menu_table == 'article_categories'){
$Menu_HTML .= '
'. $s_m_name .'
';
}
if($sub_menu_table == 'blog_categories'){
$Menu_HTML .= '
'. $s_m_name .'
';
}
if($sub_menu_table == 'link_categories'){
$Menu_HTML .= '
'. $s_m_name .'
';
}
if($sub_menu_table == 'gallery_category'){
$Menu_HTML .= '
'. $s_m_name .'
';
}
if($sub_menu_table == 'high_end_category'){
$Menu_HTML .= '
'. $s_m_name .'
';
}
if($sub_menu_table == 'seasonal_pages'){
$Menu_HTML .= '
'. $s_m_name .'
';
}
if($sub_menu_table == 'module_categories'){
$Menu_HTML .= '
'. $s_m_name .'
';
}
}//end $run_getSubNav while
}//end $run_getSubNav if
}//end $run_getMainNav while
$Menu_HTML .= '';
}//end $run_getMainNav if
echo $Menu_HTML;
?>
|
|
|