?? report.asp
字號:
<!--#include file="conn.asp"-->
<!-- #include file="inc/const.asp" -->
<!-- #include file="chkuser.asp" -->
<!-- #include file="inc/char.asp" -->
<!-- #include file="inc/theme.asp" -->
<%
dim rs,sql
dim boardid
dim announceid
dim username
dim rootid
dim topic
dim mailbody
dim email
dim content
dim postname
dim incepts
dim announce
Rem ------獲取參數(get or post的)------
Rem ------包括版面的ID和頁次------
stats="報告有問題的帖子"
call chkInput()
if foundErr then
call nav()
call headline(1)
call Error()
else
call boardinfo(boardid)
call nav()
call headline(1)
if founderr then
call error()
else
call showPage()
end if
end if
call endline()
sub showPage()
if request("action")="send" then
call announceinfo()
if founderr then
call error()
else
call success()
end if
else
call pag()
end if
end sub
Rem 版面定義信息
sub boardinfo(boardid)
sql="select boardmaster from board where "&guestlist&" boardID="&cstr(boardid)
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if not(rs.bof and rs.eof) then
boardmasterlist=rs(0)
if trim(boardmasterlist)<>"" then
master_1=split(boardmasterlist, "|")
for i = 0 to ubound(master_1)
master_2=""&master_2&"<option value="""&master_1(i)&""">"&master_1(i)&"</option> "
next
else
master_2="無版主"
end if
else
founderr=true
Errmsg=Errmsg+"<br>"+"<li>您選擇的版面不存在或者您沒有權限察看該版面。"
exit sub
end if
rs.close
set rs=nothing
end sub
sub announceinfo()
body=request("content")
writer=membername
incept=request("boardmaster")
set rs=server.createobject("adodb.recordset")
sql="select topic from bbs1 where announceID="&rootID
rs.open sql,conn,1,1
if not(rs.bof and rs.eof) then
topic_1=rs(0)
topic="報告有問題的帖子"
body=body & "您可以到http://www.aspsky.net/club/dispbbs.asp?boardid="&boardid&"&rootid="&rootid&"&id="&Announceid&"這里瀏覽這個貼子"
else
foundErr = true
ErrMsg=ErrMsg+"<br>"+"<li>您指定的貼子不存在</li>"
exit sub
end if
rs.close
sql="insert into message (incept,sender,title,content,sendtime,flag,issend) values ('"&incept&"','"&membername&"','"&topic&"','"&body&"',Now(),0,1)"
conn.execute(sql)
set rs=nothing
end sub
sub pag()
%>
<table cellpadding=0 cellspacing=0 border=0 width="<%=tablewidth%>" bgcolor=<%=tablebackcolor%> align=center>
<tr>
<td>
<table cellpadding=6 cellspacing=1 border=0 width=100%>
<form action="report.asp?action=send&boardid=<%=boardid%>&rootid=<%=rootid%>&id=<%=announceid%>" method=post>
<tr>
<td bgcolor=<%=tabletitlecolor%> valign=middle colspan=2 align=center><font color="<%=TablefontColor%>">
<b>發送報告給版主</b></font></td></tr>
<tr>
<td bgcolor=<%=tablebodycolor%>><font color="<%=TableContentColor%>"><b>報告發送給哪個版主:</b></font></td>
<td bgcolor=<%=tablebodycolor%>><select name=boardmaster size=1><%=master_2%></select></td>
</tr><tr>
<td bgcolor=<%=atablebodycolor%>><font color="<%=TableContentColor%>"><b>消息內容:</b><br>垃圾貼、廣告貼、非法貼等。。。
非必要情況下不要使用這項功能!</font></td>
<td bgcolor=<%=atablebodycolor%>><textarea name="content" cols="55" rows="6">管理員,您好,由于如下原因,我向你報告這有問題的貼子:</textarea></td>
</tr><tr>
<td colspan=2 bgcolor=<%=tabletitlecolor%> align=center><input type=submit value="發 送" name="Submit"></table></td></form></tr></table>
<%
end sub
sub chkInput
if request("boardid")="" then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>請指定論壇版面。"
elseif not isInteger(request("boardid")) then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>非法的版面參數。"
else
boardid=request("boardid")
end if
if request("id")="" then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>請指定相關貼子。"
elseif not isInteger(request("id")) then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>非法的貼子參數。"
else
AnnounceID=request("id")
end if
if request("RootID")="" then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>請指定相關貼子。"
elseif not isInteger(request("RootID")) then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>非法的貼子參數。"
else
RootID=request("RootID")
end if
if membername="" then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>請<a href=login.asp>登陸</a>后進行相關操作。"
end if
end sub
sub success()
%>
<table cellpadding=0 cellspacing=0 border=0 width="<%=tablewidth%>" bgcolor=<%=tablebackcolor%> align=center>
<tr>
<td>
<table cellpadding=3 cellspacing=1 border=0 width=100%>
<tr align="center">
<td width="100%" bgcolor=<%=tabletitlecolor%>><font color="<%=TablefontColor%>">成功:發送頁面</font></td>
</tr>
<tr>
<td width="100%" bgcolor=<%=tablebodycolor%>><font color="<%=TableContentColor%>">恭喜您,您發送成功。</font>
</td>
</tr>
<tr align="center">
<td width="100%" bgcolor=<%=tabletitlecolor%>>
<a href="javascript:history.go(-1)"><font color="<%=TablefontColor%>"> << 返回上一頁</font></a>
</td>
</tr>
</table> </td></tr></table>
<%
end sub
set rs=nothing
stats="報告有問題的貼子"
%>
<!--#include file="footer.asp"-->
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -