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

Set rs = Server.CreateObject("ADODB.Recordset")
sqlstr="select * from [user] where userid="&Trim(request("id"))
rs.open sqlstr,conn,1,3
if rs("score")>vip1 then
	rs("zhuangtai")=grpID
	rs("score")=rs("score")-vip
	rs.update
	rs.close
	set rs=nothing
	response.write "<script>window.alert('申请成功，请等待审核');location.href='profile.asp?action=deposit'</script>"
	response.end
end if

if rs("score")<vip then
	response.write "<script>window.alert('对不起，您的积分不足');location.href='profile.asp?action=deposit'</script>"
	response.end
	rs.close
	set rs=nothing
end if
%>