<%
'商易仿淘宝4.0(多用户)
'ACCESS版演示网站：http://www.ftaobao.com(商易仿淘宝商城)
'SQL版演示网站：http://sql.ftaobao.com
'电话：0571-56907100
'QQ：1147100
%>
<!--#include file="include/page.asp" -->
<!--#include file="include/coding.asp "-->

<%
Class shop_search 
Public Function Rich_Shop (strade,loc,q,isnew,atype,start_price,end_price,lbid,xlbid,slbid,jg,fs,fenye,xs,px,page,top_s)
IsFirstSql=True
sql="select chanpin.*,fukuan.* from chanpin,fukuan where chanpin.userid=fukuan.userid "

'分类
if lbid <>0 then 
sql=sql&"and lbid="&lbid
end if
if xlbid <>0 then
sql=sql&" and xlbid="&xlbid
end if
if slbid <>0 then
sql=sql&" and slbid="&slbid
end if

'是否支付宝
if strade<>"" then
zfb="支付宝"
sql=sql& " and zhifubao like '%"&zfb&"%'"
else
sql=sql& ""
end if
'所在地
if loc<>"" then
sql=sql& "and chanpin.suozaidi like '%"&loc&"%'"
end if
'关键字
if q <>""then
sql=sql&" and mc like '%"&q&"%'"
end if
'新旧程度
if isnew <>"" then
  select case isnew
         case "2":
          sql=sql&"and newold  like '全新'"
		 case "1":
		 sql=sql&" and newold like '%成新'"
  end select

end if


'fs  搜索范围        255 全部 0 一口价 1 拍卖 2 议价
fsstr=split(atype,",")

if Ubound(fsstr) <1 then
  if atype="a" then
 fs=1
 end if
 if atype="b" then
 fs=0 
 end if
Select case fs
case  0:
     sql=sql&" and fs=0"
case  1:
     sql=sql&" and fs=1"
case  2:
sql=sql&" and fs=2"
End Select
end if



'jg  价格范围

if start_price<>"" and end_price<>"" then
  'if IsFirstSql then
  '  sql=sql&" jg2>="&start_price&" and jg2<="&end_price
	'IsFirstSql=false
  'else
    sql=sql&" and jg2>="&start_price&" and jg2<="&end_price
  'end if
end if
'审核

sql=sql&" and tui=0"

'  px 排序
if px<>"" then
Select case px
case 0:
sql=sql&" order by sj desc"
case 1:
sql=sql&" order by sj"
case 2:
sql=sql&" order by jg2"
case 3:
sql=sql&" order by jg2 desc"
case 4:
sql=sql&" order by sj2"
case 5:
sql=sql&" order by sj2 desc"
case 6:
sql=sql&" order by rq"
case 7:
sql=sql&" order by rq desc"

End Select
end if
Set rs=Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,3,1 

if rs.eof then
response.write "<CENTER><br><br>&nbsp;&nbsp;没有查询到关于<font color=red>"&key&"</font>任何相关信息！您可以点击<a href=""search_gj.asp"">高级搜索</a>继续搜索</CENTER>"

end if

if not rs.eof then
'response.Write(sql)
Call Menu()

if request("page")=""  or isempty(request("page")) then
page = 1
else
page=int(request("page"))
end if

rs.pagesize = fenye
if page>rs.pagecount then
page=rs.pagecount
end if
if not rs.BOF then
Rs.Move Rs.PageSize*(page-1)
end if

'response.Write fenye
i=1
'response.Write rs.pagesize
'是否以图片显示
isshowgrid=xs

Response.Write "<div id=""ItemList"">"&vbcrlf
Select case isshowgrid
case 0:
		Response.write "<div id=""GridView""> "& vbcrlf
		Response.write "<div id=""GridViewTop""> "& vbcrlf
Response.Write "<div class=""CompareCheck"">"
            response.Write "&nbsp;<a href=""#""  onclick=comparecheck('bijiao.asp')>"
            response.Write "对比选中的商品</a>"
			Response.Write "</div>"
			Response.write "<div class=""Legends""><img src=""images/2k5/sys/component/icon_buynow.gif"" alt=""图例"" />一口价<img src=""images/2k5/sys/component/icon_bid.gif"" alt=""图例"" />拍卖<img src=""images/2k6/sys/list/16x16_hkstreet.gif"" alt=""图例"" />香港商家<img src=""images/logo/icon_alipay_16x16_v2.gif"" alt=""图例"" />可用支付宝付款"& vbcrlf
		Response.write "<select name=""loc1"" onchange=""self.location=loc1.value"">"& vbcrlf
		Response.write "<option value="""">所在地</option>"& vbcrlf
		optinos3("上海")
optinos3("杭州")
optinos3("广州")
optinos3("深圳")
optinos3("南京")
optinos3("武汉")
optinos3("天津")
optinos3("香港")
optinos3("成都")
optinos3("哈尔滨")
optinos3("重庆")
optinos3("宁波")
optinos3("无锡")
optinos3("济南")
optinos3("苏州")
optinos3("温州")
optinos3("青岛")
optinos3("沈阳")
optinos3("福州")
optinos3("西安")
optinos3("长沙")
optinos3("合肥")
optinos3("南宁")
optinos3("南昌")
optinos3("郑州")
optinos3("厦门")
optinos3("大连")
optinos3("常州")
optinos3("石家庄")
optinos3("东莞")
		Response.write "<option value="""">所有地区</option>"& vbcrlf
		Response.write "</select>"& vbcrlf
		Response.write "</div>"& vbcrlf
		Response.write "</div>"& vbcrlf
		Response.write "<div class=""Seperator""></div>"& vbcrlf
		Response.write"<div id=""bidlist""></div>"& vbcrlf
		
		

case 1:
		Response.write"<div id=""ListView"">"& vbcrlf
		Response.write"<div id=""ListViewTop"">"& vbcrlf
		Response.Write "<div class=""CompareCheck"">"
		response.Write "<a href=#  onclick=comparecheck('bijiao.asp')>"
		response.Write "对比选中的商品</a>"
		Response.Write "</div>"	
		Response.write "<div class=""Info"">"&vbcrlf
		Response.write "<div class=""Name"">商品名称/卖家</div>"&vbcrlf			
		Response.write "</div>"&vbcrlf
		Response.write "<div class=""TimeLeft"">"&vbcrlf
		Response.write "剩余时间"&vbcrlf
		Response.write "</div>"&vbcrlf
		Response.write "<div class=""Place"">"&vbcrlf
		Response.write "<select name=""loc1"" onchange=""self.location=loc1.value"">"&vbcrlf
		Response.write "<option value="""">所在地</option>"&vbcrlf
optinos3("上海")
optinos3("杭州")
optinos3("广州")
optinos3("深圳")
optinos3("南京")
optinos3("武汉")
optinos3("天津")
optinos3("香港")
optinos3("成都")
optinos3("哈尔滨")
optinos3("重庆")
optinos3("宁波")
optinos3("无锡")
optinos3("济南")
optinos3("苏州")
optinos3("温州")
optinos3("青岛")
optinos3("沈阳")
optinos3("福州")
optinos3("西安")
optinos3("长沙")
optinos3("合肥")
optinos3("南宁")
optinos3("南昌")
optinos3("郑州")
optinos3("厦门")
optinos3("大连")
optinos3("常州")
optinos3("石家庄")
optinos3("东莞")
		Response.write "<option value="""">所有地区</option>"& vbcrlf
		Response.write "</select>"&vbcrlf
		Response.write "</div>"&vbcrlf
		Response.write "<div class=""Legend"">"&vbcrlf
		Response.write "方式"&vbcrlf
		Response.write "</div>"&vbcrlf
		Response.write "<div class=""Shipping"">点击数</div>"&vbcrlf
		Response.write "<div class=""Price"">"&vbcrlf
		Response.write "价格(元)"&vbcrlf
		Response.write "</div>"&vbcrlf
		Response.write "</div>"&vbcrlf
		response.write "<div class=""HackBox""></div>"&vbcrlf
		response.write "<div id=""bidlist""></div>"&vbcrlf
case 2:
Response.Write "<div id=""TextView"">"
Response.Write "<div id=""TextViewTop"">"
Response.Write "<div class=""CompareCheck"">"
response.Write "&nbsp;<a href=#  onclick=comparecheck('bijiao.asp')>"
response.Write "对比选中的商品</a>"
Response.Write "</div>"
Response.Write "<div class=""Info"">"
Response.Write "<div class=""Name"">商品名称/卖家</div>"
Response.Write "</div>"
Response.Write "<div class=""TimeLeft"">"
Response.Write "剩余时间"
Response.Write "</div>"
Response.Write "<div class=""Place"">"
Response.Write "<select name=""loc1"" onchange=""self.location=loc1.value"">"
Response.Write "<option value="""">所在地</option>"
optinos3("上海")
optinos3("杭州")
optinos3("广州")
optinos3("深圳")
optinos3("南京")
optinos3("武汉")
optinos3("天津")
optinos3("香港")
optinos3("成都")
optinos3("哈尔滨")
optinos3("重庆")
optinos3("宁波")
optinos3("无锡")
optinos3("济南")
optinos3("苏州")
optinos3("温州")
optinos3("青岛")
optinos3("沈阳")
optinos3("福州")
optinos3("西安")
optinos3("长沙")
optinos3("合肥")
optinos3("南宁")
optinos3("南昌")
optinos3("郑州")
optinos3("厦门")
optinos3("大连")
optinos3("常州")
optinos3("石家庄")
optinos3("东莞")
Response.write "<option value="""">所有地区</option>"& vbcrlf
Response.Write "</select>"
Response.Write "</div>"
Response.Write "<div class=""Legend"">"
Response.Write "方式"
Response.Write "</div>"
Response.Write "<div class=""Shipping"">点击数</div>"
Response.Write "<div class=""Price"">"
Response.Write "价格(元)"
Response.Write "</div>"
Response.Write "</div>"
Response.Write "<div class=""HackBox""></div>"
Response.Write "<div id=""bidlist"">"
Response.Write "</div>"

end select


'显示表头
	if shopnet("fenye")<>"" then
	rs.PageSize =shopnet("fenye") '每页记录条数
	end if
			iCount=rs.RecordCount '记录总数
			iPageSize=rs.PageSize
    		maxpage=rs.PageCount 
    		page=request("page")
    
    if Not IsNumeric(page) or page="" then
        page=1
    else
        page=cint(page)
    end if
    
    if page<1 then
        page=1
    elseif  page>maxpage then
        page=maxpage
    end if
    
    rs.AbsolutePage=Page

	if page=maxpage then
		x=iCount-(maxpage-1)*iPageSize
	else
		x=iPageSize
	end if
	
			For y=1 To x
	Select case isshowgrid
	case 0
	
			 response.write"<div class=""Item"">"& vbcrlf
			response.write"<div class=""CompareCheck""><INPUT  onfocus=this.blur() onclick=""javascript:change_select("&("id")&",'"&rs("mc")&"')""  type=checkbox></div>"& vbcrlf

			response.write"<div class=""Pic"" style=""background-image:url(user/images/Rikeeupimages/"&rs("xt")&");"">"& vbcrlf
			response.write "<a href=""merchandise.asp?id="&Encode(rs("chanpin.id"))&""" target=""_blank"">"& vbcrlf
			response.write "<img src=""user/images/Rikeeupimages/"&rs("xt")&""" alt=""图片"" border=""0"" width=""89px"" height=""89px"" ></a></div>"& vbcrlf
				Select case rs("fs")
			case 0
			response.write "<div class=""Price"">"& vbcrlf
			Response.Write "￥<span>" & rs("jg2") & "</span>元"& vbcrlf
			response.write "</div>"& vbcrlf
			case 1
			response.write "<div class=""Price"">"& vbcrlf
			Response.Write "￥<span>" & rs("jg2") & "</span>元"& vbcrlf
			response.write "</div>"& vbcrlf
			case 2
			response.write "<div class=""Price"">"& vbcrlf
			Response.Write "<span>议价</span>"& vbcrlf
			response.write "</div>"& vbcrlf
			End Select
			Select case rs("fs")
			case 0
			response.write"<div class=""Legend"">"& vbcrlf
			response.write"<img src=""images/2k5/sys/component/icon_buynow.gif"" alt=""一口价"" />"& vbcrlf
			response.write " <span id=""Fav1""><a href=""user/shoucang.asp?type=1&id="&Encode(rs("chanpin.id"))&""" class=""Fav"" target=""_blank"">收藏</a></span>"& vbcrlf
			response.write "</div>"& vbcrlf
			case 1
			response.write"<div class=""Legend"">"& vbcrlf
			response.write"<img src=""images/2k5/sys/component/icon_bid.gif"" alt=""拍卖"" />"& vbcrlf
			
			response.write " <span id=""Fav1""><a href=""user/shoucang.asp?type=1&id="&Encode(rs("chanpin.id"))&""" class=""Fav"" target=""_blank"">收藏</a></span>"& vbcrlf
			response.write "</div>"& vbcrlf
			case 2
			response.write"<div class=""Legend"">"& vbcrlf
			response.write "<i>议价</i>"& vbcrlf
			response.write " <span id=""Fav1""><a href=""user/shoucang.asp?type=1&id="&Encode(rs("chanpin.id"))&""" class=""Fav"" target=""_blank"">收藏</a></span>"& vbcrlf
			response.write "</div>"& vbcrlf
			end select
			response.write"<div class=""Name""><a href=""merchandise.asp?id="&Encode(rs("chanpin.id")) &"""target=""_blank"" class=""EventCanSelect"">"&rs("mc")&"</a></div>"& vbcrlf
			response.write"</div>"& vbcrlf

	
	case 1
			response.Write "<div class=""Item"" >"& vbcrlf
			response.write "<div class=""CompareCheck"">"& vbcrlf
			response.write"<div class=""CompareCheck""><INPUT  onfocus=this.blur() onclick=""javascript:change_select("&rs("chanpin.id")&",'"&rs("mc")&"')""  type=checkbox></div>"& vbcrlf
			response.write "</div>"& vbcrlf
			response.write "<div  class=""Pic""  style=""background-image:url(user/images/Rikeeupimages/"&rs("xt")&");"" >"
			response.write "<a href=""merchandise.asp?id="&Encode(rs("chanpin.id"))&""" target=""_blank"">"& vbcrlf
			response.write"<img src=""user/images/Rikeeupimages/"&rs("xt")&"""alt=""图片"" border=""0"" width=""75px"" height=""75px"" /></a>"& vbcrlf
			response.write "</div>"& vbcrlf
			response.write "<div class=""Tool""> <span id=""Fav1""><a href=""user/shoucang.asp?type=1&id="&Encode(rs("chanpin.id"))&""" class=""Fav"" target=""_blank"">收藏</a></span></div>"& vbcrlf
			response.write "<div class=""Info"">"& vbcrlf
			response.write "<div class=""Name""><a href=""merchandise.asp?id="&Encode(rs("chanpin.id")) &"""target=""_blank"" class=""EventCanSelect"">"&rs("mc")&"</a></div>"&vbcrlf
			response.write "<div class=""Seller"">卖家:<A href=""shop/1/myshop.asp?shopid="&rs("chanpin.userid")&""">"&rs("username")&"</a><span class=""WWOnline"" status="""" nick="""" tnick="""">&nbsp;</span></div>"
			response.write "</div>"
			response.write "<div class=""TimeLeft""><i>剩余</i>"& vbcrlf
			sDate = DateDiff("s", Now(), rs("sj2")) '总秒数
			sDay = fix(sDate/86400) '天数
			sDate1 = sDate mod 86400 '余数
			sHour = fix(sDate1/3600) '小时
			sDate2 = sDate1 mod 3600 '余数
			sMinute = fix(sDate2/60) '分钟
	    	If sDay > 0 Then
			Response.Write sDay & "天"&sHour & "小时"& vbcrlf
			ElseIf sHour > 0 Then
			Response.Write sHour & "小时"&sMinute & "分钟"& vbcrlf
			ElseIf sMinute > 0 Then
			Response.Write sMinute & "分钟"& vbcrlf
			End If
			response.write "</div>"& vbcrlf
			response.write"<div class=""Place"">"&rs("chanpin.suozaidi")&"</div>"& vbcrlf
			Select case rs("fs")
			case 0
			response.write"<div class=""Legend"">"& vbcrlf
			response.write"<img src=""images/2k5/sys/component/icon_buynow.gif"" alt=""一口价"" />"& vbcrlf
			response.write "</div>"& vbcrlf
			case 1
			response.write"<div class=""Legend"">"& vbcrlf
			response.write"<img src=""images/2k5/sys/component/icon_bid.gif"" alt=""拍卖"" />"& vbcrlf
			response.write "</div>"& vbcrlf
			case 2
			response.write"<div class=""Legend"">"& vbcrlf
			response.write "<i>议价</i>"& vbcrlf
			response.write "</div>"& vbcrlf
			end select
			response.write "<div class=""Shipping"">"& rs("rq")&"</div>"& vbcrlf
				Select case rs("fs")
			case 0
			response.write "<div class=""Price"">"& vbcrlf

			Response.Write "￥<span>" & rs("jg2") & "</span>元"& vbcrlf
			response.write "</div>"& vbcrlf
			case 1
			response.write "<div class=""Price"">"& vbcrlf

			Response.Write "￥<span>" & rs("jg2") & "</span>元"& vbcrlf
			response.write "</div>"& vbcrlf
			case 2
			response.write "<div class=""Price"">"& vbcrlf
			Response.Write "<span>议价</span>"& vbcrlf
			response.write "</div>"& vbcrlf
			End Select
			response.write "</div>"& vbcrlf
			response.write "<div class=""HackBox""></div>"& vbcrlf
			
	case 2:
	Response.Write "<div class=""Item"">"
	response.write"<div class=""CompareCheck""><INPUT  onfocus=this.blur() onclick=""javascript:change_select("&rs("chanpin.id")&",'"&rs("mc")&"')""  type=checkbox></div>"& vbcrlf
	Response.Write "<div class=""Info"">"
	Response.Write "<div class=""Name"">"
	Response.Write "<a href=""merchandise.asp?id="&Encode(rs("chanpin.id"))&""" target=""_blank"">"&rs("mc")
	Response.Write "</a></div>"
	Response.Write "<div class=""Seller"">"
	Response.Write "卖家：<A href=""shop/1/myshop.asp?shopid="&rs("chanpin.userid")&""">"&rs("username")&"</a><span class=""WWOnline"" status=""01"" "
	Response.Write "nick="""" tnick="""">&nbsp;</span>"
	response.write " <span id=""Fav1""><a href=""user/shoucang.asp?type=1&id="&Encode(rs("chanpin.id"))&""" class=""Fav"" target=""_blank"">收藏</a></span>"& vbcrlf
	Response.Write "</div>"
	Response.Write "</div>"
	response.write "<div class=""TimeLeft""><i>剩余</i>"& vbcrlf
			sDate = DateDiff("s", Now(), rs("sj2")) '总秒数
			sDay = fix(sDate/86400) '天数
			sDate1 = sDate mod 86400 '余数
			sHour = fix(sDate1/3600) '小时
			sDate2 = sDate1 mod 3600 '余数
			sMinute = fix(sDate2/60) '分钟
	    	If sDay > 0 Then
			Response.Write sDay & "天"&sHour & "小时"& vbcrlf
			ElseIf sHour > 0 Then
			Response.Write sHour & "小时"&sMinute & "分钟"& vbcrlf
			ElseIf sMinute > 0 Then
			Response.Write sMinute & "分钟"& vbcrlf
			End If
			response.write "</div>"& vbcrlf
			response.write"<div class=""Place"">"&rs("chanpin.suozaidi")&"</div>"& vbcrlf
			Select case rs("fs")
			case 0
			response.write"<div class=""Legend"">"& vbcrlf
			response.write"<img src=""images/2k5/sys/component/icon_buynow.gif"" alt=""一口价"" />"& vbcrlf
			response.write "</div>"& vbcrlf
			case 1
			response.write"<div class=""Legend"">"& vbcrlf
			response.write"<img src=""images/2k5/sys/component/icon_bid.gif"" alt=""拍卖"" />"& vbcrlf
			response.write "</div>"& vbcrlf
			case 2
			response.write"<div class=""Legend"">"& vbcrlf
			response.write "<i>议价</i>"& vbcrlf
			response.write "</div>"& vbcrlf
			end select
			response.write "<div class=""Shipping"">"& rs("rq")&"</div>"& vbcrlf
				Select case rs("fs")
			case 0
			response.write "<div class=""Price"">"& vbcrlf

			Response.Write "￥<span>" & rs("jg2") & "</span>元"& vbcrlf
			response.write "</div>"& vbcrlf
			case 1
			response.write "<div class=""Price"">"& vbcrlf

			Response.Write "￥<span>" & rs("jg2") & "</span>元"& vbcrlf
			response.write "</div>"& vbcrlf
			case 2
			response.write "<div class=""Price"">"& vbcrlf
			Response.Write "议价"& vbcrlf
			response.write "</div>"& vbcrlf
			End Select
			response.write "</div>"& vbcrlf
	Response.Write "<div class=""HackBox""></div>"
	end select

	x=y+1
rs.MoveNext                                              
next
			Select case isshowgrid
			case 0:
			Response.Write "<div class=""HackBox""></div>"
			response.write"<div id=""GridViewBottom"">"
		    Response.Write "<div class=""CompareCheck"">"
            response.Write "&nbsp;<a href=#  onclick=comparecheck('bijiao.asp')>"
            response.Write "对比选中的商品</a>"
			Response.Write "</div>"
			Response.Write "<div class=""PageChanger"">"
			response.write"<table width=""98%"" align=""center"" cellpadding=""0"" cellspacing=""0"">"& vbcrlf
			response.Write"<tr>"& vbcrlf
			response.Write" <td height=""30"" align=""center"" valign=""middle""> "& vbcrlf
	call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>")
			rs.close
			set rs=nothing
			response.Write "</td>"& vbcrlf
			response.Write"</tr>"& vbcrlf
			response.Write "</table></div></div></div></div>"& vbcrlf
			case 1:
			response.Write"	<div id=""ListViewBottom"">"
			Response.Write "<div class=""CompareCheck"">"
            response.Write "&nbsp;<a href=#  onclick=comparecheck('bijiao.asp')>"
            response.Write "对比选中的商品</a>"
			Response.Write "</div>"
			Response.Write "<div class=""PageChanger"">"
			response.write"<table width=""98%"" align=""center"" cellpadding=""0"" cellspacing=""0"">"& vbcrlf
			response.Write"<tr>"& vbcrlf
			response.Write" <td height=""30"" align=""center"" valign=""middle""> "& vbcrlf
			call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>")
			rs.close
			set rs=nothing
			response.Write "</td>"& vbcrlf
			response.Write"</tr>"& vbcrlf
			response.Write "</table></div></div></div></div>"& vbcrlf
			case 2:
			Response.Write "<div id=""TextViewBottom"">"
			Response.Write "<div class=""CompareCheck"">"
            response.Write "&nbsp;<a href=#  onclick=comparecheck('bijiao.asp')>"
            response.Write "对比选中的商品</a>"
			Response.Write "</div>"
			Response.Write "<div class=""PageChanger"">"
			response.write"<table width=""98%"" align=""center"" cellpadding=""0"" cellspacing=""0"">"& vbcrlf
			response.Write"<tr>"& vbcrlf
			response.Write" <td height=""30"" align=""center"" valign=""middle""> "& vbcrlf
			call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>")
			rs.close
			set rs=nothing
			response.Write "</td>"& vbcrlf
			response.Write"</tr>"& vbcrlf
			response.Write "</table>"&vbcrlf
			Response.Write "</div>"
			Response.Write "</div>"
			Response.Write " </div>"
			Response.Write "</div>"
			end select   
	end if
End Function
End Class



Function canshu(str)
Dim query, a, x, temp
query = Split(Request.ServerVariables("QUERY_STRING"), "&")
For Each x In query
a = Split(x, "=")
If StrComp(a(0), str, vbTextCompare) <> 0 Then
temp = temp & a(0) & "=" & a(1) & "&"
End If
Next
canshu=temp
End Function
	   
Function canshu2(str)
 Dim query, a, x, temp
query = Split(Request.ServerVariables("QUERY_STRING"), "&")
For Each x In query
a = Split(x, "=")
If StrComp(a(0), str, vbTextCompare) <> 0 Then
temp = temp & a(0) & "=" & a(1) & "&amp;"
End If
Next
canshu2=temp
End Function

Function islx3()
Dim query, x, temp
islx3=false
query = Split(Request.ServerVariables("QUERY_STRING"), "&")
For Each x In query
	If StrComp(x, "lx=3", vbTextCompare)=0 Then
	  islx3=true
	End If
Next
End Function   

function optinos(para,str,num)
temp_para=fenye
if temp_para="" then temp_para=40
response.Write "<OPTION value=?"&canshu2(para)&para&"="&num
if int(temp_para)=num then response.Write " selected"
response.Write">"&str&"</OPTION>"& vbcrlf
end function
			
function optinos2(para,str,num)
temp_para=px
if temp_para="" then temp_para=0
response.Write "<OPTION value=?"&canshu2(para)&para&"="&num
if int(temp_para)=num then response.Write " selected"
response.Write">"&str&"</OPTION>"& vbcrlf
end function

function optinos3(str)
Response.write "<option value=""?"&canshu("loc")&"loc="&str &""""
response.Write">"&str&"</OPTION>"& vbcrlf
end function
			
						
function xsfanshi(str,num)
xsfs=xs
if xsfs="" then xsfs=0
if int(xsfs)=num then 
response.Write "<FONT color=#999999><B>"&str&"</B></FONT>"
else
'response.Write "<A href="""&replace(Request.ServerVariables("SCRIPT_NAME")&"?"&canshu("xs"),"&xs="&num&"","")&"xs="&num&""&""">"
response.Write "<A href="""&Request.ServerVariables("SCRIPT_NAME")&"?"&canshu("xs")&"xs"&"="&num&""">"
response.Write str
response.Write "</a>"
end if
end function 
			
			
			
			
Sub  Menu()
response.write"<div id=""DisplaySettings"" style=""overflow:hidden;"">"&vbcrlf
response.write"<div id=""DisplayMode"">显示方式："&vbcrlf
select case xs
case 0:
response.write"<a href=""?"&canshu("xs")&"xs=1"&"""><img src=""images/2k5/sys/component/display_mode_list.gif"" title=""列表方式"" alt=""列表方式"" /></a>"&vbcrlf
response.write"<a href=""?"&canshu("xs")&"xs=0"&"""><img src=""images/2k5/sys/component/display_mode_grid_act.gif""title=""图片方式"" alt=""图片方式"" /></a>"&vbcrlf
response.write"<a href=""?"&canshu("xs")&"xs=2"&"""><img src=""images/2k5/sys/component/display_mode_text.gif"" title=""纯文字方式"" alt=""纯文字方式"" /></a>"&vbcrlf
case 2:
response.write"<a href=""?"&canshu("xs")&"xs=1"&"""><img src=""images/2k5/sys/component/display_mode_list.gif"" title=""列表方式"" alt=""列表方式"" /></a>"&vbcrlf
response.write"<a href=""?"&canshu("xs")&"xs=0"&"""><img src=""images/2k5/sys/component/display_mode_grid.gif""title=""图片方式"" alt=""图片方式"" /></a>"&vbcrlf
response.write"<a href=""?"&canshu("xs")&"xs=2"&"""><img src=""images/2k5/sys/component/display_mode_text_act.gif"" title=""纯文字方式"" alt=""纯文字方式"" /></a>"&vbcrlf
case else:
response.write"<a href=""?"&canshu("xs")&"xs=1"&"""><img src=""images/2k5/sys/component/display_mode_list_act.gif"" title=""列表方式"" alt=""列表方式"" /></a>"&vbcrlf
response.write"<a href=""?"&canshu("xs")&"xs=0"&"""><img src=""images/2k5/sys/component/display_mode_grid.gif""title=""图片方式"" alt=""图片方式"" /></a>"&vbcrlf
response.write"<a href=""?"&canshu("xs")&"xs=2"&" ""><img src=""images/2k5/sys/component/display_mode_text.gif"" title=""纯文字方式"" alt=""纯文字方式"" /></a>"&vbcrlf
end select 
response.write"</div>"&vbcrlf
response.write"<div id=""ItemAmount"">每页显示数量："&vbcrlf
if fenye=20 then
response.write"<a href=""?"&canshu("fenye")&"fenye=20"&"""><img src=""images/2k5/sys/component/item_amount_20_act.gif"" title=""每页显示20个商品"" alt=""每页显示20个商品"" /></a>"&vbcrlf
else
response.write"<a href=""?"&canshu("fenye")&"fenye=20"&"""><img src=""images/2k5/sys/component/item_amount_20.gif"" title=""每页显示20个商品"" alt=""每页显示20个商品"" /></a>"&vbcrlf
end if
if fenye=40 then
response.write"<a href=""?"&canshu("fenye")&"fenye=40"&"""><img src=""images/2k5/sys/component/item_amount_5F40_act.gif"" title=""每页显示40个商品"" alt=""每页显示40个商品"" /></a>"&vbcrlf
else
response.write"<a href=""?"&canshu("fenye")&"fenye=40"&"""><img src=""images/2k5/sys/component/item_amount_5F40.gif"" title=""每页显示40个商品"" alt=""每页显示40个商品"" /></a>"&vbcrlf
end if
if fenye=80 then
response.write"<a href=""?"&canshu("fenye")&"fenye=80"&"""><img src=""images/2k5/sys/component/item_amount_80_act.gif"" title=""每页显示80个商品"" alt=""每页显示80个商品"" /></a>"&vbcrlf
else
response.write"<a href=""?"&canshu("fenye")&"fenye=80"&"""><img src=""images/2k5/sys/component/item_amount_80.gif"" title=""每页显示80个商品"" alt=""每页显示80个商品"" /></a>"&vbcrlf
end if
response.write"</div>"&vbcrlf
response.write"<div id=""SortMode"">排序方式："&vbcrlf
select case px
case 3:
response.write"<a href=""?"&canshu("px")&"px=3"&"""><img src=""images/2k5/sys/component/sortby_price_up_act.gif"" title=""按价格排列"" alt=""按价格排列"" /></a>"&vbcrlf
response.write"<a href=""?"&canshu("px")&"px=5"&"""><img src=""images/2k5/sys/component/sortby_time_up.gif"" title=""按时间排列"" alt=""按时间排列"" /></a>"&vbcrlf

response.write"<a href=""?"&canshu("px")&"px=7"&"""><img src=""images/2k5/sys/component/sortby_price_up.gif"" title=""按点击数排列"" alt=""按点击数排列"" /></a>"&vbcrlf


case 5:
response.write"<a href=""?"&canshu("px")&"px=3"&"""><img src=""images/2k5/sys/component/sortby_price_up.gif"" title=""按价格排列""alt=""按价格排列"" /></a>"&vbcrlf
response.write"<a href=""?"&canshu("px")&"px=5"&"""><img src=""images/2k5/sys/component/sortby_time_up_act.gif"" title=""按时间排列"" alt=""按时间排列"" /></a>"&vbcrlf

response.write"<a href=""?"&canshu("px")&"px=7"&"""><img src=""images/2k5/sys/component/sortby_price_up.gif"" title=""按点击数排列""alt=""按点击数排列"" /></a>"&vbcrlf

case 7:
response.write"<a href=""?"&canshu("px")&"px=3"&"""><img src=""images/2k5/sys/component/sortby_price_up.gif"" title=""按价格排列""alt=""按价格排列"" /></a>"&vbcrlf
response.write"<a href=""?"&canshu("px")&"px=5"&"""><img src=""images/2k5/sys/component/sortby_time_up.gif"" title=""按时间排列"" alt=""按时间排列"" /></a>"&vbcrlf

response.write"<a href=""?"&canshu("px")&"px=7"&"""><img src=""images/2k5/sys/component/sortby_price_up_act.gif"" title=""按点击数排列""alt=""按点击数排列"" /></a>"&vbcrlf

case else
response.write"<a href=""?"&canshu("px")&"px=3"&"""><img src=""images/2k5/sys/component/sortby_price_up.gif"" title=""按价格排列""alt=""按价格排列"" /></a>"&vbcrlf
response.write"<a href=""?"&canshu("px")&"px=5"&"""><img src=""images/2k5/sys/component/sortby_time_up.gif"" title=""按时间排列"" alt=""按时间排列"" /></a>"&vbcrlf

response.write"<a href=""?"&canshu("px")&"px=7"&"""><img src=""images/2k5/sys/component/sortby_price_up.gif"" title=""按点击数排列""alt=""按点击数排列"" /></a>"&vbcrlf

end select
response.write"</div>"&vbcrlf
response.write"<div id=""QuickPageChanger"">"&vbcrlf

response.write"</div>"&vbcrlf
response.write"<div style=""margin-top:3px;"">"&vbcrlf

response.write"</div>"&vbcrlf
response.write"</div>"&vbcrlf


End Sub
'商易仿淘宝4.0.1演示地址
'http://www.ftaobao.com		   

%>
