?? admin_topiclist.asp
字號:
<!--#include file="conn.asp"-->
<!-- #include file="inc/const.asp" -->
<!-- #include file="inc/char_board.asp" -->
<%
'=========================================================
' File: admin_topiclist.asp
' Version:5.0
' Date: 2002-9-20
' Script Written by satan
'=========================================================
' Copyright (C) 2001,2002 AspSky.Net. All rights reserved.
' Web: http://www.aspsky.net,http://www.dvbbs.net
' Email: info@aspsky.net,eway@aspsky.net
'=========================================================
stats="帖子審核"
Dim currentPage
dim AdminLockTopic
dim p,announceIDRange1,announceIDRange2,tableclass
dim bBoardEmpty
bBoardEmpty=false
AdminLockTopic=false
if (master or superboardmaster or boardmaster) and Cint(GroupSetting(36))=1 then
AdminLockTopic=true
else
AdminLockTopic=false
end if
if Cint(GroupSetting(36))=1 and UserGroupID>3 then
AdminLockTopic=true
end if
if FoundUserPer and Cint(GroupSetting(36))=1 then
AdminLockTopic=true
elseif FoundUserPer and Cint(GroupSetting(36))=0 then
AdminLockTopic=false
end if
if not AdminLockTopic then
Errmsg=Errmsg+"<br>"+"<li>您沒有在本版面審核帖子的權限。"
founderr=true
end if
currentPage=request("page")
if BoardID="" or (not isInteger(BoardID)) or BoardID="0" then
Errmsg=Errmsg+"<br>"+"<li>錯誤的版面參數!請確認您是從有效的連接進入。"
founderr=true
else
BoardID=clng(BoardID)
end if
if currentpage="" or not isInteger(currentpage) then
currentpage=1
else
currentpage=clng(currentpage)
end if
if founderr then
call nav()
call head_var(2,0,"","")
call dvbbs_error()
else
call nav()
call head_var(1,BoardDepth,0,0)
if request("action")="freetopic" then
call freetopic()
else
call main()
end if
if founderr then call dvbbs_error()
end if
call footer()
sub main()
dim totalrec,ii,page_count
dim n,pi
dim rs1,sql1
%>
<BR>
<TABLE cellPadding=1 cellSpacing=1 class=tableborder1 align=center>
<form action="admin_topiclist.asp?action=freetopic" method=post name=batch>
<input type=hidden value="<%=boardid%>" name=boardid>
<TR align=middle>
<Th height=25 width=32 id=tabletitlelink><a href="list.asp?boardid=<%=boardid%>&page=<%=request("page")%>&action=batch">選項</a></th>
<Th width=*>主 題</Th>
<Th width=80>作 者</Th>
</TR>
<%
set rs=server.createobject("adodb.recordset")
sql="select rootid from "&NowUseBBS&" where boardid="&boardid&" and ParentID=0 and isAudit=1 order by Announceid desc"
rs.open sql,conn,1,1
if rs.bof and rs.eof then
response.write "<tr><td colSpan=3 width=100% class=tablebody1>暫無審核內容</td></tr>"
rs.close
set rs=nothing
bBoardEmpty = true
else
bBoardEmpty = false
totalrec=rs.recordcount
RS.PageSize=Cint(Forum_Setting(11))
If currentpage <> "" then
currentpage = cint(currentpage)
if currentpage<1 then
currentpage = 1
end if
else
currentpage = 1
End if
if currentpage*Cint(Forum_Setting(11))>totalrec and not((currentpage-1)*Cint(Forum_Setting(11))<totalrec)then currentPage=1
Rs.AbsolutePage = currentpage
announceIDRange1=rs(0)
rs.move Cint(Forum_Setting(11))-1
if rs.EOF then rs.movelast
announceIDRange2=rs(0)
rs.close
set rs=nothing
end if
if not bBoardEmpty then
sql="select AnnounceID,boardID,UserName,Topic,DateAndTime,RootID,layer,orders,Expression,body,PostUserID,locktopic from "&NowUseBBS&" where BoardID=" & boardID & " and ( rootID >= " & announceIDRange2 & " and rootID <=" & announceIDRange1 & ") order by RootID desc,Orders"
'response.write sql
set rs=conn.execute(sql)
do while not rs.eof
page_count=page_count+1
if rs("layer")= 1 then
tableclass="tablebody1"
else
tableclass="tablebody2"
end if
response.write "<TR align=middle><TD class=tablebody2 width=32 height=27 class="&tableclass&">"
if rs("locktopic")=3 then
response.write "<input type=checkbox name=Announceid value="""&rs("Announceid")&""">"
else
response.write " "
end if
response.write "</TD><TD align=left class=tablebody1 width=* class="&tableclass&">"
if rs("layer")>1 then
for i=2 to rs("layer")
response.write " "
next
end if
response.write "<img src=face/"&rs("Expression")&"> "
response.write "<a href='dispbbs.asp?action=dispaudit&boardID="&boardID&"&ID="&cstr(rs("RootID"))&"&replyID="&Cstr(rs("announceID"))&"&skin=1'>"
if rs("topic")="" or isnull(rs("topic")) then
if len(rs("body"))>50 then
response.write htmlencode(replace(left(rs("body"),50),chr(10),""))
else
response.write htmlencode(replace(rs("body"),chr(10),""))
end if
else
if len(rs("Topic"))>50 then
response.write htmlencode(left(rs("Topic"),50))
else
response.write htmlencode(rs("Topic"))
end if
end if
response.write " ("&rs("dateandtime")&")</TD>"
response.write "<TD class=tablebody2 width=80 class="&tableclass&"><a href=""dispuser.asp?id="& rs("postuserid") &""" target=_blank>"& htmlencode(rs("username")) &"</a></TD>"
response.write "</TR>"
rs.movenext
loop
end if
set rs=nothing
if totalrec mod Forum_Setting(11)=0 then
n= totalrec \ Forum_Setting(11)
else
n= totalrec \ Forum_Setting(11)+1
end if
if currentpage-1 mod 10=0 then
p=(currentpage-1) \ 10
else
p=(currentpage-1) \ 10
end if
dim pagelist,pagelistbit
%>
<TR align=middle>
<Td height=25 class=tablebody2 colspan=3> 請選擇要操作的內容:<input name="actiontype" value="1" type=radio checked>通過審核 <input name="actiontype" value="2" type=radio>刪除帖子 <input name=submit value="執行" type=submit onclick="{if(confirm('您確定執行的操作嗎?')){this.document.batch.submit();return true;}return false;}"></Td>
</TR>
</table>
<table border=0 cellpadding=0 cellspacing=3 width="<%=Forum_body(12)%>" align="center">
</form>
<form method=post action="admin_topiclist.asp">
<input type=hidden name=selTimeLimit value='<%= request("selTimeLimit") %>'><tr>
<td valign=middle>頁次:<b><%= currentPage %></b>/<b><%= n %></b>頁 每頁<b><%= Forum_Setting(11) %></b> 主題數<b><%= totalrec %></b></td>
<td valign=middle><div align=right >分頁:
<%
if currentPage=1 then
response.write "<font face=webdings color="&Forum_body(8)&">9</font> "
else
response.write "<a href='?boardid="&boardid&"&page=1&selTimeLimit="&request("selTimeLimit")&"&action="&request("action")&"' title=首頁><font face=webdings>9</font></a> "
end if
if p*10>0 then response.write "<a href='?boardid="&boardid&"&page="&Cstr(p*10)&"&selTimeLimit="&request("selTimeLimit")&"&action="&request("action")&"' title=上十頁><font face=webdings>7</font></a> "
response.write "<b>"
for ii=p*10+1 to P*10+10
if ii=currentPage then
response.write "<font color="&Forum_body(8)&">"+Cstr(ii)+"</font> "
else
response.write "<a href='?boardid="&boardid&"&page="&Cstr(ii)&"&selTimeLimit="&request("selTimeLimit")&"&action="&request("action")&"'>"+Cstr(ii)+"</a> "
end if
if ii=n then exit for
'p=p+1
next
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -