<!--#include file="../ACT.Function.asp"-->
<!--#include file="../../act_inc/ACT.Code.asp"-->
<% 
	Dim MakeMode,TemplateContent,ModeID
	Set MakeMode =New ACT_Code
	 ModeID = ACTCMS.ChkNumeric(ACTCMS.S("ModeID"))
	 If  ModeID = "" Or ModeID="0" Then ModeID=1
	If ACTCMS.ACT_C(ModeID,3)=0 Then Call actcms.Alert("ACTCMS系统提醒您：\n\n1、该模型没有启用生成静态HTML功能\n\n2、请到系统参数设置->模型生成静态HTML>改成生成(静态)","../Mode/ACT.MX.asp?A=E&ModeID="&ModeID):Response.end
	 Application(AcTCMSN & "ClassID")="0"
	 Application(AcTCMSN & "ModeID")= ModeID
	 Application(AcTCMSN & "ACTCMS_TCJ_Type")= "ACTCMSMODE"
	TemplateContent = MakeMode.LoadTemplate(ACTCMS.ACT_C(ModeID,4))
	TemplateContent = MakeMode.LabelReplaceAll(TemplateContent)
	IF TemplateContent = "" Then Response.Write "error":Response.End
	Call Actcms.CreateFolder(ACTCMS.ActSys&ACTCMS.ACT_C(ModeID,19))
	Call MakeMode.FSOSaveFile(TemplateContent,ACTCMS.ActSys&ACTCMS.ACT_C(ModeID,19)&"index.htm")	
response.Write "<a  href=""" & ACTCMS.ActSys&ACTCMS.ACT_C(ModeID,19)& """target=""_blank""" &  ">首页模型首页成功,点击浏览</a>"
 Set MakeMode=Nothing:Set ACTCMS=Nothing
 %>