<!--#include file="conn1.asp"-->
<%
Set rs1 = Server.CreateObject("ADODB.Recordset")
sqlstr="select * from [b2b_userjb] where grpid=31"
rs1.open sqlstr,conn,1,1
vip=rs1("minipost")
vip1=vip-1

Set rs = Server.CreateObject("ADODB.Recordset")
sqlstr="select * from [user] where userid="&request("id")
rs.open sqlstr,conn,1,3
if rs("score")>vip1 then
rs("zhuangtai")=2
rs("score")=rs("score")-vip

rs.update
rs.close
set rs=nothing
response.write "<script>window.alert('申请成功，请等待审核');location.href='profile.asp?action=profile'</script>"
end if
if rs("score")<6000 then
response.write "<script>window.alert('对不起，你的积分不足');location.href='profile.asp?action=profile'</script>"
end if
%>