📄 admin_jz_save.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 name,qq,addr,peo,gameid,about,bulid,master,contact,tel,web,top,ulock
name=htmlencode(request("name"))
qq=htmlencode(request.form("qq"))
addr=htmlencode(request.form("addr"))
peo=htmlencode(request.form("peo"))
gameid=htmlencode(request.form("gameid"))
about=htmlencode(request.form("about"))
bulid=request.form("bulid")
master=htmlencode(request.form("master"))
Contact=htmlencode(request.form("Contact"))
tel=htmlencode(request.form("tel"))
web=htmlencode(request.form("web"))
if request("top")<>1 then
top=0
else
top=1
end if
if request("ulock")<>1 then
ulock=0
else
ulock=1
end if
if Contact="" then Contact=master
if tel="" then tel="无"
if name="" or qq="" or gameid="" or addr="" or peo="" or master="" or bulid="" or about="" then
response.write "<script>alert('带*的选项必须填写或选择,请返回检查后再提交');history.back()</script>"
response.end
end if
call edit()
sub edit()
sql="select * from jzdata 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("QQ")=QQ
rs("Addr")=Addr
rs("Peo")=Peo
rs("GameID")=GameID
rs("About")=About
rs("Bulid")=Bulid
rs("Master")=Master
rs("Contact")=Contact
rs("tel")=tel
rs("web")=web
rs("ulock")=ulock
rs("top")=top
rs.update
name=rs("name")
response.write "<script>alert('"&name&"编辑成功~!');</script>"
rs.close
response.redirect "Admin_Jz_list.asp"
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 + -