<%
'商易仿淘宝4.0(多用户)
'ACCESS版演示网站：http://www.ftaobao.com(商易仿淘宝商城)
'SQL版演示网站：http://sql.ftaobao.com
'电话：0571-56907100
'QQ：1147100
%>
<%
titlename="产品筛选"
If shopnet("lbid")<>"" And Not isnumeric(shopnet("lbid"))  Then
	 response.redirect"/note.asp?errid=0"
End If
If shopnet("xlbid")<>"" And Not isnumeric(shopnet("xlbid"))  Then
	 response.redirect"/note.asp?errid=0"
End If
If shopnet("slbid")<>"" And Not isnumeric(shopnet("slbid"))  Then
	 response.redirect"/note.asp?errid=0"
End If
%>

<!--#include file="FFunction.asp"-->
<!--#include file="FHeadTitle.asp"-->
<% PageStyle="FullWidth CurHome" %>
<!--#include file="search_class2.asp" -->
<style type="text/css" media="screen">
	@import url("css/v1.2.php@t=2006512.css");
	@import url("css/component.php@t=2006512.css");
	@import url("css/search.css@t=20060508.css");
</style>
</head>
<body class="<%= PageStyle %>">
<!--#include file="FHeadAll.asp"-->    
<div class="HackBox"></div>
<div id="Content">



	  <!--导航栏 -->
<%
Response.Write "<SCRIPT src='duibi.js'></SCRIPT>"
lx=shopnet("lx")'参数KEY 所属类型
key=shopnet("key")'参数的KEY内容
lbid=shopnet("lbid")'参数大类
xlbid=shopnet("xlbid")'参数二级类
slbid=shopnet("slbid")'参数三级类
jg=shopnet("jg")'价格
fs=shopnet("fs")'出售方式，0为一口价，1为拍卖，2为议价
fenye=shopnet("fenye")'每页显示数量
xs=shopnet("xs")'显示形式
px=shopnet("px")'排序
page=shopnet("page")'第几页	

strade=shopnet("strade")
atype=shopnet("atype")
start_price=shopnet("start_price")
end_price=shopnet("end_price")
isnew=shopnet("isnew")
loc=shopnet("loc")
q=shopnet("q")


if len(lbid)<>0 then
	if len(xlbid)<>0 then
		if len(slbid)<>0 then
		 DisplayListSubCategory=3
		else
		  DisplayListSubCategory=2
		end if
	else
	  DisplayListSubCategory=1
	end if
else
	  DisplayListSubCategory=0
end if
'导航栏开始
select case DisplayListSubCategory
case 0:

case 1:
sqlSelectFromLb="select * from lb where lbid="&lbid
Set rsSelectFromLb=Server.CreateObject("ADODB.Recordset")
rsSelectFromLb.open sqlSelectFromLb,conn,3,1 
if not rsSelectFromLb.eof then
Response.Write "<div id=""ListPathLinks"">"&vbcrlf
Response.Write "<ul class=""PathLinksLevel1"">"&vbcrlf
Response.Write "<li><a href=""sort.asp"">所有分类</a></li>"&vbcrlf
Response.Write "<li>"& rsSelectFromlb("lbname") &vbcrlf
Response.Write "<i>("& rsSelectFromlb("cp")&")</i></li>"&vbcrlf
Response.Write "</ul>"&vbcrlf
Response.Write "<div class=""HackBox""></div>"&vbcrlf
Response.Write "</div>"&vbcrlf
end if
rsSelectFromLb.close
set rsSelectFromLb=nothing
case 2:
sqlSelectFromLb="select * from lb where lbid="&lbid
Set rsSelectFromLb=Server.CreateObject("ADODB.Recordset")
rsSelectFromLb.open sqlSelectFromLb,conn,3,1 
if not rsSelectFromLb.eof then
Response.Write "<div id=""ListPathLinks"">"&vbcrlf
Response.Write "<ul class=""PathLinksLevel1"">"&vbcrlf
Response.Write "<li><a href=""sort.asp"">所有分类</a></li>"&vbcrlf
Response.Write "<li><a href=""ProductList.asp?lbid="&rsSelectFromLb("lbid")&""">"& rsSelectFromLb("lbname") &"</a></li>"&vbcrlf
   
   sqlSelectFromXlb="select * from Xlb where xlbid="&xlbid
   Set rsSelectFromXlb=Server.CreateObject("ADODB.Recordset")
   rsSelectFromXlb.open sqlSelectFromXlb,conn,3,1 
   if not rsSelectFromXlb.eof then
		Response.Write "<li>"&rsSelectFromXlb("xlbname")&vbcrlf
		Response.Write "<i>("&rsSelectFromXlb("cp")&")</i></li>"&vbcrlf
   end if
Response.Write "</ul>"&vbcrlf
Response.Write "<div class=""HackBox""></div>"&vbcrlf
Response.Write "</div>"&vbcrlf
end if
rsSelectFromXlb=close
set rsSelectFromXlb=nothing
rsSelectFromLb.close
set rsSelectFromLb=nothing
case 3:
sqlSelectFromLb="select * from lb where lbid="&lbid
Set rsSelectFromLb=Server.CreateObject("ADODB.Recordset")
rsSelectFromLb.open sqlSelectFromLb,conn,3,1 
if not rsSelectFromLb.eof then
Response.Write "<div id=""ListPathLinks"">"&vbcrlf
Response.Write "<ul class=""PathLinksLevel1"">"&vbcrlf
Response.Write "<li><a href=""sort.asp"">所有分类</a></li>"&vbcrlf
Response.Write "<li><a href=""ProductList.asp?lbid="&rsSelectFromLb("lbid")&""">"& rsSelectFromlb("lbname") &"</a></li>"&vbcrlf
   sqlSelectFromXlb="select * from xlb where xlbid="&xlbid
   Set rsSelectFromXlb=Server.CreateObject("ADODB.Recordset")
   rsSelectFromXlb.open sqlSelectFromXlb,conn,3,1 
   if not rsSelectFromXlb.eof then
	  Response.Write "<li><a href=""ProductList.asp?lbid="&rsSelectFromLb("lbid")&"&amp;xlbid="&rsSelectFromXlb("xlbid")&""">"& rsSelectFromXlb("xlbname")&"</a></li>"&vbcrlf
			   sqlSelectFromSlb="select * from slb where slbid="&slbid
			   Set rsSelectFromSlb=Server.CreateObject("ADODB.Recordset")
			   rsSelectFromSlb.open sqlSelectFromSlb,conn,3,1 
			   if not rsSelectFromSlb.eof then
		       Response.write "<li>"&rsSelectFromSlb("slbname")&vbcrlf
		       Response.Write "<i>("&rsSelectFromSlb("cp")&")</i></li>"&vbcrlf
			   end if
			   rsSelectFromSlb=close
	           set rsSelectFromSlb=nothing
   end if
	rsSelectFromXlb=close
	set rsSelectFromXlb=nothing
Response.Write "</ul>"&vbcrlf
Response.Write "<div class=""HackBox""></div>"&vbcrlf
Response.Write "</div>"&vbcrlf
end if
rsSelectFromLb.close
set rsSelectFromLb=nothing
end select 

'分类栏开始
select case DisplayListSubCategory
case 0:
sqlListSubCategory="select * from lb "
Set rsListSubCategory=Server.CreateObject("ADODB.Recordset")
rsListSubCategory.open sqlListSubCategory,conn,3,1 
if not rsListSubCategory.eof then
    Response.Write "<div id=""ListSubCategory""> "
	Response.Write "<div class=""FindByHint"">商品<strong>分类</strong>选择：</div>"
    Response.Write "<ul class=""CategoryListTableLevel1"">"
    do while not rsListSubCategory.eof
	Response.Write "<li>"
	Response.write "<a href=""ProductList.asp?lbid="&rsListSubCategory("lbid")&""">"
	Response.write rsListSubCategory("lbname")&"</a>"
	Response.Write "<i>("&rsListSubCategory("cp")
	Response.write ")</i>"
	Response.Write "</li>"
     rsListSubCategory.movenext
	 loop
	 Response.Write "</ul>"
	Response.Write "<div class=""HackBox""></div>"
	Response.Write "</div>"
end if
	rsListSubCategory.close
	set rsListSubCategory=nothing
case 1:
sqlListSubCategory="select * from xlb where lbid="&lbid
Set rsListSubCategory=Server.CreateObject("ADODB.Recordset")
rsListSubCategory.open sqlListSubCategory,conn,3,1 
if not rsListSubCategory.eof then
    Response.Write "<div id=""ListSubCategory""> "
	Response.Write "<div class=""FindByHint"">商品<strong>分类</strong>选择：</div>"
    Response.Write "<ul class=""CategoryListTableLevel1"">"
    do while not rsListSubCategory.eof
	Response.Write "<li>"
	Response.write "<a href=""ProductList.asp?lbid="&lbid&"&amp;xlbid="&rsListSubCategory("xlbid") &""">"
	Response.write rsListSubCategory("xlbname")&"</a>"
	Response.Write "<i>("&rsListSubCategory("cp")
	Response.write ")</i>"
	Response.Write "</li>"
     rsListSubCategory.movenext
	 loop
	 Response.Write "</ul>"
	Response.Write "<div class=""HackBox""></div>"
	Response.Write "</div>"
end if
	rsListSubCategory.close
	set rsListSubCategory=nothing
case 2:
sqlListSubCategory="select * from slb where xlbid="&xlbid
Set rsListSubCategory=Server.CreateObject("ADODB.Recordset")
rsListSubCategory.open sqlListSubCategory,conn,3,1 
if not rsListSubCategory.eof then
    Response.Write "<div id=""ListSubCategory""> "
	Response.Write "<div class=""FindByHint"">商品<strong>分类</strong>选择：</div>"
    Response.Write "<ul class=""CategoryListTableLevel1"">"
    do while not rsListSubCategory.eof
	Response.Write "<li>"
	Response.write "<a href=""ProductList.asp?lbid="&lbid&"&amp;xlbid="&xlbid&"&amp;slbid="&rsListSubCategory("slbid") &""">"
	Response.write rsListSubCategory("slbname")&"</a>"
	Response.Write "<i>("&rsListSubCategory("cp")
	Response.write ")</i>"
	Response.Write "</li>"
     rsListSubCategory.movenext
	 loop
	 Response.Write "</ul>"
	Response.Write "<div class=""HackBox""></div>"
	Response.Write "</div>"
end if
	rsListSubCategory.close
	set rsListSubCategory=nothing
case 3:
Response.Write ""
end select 
%>
<script language="javascript" type="text/javascript">
//<![CDATA[
var smore='显示全部'; var hmore='精简显示'; var maxNum=10;
function createElement(element) { 
	if (typeof document.createElementNS != 'undefined') 
	return document.createElementNS('../../../www.w3.org/1999/xhtml', element); 
	if (typeof document.createElement != 'undefined') return document.createElement(element);
	return false; 
} 
function getTriggerNode(e) {
	if (document.all) return event.srcElement;
	else return e.target;
}
function switchMore(evt) {
	var o = getTriggerNode(evt);
	if (!o || o.id.indexOf('__switch_controller_') != 0) return;
	var id = o.id.substring(20);
	var e = ess[id]; if (!e) return;
	if (o.innerHTML==fess[id]) {o.innerHTML=ffess[id];if(ffess[id]==''){o.parentNode.innerHTML='';} hiddenMore(e,'');}
	else if(o.innerHTML=ffess[id]) {o.innerHTML=fess[id]; hiddenMore(e,'none'); }
}
function hiddenMore(o,disp) {
	var ret = false;
	if (!o) { return ret; }
	for (var i = 0,j = 0; i < o.childNodes.length; ++i) {
		var child = o.childNodes.item(i);
		if (!child || (child.tagName != 'li' && child.tagName != 'LI')) continue;
		if (j++ >= maxNum) { child.style.display=disp; ret=true;  }
	}
	if (ret) {var os=o.parentNode.style.display;
	o.parentNode.style.display='none';
	o.parentNode.style.display=os;
	}
	return ret;
}
function findNext(e) {
	var a = e.nextSibling;
	while (a && !a.tagName) a=a.nextSibling;
	return a;
}
function findPre(e) {
	var a = e.previousSibling;
	while (a && !a.tagName) a=a.previousSibling;
	return a;
}
function findChildByTagName(e, tag) {
	if (!e || !e.childNodes) return;
	for (var i = 0; i < e.childNodes.length; ++i) {
		var child = e.childNodes.item(i);if (!child) continue;
		if (child.tagName && child.tagName.toLowerCase()==tag) return child;
	}
	return false;
}
function nul(){}
var es = document.getElementsByTagName('ul');
var ess = new Array();
var fess = new Array();var ffess = new Array();
for (var i = 0; i < es.length; ++i) {
	var e = es.item(i);
	if (e && e.className && e.className == 'CategoryListTableLevel1') {
		if (hiddenMore(e,'none')) { 
		ess[i] = e; 
		var name = '';
			var pNode = findPre(e);
			if (pNode && pNode.className == 'FindByHint')
			 {
			 var str = findChildByTagName(pNode, 'strong');
			if (str) name=str.innerHTML;
			};
			var iconNode=createElement('img');
			iconNode.src='pics/bao/album/sys/auction/category_view_all.gif';
			iconNode.style.marginRight='5px';
			iconNode.style.verticalAlign='middle';
			var aNode =createElement('a'); 
			aNode.id='__switch_controller_' + i;
			aNode.style.color="#222";aNode.href='javascript:nul();'; 
			aNode.onclick = switchMore;
			fess[i]=smore + name;
			if(hmore!=''){ffess[i]=hmore + name}else{ffess[i]='';
			} 
			aNode.appendChild(document.createTextNode(smore + name));
			var divNode = createElement('div'); 
			divNode.style.textAlign='center';
			divNode.style.border='1px solid #CCC';
			divNode.style.backgroundColor="#FFF";
			divNode.style.margin="10px auto 0";
			divNode.style.padding="5px";
			divNode.style.width='150px';
			divNode.appendChild(iconNode);
			divNode.appendChild(aNode);
			var divNode1 = createElement('div');
			 divNode1.className = 'HackBox';
			var n = findNext(e);
			if (n) { e.parentNode.insertBefore(divNode1,n);
			 e.parentNode.insertBefore(divNode,n); }
			else { e.parentNode.appendChild(divNode1); 
			e.parentNode.appendChild(divNode); 
			}
		}
	}
}
//]]>
</script>
<%
'商易仿淘宝4.0.1演示地址
'http://www.ftaobao.com
%>
		<div id="MainContainer">
	 <!--橱窗 -->
			<div id="ListSellerRecommended">
				<ul class="TabBarLevel1">
					<li class="Selected"><a href="">橱窗推荐</a></li>
					<li><a href="?">所有商品</a></li>
				</ul>
						 <div id="AssistantToolbar"><a href="/user/shoucang.asp?type=3&id=1&xlbid=<%=shopnet("xlbid")%>&lbid=<%=shopnet("lbid")%>"><img src="pics/bao/album/sys/icon/add_search_to_favorite.gif" width="15" height="13" alt="收藏此搜索" />收藏此搜索</a></div>
								<div class="HackBox"></div>
			</div>
<%

top_s=0
if lx=""  or not isnumeric(lx) then lx=0 else lx=clng(left(lx,1))
if fs=""  or not isnumeric(fs) then fs=255 else fs=clng(left(fs,3))
if lbid=""  or not isnumeric(lbid) then lbid=0 else lbid=clng(left(lbid,3))
if xlbid=""  or not isnumeric(xlbid) then xlbid=0 else xlbid=clng(left(xlbid,4))
if slbid=""  or not isnumeric(slbid) then slbid=0 else slbid=clng(left(slbid,5))
if jg=""  or not isnumeric(jg) then jg=0 else jg=clng(left(jg,2))
if fenye=""  or not isnumeric(fenye) then fenye =40 else fenye=clng(left(fenye,2))
if Request.Cookies("Rikee")("xs")<>xs and xs<>"" then Response.Cookies("Rikee")("xs")=xs
if Request.Cookies("Rikee")("xs")="" or not isnumeric(Request.Cookies("Rikee")("xs")) then Response.Cookies("Rikee")("xs")="0"
xs=clng(left(Request.Cookies("Rikee")("xs"),1))
if xs=""  or not isnumeric(xs) then xs=0 else xs=clng(left(xs,1))
if xs=""  or not isnumeric(xs) then xs=1 else xs=clng(left(xs,1))
if px=""  or not isnumeric(px) then px=0 else px=clng(left(px,1))
if page=""  or not isnumeric(page) then page = 1 else page=clng(left(page,6))
set ss=new shop_search
 ss.Rich_Shop strade,loc,q,isnew,atype,start_price,end_price,lbid,xlbid,slbid,jg,fs,fenye,xs,px,page,top_s
set ss=nothing
 %>
</div>
<!--边栏开始 -->


<div id="SideBar">
<div id="ListChooseForm" class="StandardSidePanel">
<form action="searchlist.asp" method="get" name="filterForm" onSubmit="return checkCondition(this)">
<div class="Title"><b>筛选商品</b></div>
<ul class="FormLite">
<li class="Seperator">
<hr />
</li>
<li>
<input type="checkbox" name="strade" id="FormLiteStrade" value="y" />
<label for="FormLiteStrade" class="B">可用支付宝付款</label>
</li>
<li class="Seperator">
<hr />
</li>
<li>
<input type="checkbox" name="atype" id="FormLiteBuyNow" value="b" />
<label for="FormLiteBuyNow">一口价</label>
<input type="checkbox" name="atype" id="FormLiteBid" value="a" />
<label for="FormLiteBid">拍卖</label>
</li>
<li>价格范围：<input name="start_price" value="" type="text" size="4" /> 至 <input name="end_price" value="" type="text" size="4" /></li>
<li class="Seperator">
<hr />
</li>
<li>
<input type="checkbox" name="isnew" id="FormLiteIsJustNew" value="2" onClick="if(this.checked) document.getElementById('FormLiteIsNew').checked=false;"  />
<label for="FormLiteIsNew">全新</label>
<input type="checkbox" name="isnew" id="FormLiteIsNew" value="1" onClick="if(this.checked) document.getElementById('FormLiteIsJustNew').checked=false;"  />
<label for="FormLiteIsNew">二手</label>
</li>

<li class="Seperator">
<hr />
</li>

<li>

所在地：<input type="text" name="loc" size="16" value="" />
</li>
<li>关键字：<input type="text" name="q" size="16" value="" /></li>
<li class="Seperator">
<hr />
</li>
<li><input type="submit" value="筛 选" id="ListSearchFormSubmit" /> <input type="button" value="重 置" id="ListSearchFormReset" onClick="resetChooseForm();" /></li>
</ul>
</form>

<div class="HackBox"></div>
<div class="Bottom"></div>
</div>
<div id="SimilarCategory" class="StandardSidePanel">
<div class="Title"><b>好东东，再挑挑！</b></div>
<ul class="CategoryListNormalLevel1">
<table>
<%set rsHot = conn.execute("select top 20 lbid,xlbid,cp,xlbname from xlb where xlbid in(select xlbid from chanpin where cang=0 order by rq desc,sj desc) and cang=0 order by xlbid desc")
do while not rsHot.eof
 strHot=strHot &"<tr>"&vbcrlf
 strHot=strHot &" <td valign=""top"">·"
 strHot=strHot &"<a href=""ProductList.asp?xlbid=" &rsHot("xlbid") & "&lbid=" &rsHot("lbid") & """title="""& rsHot("xlbname") &""" target=_blank>"&rsHot("xlbname")&"("&rsHot("cp")&")</a></td></tr>"
rsHot.movenext
loop
strHot=strHot &"</table>"&vbcrlf	

rsHot.close
set rsHot=nothing
Response.Write strHot
%>
</ul>
<div class="Bottom"></div>
</div>
</div>
</div>
<div class="HackBox"></div>
<!--#include file="bottom.asp" -->
</body>
</html>
