<!--#include file="inc.asp"-->
<%

'过滤内容中出现的html代码，引用时用 “RemoveHTML(调用内容)”

Function RemoveHTML(strHTML) 
Dim objRegExp, Match, Matches 
Set objRegExp = New Regexp 
objRegExp.IgnoreCase = True 
objRegExp.Global = True 
'取闭合的<> 
objRegExp.Pattern = "<.+?>" 
'进行匹配 
Set Matches = objRegExp.Execute(strHTML) 
' 遍历匹配集合，并替换掉匹配的项目 
For Each Match in Matches 
strHtml=Replace(strHTML,Match.Value,"") 
Next 
RemoveHTML=strHTML 
Set objRegExp = Nothing 
End Function

'定义结束。


    '接受xmlhttp对象传过来的值^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     id=Replace_Text(Request("id"))     '接受xmlhttp对象传过来的值
     If id<>"" Then
      '取出模版页和对标签赋值^^^^^^^^^^^^^^^^^^^^^^  start ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
     Dim fso,fmodify
 	 Set fso = YXFSO
 		Set rs=Server.CreateObject("adodb.recordset")
		rs.Open ("select seller_type from [Websen_worldec_Temp] where yx_selected=1"),conn,1,1
	    If Not rs.Eof Then
 	     pencat=rs("seller_type")        
	    End If
	 Set rs=Server.CreateObject("adodb.recordset")
		rs.Open ("SELECT * FROM Websen_class_2 where typeID="&id&""),conn,1,1
 	 If not rs.Eof Then
		 ttid=rs("typeID")
		 sttid=rs("sortID")
	   End If
	 rs.Close
	 If ttid="" Then 
	    ttid=0
	 End If
	 If sttid="" Then
	   sttid=0
	  End If
 		'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     msg_per_page=15
 	 '查出详细信息只属于该二级分类的产品 ^^^^^^^^^^^^^^^^^^^^^
	Set rs=Server.CreateObject("ADODB.Recordset")
     rs.Open ("select Websen_info.*,Websen_corporation.id,Websen_corporation.msn,Websen_corporation.flag as corflag,Websen_corporation.qymc,Websen_corporation.tm,Websen_corporation.[user],Websen_corporation.gradeid,Websen_corporation.country,Websen_corporation.sf,Websen_corporation.city,Websen_corporation.web,Websen_corporation.url,Websen_corporation.trust_score from Websen_Info,Websen_corporation where Websen_info.typeID="&ttid&" and Websen_info.type='买' and Websen_corporation.id=Websen_info.gsid and Websen_info.flag=1 order by Websen_corporation.trust_score desc,Websen_info.dateandtime desc"),conn,1,1
    	 '对具体的供应信息进行分页^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     If not rs.Eof Then
	   totalrec=RS.RecordCount'总记录条数
       rs.Pagesize=msg_per_page  '每页数
       mpage2=rs.Pagecount     '得到总页数
	   rowcount=msg_per_page
      End If
	 '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 %>
     <!--#include file="../inc/headpage_html.asp"-->
<%
 	Set rssort1=Server.CreateObject("ADODB.Recordset")
	rssort1.Open ("select * from Websen_class_1 where sortID="&sttid&""),conn,1,1
 	Set rssort=Server.CreateObject("ADODB.Recordset")
	rssort.Open ("select * from Websen_class_2 where typeID="&ttid&""),conn,1,1
 	Set rstype=Server.CreateObject("ADODB.Recordset")
	rstype.Open ("select * from Websen_class_3 where typeid="&ttid&""),conn,1,1
	If rstype.Eof Then
	    HOPE_Type=HOPE_Type&""
	Else
	     	     HOPE_type=HOPE_type&"<script src='"&HOPE_InstallDir&"autokind/autokind.js'></script><input type='text' id='installurltr'  style='display:none; width:12;height:1'  value="&HOPE_InstallDir&"autokind/seller_3.asp>"
		 HOPE_Type=HOPE_Type&"<div class='yoleft'><img src='#HOPE_InstallDir#images/indexpoint.gif' width='5' height='9' /> 按<strong>分类</strong>筛选：</div><div class='yorift'><table width='600' border='0' cellspacing='0' cellpadding='0'><tr>"
		 
		 
	Do while not rstype.Eof
	
	
	    HOPE_Type=HOPE_Type&"<td height=10 valign=top><a class=M href='"&HOPE_InstallDir&"seller/offerlist/"&rstype("sortid")&"-"&rstype("typeid")&"-"&rstype("typeid_2")&".html'  onclick='AjaxSearchtr("&rstype("typeid_2")&")'>"&rstype("typename_2")&"</a>"
	    HOPE_Type=HOPE_Type&"<font class=s> "
	

  '用于显示属于该第三级分类中的信息总量
	   Set prors=Server.CreateObject("ADODB.Recordset")
	    prosql="select count(Websen_info.Info_ID)as CountPro  from Websen_Info,Websen_corporation where  Websen_info.typeid_2="&rstype("typeid_2")&" and Websen_info.type='买' and Websen_corporation.id=Websen_info.gsid and Websen_info.flag=1"
	   prors.Open prosql,conn,1,1
	   If prors.Eof Then
	     HOPE_Type=HOPE_Type&""
	   End If
	   If not prors.Eof Then
	   If prors("CountPro")<=0 Then
	     HOPE_Type=HOPE_Type&"" 
	   Else
	     HOPE_Type=HOPE_Type&"<font style='font-size:12px; color:#666666'>("&prors("CountPro")&")</font>"
	   prors.Close
	   End If
	   End If

	    HOPE_Type=HOPE_Type&"</font></td>"
	a=a+1
	If a=4 Then
	    HOPE_Type=HOPE_Type&"</tr><tr>"
	a=0
	End If
	rstype.Movenext
	loop
	rstype.Close
	    HOPE_Type=HOPE_Type&"</tr></table></div>"
	End If
	
	
If rs.Eof Then
	    HOPE_body=HOPE_body&"<br><br><div align='center' class='s'>暂无求购信息</div><br>"
	Else
 	   i=1
 	   HOPE_body=HOPE_body&"<script type='text/javascript' src='"&HOPE_InstallDir&"autokind/showmsgrole.js'></script><script   language='vbscript'>sub AjaxSearchmsg() end  sub </script><input type='text' id='installurlmsg'   style='display:none; width:12;height:1'  value='"&HOPE_InstallDir&"autokind/showmsgrole.asp'/>"
	Do while not rs.Eof and rowcount > 0
	'是否为特色商机类型
 '是否为特色商机类型
	if rs("tsbz")=0 then
		tsbz=""
	elseif rs("tsbz")=1 then 
		tsbz="<img src='"&HOPE_InstallDir&"images/xinpin.gif'>"
	elseif rs("tsbz")=2 then 
		tsbz="<img src='"&HOPE_InstallDir&"images/youhui.gif'>"
	elseif rs("tsbz")=3 then 
		tsbz="<img src='"&HOPE_InstallDir&"images/jiangjia.gif'>"
	end if 
	
	    HOPE_body=HOPE_body&"<TABLE width='100%' height=85 border=0 align=center cellPadding=0 cellSpacing=0>"&vbCrlf
	    HOPE_body=HOPE_body&"<TBODY>"&vbCrlf
	    HOPE_body=HOPE_body&"<TR"
	If icolor=0 Then 
	    HOPE_body=HOPE_body&" bgColor=#ffffff" 
	Else 
	    HOPE_body=HOPE_body&" bgColor=#F9F9F9" 
	End If
	    HOPE_body=HOPE_body&">"
	    HOPE_body=HOPE_body&"<TD align=middle width='5%' class='peyen'>"&vbCrlf 
	    HOPE_body=HOPE_body&"<TABLE height=64 cellSpacing=0 cellPadding=0 width=64 border=0>"&vbCrlf
        HOPE_body=HOPE_body&"<TBODY>"&vbCrlf
	    HOPE_body=HOPE_body&"<TR>"&vbCrlf 
	    HOPE_body=HOPE_body&"<TD>"&vbCrlf 


	
	If rs("draw")<>"" Then
	    HOPE_body=HOPE_body&"<A href="&HOPE_InstallDir&"seller/offerdetail/"&rs("sortid")&"-"&rs("typeid")&"-"&rs("typeid_2")&"-"&rs("info_id")&".html target=_blank>"
	    HOPE_body=HOPE_body&"<IMG src="&HOPE_InstallDir&"Vipcom/"&rs("user")&"/"&rs("draw")&" height=100 width=100 border=0> </A>" 
	 Else
	    HOPE_body=HOPE_body&"<div class='bick_photo'>无图</div>"
	End If
	    HOPE_body=HOPE_body&"</TD>"&vbCrlf
	    HOPE_body=HOPE_body&"</TR>"&vbCrlf
		HOPE_body=HOPE_body&"</TBODY>"&vbCrlf
	    HOPE_body=HOPE_body&"</TABLE></TD>"&vbCrlf
		HOPE_body=HOPE_body&"<TD width='3%' class='peyen'>&nbsp;</TD>"&vbCrlf
	    HOPE_body=HOPE_body&"<TD width='40%' class='peyen' valign='top' style=' line-height:160%; padding-top: 12px'><A href="&HOPE_InstallDir&"seller/offerdetail/"&rs("sortid")&"-"&rs("typeid")&"-"&rs("typeid_2")&"-"&rs("info_id")&".html target=_blank class=b>"&rs("showname")&"</A>&nbsp;<FONT color=#000000>["&rs("dateandtime")&"]</FONT> <BR>[摘要]"&Left(RemoveHTML(rs("content")),40)&"......<br>"&vbCrlf
		
 set rsmp=server.CreateObject("adodb.recordset")
	   sqlmp="select * from Websen_vipgrade where roleid="&rs("gradeid")
	   rsmp.open sqlmp,conn,1,1
	   if not rsmp.eof  then
	   if instr(rsmp("rolelist"),"qw")>0 then	  		
	'用于二级域名处理^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	If is2weburl=1 Then
		HOPE_body=HOPE_body&"<a href='http://"&rs("user")&"."&WebUrl1&"'   target=_blank class=s>"&rs("qymc")&"</A>"
	Else
		HOPE_body=HOPE_body&"<A href='"&HOPE_InstallDir&"vipcom/"&rs("user")&"/'  target=_blank class=s>"&rs("qymc")&"</A>"
	End If
	'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	
	Else
	
		HOPE_body=HOPE_body&"<A href='"&HOPE_InstallDir&"Ptcom/"&rs("user")&".html' target=_blank class=s>"&rs("qymc")&"</A>"
	End If
	rsmp.close
	end if
	
'--是否使用的名片页------------------------------------------------------------
	   set rsmp1=server.CreateObject("adodb.recordset")
	   sqlmp1="select * from Websen_vipgrade where roleid="&rs("gradeid")
	   rsmp1.open sqlmp1,conn,1,1
	   FileFlag=rsmp1("FileFlag")
	   if not rsmp1.eof  then
	   if instr(rsmp1("rolelist"),"qw")>0 then	  		
	'用于二级域名处理^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	
	'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 	End If
	rsmp1.close
	end if


        HOPE_body=HOPE_body&"<br><a href='#HOPE_InstallDir#member/getprice/message.asp?info_id="&rs("info_id")&"' target='_blank'><img src='#HOPE_InstallDir#images/wansen_xj.gif' width='69' height='21' border='0' /></a>&nbsp;<a href='#HOPE_InstallDir#Vipcom/"&rs("user")&"/Contact.htm' target='_blank'><img src='#HOPE_InstallDir#images/wansen_lx.gif' width='69' height='21' border='0' /></a></TD>"&vbCrlf
       HOPE_body=HOPE_body&"<TD width=""15%"" style=' padding-left: 60px' class='peyen'><img border=""0"" src=""../../UploadFile/vipgrade/"&FileFlag&""" width=20></td>"
 		HOPE_body=HOPE_body&"<TD width=""13%"" align=center style="" padding-right: 10px"" class='peyen'>"&vbCrlf
		HOPE_body=HOPE_body&"<img src=""../../images/trust.gif"" width=22 height=14 border=0><br>"&rs("trust_score")&"<br> "
		HOPE_body=HOPE_body&"</TD>"&vbCrlf
		HOPE_body=HOPE_body&"<TD align=middle width='10%' valign='top' class='peyen'>"&vbCrlf
		HOPE_body=HOPE_body&"<div align=center style='padding-top: 15px'>"&vbCrlf
		
	If rs("tm")<>"" then	
HOPE_body=HOPE_body&"<a target=blank href=http://wpa.qq.com/msgrd?V=1&Uin="&rs("tm")&"Site=www.websen.net&Menu=yes><img border=0 SRC=#HOPE_InstallDir#images/anlineqt.gif alt=点击这里给我发消息></a><BR><BR>"
    End if
	If rs("country")="中国" Then 
		HOPE_body=HOPE_body&""&rs("sf")&"省-"&rs("city")&"市" 
	Else 
		HOPE_body=HOPE_body&""&rs("country")&"" 
	End If

		HOPE_body=HOPE_body&"</div></TD>"&vbCrlf
		HOPE_body=HOPE_body&"</TBODY>"&vbCrlf
		HOPE_body=HOPE_body&"</TABLE>"&vbCrlf
	    i=i+1
 	   icolor=icolor+1
	If icolor>1 Then icolor=0
	   rowcount=rowcount-1
	rs.Movenext
	loop
	End If
		 
'进行分页处理^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^		
			HOPE_body=HOPE_body&"<TABLE cellSpacing=0 cellPadding=0 width='100%' height='30' border=0 class='zheyen'>"&vbCrlf
			HOPE_body=HOPE_body&"<TBODY>"&vbCrlf
			HOPE_body=HOPE_body&"<TR>"&vbCrlf
			HOPE_body=HOPE_body&"<TD  align='right' class='bgeyen'>"&vbCrlf
		If not (rs.Eof and rs.Bof) Then
			gopage=currentpage2
			totalpage=mpage2
			blockPage=Int((gopage-1)/10)*10+1
			HOPE_body=HOPE_body&"&nbsp;&nbsp;共 "&totalrec&" 条信息，每页 "&msg_per_page&" 条信息，共 "&mpage2&" 页，浏览&nbsp;"
		If LCase(Request.ServerVariables("HTTPS")) = "off" Then 
			strTemp = "http://" 
		Else 
			strTemp = "https://" 
		End If 
			strTemp = strTemp & CheckStr(Request.ServerVariables("SERVER_NAME")) 
		If Request.ServerVariables("SERVER_PORT") <> 80 Then strTemp = strTemp & ":" & CheckStr(Request.ServerVariables("SERVER_PORT")) 
			strTemp = strTemp & CheckStr(Request.ServerVariables("URL"))
			lenstrTemp=Len(strTemp)+1	
		If Instr(Left(linkfile,lenstrTemp),"?")>0 Then 
		
		   i=1
	    Do Until i > 10 or blockPage > mpage2
		If blockPage=Int(gopage) Then
		   HOPE_body=HOPE_body&"<font color=#FF0000>"&blockPage&"</font>"
		Else
		   HOPE_body=HOPE_body&" <a href="&sttid&"-"&ttid&"-p"&blockPage&".html onclick=AjaxSearchtrp("&ttid&","&blockPage&")>"&blockPage&"</a> "
		End If
			blockPage=blockPage+1
			i = i + 1
		Loop
			HOPE_body=HOPE_body&" 直接到第 "
			HOPE_body=HOPE_body&"<select onchange=if(this.options[this.selectedIndex].value!=''){AjaxSearchtrp("&ttid&",this.options[this.selectedIndex].index+1);location.href=this.options[this.selectedIndex].value;}>"
		for i=1 to totalpage
			HOPE_body=HOPE_body&"<option value="&sttid&"-"&ttid&"-p"&i&".html"
		If i=gopage Then HOPE_body=HOPE_body&"   selected"
			HOPE_body=HOPE_body&">"&i&"</option>"
		next
			HOPE_body=HOPE_body&"</select>"
			HOPE_body=HOPE_body&" 页"
			
		Else
			
		   i=1
		Do Until i > 10 OR blockPage > mpage2
		If blockPage=int(gopage) Then
		    HOPE_body=HOPE_body&"<font color=#FF0000>"&blockPage&"</font>"
		Else
		    HOPE_body=HOPE_body&" <a href="&sttid&"-"&ttid&"-p"&blockPage&".html onclick=AjaxSearchtrp("&ttid&","&blockPage&")>"&blockPage&"</a> "
		End If
			blockPage=blockPage+1
			i = i + 1
		Loop
			HOPE_body=HOPE_body&" 直接到第 "
			HOPE_body=HOPE_body&"<select onchange=if(this.options[this.selectedIndex].value!=''){AjaxSearchtrp("&ttid&",this.options[this.selectedIndex].index+1);location.href=this.options[this.selectedIndex].value;}>"
		for i=1 to totalpage
			HOPE_body=HOPE_body&"<option value="&sttid&"-"&ttid&"-p"&i&".html"
		If i=gopage Then HOPE_body=HOPE_body&"   selected"
			HOPE_body=HOPE_body&">"&i&"</option>"
		next
			HOPE_body=HOPE_body&"</select>"
			HOPE_body=HOPE_body&" 页"
			
		End If
			
			'Startinfo=((gopage-1)*msg_per_page)+1
			'Endinfo=gopage*msg_per_page
		'If Endinfo>totalrec Then Endinfo=totalrec
		    
		End If
		
			HOPE_body=HOPE_body&"</TD>"&vbCrlf
			HOPE_body=HOPE_body&"</TR>"&vbCrlf
			HOPE_body=HOPE_body&"</TBODY>"&vbCrlf
			HOPE_body=HOPE_body&"</TABLE>"&vbCrlf
			HOPE_body=HOPE_body&"<script language='javascript' src="&HOPE_InstallDir&"autokind/autokind_p.js></script><input type='text' id='installurltrp'  style='display:none; width:12;height:1'  value='"&HOPE_InstallDir&"autokind/seller_2_page.asp' />"&vbCrlf
        HOPE_Title=rssort("typename")   '网页标题头
           HOPE_Sort="<a href='"&HOPE_InstallDir&"seller/trade/"&rssort1("sortid")&".html'>"&rssort1("sort")&"</a>"
    	   HOPE_TradeGo="<a href='"&HOPE_InstallDir&"'>首页</a> > <a href='"&HOPE_InstallDir&"seller/'>我要销售</a> > "&HOPE_Sort&" > "&HOPE_Title
    	   If totalrec="" Then 
		   totalrec=0
		   End If
        HOPE_TotalRec=totalrec '此类求购数统计
 
  	  '属于该行业的推荐的网盛通会员的供应信息^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	Set rstjy=Server.CreateObject("ADODB.Recordset")
	 sqltjy="select  top  15   Websen_Info.showname,Websen_Info.Info_ID,Websen_Info.sortid,Websen_Info.typeid,Websen_Info.typeid_2 from Websen_Info,Websen_corporation where Websen_Info.Gsid=Websen_corporation.id and Websen_corporation.Tjbz like '%0%' and Websen_corporation.flag=1  and Websen_Info.sortid="&sttid&" and Websen_Info.typeid="&ttid&" and Websen_Info.typeid_2=0  and Websen_Info.type='卖' order by trust_score desc,Websen_info.dateandtime desc"
       rstjy.Open sqltjy,conn,1,1
	   If rstjy.Eof Then
	    tjcompany="暂无"
	   End If
	   If Not rstjy.Eof Then 
        tjcompany=""
 	   End If
	   If Not rstjy.Eof Then 
	    tji=1
	    tjcompany=""
	   Do While Not rstjy.Eof 
	    tjcompany=tjcompany&"．<a href='"&HOPE_InstallDir&"tradeinfo/offerdetail/"&rstjy("sortid")&"-"&rstjy("typeid")&"-"&rstjy("typeid_2")&"-"&rstjy("Info_ID")&".html' target=_blank>"&rstjy("showname")&"</a><br>"
	   If tji=15 Then	   Exit Do
  	   tji=tji+1
 	   rstjy.Movenext
	   Loop
	   rstjy.Close
	   End If 
 	HOPE_TjCom=tjcompany
     rs.Close
   rssort.Close
   rssort1.Close
   
     '取出模版页和对标签赋值^^^^^^^^^^^^^^^^^^^^^^  end  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  		  If fso.FileExists(server.MapPath(HOPE_InstallDir&"seller/trade/"&sttid&"-"&ttid&".html")) Then
		  If kindtime<>"0" then 
     		Set fmodify = fso.GetFile(server.MapPath(HOPE_InstallDir&"seller/trade/"&sttid&"-"&ttid&".html"))
 		    ShowDateModified = fmodify.DateLastModified
 		    dtime=DateDiff("s",ShowDateModified,now())
		    mtime=dtime/60
  			  If trim(mtime)>=kindtime then
  				pencat=Hope_HtmlResult(pencat)
				Set fout = fso.CreateTextFile(Server.Mappath(HOPE_InstallDir&"seller/trade/"&sttid&"-"&ttid&".html"))
				'如果文件存在就按时间进行更新^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
				fout.Write pencat&"<script src='"&HOPE_InstallDir&"autokind/seller_2.asp?id="&id&"'></script>"
				fout.Close
			  End If
			  End If  
  		  Else
           pencat=Hope_HtmlResult(pencat)
  		   Set foutc = fso.CreateTextFile(Server.Mappath(HOPE_InstallDir&"seller/trade/"&sttid&"-"&ttid&".html"))
		   '如果文件存在就按时间进行更新^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 		   foutc.Write pencat&"<script src='"&HOPE_InstallDir&"autokind/seller_2.asp?id="&id&"'></script>"
		   foutc.Close
 		 End If	
	  Set fso = nothing
      conn.Close
     Set conn=nothing
  End If
%>