<% Dim isDefaultpage isDefaultpage = true '================== '= 函数名 pinpai '= 功能 产品的中文名称 '= Jake 05.06.08 '====================== Function pinpai(id) If id="" or isnull(id) then pinpai="暂无" exit function End If Dim rs,sql,pinpaistr If int(id)=-1 then pinpaistr = "显示全部品牌" Else sql = "select category from category_pinpai where categoryID="&id set rs = Server.CreateObject("Adodb.Recordset") rs.open sql,conn,1,1 If not rs.Eof then pinpaistr = Rs("category") Else pinpaistr = "暂无" End if rs.close set rs = nothing End if pinpai = pinpaistr End function '================== '= 函数名 xilie '= 功能 产品系列的中文名称 '= Jake 05.06.08 '====================== Function xilie(id) Dim rs,sql,xiliestr sql = "select sorts from sorts_pinpai where sortsID="&id set rs = Server.CreateObject("Adodb.Recordset") rs.open sql,conn,1,1 If not rs.Eof then xiliestr = Rs("sorts") Else xiliestr = "暂无" End if rs.close set rs = nothing xilie = xiliestr End function '================== '= 函数名 dalei '= 功能 产品大类的中文名称 '= Jake 05.06.08 '====================== Function dalei(id) Dim rs,sql,daleistr sql = "select category from category where categoryID="&id set rs = Server.CreateObject("Adodb.Recordset") rs.open sql,conn,1,1 If not rs.Eof then daleistr = Rs("category") Else daleistr = "暂无" End if rs.close set rs = nothing dalei = daleistr End function dim keywords keywords = jaFei.safeRequest("txtkey") pinpaiid = jaFei.safeRequest("selpinpai") catid = jaFei.safeRequest("selcat") %>
当前位置:首页 -> <%=request("txtkey")%>站内搜索 <% Const MaxPerPage=15 dim totalPut dim CurrentPage dim TotalPages dim j dim sql if jaFei.safeRequest("page")<>"" and not isnull(jaFei.safeRequest("page")) then currentPage=Cint(jaFei.safeRequest("page")) else currentPage=1 end if wherestr = " 1=1 " if keywords <> "" then IF IsNumeric(keywords) then wherestr = wherestr & " and id="&keywords Else gzjlid1=request("txtkey") gzjlid=split(gzjlid1," ") max1=ubound(gzjlid) for m=0 to max1 mm=gzjlid(m) wherestr = wherestr & " and (name like '%" & mm & "%'"& " or content like '%" & mm & "%'"& " or detail like '%" & mm & "%')" next ENd if 'wherestr = wherestr & " and (name like '%" & keywords & "%'"& " or content like '%" & keywords & "%'"& " or detail like '%" & keywords & "%')" end if if pinpaiid <> "-1" and pinpaiid <> "" then wherestr = wherestr & " and pinpaiid = " & pinpaiid end if if catid <> "-1" and catid <> "" then if len(catid) > 5 then catid = replace(catid,"000000","") wherestr = wherestr & " and categoryid = " & catid else wherestr = wherestr & " and sortsid = " & catid end if end if sql = "select saletype, prename,company,mark,pretype,intro,other,type,viewnum,grade,predate,id,name,introduce,price1,price2,categoryid,sortsid,vipprice,xianshiprice,score,productdate,pagepath,pic,dgsp from product where " & wherestr & " and (saleType not like '%6%' or saletype is null) and sendid=1 order by id desc" set rs=server.CreateObject("adodb.recordset") rs.open sql ,conn,1,1 if err.number<>0 then response.write "数据库中无数据" end if if rs.eof And rs.bof then Response.Write "

对不起,没有您想要查找的商品!

" else totalPut=rs.recordcount if currentpage<1 then currentpage=1 end if if (currentpage-1)*MaxPerPage>totalput then if (totalPut mod MaxPerPage)=0 then currentpage= totalPut \ MaxPerPage else currentpage= totalPut \ MaxPerPage + 1 end if end if '======================================== '= '= 功能 分页列表 '= 日期 Jaken 2004-6-11 ' copyright bbs.sxsrc.com 青藤网络工作室 '================================================ If not rs.Eof then rs.pagesize = MaxPerPage totalPage=rs.pagecount rs.absolutepage=currentPage ' response.write totalPage &vbnewline &totalPut url="searchresult.asp?selcat="&catid&"&txtkey="&keywords&"&selpinpai="&pinpaiid&"&" %>
<%=request("txtkey")%>用品
 幼儿、化妆品、健康用品、家居
<% call KT_showpage(10,10,currentpage,totalpage,url) %>
<% showContent %>
<% call KT_showpage(10,10,currentpage,totalpage,url) %>
<% End if '================================== end if sub showContent dim i i=0 %>
<% do while not rs.eof productlist i=i+1 if i>=MaxPerPage/3 then Exit Do if not rs.eof then rs.movenext loop rs.close set rs=nothing %>
<% End Sub %>





<%closedb%>