<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Conn.asp" -->
<!--#include file="Config.asp" -->
<%
set rs1=server.CreateObject("Adodb.recordset")
rs1.open"select * From ProdList order by id desc",conn,1,1
do while not rs1.eof 

	set fso=CreateObject("Scripting.FileSystemObject") 
	set f=fso.OpenTextFile(server.mappath("/temp/Showcase.html")) 
	StrContent=f.ReadAll 
	f.close 
	set f=nothing 
	set fso=nothing 
	StrContent=Replace(StrContent,"$$SiteKeyword$$",SiteKey)
	StrContent=Replace(StrContent,"$$ProdName$$",rs1("ProdName"))
	StrContent=Replace(StrContent,"$$SiteTitle$$",SiteTitle)
	StrContent=Replace(StrContent,"$$SiteName$$",SiteName)
	
	StrContent=Replace(StrContent,"$$BusinessArt$$",Business())
	
	StrContent=Replace(StrContent,"$$ID$$",rs1("ID"))
	StrContent=Replace(StrContent,"$$SiteUrl$$",SiteUrl)
	StrContent=Replace(StrContent,"$$AddTime$$",rs1("AddDate"))
	StrContent=Replace(StrContent,"$$Hits$$",rs1("Hits"))
	StrContent=Replace(StrContent,"$$CompanyNews(行业动态,8)$$",CompanyNews("行业动态",8))
	StrContent=Replace(StrContent,"$$ShowCase()$$",ShowCase(rs1("ID")))
	StrContent=Replace(StrContent,"$$SiteBottom$$",SiteBottom)
	StrContent=Replace(StrContent,"$$Keyword$$",Keyword())
	
	set fso=CreateObject("Scripting.FileSystemObject") 
	set f=fso.CreateTextFile(server.mappath("/Product/"&rs1("ID")&".html"), true ) 
	f.WriteLine(StrContent) 
	f.close 
	set f = nothing 
	set fso = nothing 

rs1.movenext
loop
rs1.close:set rs1=nothing
response.Write("<script language='javascript'>alert('网站案例生成！');location.href='sysadmin_view.asp';</script>")
response.End()

%>
