<!--#include file="../ACT.Function.asp"-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>模型管理</title>
<link href="../Images/css1/css.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/javascript" src="../../ACT_inc/Prototype.js"></script>
<script language="JavaScript" type="text/javascript" src="../../ACT_inc/ActHelp.js"></script>
</head>
<body>
<% 	Dim Action,ModeID,Rs,ProjectUnit,MakeFolderDir,FilePathName,ContentExtension,AutoPage
	ModeID = ACTCMS.ChkNumeric(Request("ModeID"))
	Action = Request.QueryString("A")
	 if ModeID=0 or ModeID="" Then ModeID=1
	Select Case Action
		   Case "AddSave","ESave"
		   		Call AddSave()
			Case "Add","E"
				Call AddEdit()
			Case Else
				Call Main()
	End Select
	
	IF Action = "Del" Then
	If Not ACTCMS.ChkAdmin() Then  Call Actcms.Alert("对不起，您没有操作权限！","")
		IF ModeID  > 1 Then
			ACTCMS.ACTEXE("Delete From Mode_Act Where ModeID=" & ModeID)		
			Call Actcms.ActErr("删除模型成功&nbsp;&nbsp;<a href=Mode/ACT.MX.asp>点击这里返回管理首页</a>","2")
		Else
			Call Actcms.ActErr("系统定义的模型不允许删除","1")
		End IF
	End IF
	
	
	Sub AddSave()
		 Dim ModeName,ModeTable,sql,ChannelRS,ChannelRSSql,ModeNote,ModeStatus,IFmake,RefreshFlag,Modedescription
		 Dim UpfilesDir,RecyleIF,CommentCode,Commentsize,WriteComment,CommentTemp,ModeTemplate,Modekeywords,ModeMakeDir
		 ModeName = ACTCMS.S("ModeName")
		 ModeTable = ACTCMS.S("ModeTable")&"_U_ACT"
		 ModeNote = ACTCMS.S("ModeNote")
		 ModeTemplate=ACTCMS.S("ModeTemplate")
		 Modedescription=ACTCMS.S("Modedescription")
		 Modekeywords=ACTCMS.S("Modekeywords")

		 ModeStatus = ACTCMS.S("ModeStatus")
		 IFmake = ACTCMS.S("IFmake")
		 RefreshFlag = ACTCMS.ChkNumeric(ACTCMS.S("RefreshFlag"))
		 UpfilesDir = ACTCMS.S("UpfilesDir")
		 RecyleIF = ACTCMS.S("RecyleIF")
		 ProjectUnit = ACTCMS.S("ProjectUnit")
		 MakeFolderDir = ACTCMS.S("MakeFolderDir")
		 FilePathName = ACTCMS.S("FilePathName")
		 ContentExtension = ACTCMS.S("ContentExtension")
		 ModeMakeDir = ACTCMS.S("ModeMakeDir")
		 AutoPage = ACTCMS.ChkNumeric(ACTCMS.S("AutoPage"))
		 CommentCode = ACTCMS.ChkNumeric(ACTCMS.S("CommentCode"))
		 Commentsize = ACTCMS.ChkNumeric(ACTCMS.S("Commentsize"))
		 WriteComment = ACTCMS.ChkNumeric(ACTCMS.S("WriteComment"))
		 CommentTemp = ACTCMS.S("CommentTemp")
		 IF ACTCMS.S("ModeName") = "" Then
		 	Call ACTCMS.Alert("模型名称不能为空!",""):Exit Sub
		 End If
		 
		 IF ACTCMS.S("ModeMakeDir") = "" Then
		 	Call ACTCMS.Alert("模型生成目录不能为空!",""):Exit Sub
		 End If

		 Set ChannelRS = Server.CreateObject("adodb.recordset")
		 if Action="AddSave" Then
			 If Not ACTCMS.ChkAdmin() Then   Call Actcms.Alert("对不起，您没有操作权限！","")
			 IF ACTCMS.S("ModeTable") = "" Then
				Call ACTCMS.Alert("数据表为空!",""):Exit Sub
			 End if
			 If Not ACTCMS.ACTEXE("SELECT ModeName FROM Mode_Act Where ModeName='" & ModeName & "' order by ModeID desc").eof Then
				Call ACTCMS.Alert("系统已存在该模型名称!",""):Exit Sub
			 End if	

			 If Not ACTCMS.ACTEXE("SELECT ModeTable FROM Mode_Act Where ModeTable='" & ModeTable & "' order by ModeID desc").eof Then
				Call ACTCMS.Alert("系统已存在该数据表!",""):Exit Sub
			 End if	

			 If Not ACTCMS.ACTEXE("SELECT ModeTable FROM Mode_Act Where ModeMakeDir='" & ModeMakeDir & "' order by ModeID desc").eof Then
				Call ACTCMS.Alert("系统已存在该模型目录!",""):Exit Sub
			 End if	

			  ChannelRSSql = "select * from Mode_Act"
			  ChannelRS.Open ChannelRSSql, Conn, 1, 3
			  ChannelRS.AddNew
		 	  ChannelRS("ModeTable") = ModeTable
			  ChannelRS("ModeName") = ModeName
			  ChannelRS("ModeNote") = ModeNote
			  ChannelRS("ModeStatus") = ModeStatus
			  ChannelRS("IFmake") = IFmake
			  ChannelRS("RecyleIF") = RecyleIF
			  ChannelRS("AutoPage") = AutoPage
			  ChannelRS("UpfilesDir") = UpfilesDir
			  ChannelRS("ProjectUnit") = ProjectUnit
			  ChannelRS("MakeFolderDir") = MakeFolderDir
			  ChannelRS("FilePathName") = FilePathName
			  ChannelRS("ContentExtension") = ContentExtension
			  ChannelRS("RefreshFlag") = RefreshFlag
			  ChannelRS("CommentCode") = CommentCode
			  ChannelRS("Commentsize") = Commentsize
			  ChannelRS("WriteComment") = WriteComment
			  ChannelRS("CommentTemp") = CommentTemp
			  ChannelRS("ModeTemplate") = ModeTemplate
			  ChannelRS("Modedescription") = Modedescription
			  ChannelRS("Modekeywords") = Modekeywords
			  ChannelRS("ModeMakeDir") = ModeMakeDir

			  ChannelRS("ACT_DiY")="§0§0-1-0-1§0§actcms§0§§0§§0§§0§Simple§§§0§0§0§1§0§1§0§"&ACTCMS.ActCMS_Sys(3)&"templets/article/ClassIndex.htm§"&ACTCMS.ActCMS_Sys(3)&"templets/article/Class.Htm§"&ACTCMS.ActCMS_Sys(3)&"templets/article/Content.Htm§"
			  ChannelRS.Update
			  ChannelRS.Close:Set ChannelRS = Nothing			
				 Sql="CREATE TABLE "&ModeTable&" ([ID] int IDENTITY (1, 1) NOT NULL CONSTRAINT PrimaryKey PRIMARY KEY,"&_
				"ClassID varchar(20),"&_
				"Title varchar(200),"&_
				"IntactTitle varchar(250),"&_
				"ChangesLink tinyint,"&_
				"ArticlePic tinyint,"&_
				"Intro text,"&_
				"Content text,"&_
				"Hits int Default 0,"&_
				"rev tinyint Default 0,"&_
				"KeyWords varchar(255),"&_
				"author varchar(20),"&_
				"CopyFrom varchar(20),"&_
				"UpdateTime datetime,"&_
				"TemplateUrl varchar(100),"&_
				"FileName varchar(200),"&_
				"isAccept tinyint,"&_
				"delif tinyint Default 0,"&_
				"UserID tinyint Default 0,"&_
				"ArticleInput varchar(10),"&_
				"Slide tinyint Default 0,"&_
				"PicUrl varchar(200),"&_
				"Ismake tinyint,"&_
				"GroupID_ACT varchar(50),"&_
				"Score_ACT int Default 0,"&_
				"Digg int Default 0,"&_
				"down int Default 0,"&_
				"ATT SmallInt Default 0,"&_
				"IStop tinyint Default 0"&_
				")"
			ACTCMS.ACTEXE(sql)
			Application.Contents.RemoveAll
			Call Actcms.ActErr("添加成功&nbsp;&nbsp;<a href=Mode/ACT.MX.asp>点击这里返回管理首页</a>","2")
		 Else
		If Not ACTCMS.ACTCMS_QXYZ(ModeID,"","") Then   Call Actcms.Alert("对不起，您没有"&ACTCMS.ACT_C(ModeID,1)&"系统该项操作权限！","")
		 	If Not ACTCMS.ACTEXE("SELECT ModeName FROM Mode_Act Where ModeID <>" & ModeID & " AND  ModeName='" & ModeName & "' order by ModeID desc").eof Then
				Call ACTCMS.Alert("系统已存在该模型名称!",""):Exit Sub
			 End if	
			  ChannelRSSql = "select * from Mode_Act Where ModeID=" &ModeID
			  ChannelRS.Open ChannelRSSql, Conn, 1, 3
			  if ChannelRS.eof then Call ACTCMS.Alert("错误!",""):Exit Sub
		 End if 
		  ChannelRS("ModeName") = ModeName
		  ChannelRS("ModeNote") = ModeNote
		  ChannelRS("ModeStatus") = ModeStatus
		  ChannelRS("IFmake") = IFmake
		  ChannelRS("RecyleIF") = RecyleIF
		  ChannelRS("UpfilesDir") = UpfilesDir
		  ChannelRS("ProjectUnit") = ProjectUnit
		  ChannelRS("MakeFolderDir") = MakeFolderDir
		  ChannelRS("FilePathName") = FilePathName
		  ChannelRS("ContentExtension") = ContentExtension
		  ChannelRS("AutoPage") = AutoPage
		  ChannelRS("RefreshFlag") = RefreshFlag
		  ChannelRS("CommentCode") = CommentCode
		  ChannelRS("Commentsize") = Commentsize
		  ChannelRS("WriteComment") = WriteComment
		  ChannelRS("CommentTemp") = CommentTemp
		  ChannelRS("ModeTemplate") = ModeTemplate
		  ChannelRS("Modedescription") = Modedescription
		  ChannelRS("Modekeywords") = Modekeywords
		  ChannelRS("ModeMakeDir") = ModeMakeDir
		  ChannelRS.Update
		  ChannelRS.Close:Set ChannelRS = Nothing	
		  Application.Contents.RemoveAll
		  Call Actcms.ActErr("修改成功&nbsp;&nbsp;<a href=Mode/ACT.MX.asp>点击这里返回管理首页</a>","2")
	End Sub
	Sub Main()
	%>	
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
  <tr>
    <td class="bg_tr">您现在的位置：模型管理 &gt;&gt; 浏览</td>
  </tr>
  <tr>
    <td>当前模型： <a href="?A=Add">添加模型</a> | 导出内容模型 | 导入内容模型</td>
  </tr>
</table>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
  <tr>
    <td align="center" class="bg_tr">模型名称</td>
    <td align="center" class="bg_tr">表名</td>
    <td align="center" class="bg_tr">类型</td>
    <td align="center" class="bg_tr">描述</td>
    <td align="center" class="bg_tr">状态</td>
	<td align="center" class="bg_tr">生成Html</td>
    <td  align="center" class="bg_tr" nowrap>操作</td>
  </tr>
<% 
	  Set Rs =ACTCMS.ACTEXE("SELECT ModeID, ModeName,ModeTable, ModeStatus, IFmake,ModeNote  FROM Mode_Act order by ModeID asc")
	 If Rs.EOF  Then
	 	Response.Write	"<tr><td colspan=""6"" align=""center"">没有记录</td></tr>"
	 Else
		Do While Not Rs.EOF	
			 %>

  <tr  onMouseOver=overColor(this) onMouseOut=outColor(this)>
    <td align="center"><%= Rs("ModeName") %></td>
    <td align="center"><%= Rs("ModeTable") %></td>
    <td align="center"><% if Rs("ModeID")<5 Then Response.Write "<font color=red>系统</font>" Else  Response.Write "<font color=blue>自定义</font>"  %></td>
    <td align="center"><%= Rs("ModeNote") %></td>
    <td align="center"><% IF Rs("ModeStatus") = 0 Then Response.Write "<font color=green>正常</font>" else  Response.Write "<font color=red>禁用</font>" %></td>
    <td align="center">
	<% Select Case  Rs("IFmake")
		Case "0" 
			Response.Write "<font color=red>不生成(动态浏览) </font>" 
		Case "1" 
			Response.Write "<font color=green>生成(静态)</font>"
		Case "2"
			Response.Write "<font color=red>伪静态</font>"
	  End Select 
	%>
	</td>
	<td align="center">
	<a href="Act.DiY.asp?ModeID=<%=Rs("ModeID")%>">自定义显示</a> ┆ <a href="ACT.ListM.ASP?A=L&ModeID=<%=Rs("ModeID")  %>">字段列表</a> ┆ <a href="?A=E&ModeID=<%=Rs("ModeID")  %>" >修改</a> ┆ <a href="?A=Del&ModeID=<%=Rs("ModeID")  %>"  onClick="{if(confirm('确定删除该模型吗?')){return true;}return false;}">删除</a></td>
  </tr>
  <% 
		
		Rs.movenext
		Loop
	End if	 %>
</table>	
	
	
<% 	
 
	End Sub
	Sub AddEdit()
	Dim FileFolder,ModeTable,ModeName,IFmake,RecyleIF,UpfilesDir,ModeStatus,RefreshFlag,ModeNote,A,WriteComment,CommentCode,Commentsize
	Dim CommentTemp,ModeTemplate,Modekeywords,Modedescription,ModeMakeDir
	if Action="Add" Then
	UpfilesDir="UpFiles/"
	AutoPage=0
	A="AddSave"
	FilePathName="{enname}/{date}/{pinyin}/"
	ContentExtension=".htm"
	WriteComment=3
	CommentCode=0
	Commentsize=0
	MakeFolderDir="html/"
	ModeMakeDir="html/"
	CommentTemp=ACTCMS.ACTSYS&"templets/Write.Htm"
	Else
	Set Rs=server.CreateObject("adodb.recordset") 
	Rs.OPen "Select * from Mode_Act Where ModeID = "&ModeID&" order by ModeID desc",Conn,1,1
	FileFolder = Rs("FileFolder")
	ModeTable = Rs("ModeTable")
	ModeName = Rs("ModeName")
	IFmake = Rs("IFmake")
	RecyleIF = Rs("RecyleIF")
	UpfilesDir=Rs("UpfilesDir")
	ModeStatus=Rs("ModeStatus")
	RefreshFlag=Rs("RefreshFlag")
	ModeNote=Rs("ModeNote")
	ProjectUnit=Rs("ProjectUnit")
	MakeFolderDir=Rs("MakeFolderDir")
	FilePathName=Rs("FilePathName")
	ContentExtension=Rs("ContentExtension")
	AutoPage=Rs("AutoPage")
	WriteComment=Rs("WriteComment")
	CommentCode=Rs("CommentCode")
	Commentsize=Rs("Commentsize")
	CommentTemp=Rs("CommentTemp")
	ModeTemplate=Rs("ModeTemplate")
	Modekeywords=Rs("Modekeywords")
	Modedescription=Rs("Modedescription")
	ModeMakeDir=Rs("ModeMakeDir")
	A="ESave"
	end If
  %>
<form id="form1" name="form1" method="post" action="?A=<%= A %>&ModeID=<%= Request.QueryString("ModeID") %>">

  <table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
    <tr>
      <td colspan="2" class="bg_tr">您现在的位置：<a href="?">模型管理</a> &gt;&gt; 添加/修改 </td>
    </tr>
    <tr>
      <td width="29%" align="right" >模型状态：&nbsp;&nbsp;</td>
      <td width="71%" >
	  <input <% IF ModeStatus = 0 Then Response.Write "Checked" %> id="ModeStatus1" type="radio" name="ModeStatus" value="0" />
     <label for="ModeStatus1"> 正常 </label>
       <input <% IF ModeStatus = 1 Then Response.Write "Checked" %>  id="ModeStatus2" type="radio" name="ModeStatus" value="1" /><label for="ModeStatus2">关闭</label>
	   <span class="h" style="cursor:help;"  onclick="Help('ACTmx_mxzt',this)">帮助</span></td>
    </tr>
    <tr>
      <td height="25" align="right" >模型名称：&nbsp;&nbsp;</td>
      <td height="25" ><input name="ModeName" type="text" id="ModeName" value="<%=ModeName %>" />
	  <span class="h" style="cursor:help;"  onclick="Help('ACTmx_mxmc',this)">帮助</span></td>
    </tr>
    <tr>
      <td height="25" align="right" >数据表名称：&nbsp;&nbsp;</td>
      <td height="25" ><input <% if A="ESave" then response.Write "disabled" %> name="ModeTable" type="text" id="ModeTable" value="<%= ModeTable %>" />
        <span class="h" style="cursor:help;"  onclick="Help('ACTmx_sjbmc',this)">帮助</span><% if A<>"ESave" then response.Write "_U_ACT" %></td>
    </tr>

    <tr>
      <td height="25" align="right" >单位：&nbsp;&nbsp;</td>
      <td height="25" >
	  <input name="ProjectUnit" type="text" id="ProjectUnit" value="<%= ProjectUnit %>" size="30" maxlength="250" />
      <span class="h" style="cursor:help;"  onclick="Help('ACTmx_dw',this)">帮助</span>*如：篇、个、本等</td>
    </tr>
	<tr>
      <td height="25" align="right" >模型描述：&nbsp;&nbsp;</td>
      <td height="25" ><input name="ModeNote" type="text" id="ModeNote" value="<%= ModeNote %>" size="40" maxlength="250" />
        <span class="h" style="cursor:help;"  onclick="Help('ACTmx_mxms',this)">帮助</span>简单的描述.不能超过250个字符</td>
    </tr>

	<tr>
      <td height="25" align="right" >文件生成存放目录：&nbsp;&nbsp;</td>
      <td height="25" ><input name="MakeFolderDir" type="text" id="MakeFolderDir" value="<%= MakeFolderDir %>" size="40" maxlength="250" /> 不能以 / 开始,结尾必须有 / 符号
	  <span class="h" style="cursor:help;"  onclick="Help('ACTmx_wjsccfml',this)">帮助</span></td>
    </tr>

	<tr>
      <td height="25" align="right" >模型生成目录：&nbsp;&nbsp;</td>
      <td height="25" ><input name="ModeMakeDir" type="text" id="ModeMakeDir" value="<%= ModeMakeDir %>" size="40" maxlength="250" /> 不能为空
	  <span class="h" style="cursor:help;"  onclick="Help('ACTmx_ModeMakeDir',this)">帮助</span></td>
    </tr>

    <tr>
      <td height="25" align="right" >模型生成静态HTML功能总开关：&nbsp;&nbsp;</td>
      <td height="25" >
	  
	    <input <% IF IFmake = 1 Then Response.Write "Checked" %> id="IFmake1" type="radio" name="IFmake" value="1"  />
        <label for="IFmake1">生成(静态)</label>
	  <input <% IF IFmake = 0 Then Response.Write "Checked" %> id="IFmake2" type="radio" name="IFmake" value="0"  /><label for="IFmake2">不生成(动态浏览)</label>	  
	  <input <% IF IFmake = 2 Then Response.Write "Checked" %> id="IFmake3" type="radio" name="IFmake" value="0"  /><label for="IFmake3">伪静态</label>
	  <span class="h" style="cursor:help;"  onclick="Help('ACTmx_sc',this)">帮助</span></td>
    </tr>


    <tr>
      <td height="25" align="right" >自动分页：&nbsp;&nbsp;</td>
      <td height="25" >	 
      <input name="AutoPage" type="text" id="AutoPage" value="<%= AutoPage %>" size="30">
	  <span class="h" style="cursor:help;"  onclick="Help('ACTmx_fy',this)">帮助</span>为0则不设置自动分页</td>
    </tr>

    <tr>
      <td height="25" align="right" >删除文章：&nbsp;&nbsp;</td>
      <td height="25" >
	  <input  <% IF RecyleIF = 0 Then Response.Write "Checked" %> id="RecyleIF1" type="radio" name="RecyleIF" value="0">
        <label for="RecyleIF1">放入回收站</label>
      <input  <% IF RecyleIF = 1 Then Response.Write "Checked" %> id="RecyleIF2"  type="radio" name="RecyleIF" value="1"> 
     <label for="RecyleIF2">彻底删除</label>
	 <span class="h" style="cursor:help;"  onclick="Help('ACTmx_del',this)">帮助</span></td>
    </tr>
    <tr>
      <td height="25" align="right" >后台文件上传目录：&nbsp;&nbsp;</td>
      <td height="25" ><input name="UpfilesDir" type="text" id="UpfilesDir" value="<%= UpfilesDir %>" size="30">
	  <span class="h" style="cursor:help;"  onclick="Help('ACTmx_scwj',this)">帮助</span></td>
    </tr>

    <tr>
      <td height="25" align="right" >内容生成规则：&nbsp;&nbsp;</td>
      <td height="25" ><input name="FilePathName" type="text" id="FilePathName" value="<%= FilePathName %>" size="50">
	  <span class="h" style="cursor:help;"  onclick="Help('ACTmx_nrsc',this)">帮助</span>
	  全部小写</td>
    </tr>

    <tr>
      <td height="25" align="right" >内容文件扩展名：&nbsp;&nbsp;</td>
      <td height="25" ><input name="ContentExtension" type="text" id="ContentExtension" value="<%= ContentExtension %>" size="50">
	  <span class="h" style="cursor:help;"  onclick="Help('ACTmx_nrkzm',this)">帮助</span></td>
    </tr>


    <tr>
      <td height="25" align="right" >模型首页模板：&nbsp;&nbsp;</td>
      <td height="25" ><input name="ModeTemplate" type="text" id="ModeTemplate" value="<%= ModeTemplate %>" size="50">
	<input class="ACT_btn" type="button"  onClick="OpenWindowAndSetValue('../include/print/SelectPic.asp?CurrPath=<%=ACTCMS.ActCMS_Sys(3)%>templets',500,320,window,document.form1.ModeTemplate);" value="选择模板..."> 
	  <span class="h" style="cursor:help;"  onclick="Help('ACTmx_ModeTemplate',this)">帮助</span></td>
    </tr>



    <tr>
      <td height="25" align="right" >模型META关键词：&nbsp;&nbsp;</td>
      <td height="25" ><input name="Modekeywords" type="text" id="Modekeywords" value="<%= Modekeywords %>" size="50">
	  <span class="h" style="cursor:help;"  onclick="Help('ACTmx_Modekeywords',this)">帮助</span></td>
    </tr>


    <tr>
      <td height="25" align="right" >模型META网页描述：&nbsp;&nbsp;</td>
      <td height="25" ><input name="Modedescription" type="text" id="Modedescription" value="<%= Modedescription %>" size="50">
	  <span class="h" style="cursor:help;"  onclick="Help('ACTmx_Modedescription',this)">帮助</span></td>
    </tr>







	<tr>
      <td height="25" align="right" >后台添加文章，同时发布选项：&nbsp;&nbsp;</td>
      <td height="25" >
	  <input id="RefreshFlag1" <% IF RefreshFlag = 1 Then Response.Write "Checked" %> type="radio" name="RefreshFlag" value="1" >
 <label for="RefreshFlag1">仅发布内容页</label> 
  <input id="RefreshFlag2"  <% IF RefreshFlag = 2 Then Response.Write "Checked" %> type="radio" name="RefreshFlag" value="2" >
  <label for="RefreshFlag2">发布栏目页+内容页+首页</label> 
  <input id="RefreshFlag3"  <% IF RefreshFlag = 3 Then Response.Write "Checked" %> type="radio" name="RefreshFlag" value="3" >
  <label for="RefreshFlag3">发布首页+内容页</label>
  <span class="h" style="cursor:help;"  onclick="Help('ACTmx_fb',this)">帮助</span></td>
    </tr>
    <tr>
      <td align="right" >评论选项：</td>
      <td ><table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><input <% IF WriteComment = 0 Then Response.Write "Checked" %>  type="radio" value="0" name="WriteComment" id="WriteComment1" />
<label for="WriteComment1"><font color="red">关闭本模型的所有信息评论</font></label><br />
<input <% IF WriteComment = 1 Then Response.Write "Checked" %>  type="radio" value="1" name="WriteComment" id="WriteComment2"  />
<label for="WriteComment2">本模型只允许<font color="green">会员</font>评论，且评论内容需要后台的审核</label>
<br />
<input <% IF WriteComment = 2 Then Response.Write "Checked" %>  type="radio" value="2" name="WriteComment" id="WriteComment3"  />
<label for="WriteComment3">本模型只允许<font color="green">会员</font>评论，且评论内容不需要后台审核</label>
<br />
<input <% IF WriteComment = 3 Then Response.Write "Checked" %>  type="radio" value="3" name="WriteComment" id="WriteComment4"  />
<label for="WriteComment4">本模型允许<font color="green">会员</font>，<font color="red">游客</font>评论，且评论内容需要后台审核</label>
<br />
<input <% IF WriteComment = 4 Then Response.Write "Checked" %>  type="radio" value="4" name="WriteComment" id="WriteComment5"  />
<label for="WriteComment5">本模型允许<font color="green">会员</font>，<font color="red">游客</font>评论，且评论内容不需要后台审核<br>
</label></td>
  </tr>
  <tr>
    <td height="50" style="height:30">评论需要验证码：
      <INPUT <% IF CommentCode = 0 Then Response.Write "Checked" %>   type="radio"  value="0" name="CommentCode" id="CommentCode1">
<label for="CommentCode1">是</label>
<INPUT <% IF CommentCode = 1 Then Response.Write "Checked" %>  type="radio" value="1" name="CommentCode" id="CommentCode2">
<label for="CommentCode2">否</label></td>
  </tr>
  <tr>
    <td height="50">评论字数控制：<input name="Commentsize" type="text" id="Commentsize" value="<%=Commentsize%>" size="8" maxlength="5"> 
	不限制请输入&quot;0&quot; </td>
  </tr>
   <tr>
    <td height="50">评论页模板：<input name="CommentTemp" type="text" id="CommentTemp" value="<%=CommentTemp%>" size="40" maxlength="5"> 
	<input class="ACT_btn" type="button"  onClick="OpenWindowAndSetValue('../include/print/SelectPic.asp?CurrPath=<%=ACTCMS.ActCMS_Sys(3)%>templets',500,320,window,document.form1.CommentTemp);" value="选择模板..."> 
	</td>
  </tr>
</table></td>
    </tr>

    <tr>
      <td align="right" >&nbsp;</td>
      <td ><input type=button onclick=CheckForm() class="ACT_btn"  name=Submit1 value="  保存  " />
      <input type="reset" name="Submit2" class="ACT_btn" value="  重置  " /></td>
    </tr>
  </table>
</form><br>

<% end sub  %>
<script language="JavaScript" type="text/javascript">

function overColor(Obj)
{
	var elements=Obj.childNodes;
	for(var i=0;i<elements.length;i++)
	{
		elements[i].className="tdbg1"
		Obj.bgColor="";
	}
	
}
function outColor(Obj)
{
	var elements=Obj.childNodes;
	for(var i=0;i<elements.length;i++)
	{
		elements[i].className="tdbg";
		Obj.bgColor="";
	}
}
function CheckForm()
{ var form=document.form1;
	
	 if (form.ModeName.value=='')
		{ alert("请输入模型名称!");   
		  form.ModeName.focus();    
		   return false;
		} 
	 if (form.ModeTable.value=='')
		{ alert("请输入数据表名称!");   
		  form.ModeTable.focus();    
		   return false;
		} 	    form.Submit1.value="正在提交数据,请稍等...";
		form.Submit1.disabled=true;
		form.Submit2.disabled=true;		
	    form.submit();
        return true;
	}
	function OpenWindowAndSetValue(Url,Width,Height,WindowObj,SetObj)
{
	var ReturnStr=showModalDialog(Url,WindowObj,'dialogWidth:'+Width+'pt;dialogHeight:'+Height+'pt;status:yes;help:no;scroll:yes;');
	if (ReturnStr!='') SetObj.value=ReturnStr;
	return ReturnStr;
}	

</script>

</body>
</html>
