<!--#include file="setup.asp" -->
<%
NC_Admin.AdminChk = "37"
NC_Admin.Check
DownsysClass.admin_header
If Not(DownsysClass.IsObjectFSO(DownsysClass.Script_FSO) And CInt(DownsysClass.Setting(5)) = 0 ) Then
	NC_Admin.Error_Msg ("<b><font color=red>你的服务器不支持 FSO(Scripting.FileSystemObject)或你后台没有选择为html方式</font></b>")
	DownsysClass.admin_footer
	Response.End
End If
Init_Createhelp
DownsysClass.admin_footer
NothingObject
CloseConn

Public Sub Init_Createhelp()
Dim DownloadClass_Ads
Dim NowStats,HtmlTitle,Style_CSS,HtmlTempStr,htmlHelp,Helphtml, i
Dim TempTopStr,TempFootStr,HelpInfo,Action 
Dim FSO,Fout,CreateHtml
On Error Resume Next
Server.ScriptTimeOut = 9999
DownsysClass.LoadTemplates ("help")
Set DownloadClass_Ads = New Adcolumn_Cls
Helphtml = "statement,cooperation,about,ads,link,help"
htmlHelp = split(Helphtml , ",")
For i = 0 To Ubound(htmlHelp)
Action = htmlHelp(i)
Select Case Action
Case "statement"  '下载声明
	NowStats = DownsysClass.TempSet(1)
        HtmlTitle = DownsysClass.TempSet(1)
        HelpInfo = DownsysClass.TempHtml(2)
Case "cooperation"  '商业合作
	NowStats = DownsysClass.TempSet(2)
        HtmlTitle = DownsysClass.TempSet(2)
        HelpInfo = DownsysClass.TempHtml(3)
Case "about"  '关于本站
	NowStats = DownsysClass.TempSet(3)
        HtmlTitle = DownsysClass.TempSet(3)
        HelpInfo = DownsysClass.TempHtml(4)
Case "ads"  '广告联系
	NowStats = DownsysClass.TempSet(4)
        HtmlTitle = DownsysClass.TempSet(4)
        HelpInfo = DownsysClass.TempHtml(5)
Case "link"  '友情连接
	NowStats = DownsysClass.TempSet(5)
        HtmlTitle = DownsysClass.TempSet(5)
        HelpInfo = DownsysClass.TempHtml(6)
Case else
	NowStats = DownsysClass.TempSet(0)
        HtmlTitle = DownsysClass.TempSet(0)
        HelpInfo = DownsysClass.TempHtml(1)
End Select 
TempTopStr = DownsysClass.mainhtml(0) & DownsysClass.mainhtml(1) & DownsysClass.mainhtml(2) & DownsysClass.mainhtml(3)
TempFootStr = DownsysClass.mainhtml(4)
Style_CSS = Replace(Replace(DownsysClass.Style_CSS, "{$SetupDir}", DownsysClass.SetupDir), "{$PicUrl}", DownsysClass.TempDir)
HtmlTempStr = TempTopStr & DownsysClass.TempHtml(0) & TempFootStr
HtmlTempStr = Replace(HtmlTempStr, "{$NavMenu}", DownsysClass.SortingMenu)
HtmlTempStr = Replace(HtmlTempStr, "{$Width}", DownsysClass.mainset(0))
HtmlTempStr = Replace(HtmlTempStr, "{$Style_CSS}", Style_CSS)
If CInt(DownsysClass.Setting(5)) = 1 Then
	HtmlTempStr = Replace(HtmlTempStr, "{$FootMeun}", DownsysClass.mainset(11))
Else 
	HtmlTempStr = Replace(HtmlTempStr, "{$FootMeun}", DownsysClass.mainset(44))
End If
HtmlTempStr = Replace(HtmlTempStr, "{$Width}", DownsysClass.mainset(0))
If CInt(DownsysClass.Setting(5)) = 0 Then
        HtmlTempStr = Replace(HtmlTempStr, "{$TopMeun}", DownsysClass.mainset(9))
Else
        HtmlTempStr = Replace(HtmlTempStr, "{$TopMeun}", DownsysClass.mainset(10))
End If
HtmlTempStr = Replace(HtmlTempStr, "{$NowStats}", NowStats)
HtmlTempStr = Replace(HtmlTempStr, "{$Title}", HtmlTitle)
HtmlTempStr = Replace(HtmlTempStr, "{$HelpInfo}", HelpInfo)
HtmlTempStr = Replace(HtmlTempStr, "{$HelpTitle}", HtmlTitle)
HtmlTempStr = Replace(HtmlTempStr, "{$Adcolumn(0)}", DownloadClass_Ads.RunScriptAds(7))
HtmlTempStr = Replace(HtmlTempStr, "{$Adcolumn(1)}", DownloadClass_Ads.BannerAds(7))
HtmlTempStr = Replace(HtmlTempStr, "{$Adcolumn(2)}", DownloadClass_Ads.AdsColumn(7, 2))
HtmlTempStr = Replace(HtmlTempStr, "{$Adcolumn(3)}", DownloadClass_Ads.AdsColumn(7, 3))
HtmlTempStr = Replace(HtmlTempStr, "{$Adcolumn(4)}", DownloadClass_Ads.ScriptFloatAds(3))
HtmlTempStr = Replace(HtmlTempStr, "{$Adcolumn(5)}", DownloadClass_Ads.ScriptFixedAds(3))
	Set FSO = Server.CreateObject("ADODB.STREAM")
	CreateHtml = Server.MapPath(DownsysClass.SetupDir & Action & ".html")
	With FSO
		.Open
		.Charset = "GB2312"
		.WriteText HtmlTempStr
		.SaveToFile CreateHtml,2
		.Close
	End With
	Set FSO = Nothing
Next
NC_Admin.Succeed_Msg ("生成帮助HTML页完成!")
End Sub
%>