<!--#include file="../Include/Conn.asp" -->
<!--#include file="../Include/const.asp" -->
<!--#include file="../Include/char.asp" -->
<!--#include file="IsLogin.asp" -->
<!--#include file="../sql/Neeao_SqlIn.Asp" -->
<%

club_id=clng(checkStr(request("id")))
p_id=clng(checkStr(request("p_id")))
'response.write request("m_id")
'response.end
 if club_id="" or p_id="" or IsNumeric(p_id)=false or isnumeric(club_id)=false then
 Call Msgbox("对不起，发生错误！",1)
 Response.end
 end if
 m_ID = Session("CurUserID")
 m_username= Session("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")
if m_username=rs_a("f_manage_username") then
sql_c="select * from t_club_board where f_id="&p_id
else
sql_c="select * from t_club_board where f_username='"&m_username&"' and f_id="&p_id
end if
'response.write sql_c
'response.end
rs_c.open sql_c,conn,1,3
if not rs_c.eof then

rs_c("f_content")=m_content

rs_c("f_regtime")=now()
rs_c.update
end if
rs_c.close
set rs_c=nothing
'rs_a("f_clubactive")=rs_a("f_clubactive")+1
'rs_a.update
'url="club_meetmanage.asp?id="&rs_a("f_id")
'response.redirect url 
 Call Msgbox("本子俱乐部的公告信息修改成功！","club_boardmanage.asp?id="&rs_a("f_id"))
 '////////////////////////////////
rs_a.close
set rs_a=nothing
%>
