<!--#include file="include/conn.asp"-->
<!--#include file="menu.asp"-->
<%
Dim mpl
mpl = Trim(request("mpl"))
If action="wz" Then 
	session("mpl")="1"
	Call backurl("/ProClassBig.asp?TT="&TT&"")
End If 

If action="tp" Then 
	session("mpl")="0"
	Call backurl("/ProClassBig.asp?TT="&TT&"")
End If 
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<!---通用配置--->
<title><%=CLASSBNAME(TT)%>_<%=sWeb("WebTitle")%>_<%=sWeb("WebUrl")%>_Powered by www.gaozhen.name QQ_47329193</title>
<meta name="keywords" content="<%=sWeb("WebKeyWord")%>" />
<meta name="description" content="<%=sWeb("WebDescription")%>" />
<meta name="author" content="<%=sWeb("WebAuthor")%>" />
<meta name="copyright" content="<%=sWeb("WebCopyright")%>" />
<meta content="all" name="robots" />
<link rel="shortcut icon" href="/include/favicon/favicon.ico" />
<link rel="icon" href="/include/favicon/favicon.gif" type="image/gif" >
<link type="text/css" href="/include/css/global.css" rel="stylesheet" />
<script type="text/javascript" src="/include/Js/config.js"></script>
<!---网站配置--->
<link type="text/css" href="/css/style.css" rel="stylesheet" />
</head>
<body>
<%Call TopMenu()%>
<%Call HeadMenu()%>
<div id="maindiv">
<!---主体部分--->
<div id="lstpro">
	<div id="lstleft">
	<!--#include file="Leftpro.asp"-->
	</div>
	<div id="lstright">
	<div id="rrfff">
	<div class="sgohome">您现在的位置：首页 >> <a href=/ProClassBig.asp?TT=<%=TT%>><%=CLASSBNAME(TT)%></a> >> <a href=/ProClassBig.asp?TT=<%=TT%>&SS=<%=SS%>><%=CLASSSNAME(SS)%></a> >> <a href=/ProClassBig.asp?TT=<%=TT%>&SS=<%=SS%>&SS3=<%=SS3%>><%=CLASSS3NAME(SS3)%></a></div>
	<div class="stitle"><h1><%=CLASSBNAME(TT)%></h1>
	<div class="smore">
	<select onchange="top.location=this.value;">
	<option value="">价格排序</option>
	<option value="/ProClassBig.asp?TT=<%=TT%>&mpx=1">按价格由高到低</option>
	<option value="/ProClassBig.asp?TT=<%=TT%>&mpx=0">按价格由低到高</option>
	</select>
	<select onchange="top.location=this.value;">
	<option value="">排列方式</option>
	<option value="/ProClassBig.asp?action=wz&TT=<%=TT%>">文字排列</option>
	<option value="/ProClassBig.asp?action=tp&TT=<%=TT%>&mpl=0">图片排列</option>
	</select>
	</div>
	</div>

<%If session("mpl")="0" Then%>
	<div class="scont">
	<ul>
		<%
		Set oRs =server.createobject("adodb.recordset")
		If TT<>"" And SS<>"" And SS3<>"" Then
		sSql = "SELECT Id,PBId,PTitle,PSmallPic,PSmoney,PHmoney FROM [LstPro] WHERE PSId3="&SS3&""
		ElseIf TT<>"" And SS<>"" Then
		sSql = "SELECT Id,PBId,PTitle,PSmallPic,PSmoney,PHmoney FROM [LstPro] WHERE PSId="&SS&""
		ElseIf TT<>"" Then
		sSql = "SELECT Id,PBId,PTitle,PSmallPic,PSmoney,PHmoney FROM [LstPro] WHERE PBId="&TT&""
		Else
		sSql = "SELECT Id,PBId,PTitle,PSmallPic,PSmoney,PHmoney FROM [LstPro]"
		End If
		If mpx = 1 Then
			sSql = sSql & " ORDER BY PHmoney desc, Id desc"
		ElseIf mpx = 0 Then
			sSql = sSql & " ORDER BY PHmoney asc,Id desc"
		Else
			sSql = sSql & " ORDER BY Id desc"
		End If
		oRs.open sSql,oconn,1,1
		if oRs.bof and oRs.eof then 
		else
		Call Showpage("1",35)
		for i=1 to mypage%>
		
		<li><a href="/ProInfo.asp?Id=<%=oRs("Id")%>"><img width=160 height=140 src="<%=oRs("PSmallPic")%>"></a><br>
		<a href="/ProInfo.asp?TT=<%=oRs("PBId")%>&Id=<%=oRs("Id")%>"><B><%=Left(oRs("PTitle"),10)%></B></a><br>
		<del class="fhui">市场价：<%=oRs("PSmoney")%>元</del><br>
		零售价：<%=GZMONRY(oRs("PHmoney"))%>元</li>

		<%
		oRs.MoveNext
		Next
		End If
		%>
	</ul>
	</div>
		<div class="sspage"><%Call Showpage("?TT="&TT&"&SS="&SS&"&mpx="&mpx&"",35)%></div>

<%Else%>


<table border="1" width="100%" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#C0C0C0">
	<div class="scontwz">
	<tr>
		<td height="30" bgcolor="#CCCCCC" align="center">产品名称</td>
		<td height="30" bgcolor="#CCCCCC" align="center">市场价</td>
		<td height="30" bgcolor="#CCCCCC" align="center">会员价</td>
		<td height="30" bgcolor="#CCCCCC" align="center">加入收藏</td>
	</tr>
		<%
		Set oRs =server.createobject("adodb.recordset")
		If TT<>"" And SS<>"" And SS3<>"" Then
		sSql = "SELECT Id,PBId,PTitle,PSmallPic,PSmoney,PHmoney FROM [LstPro] WHERE PSId3="&SS3&""
		ElseIf TT<>"" And SS<>"" Then
		sSql = "SELECT Id,PBId,PTitle,PSmallPic,PSmoney,PHmoney FROM [LstPro] WHERE PSId="&SS&""
		ElseIf TT<>"" Then
		sSql = "SELECT Id,PBId,PTitle,PSmallPic,PSmoney,PHmoney FROM [LstPro] WHERE PBId="&TT&""
		Else
		sSql = "SELECT Id,PBId,PTitle,PSmallPic,PSmoney,PHmoney FROM [LstPro]"
		End If
		If mpx = 1 Then
			sSql = sSql & " ORDER BY PHmoney desc, Id desc"
		ElseIf mpx = 0 Then
			sSql = sSql & " ORDER BY PHmoney asc,Id desc"
		Else
			sSql = sSql & " ORDER BY Id desc"
		End If
		oRs.open sSql,oconn,1,1
		if oRs.bof and oRs.eof then 
		else
		Call Showpage("1",50)
		for i=1 to mypage%>
	<tr>
		<td height="30" align="center"><a href="/ProInfo.asp?Id=<%=oRs("Id")%>"><%=oRs("PTitle")%></a></td>
		<td height="30" align="center"><%=oRs("PSmoney")%>元</td>
		<td height="30" align="center"><%=GZMONRY(oRs("PHmoney"))%>元</td>
		<td height="30" align="center"><a href=/UserCenter.asp?action=addfav&ProId=<%=oRs("Id")%>>加入收藏</a></td>
	</tr>
		<%
		oRs.MoveNext
		Next
		End If
		%>
	</div>
	</table>
	<div class="sspage"><%Call Showpage("?TT="&TT&"&SS="&SS&"&mpx="&mpx&"",50)%></div>

<%End If%>

	</div>
	</div>
</div>
<script type="text/javascript"> 
window.onload = function ()
{
	var oStar = document.getElementById("star");
	var aLi = oStar.getElementsByTagName("li");
	var oUl = oStar.getElementsByTagName("ul")[0];
	var oSpan = oStar.getElementsByTagName("span")[1];
	var oP = oStar.getElementsByTagName("p")[0];
	var i = iScore = iStar = 0;
	var aMsg = [
				"很不满意|差得太离谱，与卖家描述的严重不符，非常不满",
				"不满意|部分有破损，与卖家描述的不符，不满意",
				"一般|质量一般，没有卖家描述的那么好",
				"满意|质量不错，与卖家描述的基本一致，还是挺满意的",
				"非常满意|质量非常好，与卖家描述的完全一致，非常满意"
				]
	
	for (i = 1; i <= aLi.length; i++)
	{
		aLi[i - 1].index = i;
		//鼠标移过显示分数
		aLi[i - 1].onmouseover = function ()
		{
			fnPoint(this.index);
			//浮动层显示
			oP.style.display = "block";
			//计算浮动层位置
			oP.style.left = oUl.offsetLeft + this.index * this.offsetWidth - 104 + "px";
			//匹配浮动层文字内容
			oP.innerHTML = "<em><b>" + this.index + "</b> 分 " + aMsg[this.index - 1].match(/(.+)\|/)[1] + "</em>" + aMsg[this.index - 1].match(/\|(.+)/)[1]
		};
		//鼠标离开后恢复上次评分
		aLi[i - 1].onmouseout = function ()
		{
			fnPoint();
			//关闭浮动层
			oP.style.display = "none"
		};
		//点击后进行评分处理
		aLi[i - 1].onclick = function ()
		{
			iStar = this.index;
			oP.style.display = "none";
			oSpan.innerHTML = "<strong>" + (this.index) + " 分</strong> (" + aMsg[this.index - 1].match(/\|(.+)/)[1] + ")"
		}
	}
	//评分处理
	function fnPoint(iArg)
	{
		//分数赋值
		iScore = iArg || iStar;
		for (i = 0; i < aLi.length; i++) aLi[i].className = i < iScore ? "on" : "";	
	}
};
</script>
<!---版权部分--->
<div class="clear"></div>
<%Call HelpMenu()%>
<%Call ShowEnd()%>
</div>
</body>
</html>
