📄 jz_save.asp
字号:
<!--#include file="config.asp"-->
<!--#include file="conn.asp"-->
<!--#include file="code.asp"-->
<%
set rs = server.createobject("adodb.recordset")
dim name,qq,addr,peo,gameid,about,bulid,master,contact,tel,web
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 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 add()
sub add()
sql="SELECT * FROM Jzdata where Name='"&Name&"' and Master='"&Master&"'"
rs.open sql,conn,1,1
if rs.bof and rs.eof then
rs.close
sql="select * from Jzdata"
rs.open sql,conn,1,3
rs.addnew
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")=JZUlock '1:前台添加家族时自动通过审核;0:前台发布家族后需在后台审核后才能显示。
rs("top")=0
rs.update
name=rs("name")
response.write "<script>alert('恭喜您家族名为:"&name&"提交成功,请等待管理员审核\n审核成功后您发布的信息将被显示');location.replace('index.asp')</script>"
rs.close
rs.nothing
call closeconn
else
response.write "<script>alert('当前提交的家族名与族长名在数据库里已经存在\n请重新检查后提交,请不要提交重复信息');history.back()</script>"
rs.close
rs.nothing
call closeconn
end if
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -