<% data_path="../" 'ACC连接数据库路径,对SQL无效 %> <%=webname%>供求搜索 <% '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ sortid=Replace_Text(Request.form("topCatFormKey")) '第一类 typeid=Replace_Text(Request.form("secondCatFormKey")) '第二类 if typeid="" then typeid=0 end if typeid_2=Replace_Text(Request.form("leafCatFormKey")) if typeid_2="" then typeid_2=0 end if '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ keywords=replace_text(request("keywords")) proadd=replace_text(request("proadd")) country=Replace_Text(request("country1")) sf=Replace_Text(request("province")) city=Replace_Text(request("city")) DateTime=replace_text(request("DateTime")) tsbz=replace_text(request("tsbz")) '本搜索供求信息的查询^ sadddate=month(date()) If Database_type=1 Then sql="select Yixiang_info.*,yixiang_history_price.price,Yixiang_corporation.id,Yixiang_corporation.flag as corflag,Yixiang_corporation.qymc,Yixiang_corporation.tm,Yixiang_corporation.[user],Yixiang_corporation.gradeid,Yixiang_corporation.country,Yixiang_corporation.sf,Yixiang_corporation.city,Yixiang_corporation.web,Yixiang_corporation.url,Yixiang_corporation.trust_score from Yixiang_Info join Yixiang_corporation on Yixiang_corporation.flag=1 and Yixiang_corporation.id=Yixiang_info.gsid and Yixiang_info.flag=1 " '---------------------------------------------------------------------------------------- else sql="select Yixiang_info.*,Yixiang_corporation.id,Yixiang_corporation.flag as corflag,Yixiang_corporation.qymc,Yixiang_corporation.tm,Yixiang_corporation.[user],Yixiang_corporation.gradeid,Yixiang_corporation.country,Yixiang_corporation.sf,Yixiang_corporation.city,Yixiang_corporation.web,Yixiang_corporation.url,Yixiang_corporation.trust_score from Yixiang_Info,Yixiang_corporation where Yixiang_corporation.flag=1 and Yixiang_corporation.id=Yixiang_info.gsid and Yixiang_info.flag=1 " end if if Chkrequest(sortid) then if sortid<>0 then sql=sql&" and Yixiang_info.sortid="&sortid&"" if Chkrequest(typeid) then sql=sql&" and Yixiang_info.typeid="&typeid&"" end if if Chkrequest(typeid_2) then sql=sql&" and Yixiang_info.typeid_2="&typeid_2&"" end if end if end if if keywords<>"" then sql=sql&" and (Yixiang_info.keywords like '%"&keywords&"%' or Yixiang_info.showname like '%"&keywords&"%' )" if country<>"" then sql=sql&" and Yixiang_corporation.country like '%"&country&"%'" if sf<>"" then sql=sql&" and Yixiang_corporation.sf like '%"&sf&"%'" if city<>"" then sql=sql&" and Yixiang_corporation.city like '%"&city&"%'" if datetime<>"" then if datetime<>"all" then If Database_type=1 Then if datetime="no" then sql=sql&" and datediff(day,Yixiang_info.infoenddate,getdate())>0" elseif datetime="ok" then sql=sql&" and datediff(day,Yixiang_info.infoenddate,getdate())<=0" elseif datetime="10" then sql=sql&" and datediff(day,Yixiang_info.infoenddate,getdate())<=10" elseif datetime="30" then sql=sql&" and datediff(day,Yixiang_info.infoenddate,getdate())<=30" end if else if datetime="no" then sql=sql&" and datediff('d',Yixiang_info.infoenddate,now())>0" elseif datetime="ok" then sql=sql&" and datediff('d',Yixiang_info.infoenddate,now())<=0" elseif datetime="10" then sql=sql&" and datediff('d',Yixiang_info.infoenddate,now())>=10" elseif datetime="30" then sql=sql&" and datediff('d',Yixiang_info.infoenddate,now())<=30" end if end if end if end if if tsbz<>"" then sql=sql&" and tsbz="&tsbz&"" end if If Database_type=1 Then sql=sql&" left join yixiang_history_price on Yixiang_corporation.id=yixiang_history_price.gsid and yixiang_history_price.keywords = '"&keywords&"' and month(yixiang_history_price.begintime)="&sadddate&" order by yixiang_info.toprice desc,yixiang_history_price.price desc,Yixiang_corporation.trust_score desc " else sql=sql&" order by Yixiang_corporation.trust_score desc" end if Set rs= Server.CreateObject("ADODB.Recordset") rs.open sql,conn,1,1 msg_per_page=20 '定义每页显示记录条数 %>
<%if rs.eof then response.Write"" response.Write"
" response.Write"
 您查找的“"&keywords&"”的信息暂时没有找到

" response.Write"
" else %>
 
图片 供求信息/公司
  <%response.write" 等级/指数 "%>
产地
<% do while not rs.eof and rowcount > 0 if trim(rs("draw1"))<>"" then PTpic=HOPE_InstallDir&"Vipcom/"&rs("User")&"/"&rs("draw") else PTpic=HOPE_InstallDir&"UploadFile/nopicture.gif" end if %> onmouseover="this.style.backgroundColor='#FFF8F4'" onmouseout="this.style.backgroundColor='<%if icolor=0 then response.write"#ffffff" else response.write"#f6f6f6" end if%>'">
<% if rs("type")="买" then response.write"" elseif rs("type")="卖" then response.write"" end if %>
<% if rs("type")="买" then response.write"" elseif rs("type")="卖" then response.write"" end if %> <% Set re = New RegExp re.Pattern ="("&keywords&")" re.IgnoreCase = True re.Global=True if rs("showname")<>"" then result = re.Replace(rs("showname"), "$1") else result = "" end if %> <%=result%> <% '是否为特色商机类型 if rs("tsbz")=0 then tsbz="" elseif rs("tsbz")=1 then tsbz="" elseif rs("tsbz")=2 then tsbz="" elseif rs("tsbz")=3 then tsbz="" end if %> <%=tsbz%>
有效期:<%=rs("infostartdate")%>---<%=rs("infoenddate")%>
<% '--是否使用的名片页------------------------------------------------------------ set rsmp=server.CreateObject("adodb.recordset") sqlmp="select * from yixiang_vipgrade where roleid="&rs("gradeid") rsmp.open sqlmp,conn,1,1 if not rsmp.eof then if rs("corflag")=1 then if instr(rsmp("rolelist"),"qw")>0 then if is2weburl=1 then %> .<%=weburl1%>" target="_blank"><%=rs("qymc")%> <%else%> /" target="_blank"><%=rs("qymc")%> <% end if else %> .html" target="_blank"><%=rs("qymc")%> <% end if end if rsmp.close end if %>
<% if rs("Specifications")<>"" then response.write"规格要求:"&rs("Specifications")&"
" end if if rs("Packaging")<>"" then response.write"包装要求:"&rs("Packaging")&"
" end if if rs("PriceTerms")<>"" then response.write"价格要求:"&rs("PriceTerms")&"
" end if response.write""&left(noHtml(rs("content")),38)&"...
" %> 发布时间:<%=rs("dateandtime")%>
<% '--是否使用的名片页------------------------------------------------------------ set rsmp1=server.CreateObject("adodb.recordset") sqlmp1="select * from yixiang_vipgrade where roleid="&rs("gradeid") rsmp1.open sqlmp1,conn,1,1 if not rsmp1.eof then if rs("corflag")=1 then if instr(rsmp1("rolelist"),"qw")>0 then if is2weburl=1 then %> .<%=weburl1%>/supply1.htm" target="_blank">该会员所有供应信息 .<%=weburl1%>" target="_blank">查看该会员企业网站 <%else%> /supply1.htm" target="_blank">该会员所有供应信息 /" target="_blank">查看该会员企业网站 <% end if end if end if end if %>
<% if rsmp1("gradepic")<>"" then response.Write""&rsmp1("gradename")&""&vbCrlf response.Write"
"&vbCrlf end if %> <%=rs("trust_score")%>
<% if rs("country")="中国" then response.write""&rs("sf")&""&rs("city")&"" else response.write""&rs("country")&"" end if %>

<% icolor=icolor+1 if icolor>1 then icolor=0 rowcount=rowcount-1 rs.movenext loop end if %>
<%=listPages(""&HOPE_InstallDir&"search/searchall.asp?sortid="&sortid&"&typeid="&typeid&"&typeid_2="&typeid_2&"&keywords="&keywords&"&country1="&country&"&province="&sf&"&city="&city&"&datetime="&datetime&"&show="&show&"")%>

<% rsmp1.close rs.close set rs=nothing conn.close set conn=nothing %>