<%
'商易仿淘宝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 "-->
<!--#include file="include/tishi.asp"-->

<%

Sub PageControl(iCount,pagecount,page,table_style,font_style)
'生成上一页下一页链接
    Dim query, a, x, temp
    action = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")

    query = Split(Request.ServerVariables("QUERY_STRING"), "&")
    For Each x In query
        a = Split(x, "=")
        If StrComp(a(0), "page", vbTextCompare) <> 0 Then
            temp = temp & a(0) & "=" & a(1) & "&"
        End If
    Next

    Response.Write("<table width=100% border=0 cellpadding=0 cellspacing=0 >" & vbCrLf )        
    Response.Write("<form method=get onsubmit=""document.location = '" & action & "?" & temp & "Page='+ this.page.value;return false;""><TR >" & vbCrLf )
    Response.Write("<TD align=center height=35>" & vbCrLf )
    Response.Write(font_style & vbCrLf )    
        
    if page<=1 then
        Response.Write ("首 页 " & vbCrLf)        
        Response.Write ("上一页 " & vbCrLf)
    else        
        Response.Write("<A HREF=" & action & "?" & temp & "Page=1>首 页</A> " & vbCrLf)
        Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page-1) & ">上一页</A> " & vbCrLf)
    end if

    if page>=pagecount then
        Response.Write ("下一页 " & vbCrLf)
        Response.Write ("尾 页 " & vbCrLf)            
    else
        Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page+1) & ">下一页</A> " & vbCrLf)
        Response.Write("<A HREF=" & action & "?" & temp & "Page=" & pagecount & ">尾 页</A> " & vbCrLf)            
    end if

    Response.Write(" 页次：" & page & "/" & pageCount & "页" &  vbCrLf)
    Response.Write(" 共有" & iCount & "种商品" &  vbCrLf)
    Response.Write(" 转到" & "<INPUT CLASS=wenbenkuang TYEP=TEXT NAME=page SIZE=2 Maxlength=5 VALUE=" & page & ">" & "页"  & vbCrLf & "<INPUT CLASS=go-wenbenkuang type=submit value=GO>")
    Response.Write("</TD>" & vbCrLf )                
    Response.Write("</TR></form>" & vbCrLf )        
    Response.Write("</table>" & vbCrLf )        
End Sub
Class shop_search 
Public Function Rich_Shop (lx,key,lbid,xlbid,slbid,jg,fs,fenye,xs,px,page,top_s)

sql="select * from chanpin where tui=0"
if key <>"" then
Select case int(lx)
case 0:
sql=sql&" and (mc like '%"&key&"%' or cj like '%"&key&"%')"
case 1:
sql=sql&" and username like '%"&key&"%'"
case 2:
sql=sql&" and huiyuan like '%"&key&"%'"
case 3:
sql=sql&" and suozaidi like '%"&key&"%'"
case 4:
sql=sql&" and js like '%"&key&"%'"
'case 5:
'sql=sql&" cj like '%"&key&"%'"
End Select
'------------

end if




'分类
if lbid <>0 then sql=sql&" and lbid="&lbid
if xlbid <>0 then sql=sql&" and xlbid="&xlbid
if slbid <>0 then sql=sql&" and slbid="&slbid
'fs  搜索范围        255 全部 0 一口价 1 拍卖 2 议价
Select case fs
case  255:
sql=sql&""
case  0:
sql=sql&" and fs=0"
case  1:
sql=sql&" and fs=1"
case  2:
sql=sql&" and fs=2"
End Select

'jg  价格范围
Select case jg
case 1:
sql=sql&" and jg2=1"
case 2:
sql=sql&" and jg2>=2 and jg2<=10"
case 2:
sql=sql&" and jg2>=11 and jg2<=50"
case 4:
sql=sql&" and jg2>=51 and jg2<=100"
case 5:
sql=sql&" and jg2>=101 and jg2<=200"
case 6:
sql=sql&" and jg2>=201 and jg2<=500"
case 7:
sql=sql&" and jg2>=501 and jg2<=1000"
case 8:
sql=sql&" and jg2>=1001 and jg2<=1500"
case 9:
sql=sql&" and jg2>=1501 and jg2<=2000"
case 10:
sql=sql&" and jg2>=2001 and jg2<=5000"
case 11:
sql=sql&" and jg2>=5001 and jg2<=10000"
case 12:
sql=sql&" and jg2>=10001 and jg2<=50000"
case 13:
sql=sql&" and jg2>=50001 and jg2<=100000"
case 14:
sql=sql&" and jg2>=100001"

End Select



'审核
'if kong=true then
'sql=sql&" tui=0"
'else
sql=sql&" and tui=0"
'end if

'  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")
'response.Write(sql)
'response.end
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"">商品名称/卖家"
Response.Write "</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
Response.Write "<form id='form1' name='form1' method='post' action='bijiao.asp'>"

'显示表头

	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() value="&rs("id")&"  type=checkbox name='pro_id'></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("id"))&""" target=""_blank"">"& vbcrlf
				response.write "<img src=""user/images/Rikeeupimages/"&rs("xt")&""" alt=""图片"" border=""0"" height=""89px"" width=""89px""></a></div>"& vbcrlf
				Select case rs("fs")
			case 0
			response.write "<div class=""Price"">"& vbcrlf
			Response.Write "" & rs("jg2") & "元"& vbcrlf
			response.write "</div>"& vbcrlf
			case 1
			response.write "<div class=""Price"">"& vbcrlf
			Response.Write "" & rs("jg2") & "元"& vbcrlf
			response.write "</div>"& vbcrlf
			case 2
			response.write "<div class=""Price"">"& vbcrlf
			Response.Write "议价"& 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("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("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("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("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() value="&rs("id")&"  type=checkbox name='pro_id'></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("id"))&""" target=""_blank"">"& vbcrlf
			response.write"<img src=""user/images/Rikeeupimages/"&rs("xt")&""" alt=""图片"" border=""0"" height=""80px""  width=""80px""/></a>"& vbcrlf
			response.write "</div>"& vbcrlf
			response.write "<div class=""Tool""> <span id=""Fav1""><a href=""user/shoucang.asp?type=1&id="&Encode(rs("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("id")) &"""target=""_blank"" class=""EventCanSelect"">"&rs("mc")&"</a></div>"&vbcrlf
			response.write "<div class=""Seller"">卖家:<A href=""shop/1/myshop.asp?shopid="&rs("userid")&""">"&rs("username")&"</a><span class=""WWOnline"" status="""" nick="""" tnick=""""></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("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() value="&rs("id")&"  type=checkbox name='pro_id'></div>"& vbcrlf
	Response.Write "<div class=""Info"">"
	Response.Write "<div class=""Name"">"
	Response.Write "<a href=""merchandise.asp?id="&Encode(rs("id"))&""" target=""_blank"">"&rs("mc")
	Response.Write "</a></div>"
	Response.Write "<div class=""Seller"">"
	Response.Write "卖家：<A href=""shop/1/myshop.asp?shopid="&rs("userid")&""">"&rs("username")&"</a><span class=""WWOnline"" status=""01"" "
	Response.Write "nick="""" tnick=""""></span>"
	response.write " <span id=""Fav1""><a href=""user/shoucang.asp?type=1&id="&Encode(rs("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("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") & "元"& vbcrlf
			response.write "</div>"& vbcrlf
			case 1
			response.write "<div class=""Price"">"& vbcrlf

			Response.Write "￥<span>" & rs("jg2") & "元"& 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>"
	end select

	x=y+1
rs.MoveNext                                              
next
		
	Response.Write "</form>"
	
	
	
			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
			if rs.recordcount>=1 then
			if page-1 mod 10=0 then
			p=(page-1) \ 10
			else
			p=(page-1) \ 10
			end if
			response.write "共"& rs.recordcount &"条,分"& rs.pagecount &"页："
			if p*10>0 then response.write "<a href='?"&transparam()&"page="&p*10&"' title=上十页>[&lt;&lt;]</a> "& vbcrlf
			uming_i=1
			for ii=p*10+1 to P*10+10
			if ii=page then
			response.write "<font color=#ff0000>["+Cstr(ii)+"]</font> "& vbcrlf
			else
			response.write "<a href='?"&transparam()&"page="&ii&"'>["+Cstr(ii)+"]</a> "& vbcrlf
			end if
			if ii=rs.pagecount then exit for
			uming_i=uming_i+1
			next
			if ii<=rs.pagecount and uming_i=11 then response.write "<a href='?"&transparam()&"page="&ii&"' title=下十页>[&gt;&gt;]</a>"
			end if
			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
			if rs.recordcount>=1 then
			if page-1 mod 10=0 then
			p=(page-1) \ 10
			else
			p=(page-1) \ 10
			end if
			response.write "共"& rs.recordcount &"条,分"& rs.pagecount &"页："
			if p*10>0 then response.write "<a href='?"&transparam()&"page="&p*10&"' title=上十页>[&lt;&lt;]</a> "& vbcrlf
			uming_i=1
			for ii=p*10+1 to P*10+10
			if ii=page then
			response.write "<font color=#ff0000>["+Cstr(ii)+"]</font> "& vbcrlf
			else
			response.write "<a href='?"&transparam()&"page="&ii&"'>["+Cstr(ii)+"]</a> "& vbcrlf
			end if
			if ii=rs.pagecount then exit for
			uming_i=uming_i+1
			next
			if ii<=rs.pagecount and uming_i=11 then response.write "<a href='?"&transparam()&"page="&ii&"' title=下十页>[&gt;&gt;]</a>"
			end if
			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)
if islx3() then
Response.write "<option value=""?"&canshu("key")&"key="&str &""""
else
Response.write "<option value=""?"&canshu("key")&"lx=3&key="&str &""""
end if
if  StrComp(str, key, vbTextCompare)=0 then response.Write "selected"
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
%>
