<?
#################################################################
## PHP Pro Bid v6.11															##
##-------------------------------------------------------------##
## Copyright ©2007 PHP Pro Software LTD. All rights reserved.	##
##-------------------------------------------------------------##
#################################################################

if ( !defined('INCLUDED') ) { die("Access Denied"); }
?>

<link rel="stylesheet" media="screen" href="themes/<?=$setts['default_theme'];?>/SpryAssets/superfish.css" /> 
<link rel="stylesheet" media="screen" href="themes/<?=$setts['default_theme'];?>/SpryAssets/superfish-vertical.css" /> 

<script src="themes/<?=$setts['default_theme'];?>/SpryAssets/superfish.js"></script> 
 

<script> 
 
    $(document).ready(function(){ 
        $("ul.sf-menu").superfish({ 
            animation: {height:'show'},   // slide-down effect without fade-in 
            delay:     1.2             // 1.2 second delay on mouseout 
        }); 
    }); 
 
</script>			
<? 
$is_subcat.='<table width="100%" border="0" cellspacing="0" cellpadding="0" id="menu_bg">';
   
 while ($cats_header_details = $db->fetch_array($sql_select_cats_list)) 
{
	$category_link = process_link('categories', array('category' => $category_lang[$cats_header_details['category_id']], 'parent_id' => $cats_header_details['category_id'])); 
 $is_subcat.= '<tr><td>';
 


 $sql_select_show_cat = $db->query("SELECT category_id, items_counter, hover_title,is_subcat FROM
	" . DB_PREFIX . "categories WHERE parent_id=0 AND hidden=0 AND user_id=0 AND enable_auctions=1 AND category_id=".$cats_header_details['category_id']." ORDER BY order_id ASC, name ASC");
   
   while ($show_subcat=$db->fetch_array($sql_select_show_cat)){


 if ( $show_subcat['is_subcat']==""){
	$ul_sub='';
	$li_sub='';
	$li_end_sub='';
	
 } else {
   $ul_sub='<ul>';
	$li_sub='<li>';
	$li_end_sub='</li>';
 }


$category_pal='<a  href="'.$category_link.'"'.((!empty($cats_header_details['hover_title'])) ? 'title="' . $cats_header_details['hover_title'] . '"' : '').'>'.$is_subc
     .$category_lang[$cats_header_details['category_id']].(($setts['enable_cat_counters']) ? (($cats_header_details['items_counter']) ? '(<strong>' . $cats_header_details['items_counter'] . '</strong>)' : '(' . $cats_header_details['items_counter'] . ')') : '').'</a>'; ?>
 

	

<? $is_subcat.='<ul class="sf-menu sf-vertical">
					<li class="current">'.$category_pal.$ul_sub; ?>

			   
 <? $sql_select_subcat_list = $db->query("SELECT category_id, items_counter, hover_title FROM
	" . DB_PREFIX . "categories WHERE  parent_id=".$cats_header_details['category_id']."  AND hidden=0 AND user_id=0  ORDER BY order_id ASC, name ASC");
	while ($subcat_header_details = $db->fetch_array($sql_select_subcat_list))
	{
		$subcat_link = process_link('categories', array('category' => $category_lang[$subcat_header_details['category_id']], 'parent_id' => $subcat_header_details['category_id'])); 
  

	  $subcategory='<a class="active" href="'.$subcat_link.'"'.((!empty($subcat_header_details['hover_title'])) ? 'title="' . $subcat_header_details['hover_title'] . '"' : '').'><span> 
     '.$category_lang[$subcat_header_details['category_id']].(($setts['enable_cat_counters']) ? (($subcat_header_details['items_counter']) ? '(<strong>' . $subcat_header_details['items_counter'] . '</strong>)' : '(' . $subcat_header_details['items_counter'] . ')') : '').'</span> </a>'; 
 

$is_subcat.=$li_sub.$subcategory.$li_end_subcat; ?>


<? } ?>
<? } ?>
<? } ?>
<? $is_subcat.='</ul></li></ul></td>
</tr>	
  
</table>';?>
<? echo $is_subcat;?>

