📄 setfelicityvip.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="session3.asp"-->
<%
dim danweiid,danweiorder,danweiname,danweino,i
if request("action")="update" then
for i=1 to request.form("id").count
id=replace(request.form("id")(i),"'","")
vipdate=replace(request.form("vipdate")(i),"'","")
username=replace(request.form("username")(i),"'","")
fanhui=replace(request.form("fanhui")(i),"'","")
xiaofei=replace(request.form("xiaofei")(i),"'","")
If vipdate="" Then
response.Write "<script language='javascript'>alert('时间不能为空!');history.go(-1);</script>"
response.end
end if
If username="" Then
response.Write "<script language='javascript'>alert('用户名不能为空!');history.go(-1);</script>"
response.end
end if
If xiaofei="" Then
response.Write "<script language='javascript'>alert('消费金额不能为空!');history.go(-1);</script>"
response.end
end if
If fanhui="" Then
response.Write "<script language='javascript'>alert('返回金额不能为空!');history.go(-1);</script>"
response.end
end if
conn.execute("update wq_xyvip set vipdate='"&vipdate&"',username='"&username&"',xiaofei="&xiaofei&",fanhui="&fanhui&" where id="&id)
next
conn.close
set conn=nothing
'response.write "<p align=center><font color=red><br>2秒钟后返回上页!</font>"
response.Write "<script language='javascript'>alert('修改VIP用户成功!')</script>"
response.write "<meta http-equiv=""refresh"" content=""0;url=ManageFelicityVip.asp"">" ' content=""0返回url的时间,单位为秒
end if
if request("action")="add" then
vipdate=request("vipdate")
username=request("username")
xiaofei=request("xiaofei")
fanhui=request("fanhui")
If vipdate="" Then
response.Write "<script language='javascript'>alert('时间不能为空!');history.go(-1);</script>"
response.end
end if
If username="" Then
response.Write "<script language='javascript'>alert('用户名不能为空!');history.go(-1);</script>"
response.end
end if
If xiaofei="" Then
response.Write "<script language='javascript'>alert('消费金额不能为空!');history.go(-1);</script>"
response.end
end if
If fanhui="" Then
response.Write "<script language='javascript'>alert('返回金额不能为空!');history.go(-1);</script>"
response.end
end if
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open "select * from wq_xyvip",conn,1,3
rs.addnew
rs("vipdate")=vipdate
rs("username")=username
rs("xiaofei")=xiaofei
rs("fanhui")=fanhui
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
response.Write "<script language='javascript'>alert('幸运VIP用户添加成功!')</script>"
response.write "<meta http-equiv=""refresh"" content=""0;url=ManageFelicityVip.asp"">"
end if
if request("action")="del" then
id=request("id")
conn.execute("delete from wq_xyvip where id=" &id)
conn.close
set conn=nothing
response.Write "<script language='javascript'>alert('删除成功!')</script>"
response.write "<meta http-equiv=""refresh"" content=""0;url=ManageFelicityVip.asp"">"
response.end
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -