<!--#include file="../Include/Conn.jsp" -->
<!--#include file="../Include/const.jsp" -->
<!--#include file="../Include/char.jsp" -->
<!--#include file="IsLogin.jsp" -->
<%

club_id=request("id")
'response.write request("m_id")
'response.end
 if club_id="" or IsNumeric(club_id)=false then
 Call Msgbox("对不起，发生错误！",1)
 Response.end
 end if
 m_ID = Request.Cookies("aspxnet")("CurUserID")
 m_username= Request.Cookies("aspxnet")("CurUsername")

set rs_a=server.createobject("adodb.recordset")
sql_a="select * from t_club where F_id="&club_id
rs_a.open sql_a,conn,1,3

if rs_a.eof then
 Call Msgbox("对不起，该小圈子已经不存在！",1)
 Response.end
end if
'判别身份，是否有权限上传照片
set rs_user=server.createobject("adodb.recordset")
sql_user="select f_ischeck,f_identity from t_club_member where F_club_id="&club_id&" and f_username='"&m_username&"'"
rs_user.open sql_user,conn
if rs_user.eof and rs_user.bof then
 Call Msgbox("对不起,您还未加入本小圈子！",1)
 Response.end
 else
 if rs_user("f_ischeck")=false then
 Call Msgbox("对不起,您还未通过审核加入本小圈子，请耐心等待！",1)
 Response.end
 end if
end if
if rs_user("f_identity")="初级会员" then    '初级会员无权发布活动信息
 Call Msgbox("对不起,您是本小圈子[初级会员]暂无权发布公告信息！",1)
 Response.end
end if
rs_user.close
set rs_user=nothing

m_content=HTMLEncode(request("content"))
'添加活动信息

set rs_c=server.createobject("adodb.recordset")
sql_c="select * from t_club_board"
rs_c.open sql_c,conn,1,3
rs_c.addnew
rs_c("f_club_id")=club_id
rs_c("f_content")=m_content
'区分是否审核，目前自动通过审核
rs_c("f_username")=m_username
rs_c("f_regtime")=now()
rs_c.update
rs_c.close
set rs_c=nothing

url="club_boardmanage.jsp?id="&rs_a("f_id")
response.redirect url 
 
 '////////////////////////////////
rs_a.close
set rs_a=nothing
%>
