<% Option Explicit %>
<!--#include file="../../Inc/Const.asp" -->
<!--#include file="../../Inc/Cls_DB.asp" -->
<%
Dim DBC,Conn
Set DBC = New DataBaseClass
Set Conn = DBC.OpenConnection()
Set DBC = Nothing
%>
<!--#include file="../../Inc/Session.asp" -->
<!--#include file="../../Inc/CheckPopedom.asp" -->
<%
if Not JudgePopedomTF(Session("Name"),"P0608") then Call ReturnError1()
Dim Path,FileName,EditFile,FileContent,Result
Result = Request.Form("Result")
Path = "../../Inc"
FileName = "Const.asp"
EditFile = Server.MapPath(Path) & "\" & FileName
Dim FsoObj,FileObj,FileStreamObj
Set FsoObj = Server.CreateObject("Scripting.FileSystemObject")
Set FileObj = FsoObj.GetFile(EditFile)
if Result = "" then
	Set FileStreamObj = FileObj.OpenAsTextStream(1)
	if Not FileStreamObj.AtEndOfStream then
		FileContent = FileStreamObj.ReadAll
	else
		FileContent = ""
	end if
else
	Set FileStreamObj = FileObj.OpenAsTextStream(2)
	FileContent = Request.Form("ConstContent")
	FileStreamObj.Write FileContent
	if Err.Number <> 0 then
		%>
		<script language="JavaScript">
			alert('<% = "保存失败，请拷贝后，重新打开文件再保存" %>');window.location='SysConstSet.asp';
		</script>
		<%
		
	else
		%>
		<script language="JavaScript">
			alert('修改成功');window.location='SysConstSet.asp';
		</script>
		<%
	end if
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>系统常量设置</title>
</head>
<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>
<link href="../../CSS/css.css" rel="stylesheet">
<body bgcolor="#FFFFFF" topmargin="0" leftmargin="0" scroll=no>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <form action="" name="Form" method="post">
    <tr> 
      <td height="23" colspan="2" class="SysParaButtonStyle"> <div align="center"><strong>系统常量设置</strong></div></td>
    </tr>
    <tr> 
      <td colspan="2"><div align="center">
          <textarea name="ConstContent" rows="35" style="width:99%;"><% = FileContent %></textarea>
        </div></td>
    </tr>
    <tr> 
      <td height="30"> <div align="center"> 
          <input type="submit" name="Submit" value=" 确 定 ">
          <input name="Result" type="hidden" id="Result" value="Modify">
        </div></td>
      <td height="30"> <div align="center"> 
          <input type="reset" name="Submit2" value=" 重 填 ">
        </div></td>
    </tr>
    <tr> 
      <td height="30" colspan="2"><div align="center"><font color="#FF0000">注意：主窗口里中任意单引号&quot;<font color="#0000FF">'</font>&quot;不能去掉，请不要使用回车。&quot;<font color="#0000FF">&lt;%</font>&quot;和&quot;<font color="#0000FF">%&gt;</font>&quot;不能去掉。请一定注意。建议只改字符，不要增加、删除</font></div></td>
    </tr>
  </form>
</table>
</body>
</html>
<%
Set FsoObj = Nothing
Set FileObj = Nothing
Set FileStreamObj = Nothing
%>
