<!--#include file="setup.asp"-->
<!--#include file="check.asp"-->
<%
Admin_header
'=====================================================================
' 软件名称：新云网站管理系统(华西网域风格:Www.Hx99.Cn)
' 当前版本：NewCloud Site Management System Version 2.1
' 文件名称：admin_other.asp
' 更新日期：2005-3-20
' 官方网站：新云网络(www.newasp.net) QQ：94022511
'=====================================================================
' Copyright 2002-2005 newasp.net - All Rights Reserved.
' newasp is a trademark of newasp.net
'=====================================================================
Dim Action,filePath,ItemTitle
Action = LCase(Request("action"))
If Not ChkAdmin("999") Then
	Server.Transfer("showerr.asp")
	Response.End
End If
Select Case Trim(Action)
Case "reginfo"
	filePath = "../user/reginfo.ini"
	ItemTitle = "修改用户注册条款"
Case "regitem"
	filePath = "../user/regitem.ini"
	ItemTitle = "修改用户注册条款"
Case "help"
	filePath = "../support/help.ini"
	ItemTitle = "修改网站帮助信息"
Case "about"
	filePath = "../support/about.ini"
	ItemTitle = "修改有关于我们信息"
Case "ad"
	filePath = "../support/advertise.ini"
	ItemTitle = "修改广告合作协议"
Case "declare"
	filePath = "../support/declare.ini"
	ItemTitle = "修改网站声明"
Case Else
	filePath = "../reg/reginfo.ini"
	ItemTitle = "修改用户注册条款"
End Select
If Trim(LCase(Request("stype"))) = "save" Then
	Call SaveTextFile
Else
	Call showmain
End If
If FoundErr = True Then
	ReturnError(ErrMsg)
End If
Admin_footer
SaveLogInfo(AdminName)
CloseConn
Public Sub showmain()
	If FoundErr = True Then Exit Sub
	Response.Write "<script language=JavaScript>" & vbNewLine
	Response.Write "function doSubmit(){" & vbNewLine
	Response.Write "	if (document.myform.content.value==""""){" & vbNewLine
	Response.Write "		alert(""内容不能为空！"");" & vbNewLine
	Response.Write "		return false;" & vbNewLine
	Response.Write "	}" & vbNewLine
	Response.Write "	document.myform.submit();" & vbNewLine
	Response.Write "}" & vbNewLine
	Response.Write "</script>" & vbNewLine
	Response.Write "<script src='include/romnumber.js' type=text/javascript></script>" & vbNewLine
	Response.Write "<table border=0 align=center cellpadding=3 cellspacing=1 class=tableborder>" & vbNewLine
	Response.Write "<form name=myform method=post action='admin_other.asp'>" & vbNewLine
	Response.Write "<input type=hidden name='stype' value='save'>" & vbNewLine
	Response.Write "<input type=hidden name='action' value='" & Action & "'>" & vbNewLine
	Response.Write "<tr>" & vbNewLine
	Response.Write "	<th>&gt;&gt;" & ItemTitle & "&lt;&lt;</th>" & vbNewLine
	Response.Write "</tr>" & vbNewLine
	Response.Write "<tr>" & vbNewLine
	Response.Write "	<td class=tablerow1><b>说明：</b><br><font color=blue>{$SiteName} 标签代表您的网站名称，{$SiteUrl} 标签代表网站URL，这此相关标签请不要修改，支持HTML语法。</font><br>" & vbNewLine
	Response.Write "	<b>文件路径：</b><font color=red>" & Server.MapPath(filePath) & "</font></td>" & vbNewLine
	Response.Write "</tr>" & vbNewLine
	Response.Write "<tr>" & vbNewLine
	Response.Write "	<td class=tablerow1 noWrap><textarea id='txt_ln' name='content1' cols='6' class=RomNumber readonly>"
	Response.Write "</textarea><textarea name=""content"" id='txt_main' cols=""86"" wrap=""OFF"" class=txtmain onkeydown='editTab()' onchange=""document.forms[0].modi.value='ture'"" onscroll='show_ln()' wrap='on'>" & Server.HTMLEncode(Newasp.ReadFile(filePath)) & "</textarea>" & vbNewLine
	Response.Write "			<script>for(var i=1; i<=24; i++) document.getElementById('txt_ln').value += i + '\n';</script></td>" & vbNewLine
	Response.Write "</tr>" & vbNewLine
	Response.Write "<tr>" & vbNewLine
	Response.Write "	<td class=tablerow2 align=center><input type=Button name=""btnSubmit"" value='保存修改' class=Button onclick=""doSubmit();""></td>" & vbNewLine
	Response.Write "</tr>" & vbNewLine
	Response.Write "</form>" & vbNewLine
	Response.Write "</table>" & vbNewLine
End Sub
Public Sub SaveTextFile()
	If Trim(Request.Form("content")) = "" Then
		FoundErr = True
		ErrMsg = ErrMsg + "<li>内容不能为空！</li>"
		Exit Sub
	End If
	Dim strContent
	strContent = Request.Form("content")
	Newasp.CreatedTextFile filePath, strContent
	Succeed("<li>恭喜您！" & ItemTitle & "成功。</li>")
End Sub
%>