<%
dim inum,wherelist,sql,z
inum=0
set rs=server.CreateObject("adodb.recordset")
z=GetSqlSafeStr(trim(request("z")))
brandname = GetSqlSafeStr(trim(request("brandname")))
wherelist = " a.logo<>''"
if z<>"" then
wherelist = wherelist & " and zimu='"&z&"'"
end if
if brandname <> "" then
wherelist = wherelist & " and pinpai like '%"&brandname&"%'"
end if
sql = "select Title,Cid,a.logo,a.content,type,zimu,pinpai,zhanneizhan from Product as a inner join company as b on a.Cid=b.id where "&wherelist&" order by a.orderid desc,a.id desc"
rs.open sql,conn,1,1
do while(not rs.eof)
%>
<%
set rs=server.CreateObject("adodb.recordset")
wherelist = " status=1 and isfaith=1"
sql="select * from company where "&wherelist&" order by orderid desc,id desc"
rs.open sql,conn,1,1
do while(not rs.eof)
%>