<title>生成供应一级分类</title><!--#include file="inc.asp"-->
<%



     id=Replace_Text(Request("id"))     '接受xmlhttp对象传过来的值
     If id<>"" Then
	 
	    '取出模版页和对标签赋值^^^^^^^^^^^^^^^^^^^^^^  start ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 		Set rs=Server.CreateObject("adodb.recordset")
		rs.Open ("select info_list  from [Websen_worldec_Temp] where yx_selected=1"),conn,1,1
	      If Not rs.Eof Then
 	      pencat=rs("tradeinfo_sort")        
	      End If
   		 Set rs=Server.CreateObject("adodb.recordset")
	    	rs.Open ("SELECT * FROM websen_newsType WHERE typeid="&id&""),conn,1,1
 		  If not rs.Eof Then
   		     typeid=rs("typeid")
			 sortname=rs("type")
		  End If
 		 rs.Close
 		 If typeid="" Then 
		 typeid=0
		 End If

		  
		   
   '获取该类下的信息内容^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   
      msg_per_page=20
 	  Set rs=Server.CreateObject("adodb.recordSet")
 	 rs.Open ("select * from Websen_news where typeid="&ttid&" order by newsID 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"-->
<%
 	'HOPE_body用于显示页面的主题分类信息^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	HOPE_body=HOPE_body&"<br><br><div align='center' class='s'>此类商业资讯信息</div><br>"&vbCrlf
	Else
	
	HOPE_body=HOPE_body&"<table width='100%' border=0 cellpadding=2 cellspacing=0 bordercolor='#111111' style='border-collapse: collapse'>"&VbCrLf 
	Do While Not rs.Eof and rowcount > 0
	HOPE_body=HOPE_body&"<tr "
	If icolor=0 Then
	HOPE_body=HOPE_body&"bgColor=#ffffff"
	Else
	HOPE_body=HOPE_body&"bgColor=#ffffff"
	End If
	HOPE_body=HOPE_body&">"&VbCrLf
	If len(rs("title"))>30 Then
	if rs("checkbox")=1 then
		HOPE_body=HOPE_body&"<td width='84%' style='font-size:12px;'>·&nbsp;<a href='"&rs("http")&"' target=_blank>"&left(rs("title"),20)&"...</a></td>"&VbCrLf 
	else
	HOPE_body=HOPE_body&"<td width='84%' style='font-size:12px;'>·&nbsp;<a href='"&HOPE_InstallDir&"info/detail/"&rs("typeid")&"-"&rs("newsid")&".html' target=_blank>"&left(rs("title"),20)&"...</a></td>"&VbCrLf 
	rs1("websen_http")=1
	rs1.update
	end if
	Else
		if rs("checkbox")=1 then
		HOPE_body=HOPE_body&"<td width='84%' style='font-size:12px;'>·&nbsp;<a href='"&rs("http")&"' target=_blank>"&left(rs("title"),20)&"...</a></td>"&VbCrLf 
	else
	HOPE_body=HOPE_body&"<td width='84%' style='font-size:12px;'>·&nbsp;<a href='"&HOPE_InstallDir&"info/detail/"&rs("typeid")&"-"&rs("newsid")&".html' target=_blank>"&left(rs("title"),20)&"...</a></td>"&VbCrLf 
	rs1("websen_http")=1
	rs1.update
	end if
	End If
	HOPE_body=HOPE_body&"<td width='16%' align=right> <p align='right' style=' color: #999999'>["&FormatDate(rs("dateandtime"),2)&"] </td>"&VbCrLf 
	HOPE_body=HOPE_body&"</tr>"&VbCrLf 
	icolor=icolor+1
	If icolor>1 Then icolor=0
	rowcount=rowcount-1
	rs.MoveNext
	Loop
	 
	End If
	HOPE_body=HOPE_body&"</table>"
	
	HOPE_body=HOPE_body&"<br>"&vbCrlf
	HOPE_body=HOPE_body&"<TABLE width=100% border=0 align=center cellPadding=1 cellSpacing=0 style='BORDER-TOP: #9C9A9C 1px solid;BORDER-Bottom: #9C9A9C 1px solid'>"&vbCrlf
	HOPE_body=HOPE_body&"<TBODY>"&vbCrlf
	HOPE_body=HOPE_body&"<TR>"&vbCrlf
	HOPE_body=HOPE_body&"<TD>"&vbCrlf
	HOPE_body=HOPE_body&"<TABLE cellSpacing=0 cellPadding=4 width=100% border=0>"&vbCrlf
	HOPE_body=HOPE_body&"<TBODY>"&vbCrlf
	HOPE_body=HOPE_body&"<TR>"&vbCrlf
	HOPE_body=HOPE_body&"<TD class=s noWrap align=middle><b>"&vbCrlf
	'************** 分页开始 ***************
	   If not (rs.Eof and rs.Bof) Then
		gopage=currentpage2
		totalpage=mpage2
		blockPage=Int((gopage-1)/5)*5+1
		
		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 
		
	If blockPage = 1 Then
	HOPE_body=HOPE_body&"<span disabled>【←前5页</span>&nbsp;"
	Else
	HOPE_body=HOPE_body&"<span disabled>【</span><a href="&ttid&"-p"&blockPage-5&".html>←前5页</a>&nbsp;"
	End If
	   i=1
	Do Until i > 5 or blockPage > mpage2
	If blockPage=int(gopage) Then
	HOPE_body=HOPE_body&"<font color=#FF0000>[<b>"&blockPage&"</b>]</font>"
	Else
	HOPE_body=HOPE_body&" <a href="&ttid&"-p"&blockPage&".html>["&blockPage&"]</a> "
	End If
		blockPage=blockPage+1
		i = i + 1
	Loop
	If blockPage > totalpage Then
	HOPE_body=HOPE_body&"&nbsp;<span disabled>后5页→】"
	Else
	HOPE_body=HOPE_body&"&nbsp;<a href="&ttid&"-p"&blockPage&".html>后5页→</a><span disabled>】"
	End If 
	HOPE_body=HOPE_body&" 直接到第 "
	HOPE_body=HOPE_body&"<select onchange=if(this.options[this.selectedIndex].value!=''){location=this.options[this.selectedIndex].value;}>"
	for i=1 to totalpage
	HOPE_body=HOPE_body&"<option value="&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&" 页<Br><Br>"
		
	Else
		
	If blockPage = 1 Then
	HOPE_body=HOPE_body&"<span disabled>【←前5页</span>&nbsp;"
	Else
	HOPE_body=HOPE_body&"<span disabled>【</span><a href="&ttid&"-p"&blockPage-5&".html>←前5页</a>&nbsp;"
	End If
	   i=1
	Do Until i > 5 or blockPage > mpage2
	 If blockPage=int(gopage) Then
	HOPE_body=HOPE_body&"<font color=#FF0000>[<b>"&blockPage&"</b>]</font>"
	Else
	HOPE_body=HOPE_body&" <a href="&ttid&"-p"&blockPage&".html>["&blockPage&"]</a> "
	End If
		blockPage=blockPage+1
		i = i + 1
	Loop
	If blockPage > totalpage Then
	HOPE_body=HOPE_body&"&nbsp;<span disabled>后5页→】"
	Else
	HOPE_body=HOPE_body&"&nbsp;<a href="&ttid&"-p"&blockPage&".html>后5页→</a><span disabled>】"
	End If 
	HOPE_body=HOPE_body&" 直接到第 "
	HOPE_body=HOPE_body&"<select onchange=if(this.options[this.selectedIndex].value!=''){location=this.options[this.selectedIndex].value;}>"
	 For i=1 to totalpage
	HOPE_body=HOPE_body&"<option value="&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&" 页<Br><Br>"
		
	End If
		
		Startinfo=((gopage-1)*msg_per_page)+1
		Endinfo=gopage*msg_per_page
	If Endinfo>totalrec Then Endinfo=totalrec
	HOPE_body=HOPE_body&"&nbsp;&nbsp;共 "&totalrec&" 条信息 当前显示第 "&Startinfo&" - "&Endinfo&" 条 每页 "&msg_per_page&" 条信息 共 "&mpage2&" 页"
	End If
	
	HOPE_body=HOPE_body&"</b></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&"</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/info_1.asp' />"&vbCrlf
			
  		
	sql1="select top 25 * from Websen_news where typeid="&ttid&" order by NewsID Desc"
	Set rs1= Server.CreateObject("ADODB.RecordSet") 
	rs1.Open sql1,conn,1,1
	If rs1.Eof Then
	HOPE_New=HOPE_New&"<font color='#FFFFFF' class=white>此类暂无新增资讯</font>"
	Else
	Do While Not rs1.Eof
	HOPE_New=HOPE_New&"<a href='"&HOPE_InstallDir&"info/detail/"&rs1("typeid")&"-"&rs1("newsid")&".html' target='_blank' class=white><font color='#FFFFFF'>"&rs1("title")&"</font></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
	rs1.MoveNext
	Loop
	rs1.Close
	End If
	 
  	 HOPE_Title=ttname&"资讯" '网页标题头
	 HOPE_TypeID=ttid
		
		
		'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   	  
      '此类供应数统计^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	        If totalrec="" Then
		      totalrec=0 
			End If	
             HOPE_TotalRec="(<font color=red>"&totalrec&"</font>)" 
	   
	  '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	  
  	  '属于该行业的推荐的网盛通会员的供应信息^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	Set rstjy=Server.CreateObject("ADODB.Recordset")
	 sqltjy="select  top  15   Websen_Info.showname,Websen_Info.Info_ID,Websen_Info.typeid,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.typeid="&typeid&" and Websen_Info.typeid=0 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("typeid")&"-"&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
	 
    '取出模版页和对标签赋值^^^^^^^^^^^^^^^^^^^^^^  end  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      
      Dim fso,fmodify
 	  Set fso = YXFSO
       If fso.FileExists(Server.MapPath(HOPE_InstallDir&"tradeinfo/trade/"&id&".html"))  Then
	   If kindtime<>"0" then 
	   '如果文件存在就按时间进行更新^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        Set fmodify = fso.GetFile(Server.MapPath(HOPE_InstallDir&"tradeinfo/trade/"&id&".html"))
 		 ShowDateModified = fmodify.DateLastModified
 		 dtime=DateDiff("s",ShowDateModified,Now())
		 mtime=dtime/60
   	     If trim(mtime)>=kindtime Then
	     pencat=Hope_HtmlResult(pencat)
         Set sort_savem = fso.CreateTextFile(Server.Mappath(HOPE_InstallDir&"tradeinfo/trade/"&typeid&".html"))
         '说明：加入js脚本是用于更新页面
 		 sort_savem.Write pencat&"<script src="&HOPE_InstallDir&"autokind/trade_1.asp?id="&id&"></script>"
		 sort_savem.Close
		 End If
		  End If
		 '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	   Else
	    '如果文件不存在就生成它^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
		 pencat=Hope_HtmlResult(pencat)
 		Set sort_save = fso.CreateTextFile(Server.Mappath(HOPE_InstallDir&"info/community/"&typeid&".html"))
        '说明：加入js脚本是用于更新页面
 		sort_save.Write pencat&"<script src="&HOPE_InstallDir&"autokind/info_1.asp?id="&id&"></script>"
		sort_save.Close
		'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 	   End If
  	 Set fso = Nothing
     conn.Close
     Set conn=Nothing
  End if
 %>