<%dbdns="../../"%>
<!--#include file="../main.asp"-->
<%
userid=request.form("user_id")
l_id=request.Form("l_id")
username=request.form("username")
msg=request.form("msg")
key=request("key")
if username="" or len(username)<2 or len(username)>16 then
response.write "<script>alert('反馈出错，下面是产生错误的可能原因：\n\n·请输入 2-16 位字符的用户名！');window.close();</Script>"
response.End()
end if
if msg="" or len(msg)<5 or len(msg)>200 then
response.write "<script>alert('反馈出错，下面是产生错误的可能原因：\n\n·请输入 10-100 位字符的反馈内容！');window.close();</Script>"
response.End()
end if
if key=5 then
if session("goname")="" then
response.Redirect("../login.asp")
end if
set rs=Server.CreateObject("Adodb.Recordset")
rs.Open "Select *  from T_club_member where F_username='"&session("goname")&"' and F_key=1",conn
if rs.EOF then
Response.Write "<script>alert('用户出错，下面是产生错误的可能原因：\n\n·对不起，您还没有加入该俱乐部!，请加入');history.go(-1);</Script>"
Response.End   
end if
end if
set rs=Server.CreateObject("Adodb.Recordset")
sql="select * from message_club"
rs.open sql,conn,1,3
rs.addnew
rs("username")=username
rs("message")=msg
rs("user_id")=userid
rs("l_id")=l_id
rs("key1")=key
rs.update
rs.close
set rs=nothing

response.Redirect("../activitx_view.asp?id="&l_id&"")
response.End()
%>