<%
Server.ScriptTimeout=999
session.Timeout=999
%>
<!-- #include file="conn.asp" -->
<%

str1="<html><head><meta http-equiv='Content-Type' content='text/html; charset=gb2312'/><title></title><style type='text/css'>body,td,th {font-size: 13px;line-height: 22px;}.div {background-color: #D7F2FF;}</style></head><body><div align=center class=div><b>"

str2="</b></div><br><br>"

str3="<hr><p>上一篇："

str4="<br> 下一篇："

str5="<br></p><div align=center class=div>  <div align=center><a href=../help.asp>返回</a>&nbsp;&nbsp;&nbsp;<a href='javascript:window.close()'>关闭窗口</a> </div></div><link href=../help_look.css rel=stylesheet type=text/css></body></html>"

function create_file(f,s)'
	set fso=Server.CreateObject("Scripting.FileSystemObject")
	set hf=fso.OpenTextFile(Server.mappath("..\002\h\f"&f&".htm"),2,true)
		hf.write s
		hf.close
	set hf=nothing
	set fso=nothing	
end function



	set rs=server.createobject("adodb.recordset") 
	sql="select * from FAQ"
	rs.open sql,conn,1,1 
	
	for i=1 to rs.recordcount
		if not rs.eof then
			if(rs.recordcount>1) then
				rs.move 1
				rsNext="<a href=f"&rs("id")&".htm>"&rs("title")&"</a>"
				rs.move -1'还原
			end if
		end if
		create_file rs("id"),str1&rs("title")&str2&rs("re_content")&str3&rsUp&str4&rsNext&str5
		if i>1 then
			rs.move -1 '上一条
			rsUp="<a href=f"&rs("id")&".htm>"&rs("title")&"</a>"
			rs.move 1'还原
		end if
		
		rs.movenext
	next
	
	rs.close 
	set rs=nothing

%>
完成

