📄 tongxunlusave.asp
字号:
<%action=request.querystring("action")
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
connstr=Application("hg_connstr")
conn.open connstr
sid=clng(request.querystring("id"))
action=request("action")
a1=request.form("a1")
a2=request.form("a2")
a3=request.form("a3")
a4=request.form("a4")
a5=request.form("a5")
a6=request.form("a6")
if a6="" then a6=0
a7=request.form("a7")
a8=request.form("a8")
a13=request.form("a13")
a12=request.form("a12")
if a12=2 then action=45
if action=44 then
a9=session("hxf_u_nickname")
else
a9="|公共|"
end if
'检验数据合法性
if a1="" or a2="" or not isnumeric(a3) or not isnumeric(a4) or not isnumeric(a6) or a5="" or a7="" or a8="" or a9="" or a13="" or a12="" then
%>
<script language=vbscript>
MsgBox "错误:输入不能有空,没有信息的请填写[无]或者电话号码与qq号码您填写的不是数字,请核对!"
location.href = "rizhi.asp?action=<%=action%>"
</script>
<%else
set tablelist=conn.execute("select * from 通讯录 where a3='" &a3 &"' and a9='" &a9 &"'")
if not(tablelist.eof and tablelist.bof) then
%>
<script language=vbscript>
MsgBox "错误:数据库中已经存在此条通讯录信息,禁止重复提交!"
location.href = "rizhi.asp?action=<%=action%>"
</script>
<%else
'写入记录
sql="SELECT * FROM 通讯录 WHERE 有效=true"
set rs=conn.Execute(sql)
If not(Rs.Bof OR Rs.Eof) Then
id=rs("id")
sql="update 通讯录 set a1='"&a1&"',a2='"&a2&"',a3='"&a3&"',a4='"&a4&"',a5='" &a5& "',a6='" &a6 & "',a7='"&a7&"',a8='"&a8&"',a9='"&a9&"',a11=now(),有效=false,a12='"&a12&"',a13='"&a13&"' where id="&id
conn.Execute(sql)
else
conn.execute("insert into 通讯录(a1,a2,a3,a4,a5,a6,a7,a8,a9,a12,a13) values('" &a1 &"','" &a2 &"','" &a3 &"','" &a4&"','" &a5&"','" &a6&"','" &a7&"','" &a8&"','" &a9&"','" &a12&"','" &a13&"')")
end if
%>
<script language=vbscript>
MsgBox "系统提示:提交成功,按此返回!"
location.href = "rizhi.asp?action=<%=action%>"
</script>
<%end if
conn.close
set conn=nothing
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -