📄 save.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="jl.asp" -->
<%
'ASP彩票系统
'制作:子渊
'由左眼失明残疾人子渊制作
'手机:13556590001
'E:MAIL:ziyzo2008@yahoo.com.cn
'演示:http://www.gy16.com/cp/
'以上信息不影响资源,请保留版权信息
%>
<%
sj=replace(trim(request("sj")),"'","")
qs=trim(request("qs"))
p1=trim(request("p1"))
p2=trim(request("p2"))
p3=trim(request("p3"))
p4=trim(request("p4"))
p5=trim(request("p5"))
p6=trim(request("p6"))
tm=trim(request("tm"))
show=trim(request("show"))
action=request("action")
select case action
case "add"
call add()
case "edit"
call edit()
case "del"
call del()
end select
connclose
'===================================================================
sub add()
stemp="select * from hao where qs='"& qs &"'"
set dbstr=conn.execute(stemp)
if dbstr.eof then
stemp="insert into hao(qs,p1,p2,p3,p4,p5,p6,tm,sj,show) values('"& qs &"','"& p1 &"','"& p2 &"','"& p3 &"','"& p4 &"','"& p5 &"','"& p6 &"','"& tm &"','"& sj &"','"& show &"')"
'response.write stemp
conn.execute(stemp)
response.write "<script>alert('添加成功!');location.href='367gx.asp';</script>"
else
response.write "<script>alert('该期资料已被保存!');location.href='367gx.asp';</script>"
exit sub
end if
dbstr.close
set dbstr=nothing
end sub
'===================================================================
sub edit()
id=request("id")
if id="" or IsNull(id) then
response.write "<script>alert('非法参数!');location.href='367gl.asp';</script>"
exit sub
end if
stemp="select * from hao where qs='"& qs &"'"
set dbstr=conn.execute(stemp)
if not dbstr.eof then
stemp="update hao set qs='"& qs &"',sj='"& sj &"',p1='"& p1 &"',p2='"& p2 &"',p3='"& p3 &"',p4='"& p4 &"',p5='"_
& p5 &"',p6='"& p6 &"',tm='"& tm &"',show='"& show &"' where id="&id&""
conn.execute(stemp)
response.write "<script>alert('修改成功!');location.href='367gl.asp';</script>"
else
response.write "<script>alert('该期资料不存在!');location.href='367gl.asp';</script>"
exit sub
end if
dbstr.close
set dbstr=nothing
end sub
'===================================================================
sub del()
id=request("id")
if id="" or IsNull(id) then
response.write "<script>alert('非法参数!');location.href='367gl.asp';</script>"
exit sub
end if
stemp="delete from hao where id in ("& id &")"
conn.execute(stemp)
response.write "<script>alert('删除成功!');location.href='367gl.asp';</script>"
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -