<!--#include file="../Include/Conn.asp" -->
<%
if session("goname")="" then
response.Redirect("../login.asp")
end if
club=request("club")
key=request("key")
set rs=Server.CreateObject("Adodb.Recordset")
rs.Open "Select *  from T_club_member where F_username='"&session("goname")&"' and F_club_id="&club&" and F_type=1",conn
if not rs.EOF then
Response.Write "<script>alert('用户加入出错，下面是产生错误的可能原因：\n\n·对不起，您己经是该俱乐部的管理员了!，请重新加入');history.go(-1);</Script>"
Response.End   
end if
set rs=Server.CreateObject("Adodb.Recordset")
rs.Open "Select *  from T_club_member where F_username='"&session("goname")&"' and F_club_id="&club&"",conn
if not rs.EOF then
Response.Write "<script>alert('用户加入出错，下面是产生错误的可能原因：\n\n·对不起，您己经加入该俱乐部了!，请重新加入');history.go(-1);</Script>"
Response.End   
end if
set rs=Server.CreateObject("Adodb.Recordset")
sql="select * from T_club_member"
rs.open sql,conn,1,3
rs.addnew
rs("F_club_id")=club
rs("F_username")=session("goname")
rs("F_user_id")=session("goid")
rs("F_key")=key
rs.update
rs.close
set rs=nothing
response.Redirect("../club.asp?id="&club)
response.End()
%>