<!--#include file="../../conn.asp"-->
<!--#include file="../inc/setup.asp"-->
<!--#include file="../inc/const.asp"-->
<!--#include file="../inc/check.asp"-->
<!--#include file="../../inc/cls_editor.asp" -->
<%
Admin_header
'=====================================================================
' 软件名称：新云网站管理系统
' 当前版本：NewAsp Content Management System Version 4.0
' 文件名称：admin_other.asp
' 更新日期：2008-09-16
' 官方网站：新云网络(www.newasp.net www.newasp.cn) QQ：94022511
'=====================================================================
' Copyright 2003-2008 newasp.net - All Rights Reserved.
' newasp is a trademark of newasp.net
'=====================================================================
%>
<table class="table1" cellspacing="1" cellpadding="3" align="center" border="0">
	<tr>
		<td class="tableline linetitle" width="100" align="left">投票管理</td>
		<td class="tableline" width="*" align="right"><a href="admin_setting.asp">基本设置</a>
			 - <a href="?action=help">网站帮助</a>
			 - <a href="?action=about">关于我们</a>
			 - <a href="?action=ad">广告合作</a>
			 - <a href="?action=declare">网站声明</a>
			 - <a href="admin_channel.asp">频道管理</a>
		</td>
	</tr>
</table>
<%
Dim Action,filePath,ItemTitle
Action = LCase(Request("action"))
If Not ChkAdmin("Other") Then
	Call Transfer_error()
End If
Select Case Trim(Action)
Case "reginfo"
	filePath = "../../user/reginfo.ini"
	ItemTitle = "修改用户注册条款"
Case "regitem"
	filePath = "../../user/regitem.ini"
	ItemTitle = "修改用户注册条款"
Case "help"
	filePath = "../../common/template/help.html"
	ItemTitle = "修改网站帮助信息"
Case "about"
	filePath = "../../common/template/about.html"
	ItemTitle = "修改有关于我们信息"
Case "ad"
	filePath = "../../common/template/advertise.html"
	ItemTitle = "修改广告合作协议"
Case "declare"
	filePath = "../../common/template/declare.html"
	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)
NewAsp.PageEnd

Sub showmain()
	If FoundErr = True Then Exit Sub
%>
<form name="myform" method="post" action="?stype=save">
<input type="hidden" name="action" value="<%=Action%>">
<table border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
<tr>
	<th>添加友情连接</th>
</tr>
<tr>
	<td class="tablerow1">
	<%
	Dim oEditor
	Set oEditor = New Editor_Cls
	oEditor.UserMode	= 0
	oEditor.setEditMode	= 0
	oEditor.ChannelID	= 0
	oEditor.Width		= 0
	oEditor.Height		= 380
	oEditor.BasePath	= "../../editor/"
	oEditor.ToolbarSet	= "AdminMode"
	oEditor.Value		= NewAsp.ReadTextFile(filePath)
	oEditor.InstanceName= "content"
	oEditor.Execute()
	Set oEditor = Nothing
	%>
	</td>
</tr>
<tr>
	<td class="tablerow2"><input type="submit" name="submit_button" value="保存设置" class="button"></td>
</tr>
<tr>
	<td class="tablerow1">文件路径：<%=filePath%></td>
</tr>
</table>
</form>
<%
End Sub

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.writeTextFile filePath, strContent
	Succeed("<li>恭喜您！" & ItemTitle & "成功。</li>")
End Sub
%>