<!--#include file="conn.asp"-->



<%
dim towho,checkad,topic,play,text,sql
dim forum,conn1,sqlad,TableWidth,Tablebackcolor,Tabletitlecolor,aTabletitlecolor
dim rs
%>
<%if request.form("topic")="" or request.form("text")="" then%>
<script language=vbscript>
  MsgBox "请填写举报投诉的理由和举报内容！"
  location.href = "javascript:history.back()"
</script>
<%
else
%>
<!--#include file="connfy.asp"-->
<%
towho=request.form("towho")
sqlad="select userclass from [user] where username='"&towho&"' "
set checkad=conn.execute(sqlad)
if  checkad.eof then%>

<script language=vbscript>
  MsgBox "对不起，您投诉的人不存在！"
  location.href = "javascript:history.back()"
</script>


<%
response.end
else
 if  checkad(0)=20 then%>
 <script language=vbscript>
  MsgBox "对不起，您不能投诉管理员！"
  location.href = "javascript:history.back()"
</script>
 <%
response.end
end if
end if

topic=request.form("topic")
play=request.form("play")
text=request.form("text")


set rs=server.createobject("adodb.recordset")
sql="select * from bbs where (id is null)"
rs.open sql,conn1,1,3
rs.addnew
rs("被告")=towho
rs("标题")=topic
rs("要求")=play
rs("状词")=text
rs("日期")=now()
rs("原告")=request.cookies("aspsky")("username")
rs.update
rs.close
conn1.close
set conn1=nothing
response.redirect("over.asp")
		rs.close
		set rs=nothing
end if
sub endinfo(message) 
'-------------------------------信息提示-------------------------------
%>
<table width="<%=TableWidth%>" border=0 cellspacing=1 cellpadding=3 align=center bgcolor="<%=Tablebackcolor%>"><tr bgcolor="<%=Tabletitlecolor%>" ><td align=center height=26 bgcolor="<%=Tabletitlecolor%>"><b>信息提示</b></td></tr><tr><td align=center height=70 bgcolor="<%=aTabletitlecolor%>"><%=message%><br></td></tr><tr><td align=center height=26 bgcolor="<%=Tabletitlecolor%>"><a href="fy.asp">返回</a></td></tr></table>
<%end sub
%>