<?php

// 主菜单 PRODUCTS 链接页面，产品总页面 prolist.html（模板） templ_index 576 {ls_classpro},  老网站 是 {ls_pro}

$prolistcatepic=$pro_pic_rows['cateFolders']."/".$pro_pic_rows['cateIconPic']."jpg"; //catePagePic是banner

if($prolistStytle=="cateIconPic") { $prolistpic=$prolistcatepic; } // 使用cateIconPic代表图，第一个产品链接

if($prolistStytle=="selectProducts") {$prolistpro=getpiclink($pro_pic_rows['ID'],"",""," and AdditionalAttributesClassPro=1 "); $prolistpic=$prolistpro['picsrc'];   } // 使用类代表图

if(!file_exists("../".$prolistpic) || $prolistpic=="" || substr($prolistpic,-1)=="/" ){ $prolistpic="images/noimage.jpg"; echo "<br/> ".$pro_pic_rows['cateName']." 本类别没有设值代表图，或者不存在。<br/>";}


//大类 图片相册

/*	$ls_pro .= "<div class=\"col-lg-3 col-md-4 col-sm-6 col-xs-12\"><div class=\"thumbnail\"><div class=\"img-pic\"><a href=\"".$pro_pic_rows['cateFolders']."/\">
<img src=\"".$_SESSION['dda'].$prolistpic."\" name=\"imgs\" alt=\"<translate>".$pro_pic_rows['midcateName']."</translate>\" /></a></div><div class=\"caption pro-name\">
<a href=\"".$pro_pic_rows['cateFolders']."/\"><translate>".$pro_pic_rows['cateName']."</translate></a></div></div></div>";
*/	

//大类 图片列表
	$ls_procatebrief=trim(substr(strip_tags(htmlspecialchars_decode($pro_pic_rows['cateBrief'])),0,$prolistbrieflen));

	$ls_pro.="<div>
	 <div class=\"col-lg-3 col-md-3 col-sm-3 col-xs-6\" >
	<a href=\"".$pro_pic_rows['cateFolders']."/".($oldcatepath?$pro_pic_rows['cateFolders'].".html":"")."\" alt=\"<translate>".$pro_pic_rows['cateName']."</translate>\" title=\"<translate>".$pro_pic_rows['cateName']."</translate>\" >
	<img src=\"".$_SESSION['dda'].$prolistpic."\" alt=\"<translate>".$pro_pic_rows['cateName']."</translate>\" title=\"<translate>".$pro_pic_rows['cateName']."</translate>\" width='240' /></a>
	<div class=\"prowenzi\" >
	<a class=\"mingzi\" href=\"".$pro_pic_rows['cateFolders']."/".($oldcatepath?$pro_pic_rows['cateFolders'].".html":"")."\" alt=\"<translate>".$pro_pic_rows['cateName']."</translate>\" title=\"<translate>".$pro_pic_rows['cateName']."</translate>\" class='pn' >".$pro_pic_rows['cateName']."</a>
	<p class=\"nsn\">
<translate>".($listdetail==""? $ls_procatebrief:$listdetail)."</translate>
</p>
	<input name=\"detail".$pro_pic_rows['ID']."\" type=\"button\" class='btn' value=\"Detail\" onclick=\"window.location.href='".$pro_pic_rows['cateFolders']."'\"></div></div></div>

";
		
//大类名及大类产品相册，全部或类产品
/*
		if($catedetailStytle=="selectProducts") $addstr=" and AdditionalAttributesClassPro=1 "; else $addstr=" "; //类产品
				
		$ls_pro .= "<div style=\"float:left;width:100%\" >"; 
		$ls_pro .= "<div class=\"pro_list\"><h2 class=\"proName1\" ><a href=\"".$pro_pic_rows['cateFolders'].($oldcatepath?$pro_pic_rows['cateFolders'].".html":"")."\"><translate>".$pro_pic_rows['cateName']."</translate></a></h2></div>";		
		
		$catedetail_sql="SELECT * FROM `ls_products` WHERE `productID`=".$pro_pic_rows['ID'].$addstr."  order by Num ";
		$catedetail_query=$opendb->query($catedetail_sql);
		while($catedetail_rows=mysqli_fetch_assoc($catedetail_query)){
			$filenameprodetail=$catedetail_rows['filename']==""?clearFolder(strtolower(pathProName($catedetail_rows['productName'])))."-".$catedetail_rows['ID'].".html":$catedetail_rows['filename'];
			$prolistpro=getpiclink($pro_pic_rows['ID'],$catedetail_rows['productPic']," "); 
			$prolistpic=$prolistpro['picsrc']; 

			$ls_pro .= " 
			<div class=\"prodt\">
			<div class=\"proimg\">
			<a class=\"prog\" href=\"".$pro_pic_rows['cateFolders']."/".$filenameprodetail."\">
			<img src=\"".$_SESSION['dda'].$prolistpic."\" name=\"imgs\" alt=\"<translate>".$catedetail_rows['productName']."</translate>\" title=\"<translate>".$catedetail_rows['productName']."</translate>\" /></a>
			</div>
<div class=\" prowenzi\" >
  <span class=\"ns\">
			<div class=\"mingzi\"><a href=\"".$pro_pic_rows['cateFolders']."/".$filenameprodetail."\"><translate>".$catedetail_rows['productName']."</translate></a>
			</div>
			</span></div>
 
 </div> 
			";
		}
		$ls_pro .= "</div>"; 		
*/		
?>
