vip.asp

来自「时代商城购物系统功能」· ASP 代码 · 共 79 行

ASP
79
字号
<!--#include file="conn.asp"-->
<!--#include file="config.asp"-->
<%
select case Request.QueryString("action")

case "vipscore"
vipscore

case "uptovip"
uptovip

case "chgscore"
chgscore

end select

sub vipscore
%>
<title><%=webname%>--VIP会员资格和推荐会员奖励</title>
<TABLE class=table-xia height=1 align="center" cellSpacing=0 cellPadding=0 width="350" border=0>
      <TBODY>
        <TR><TD></TD></TR></TBODY></TABLE>
<table width="350" border="0" align="center" cellpadding="0" cellspacing="0" class=table-zuoyou>
  <tr> 
    <td HEIGHT="25" align="center" class=table-xia><b>VIP会员资格和推荐会员奖励</b></td>
  </tr>
  <tr height="120"> 
    <td valign="top" class=table-xia><br>
      </td>
  </tr>
</table>
<%
end sub

sub uptovip
dim strvipscore,strscore
set rs=server.CreateObject("adodb.recordset")
rs.open "select webimg14 from config",conn,1,1
strvipscore = CLng(rs("webimg14"))
rs.close
rs.open "select score,vip from [User] where username='"&request.cookies("timesshop")("username")&"' ",conn,1,3
if rs("vip")=true then
response.Write "<script language=javascript>alert('您已经是VIP用户,不用再升级!');history.go(-1);</script>"
response.End
else
strscore = CLng(rs("score"))
if strscore>=strvipscore then
rs("vip")=true
rs("score")=strscore-strvipscore
rs.update
response.Write "<script language=javascript>alert('恭喜您,升级成功!');history.go(-1);</script>"
else
response.Write "<script language=javascript>alert('您的积分不够,请继续努力赚积分!');history.go(-1);</script>"
end if
end if
rs.close
set rs = nothing
end sub

sub chgscore
dim strdeposit,strscore,strchg
strchg=CLng(request.form("strchg"))
set rs=server.CreateObject("adodb.recordset")
rs.open "select score,deposit from [User] where username='"&request.cookies("timesshop")("username")&"' ",conn,1,3
strscore=CLng(rs("score"))
strdeposit=rs("deposit")
if strchg>strscore then
response.Write "<script language=javascript>alert('你的积分不够!');history.go(-1);</script>"
response.End
else
rs("deposit")=strdeposit+strchg
rs("score")=strscore-strchg
rs.update
response.Write "<script language=javascript>alert('积分转预存款成功!');history.go(-1);</script>"
end if
rs.close
set rs = nothing
end sub
%> 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?