⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vip.asp

📁 购物程序电子商务
💻 ASP
字号:
<!--#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>
<%
set rs=server.CreateObject("adodb.recordset")
rs.open "select webimg11,webimg13,webimg14 from config",conn,1,1
%> 
<table width="350" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor=<%=bgclr1%>>
  <tr> 
    <td HEIGHT="20" align="center" bgcolor="<% = bgclr1 %>"> <FONT COLOR=#ffffff>VIP会员资格和推荐会员奖励</FONT> </td>
  </tr>
  <tr height="120"> 
    <td valign="top" BGCOLOR=#FFFFFF><br>
      &nbsp;申请<b>VIP</b>会员需要积分: <font color="red"><%=trim(rs("webimg14"))%></font>&nbsp;分 <br>
      &nbsp;推荐一个会员奖励积分:  <font color="red"><%=trim(rs("webimg13"))%></font>&nbsp;分 <br>
	  &nbsp;VIP会员享受的服务:<%=trim(rs("webimg11"))%></td>
  </tr>
</table>
<%rs.close
set rs=nothing

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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -