admin_configsave.asp

来自「发布整站源码 可以再开发~ 本人实用中 效果嗷嗷滴~」· ASP 代码 · 共 46 行

ASP
46
字号
<!--#include file="config.asp"-->
<!--#include file="code.asp"-->
<%
'检查管理员是否登录
AdminName = ReplaceBadChar(Trim(Request.Cookies(webkey)("AdminName")))
AdminPassword = ReplaceBadChar(Trim(Request.Cookies(webkey)("AdminPassword")))
RndPassword = ReplaceBadChar(Trim(Request.Cookies(webkey)("RndPassword")))
If AdminName = "" Or AdminPassword = "" Or RndPassword = "" Then
	Response.Redirect "Admin_login.asp"
End If
%>
<%
'option explicit
response.buffer=true	
Const PurviewLevel=1    '操作权限
%>
<%
if trim(request("Action"))="Save" then
	dim fso,hf
	set fso=Server.CreateObject("Scripting.FileSystemObject")
	set hf=fso.CreateTextFile(Server.mappath("config.asp"),true)
	hf.write "<" & "%" & vbcrlf
	hf.write "Const webname=" & chr(34) & trim(request("webname")) & chr(34) & "        '网站名称" & vbcrlf
	hf.write "Const weburl=" & chr(34) & trim(request("weburl")) & chr(34) & "        '网站地址" & vbcrlf
	hf.write "Const webmaster=" & chr(34) & trim(request("webmaster")) & chr(34) & "        '管理员QQ" & vbcrlf
	hf.write "Const bgimage=" & chr(34) & trim(request("bgimage")) & chr(34) & "        '背景图片" & vbcrlf
	hf.write "Const db_set=" & chr(34) & trim(request("db_set")) & chr(34) & "        '数据库路径" & vbcrlf
	hf.write "Const webkey=" & chr(34) & trim(request("webkey")) & chr(34) & "        '自定义系统识别码" & vbcrlf
	hf.write "Const admintable=" & chr(34) & trim(request("admintable")) & chr(34) & "        '自定义管理员数据表名字" & vbcrlf
	hf.write "Const MaxPerPage=" & trim(request("MaxPerPage")) &"        '每页的记录数" & vbcrlf
	hf.write "Const SFUlock=" & trim(request("SFUlock")) &"        '是否自动审核私服信息。1为是,0为否。" & vbcrlf
	hf.write "Const JZUlock=" & trim(request("JZUlock")) &"        '是否自动审核家族信息。1为是,0为否。" & vbcrlf
	hf.write "Const SFHits=" & trim(request("SFHits")) &"        '每次浏览信息后,私服浏览量递增值。" & vbcrlf
	hf.write "Const JZHits=" & trim(request("JZHits")) &"        '每次浏览信息后,家族浏览量递增值。" & vbcrlf
	hf.write "Const NewsHits=" & trim(request("NewsHits")) &"        '每次浏览信息后,公告浏览量递增值。" & vbcrlf
	hf.write "Const dsign=" & chr(34) & trim(request("dsign")) & chr(34) & "        '服务器带宽种类" & vbcrlf
	hf.write "Const rsign=" & chr(34) & trim(request("rsign")) & chr(34) & "        '服务器在线人数种类" & vbcrlf
	hf.write "Const ssign=" & chr(34) & trim(request("ssign")) & chr(34) & "        '服务器线路种类" & vbcrlf
	hf.write "Const welcome=" & chr(34) & trim(request("welcome")) & chr(34) & "        '状态栏欢迎词" & vbcrlf
	hf.write "%" & ">" & vbcrlf
	hf.close
	set hf=nothing
	set fso=nothing
	response.Redirect "admin_Config.asp?Success=True"
end if
%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?