<?php
//上级类页面生成 templ_index 240 {ls_classpro}, 大类，中类，小类，<ul class=\"ls_classpro\">

			$s_classpro.="<li><img src='../".$templates_var."/images/name_prefix.gif' border='0'> <a href='../".$classpro_rows['cateFolders']."/index.html'>".$classpro_rows['cateName']."</a></li><ul> \r\n";
			// $s_classpro.="\n <div class=\"cate_list\">\n"; //大类菜单样式，div css:cate_list
		  } 
		  else//大类中类
		  {
			//$s_classpro.="&nbsp;<img src='../Templates/".$templates_var."/images/cate.gif' border='0'> \n";  //大类引导图
			$detailsfile="../".$classpro_rows['cateFolders']."/indexdetails.html";
			if(file_exists($detailsfile))
			{ 	$s_classpro.=" <dt><a href='".$detailsfile."'>".$classpro_rows['cateName']."</a></dt>\r\n";}
			else
			{	$s_classpro.=" <li><img src='../".$templates_var."/images/name_prefix.gif' border='0'> <a href='javascript:void(0)'>".$classpro_rows['cateName']."</a><ul>\r\n";}
		
			//？ 不应该有$s_classpro.="\n <div class=\"cate_list\">\n";
				while($pro_midcate_rows=mysql_fetch_assoc($pro_midcate_query))
				{
					$pro_subcate_sql="select * from ls_products where branchID=0 and midcateName is null and cateName is null and cateFolders is null and catePagePic is null and catePagePicWidth is null and catePagePicHeight is null and cateBrief is null and productPic is null and productItemNo is null and productName is null and productSpecification is null and productID is null and enable=1 and subcateID=".$pro_midcate_rows['ID']." order by Num asc";
					$pro_subcate_query=$opendb->query($pro_subcate_sql);
					$pro_subcate_num=mysql_num_rows($pro_subcate_query); 

				//$s_classpro.="<div class=\"midcate_list\">"; //中类菜单样式
	
					if($pro_subcate_num==0)//没小类
					{
					//$s_classpro.="&nbsp;<img src='../Templates/".$templates_var."/images/midcate.gif' border='0'> \n";  //中类引导图
						$s_classpro.="<li><a href='../".$classpro_rows['cateFolders']."/".$pro_midcate_rows['midcateFolders']."/index.html'>".$pro_midcate_rows['midcateName']."</a></li>\r\n";
					}
					else//有小类
					{
					//$s_classpro.="&nbsp;<img src='../Templates/".$templates_var."/images/midcate.gif' border='0'> \n"; //中类引导图
						$detailsfile="../".$classpro_rows['cateFolders']."/".$pro_midcate_rows['midcateName']."/indexdetails.html";
						if(file_exists($detailsfile))
						{$s_classpro.="<a href='".$detailsfile."'>".$pro_midcate_rows['midcateName']."</a>\r\n";}
						else
						{$s_classpro.="\n<dd><a href='javascript:void(0)'>".$pro_midcate_rows['midcateName']."</a>\n<ul>\r\n";}
					//$s_classpro.="<div class=\"subcate_list\">";//小类菜单样式
						while($pro_subcate_rows=mysql_fetch_assoc($pro_subcate_query))		//小类生成
						{
							$s_classpro.="<li><a href=\"../".$classpro_rows['cateFolders']."/".$pro_midcate_rows['midcateFolders']."/".$pro_subcate_rows['subcateFolders']."/index.html\" >".$pro_subcate_rows['subcateName']."</a></li>\r\n";
						 }
					$s_classpro.="</ul>\n</dd>\r\n"; 
					}
				}
				$s_classpro.="</ul></li>\r\n";
?>
