⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_save.asp

📁 发布整站源码 可以再开发~ 本人实用中 效果嗷嗷滴~
💻 ASP
字号:
<!--#include file="config.asp"-->
<!--#include file="conn.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
%>
<%
set rs = server.createobject("adodb.recordset")
dim id,name,ip,gameid,daikuan,renshu,sdate,addr,xingzhi,main,homepage,download,ulock,addtime
id=request("id")
name=htmlencode(request("name"))
ip=htmlencode(request.form("ip"))
gameid=trim(request.form("gameid"))
daikuan=trim(request.form("daikuan"))
Service=trim(request.form("Service"))
renshu=trim(request.form("renshu"))
Sdate=request.form("Sdate")
addr=htmlencode(request.form("addr"))
xingzhi=htmlencode(request.form("xingzhi"))
main=htmlencode(request.form("main"))
addname=htmlencode(request.form("addname"))
email=htmlencode(request.form("email"))
homepage=htmlencode(request.form("homepage"))
download=htmlencode(request.form("download"))
top=htmlencode(request("top"))
ulock=htmlencode(request("ulock"))
addtime=request("addtime")
hits=request("hits")
if ulock="" then ulock="0"
if top="" then top="0"
if name="" or ip="" or gameid="" or daikuan="" or Service="" or  renshu="" or Sdate="" or main="" or xingzhi="" or addr="" then
response.write "<script>alert('带*的选项必须填写或选择,请返回检查后再提交');history.back()</script>"
response.end
end if

if int(daikuan)>ubound(split(dsign,",")) or int(renshu)>ubound(split(rsign,",")) or int(service)>ubound(split(ssign,",")) then
response.write "<script>alert('非法数据,请勿试图提交非法参数');history.back()</script>"
response.end
end if

call edit()

sub edit()
	sql="select * from sfdata where id="&request("id") 
	rs.open sql,conn,1,3
	if rs.bof and rs.eof then
	rs.close
	response.write "<script>alert('无此ID,请返回重新检查');history.back()</script>"
	else
	rs("name")=name
	rs("ip")=ip
	rs("gameid")=gameid
	rs("daikuan")=daikuan
	rs("service")=service
	rs("renshu")=renshu
	rs("addr")=addr
	rs("xingzhi")=xingzhi
	rs("main")=main
	rs("homepage")=homepage
	rs("download")=download
	rs("ulock")=ulock
	rs("top")=top
	rs("sdate")=sdate
	rs("addtime")=addtime
	rs("email")=email
	rs("hits")=hits
	rs("gameid")=gameid
	rs("addname")=addname
	rs.update
	response.Redirect "Admin_list.asp"
	rs.close
	end if
call closedb()
end sub

sub closedb()
set rs=nothing
conn.close
set conn=nothing
end sub
%>

⌨️ 快捷键说明

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