<!--#include file="inc/Conn.asp"-->
<!--#include file="thecity.asp"-->
<!--#include file="inc/Function_PC.asp"-->
<%
keys=request("keys")
cid=request("cid")
if cid="" then cid=0
if cid<>0 then
set rs=server.CreateObject("adodb.recordset")
sql="select * from Dream_Theme where ID="&cid&" order by Dream_zid asc, id desc"	
rs.open sql,Conn,1,1
if not(rs.eof and rs.bof) then	
	if rs("Dream_Title")<>"" then
		DreamTitles=rs("Dream_Title")
	else
		DreamTitles=rs("Dream_Names")
	end if
	DreamKeys=rs("Dream_Keyword")
	DreamDes=rs("Dream_Description")	
	if rs("Dream_ClassID")=0 then
		bid=rs("id")
		sid=0
		bclassname=rs("Dream_Names")
		sclassname=""		
	else
		bid=rs("Dream_ClassID")
		sid=rs("id")
		bclassname=B_ClassName(bid)
		sclassname=rs("Dream_Names")
	end if
else
	response.Write "index.asp"	
end if
rs.close
set rs=nothing
else
bclassname="全部信息"
bid=0
end if


if bclassname<>"" then
localstr=" > <a href=""?cid="&bid&""">"&bclassname&"</a>"
end if

if sclassname<>"" then
localstr=localstr&" > <a href=""?cid="&sid&""">"&sclassname&"</a>"
end if

%>
<!DOCTYPE html>
<html id="" lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title><%if DreamTitles<>"" then%><%=DreamTitles%>-<%end if%><%=Dream_SiteName%></title>
<meta name="description" content="<%=DreamKeys%>">
<meta name="keywords" content="<%=DreamDes%>">
<!--#include file="jscss.asp"-->
<!--#include file="inc/zdsbphone.asp"-->
</head>
<body>
<!--顶部导航-->
<!--#include file="nheader.asp"-->
<!--导航-->
<div class="conment">
<div class="local">当前位置：<a href="index.asp">首页</a><%=localstr%></div>
<%
if bid<>0 then
set rs=server.CreateObject("adodb.recordset")
sql="select * from Dream_Theme where Dream_ClassID="&bid&" order by Dream_Zid asc, id desc"
rs.open sql,Conn,1,1
if not(rs.eof and rs.bof) then
response.Write "<div class=""subclass""><h3>类别：</h3><div>"
if sid=0 then
response.Write "<a href=""?cid="&bid&""" class=""a"">全部</a>"
else
response.Write "<a href=""?cid="&bid&""">全部</a>"
end if
do while not rs.eof
%>
<a href="list.asp?cid=<%=rs("id")%>"<%if int(sid)=rs("id") then%> class="a"<%end if%>><%=rs("Dream_Names")%></a>
<%
rs.movenext
loop
response.Write "</div></div>"
end if
rs.close
set rs=nothing
end if
%>
<!--左边栏-->
<div class="left_nav">
<h3>全部分类</h3>
<ul>	
<%
set rs=server.CreateObject("adodb.recordset")
sql="select * from Dream_Theme where Dream_ClassID=0 order by Dream_Zid asc, id desc"
rs.open sql,Conn,1,1
if not(rs.eof and rs.bof) then
do while not rs.eof
%>
<li><a href="list.asp?cid=<%=rs("id")%>"<%if int(bid)=rs("id") then%> class="a"<%end if%>><%=rs("Dream_Names")%>&nbsp;<i>(<%=GoodsNum(rs("id"))%>)</i></a></li>
<%
rs.movenext
loop	
end if
rs.close
set rs=nothing
%>
</ul>
</div>
<!--右边栏-->
<div class="right_goods">
<div class="right_goods_title"><a href="?cid=<%=cid%>" class="a">全部商户</a></div>
<div class="right_goodslist">
	<ul>
		<%
		page=request("page")
		if page<>"" then
		page=int(page)
		else
		page=1
		end if
		pagenum=16
		set rs=server.CreateObject("adodb.recordset")
		sqlstr=""
		if request.cookies("cityall")<>"" then
		sqlstr=sqlstr&" and Dream_Area in ("&request.cookies("cityall")&")"
		end if
		if keys<>"" then
		sqlstr=sqlstr&" and (Dream_Title like '%"&keys&"%' or Dream_Address like '%"&keys&"%' or Dream_Phone like '%"&keys&"%')"
		end if
		if cid<>0 then
		if sid=0 then
		sql="select * from Dream_Menpiao where Dream_Theme in (select id from Dream_Theme where Dream_ClassID="&bid&" or id="&bid&" order by dream_zid asc,id desc) and Dream_IsOK=true "&sqlstr&" order by Dream_OrderID desc, id desc"
		else
		sql="select * from Dream_Menpiao where Dream_Theme = "&sid&" and Dream_IsOK=true "&sqlstr&" order by Dream_OrderID desc,id desc"
		end if
		else
		sql="select * from Dream_Menpiao where Dream_IsOK=true "&sqlstr&" order by Dream_OrderID desc, id desc"
		end if
		rs.open sql,Conn,1,1
		if not(rs.eof and rs.bof) then
		rs.PageSize=pagenum
		if page=0 then page=1 
		pages=rs.pagecount
		if page > pages then page=pages
		rs.AbsolutePage=page
		for j=1 to rs.PageSize
		if rs("Dream_DefaultPicUrl")<>"" then
		Dream_DefaultPicUrl=rs("Dream_DefaultPicUrl")
		else
		Dream_DefaultPicUrl="images/nopic.jpg"
		end if
		goodclass=""
		if j mod 4 = 0 then
		goodclass="class=""last"""
		end if
		isrz="no"
		if rs("Dream_UserID")<>"" then
		isrz=userrz(rs("Dream_UserID"))
		end if
		%>
		<li <%=goodclass%>>
		<a href="view.asp?id=<%=rs("id")%>">		
		<span><img src="<%=Dream_DefaultPicUrl%>" alt="<%=rs("Dream_Title")%>"></span>
		<h3 title="<%=rs("Dream_Title")%>"><%=gotTopic(rs("Dream_Title"),26)%></h3>
		<p title="<%=rs("Dream_Address")%>">地址：<%=gotTopic(rs("Dream_Address"),26)%></p>
		<p title="<%=rs("Dream_Phone")%>">电话：<i><%=rs("Dream_Phone")%></i></p>		
		</a>
		<%if isrz="yes" then%>
		<cite title="资质认证"><img src="images/rz.jpg" alt="资质认证"></cite>
		<%end if%>
		</li>		
		<%
		rs.movenext
		if rs.eof then exit for
		next
		pagecountnum=rs.pagecount
		else
		response.Write "<div class=""noinfo"">很抱歉！没有找到相关的信息。</div>"
		end if
		rs.close
		set rs=nothing		
		urlstr="&cid="&cid
		%>
	</ul>
</div>
<div class="page"><%if pagecountnum>=1 then call Pc_Centpage() end if%></div>
</div>
</div>
<!--#include file="footer.asp"-->
</body></html>