赞
踩
- u_level=2 '升级高级VIP
- set rs = conn.db("SELECT * FROM vip_user WHERE open_id='"&openid&"'","1")
- if Not rs.EOF Then
- if rs("pay_state")=1 then '已支付
- if rs("vip_level")=2 then '当前会员级别:vip
- strMsg="您已是高级VIP会员,请勿重复购买!"
- pay_state=1
- elseif rs("vip_level")=1 then '当前高级vip
- if u_level=2 then
- conn.db "update vip_user set user_state=0 where vip_level=1 and open_id='"&openid&"'","0"
- conn.db "insert into vip_user(order_no,userId,parentId,open_id,nickname,vip_level,total_fee,start_time,stop_time) values('"&out_trade_no&"',"&uid&","&fid&",'"&openid&"','"&nickname&"',"&u_level&",6800,'"&Now()&"','"&DateAdd("yyyy",1,Now())&"')","0"
- strMsg="恭喜您,您已成功购买高级vip会员服务!"
- else
- strMsg="您已是VIP会员,请勿重复购买!"
- pay_state=1
- end if
- end if
-
- else
- conn.db "delete * from vip_user where open_id='"&openid&"'","0"
- select case u_level
- case 1
- conn.db "insert into vip_user(order_no,userId,parentId,open_id,nickname,vip_level,total_fee,start_time,stop_time) values('"&out_trade_no&"',"&uid&","&fid&",'"&openid&"','"&nickname&"',"&u_level&",688,'"&Now()&"','"&DateAdd("yyyy",1,Now())&"')","0"
- strMsg="恭喜您,您已成功购买vip会员服务!"
- case 2
- conn.db "insert into vip_user(order_no,userId,parentId,open_id,nickname,vip_level,total_fee,start_time,stop_time) values('"&out_trade_no&"',"&uid&","&fid&",'"&openid&"','"&nickname&"',"&u_level&",6800,'"&Now()&"','"&DateAdd("yyyy",1,Now())&"')","0"
- strMsg="恭喜您,您已成功购买高级vip会员服务!"
- case else
- strMsg="unknown error"
- end select
- end if
- else
- select case u_level
- case 1
- conn.db "insert into vip_user(order_no,userId,parentId,open_id,nickname,vip_level,total_fee,start_time,stop_time) values('"&out_trade_no&"',"&uid&","&fid&",'"&openid&"','"&nickname&"',"&u_level&",688,'"&Now()&"','"&DateAdd("yyyy",1,Now())&"')","0"
- strMsg="恭喜您,您已成功购买vip会员服务!"
- case 2
- conn.db "insert into vip_user(order_no,userId,parentId,open_id,nickname,vip_level,total_fee,start_time,stop_time) values('"&out_trade_no&"',"&uid&","&fid&",'"&openid&"','"&nickname&"',"&u_level&",6800,'"&Now()&"','"&DateAdd("yyyy",1,Now())&"')","0"
- strMsg="恭喜您,您已成功购买高级vip会员服务!"
- case else
- strMsg="unknown error"
- end select
- end if
- rs.close
- set rs=nothing
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。