<%
this_areaclass=Split(showlistclass(area_id),",")
For i=0 To UBound(this_areaclass)-1
If this_areaclass(i)=this_area Then
response.write ""&showclassname(this_areaclass(i))
Else
%>
<%=showclassname(this_areaclass(i))%>
<%
End If
response.write ""
next%>
<%
this_smallclass=Split(showshopclass(this_followid),",")
For i=0 To UBound(this_smallclass)
If this_smallclass(i)=this_shopclass2id Then
response.write ""&showclass(this_smallclass(i))
Else
%>
"><%=showclass(this_smallclass(i))%>
<%
End If
response.write ""
next%>
<%
Set rsshop=server.createobject("adodb.recordset")
pagenum=10
searchstr=" where shopname<>'' and lock_user=0 and area_id='"&area_id&"' "
If this_shopclass2id<>"" Then
searchstr=searchstr&" and (shop_classid='"&this_shopclass2id&"' "
shopclasslist=split(showshopclass(this_shopclass2id),",")
For i=0 To UBound(shopclasslist)-1
searchstr=searchstr&" or shop_classid='"&shopclasslist(i)&"' "
Next
searchstr=searchstr&" ) "
End if
If this_area<>"" Then
searchstr=searchstr&" and shopareaid='"&this_area&"' "
End If
If request("tag")<>"" Then
tag=server.htmlencode(request("tag"))
searchstr=searchstr&" and ( shopname like '%"&tag&"%' or join_tese like '%"&tag&"%' or address like '%"&tag&"%' or zhuying like '%"&tag&"%')"
Call savetag(Left(request("tag"),20))
End If
If request("str")<>"输入商家的位置或名称..." Then
searchstr=searchstr&" and ( shopname like '%"&request("str")&"%' or join_tese like '%"&request("str")&"%' or address like '%"&request("str")&"%' or zhuying like '%"&request("str")&"%')"
Call savetag(Left(request("str"),20))
End If
If request("order")<>"" Then
order=request("order")
Else
order="desc"
End if
If request("top")<>"" Then
Select Case request("top")
Case 1
method=" shopid "
Case 2
method=" dp_count "
Case 3
method=" (dp_zhiliang+dp_fuwu+dp_huanjing+dp_xingjia)/(case dp_count when 0 then 1 else dp_count end) "
Case 4
method=" dp_zhiliang/(case dp_count when 0 then 1 else dp_count end) "
Case 5
method=" dp_fuwu/(case dp_count when 0 then 1 else dp_count end) "
Case 6
method=" dp_huanjing/(case dp_count when 0 then 1 else dp_count end) "
Case 7
method=" dp_xingjia/(case dp_count when 0 then 1 else dp_count end) "
Case Else
method=" regtime "
End Select
Else
method=" shopid "
End If
sql="select * from shop "&searchstr&" order by join_type ,len(shoplogo) desc, "&method&" "&order
rsshop.open sql,conn,1,1
%>
Search搜索结果
共有相关商户信息 <%=rsshop.recordcount%> 项
排序方式:
<%method="最新增加,点评最多,综合评分,质量,服务,环境,性价比"
methodarr=Split(method,",")
For i=0 To UBound(methodarr)
%>
&area=<%=this_area%>&top=<%=i+1%>&=desc"><%=methodarr(i)%>
<%
next%>
<%
If rsshop.eof Then
response.write "
对不起,没有找到您要的信息,您可以尝试其他搜索!
"
else
If Request.querystring("p") = "" or Request.querystring("p") = 0 then
p = 1
Else
p = CINT(Request("p"))
End If
rsshop.PageSize=pagenum '每页显示的记录数
Dim TotalPages
TotalPages = rsshop.PageCount '获得总页数
If p>rsshop.Pagecount Then
p=rsshop.Pagecount
end if
If rsshop.recordcount>0 then
rsshop.AbsolutePage=p
End if
rsshop.CacheSize = rsshop.PageSize
Dim Totalcount
Totalcount =INT(rsshop.recordcount)
Dim Y
Y=0
While Not rsshop.EOF
Call shopdetail(rsshop("shopid"),1)
Y = Y + 1
rsshop.Movenext
If Y=pagenum then
While Not rsshop.EOF
rsshop.Movenext
Wend
End If
Wend
if int(int(p/10)*10+9)>TotalPages then
ToPages=TotalPages
else
ToPages=int(int(p/10)*10+9)
end if
if p/10 < 1 then
fromPages=1
else
fromPages=int(p/10)*10
end If
If pagenum<>100 then
%>
<%End If
End if%>