<!--#include file="../../Inc/Const.asp" -->
<!--#include file="../../Inc/Cls_DB.asp" -->
<!--#include file="../../Inc/Function.asp" -->
<%
dim conn,RsConfig,DBC,SQLStr,FSOObj1
set DBC=New DataBaseClass
set conn=DBC.OpenConnection
%>
<!--#include file="../../Inc/Session.asp" -->
<!--#include file="../../Inc/CheckPopedom.asp" -->
<%
if Not JudgePopedomTF(Session("Name"),"P0601") then Call ReturnError1()
SQLStr="select * from config"
set RsConfig=server.CreateObject("ADODB.recordset")
RsConfig.open SQLStr,conn,1,3
if request.Form("operation")="Modify" then
	On  Error Resume Next
	if request.Form("NewsFileName8")="" then
		if len(request.form("NewsFileName1")&request.form("NewsFileName2")&request.form("NewsFileName3")&request.form("NewsFileName4")&request.form("NewsFileName5")&request.form("NewsFileName6")&request.form("NewsFileName7")&request.form("NewsFileName8")&request.form("NewsFileName9")&request.form("NewsFileName10")&request.form("NewsFileName11")&request.form("NewsFileName12")&request.form("NewsFileName13"))<3 then
			Response.Write("<script>alert(""错误：\n\n如果生成文件名没有选择NewsID,请选择至少3位以上的随机文件名组合,并带一个随机数"");location.href=""SysParameter.asp"";</script>")
			Response.End
		end if
	end if
	if str=IsValidEmail (request.Form("Email")) then
		Response.Write("<script>alert(""错误：\n请输入一个正确的Email"");location.href=""SysParameter.asp"";</script>")
		Response.End
	else
		RsConfig("Email")=Replace(Replace(request.form("Email"),"'",""),"""","")
	end if
	RsConfig("Domain")=Replace(Replace(request.form("Domain"),"'",""),"""","")
	RsConfig("UpFileSize")=Replace(Replace(request.form("UpFileSize"),"'",""),"""","")
	RsConfig("UpFileType")=Replace(Replace(request.form("UpFileType"),"'",""),"""","")
	RsConfig("SiteName")=Replace(Replace(request.form("SiteName"),"'",""),"""","")
	RsConfig("AutoRefreshTF")=Replace(Replace(request.form("AutoRefreshTF"),"'",""),"""","")
	RsConfig("AutoJSTF")=Replace(Replace(request.form("AutoJSTF"),"'",""),"""","")
	RsConfig("MailServer")=Replace(Replace(request.form("MailServer"),"'",""),"""","")
	RsConfig("MailName")=Replace(Replace(request.form("MailName"),"'",""),"""","")
	RsConfig("MailPass")=Replace(Replace(request.form("MailPass"),"'",""),"""","")
	RsConfig("Copyright")=Replace(Replace(request.form("Copyright"),"'",""),"""","")
	RsConfig("UserConfer")=Request.Form("UserConfer")
	RsConfig("NewsFileName")=request.form("NewsFileName1")&request.form("NewsFileName2")&request.form("NewsFileName3")&request.form("NewsFileName4")&request.form("NewsFileName5")&request.form("NewsFileName6")&request.form("NewsFileName7")&request.form("NewsFileName8")&request.form("NewsFileName9")&request.form("NewsFileName10")&request.form("NewsFileName11")&request.form("NewsFileName12")&request.form("NewsFileName13")
	if request.form("AutoClass")<>"" then
		RsConfig("AutoClass")=1
	else
		RsConfig("AutoClass")=0
	end if
	if request.form("MemberType")="1" then
		RsConfig("MemberType")=1
	elseif request.form("MemberType")="2" then
		RsConfig("MemberType")=2
	else
		RsConfig("MemberType")=0
	end if
	if request.form("AutoIndex")<>"" then
		RsConfig("AutoIndex")=1
	else
		RsConfig("AutoIndex")=0
	end if
	if request.form("MakeType")="0" then
		RsConfig("MakeType")=0
	else
		RsConfig("MakeType")=1
	end if
	if request.Form("NumberLoginPoint")<>"" then 
		RsConfig("NumberLoginPoint")=clng(request.Form("NumberLoginPoint"))
	else
		RsConfig("NumberLoginPoint")=1
	end if
	if request.Form("NumberContPoint")<>"" then 
		RsConfig("NumberContPoint")=clng(request.Form("NumberContPoint"))
	else
		RsConfig("NumberContPoint")=10
	end if

	RsConfig("IndexExtName")=Replace(Replace(request.form("IndexExtName"),"'",""),"""","")
	RsConfig.update
	Set FSOObj1 = Server.CreateObject("Scripting.FileSystemObject")
	if FSOObj1.FileExists(Server.MapPath("/")&"\"& SysRootDir &"\index."&Request.Form("oldIndexExtName")&"") then
	   FSOObj1.DeleteFile(Server.MapPath("/")&"\"& SysRootDir &"\index."&Request.Form("oldIndexExtName")&"")
	end if
	Set FSOObj1=nothing
	if Err.Mumber = 0 then
%>
<script language="javascript">
alert('修改成功');window.location='SysParameter.asp';
</script>
<%
	else
%>
<script language="javascript">
alert('有错误发生，请刷新后再试');window.location='SysParameter.asp';
</script>
<%
	Response.Redirect("SysParameter.asp")  
	end if
	Response.End

end if 

%>

<html>
<title>网站基本参数设置</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
.SysParaButtonStyle {
	border-top-width: 1px;
	border-right-width: 1px;
	border-bottom-width: 1px;
	border-left-width: 1px;
	border-right-style: solid;
	border-bottom-style: solid;
	border-left-style: solid;
	border-right-color: #999999;
	border-bottom-color: #999999;
	border-left-color: #FFFFFF;
	background-color: #E6E6E6;
}
-->
</style>
</head>
<link href="../../CSS/css.css" rel="stylesheet">
<body bgcolor="#FFFFFF" topmargin="0" leftmargin="0" scroll=yes>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="23" class="SysParaButtonStyle"> 
      <div align="center"><strong>网站基本参数设置</strong></div></td>
  </tr>
</table>
 <tr><td height="50">&nbsp;</td>
 </tr>
  <tr><td>
<table width="677" height="411" border="1" align="center" cellpadding="2" cellspacing="1"  bordercolor="e6e6e6">
      <form name=form method=post action="" >
        <tr valign="middle"> 
          <td width="151" height="1"> <div align="left"> 
              <table width="190" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td height="1"></td>
                </tr>
              </table>
              　您的信箱：</div></td>
          <td width="509" height="1"> <input name="Email" type="text" value="<%=RsConfig("Email")%>" size="30"> 
          </td>
        </tr>
        <tr valign="middle" > 
          <td height="23" width="151"><div align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;当前版本：</div></td>
          <td height="23"><input name="Version" type="text"  value="<%=RsConfig("Version")%>" size="30" disabled> 
          </td>
        </tr>
        <tr valign="middle" > 
          <td width="151" height="23"> <div align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;程序使用的域名： 
            </div></td>
          <td height="23"> <input name="DoMain" type="text" id="DoMain" value="<%=RsConfig("DoMain")%>" size="30"> 
            <font color="#FF0000">(请使用http://标识),后面不能带&quot;/&quot;符号</font></td>
        </tr>
        <tr valign="middle"> 
          <td height="23" width="151"><div align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;站点名称：</div></td>
          <td height="23"><input name="SiteName" type="text" value="<%=RsConfig("SiteName")%>" size="30"></td>
        </tr>
        <tr valign="middle"> 
          <td width="151" height="23"> <div align="left"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;上传文件的类型： 
            </div></td>
          <td height="23"> <input name="UpFileType" type="text"  value="<%=RsConfig("UpFileType")%>" size=30> 
            <span class="Notices"><font color="#FF0000">(请用“,”逗号隔开) </font></span></td>
        </tr>
        <tr valign="middle"> 
          <td height="23" width="151"> <div align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;限制上传文件大小：</div></td>
          <td height="23"> <input type="text" size=10 name="UpFileSize" value="<%=RsConfig("UpFileSize")%>" >
            KB</td>
        </tr>
        <tr valign="middle"> 
          <td height="22" width="151"> <div align="left"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;发送邮件SMTP服务器：</div></td>
          <td height="22"><input name="MailServer" type="text" id="MailServer"  value="<%=RsConfig("MailServer")%>" size=30> 
          </td>
        </tr>
        <tr valign="middle"> 
          <td height="21">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;发送邮件SMTP服务器用户名：</td>
          <td height="21"> <input name="MailName" type="text" id="MailName"  value="<%=RsConfig("MailName")%>" size=30></td>
        <tr valign="middle"> 
          <td height="21">&nbsp;&nbsp;&nbsp;&nbsp;发送邮件SMTP服务器密码：</td>
          <td height="21"> <input name="MailPass" type="password" id="MailPass"  value="<%=RsConfig("MailPass")%>" size=30></td>
        <tr valign="middle"> 
          <td height="21">&nbsp;&nbsp;&nbsp;&nbsp;新闻生成文件名样式：</td>
          <td height="21"> <input name="NewsFileName1" type="checkbox" id="NewsFileName" value="Y" <%if InStr(1, RsConfig("NewsFileName"),"Y" ,1)<>0 then response.Write("checked") %>>
            年 
            <input name="NewsFileName2" type="checkbox" id="NewsFileName" value="M" <%if InStr(1, RsConfig("NewsFileName"),"M" ,1)<>0 then response.Write("checked") %>>
            月 
            <input name="NewsFileName3" type="checkbox" id="NewsFileName" value="D" <%if InStr(1, RsConfig("NewsFileName"),"D" ,1)<>0 then response.Write("checked") %>>
            日 
            <input name="NewsFileName4" type="checkbox" id="NewsFileName" value="H"  <%if InStr(1, RsConfig("NewsFileName"),"H" ,1)<>0 then response.Write("checked") %>>
            时 
            <input name="NewsFileName5" type="checkbox" id="NewsFileName" value="I"  <%if InStr(1, RsConfig("NewsFileName"),"I" ,1)<>0 then response.Write("checked") %>>
            分 
            <input name="NewsFileName6" type="checkbox" id="NewsFileName" value="S"  <%if InStr(1, RsConfig("NewsFileName"),"S" ,1)<>0 then response.Write("checked") %>>
            秒 
            <input name="NewsFileName7" type="checkbox" id="NewsFileName" value="A"  <%if InStr(1, RsConfig("NewsFileName"),"A" ,1)<>0 then response.Write("checked") %>>
            ClassID 
            <input name="NewsFileName8" type="checkbox" id="NewsFileName" value="N"  <%if InStr(1, RsConfig("NewsFileName"),"N" ,1)<>0 then response.Write("checked") %>>
            Newsid <br> <input name="NewsFileName9" type="checkbox" id="NewsFileName" value="Z"  <%if InStr(1, RsConfig("NewsFileName"),"Z" ,1)<>0 then response.Write("checked") %>>
            2位随机数 
            <input name="NewsFileName10" type="checkbox" id="NewsFileName" value="X" <%if InStr(1, RsConfig("NewsFileName"),"X" ,1)<>0 then response.Write("checked") %>>
            3位随机数 
            <input name="NewsFileName11" type="checkbox" id="NewsFileName" value="C" <%if InStr(1, RsConfig("NewsFileName"),"C" ,1)<>0 then response.Write("checked") %>>
            4位随机数 
            <input name="NewsFileName12" type="checkbox" id="NewsFileName" value="V"  <%if InStr(1, RsConfig("NewsFileName"),"V" ,1)<>0 then response.Write("checked") %>>
            5位随机数 
            <input name="NewsFileName13" type="checkbox" id="NewsFileName" value="U" <%if InStr(1, RsConfig("NewsFileName"),"U" ,1)<>0 then response.Write("checked") %>>
            分割&quot;_&quot; <br> <font color="#FF0000">采用任意组合,注意：如果你没有选择newsid,您必须选择至少3个（包含3个）以上的组合,随机数只能选择一个。否则默认识别“3位随机数”</font></td>
        <tr valign="middle"> 
          <td height="21">&nbsp;&nbsp;&nbsp;&nbsp;自动生成分类：</td>
          <td height="21"> <input name="AutoClass" type="checkbox" id="AutoClass" value="1"  <%if RsConfig("AutoClass")=1 then response.Write("checked") %>></td>
        <tr valign="middle"> 
          <td height="21">&nbsp;&nbsp;&nbsp;&nbsp;自动生成首页：</td>
          <td height="21"> <input name="Autoindex" type="checkbox" id="Autoindex" value="1"  <%if RsConfig("Autoindex")=1 then response.Write("checked") %> >
            　　生成首页的扩展名： 
            <select name="IndexExtName" id="IndexExtName">
              <option value="htm" <%if RsConfig("IndexExtName")="htm" then response.Write("selected")%>>htm</option>
              <option value="html" <%if RsConfig("IndexExtName")="html" then response.Write("selected")%>>html</option>
              <option value="shtml" <%if RsConfig("IndexExtName")="shtml" then response.Write("selected")%>>shtml</option>
              <option value="shtm" <%if RsConfig("IndexExtName")="shtm" then response.Write("selected")%>>shtm</option>
              <option value="asp" <%if RsConfig("IndexExtName")="asp" then response.Write("selected")%>>asp</option>
            </select> <input name="oldIndexExtName" type="hidden" id="oldIndexExtName" value="<%=RsConfig("IndexExtName")%>"> 
          </td>
        <tr valign="middle"> 
          <td height="21">&nbsp;&nbsp;&nbsp;&nbsp;生成方式：</td>
          <td height="21"> <input name="MakeType" type="radio" value="0" <%if RsConfig("MakeType")=0 then response.Write("checked") %>>
            Fso(File System Object) 
            <input type="radio" name="MakeType" value="1"  <%if RsConfig("MakeType")=1 then response.Write("checked") %>>
            Adodb.Stream</td>
        <tr valign="middle"> 
          <td height="21">&nbsp;&nbsp;&nbsp;&nbsp;切换会员系统：</td>
          <td height="21"> <input name="MemberType" type="radio" value="0" <%if RsConfig("MemberType")=0 then response.Write("checked")%>>
            本系统会员系统 
            <input type="radio" name="MemberType" value="1" <%if RsConfig("MemberType")=1 then response.Write("checked")%>>
            动网论坛会员系统 
            <input type="radio" name="MemberType" value="2" <%if RsConfig("MemberType")=2 then response.Write("checked")%>>
            极限论坛会员系统</td>
        <tr valign="middle"> 
          <td height="21"><div align="left">　会员登陆增加点数：</div></td>
          <td height="21"> <input name="NumberLoginPoint" type="text" id="NumberLoginPoint" value="<%=RsConfig("NumberLoginPoint")%>" size="8">
            　　会员投稿审核后增加： 
            <input name="NumberContPoint" type="text" id="NumberContPoint" value="<%=RsConfig("NumberContPoint")%>" size="8"></td>
        <tr valign="middle"> 
          <td height="21"><div align="right"></div></td>
          <td height="21">&nbsp;</td>
        <tr valign="middle"> 
          <td height="21">　会员注册协议：<font color="#FF0000"><br>
            可以使用html语法</font></td>
          <td height="21"> <textarea name="UserConfer" cols="60" rows="5" id="UserConfer"><%=RsConfig("UserConfer")%></textarea> 
            <font color="#FF0000">&nbsp; </font></td>
        <tr valign="middle"> 
          <td height="21">　 版权信息：<br> <font color="#FF0000"> 可以使用html语法</font> 
          </td>
          <td height="21"> <textarea name="Copyright" cols="60" rows="5" id="Copyright"><%=RsConfig("Copyright")%></textarea> 
            <font color="#FF0000">&nbsp; </font></td>
        <tr align="center" valign="middle" class="tabbgcolorli"> 
          <input type=hidden name=operation value=Modify>
          <td height="20" colspan="2"> <input type="submit" value=" 修 改 "  class=Anbutc> 
            <input type="reset" value=" 还 原 " onclick="" class=Anbutc> </td>
        </tr>
      </form>
    </table>


</body>
</html>
<%
RsConfig.close
set RsConfig =nothing
set conn=nothing
set DBC=nothing
%>