⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_topiclist.asp

📁 功能强大的一个b/s工作站
💻 ASP
📖 第 1 页 / 共 2 页
字号:
	end if
%>
转到:<input type=text name=Page size=3 maxlength=10  value='<%= currentpage %>'><input type=submit value=Go name=submit>
</div></td></tr>
<input type=hidden name=BoardID value='<%= BoardID %>'>
</form></table>

<table border=0 cellpadding=0 cellspacing=3 width="<%=Forum_body(12)%>" align=center>
<tr>
<FORM METHOD=POST ACTION="queryresult.asp?boardid=<%=boardid%>&sType=2&SearchDate=30&pSearch=1">
<td width=50% valign=middle nowrap height=40>
快速搜索:<input type=text name="keyword">&nbsp;<input type=submit name=submit value="搜索">
</td>
</FORM>
<td valign=middle nowrap width=50%> <div align=right>
<select onchange="if(this.options[this.selectedIndex].value!=''){location=this.options[this.selectedIndex].value;}">
<option selected>跳转论坛至...</option>
<%
set rs=conn.execute("select boardid,boardtype,depth from board order by rootid,orders")
do while not rs.EOF
response.write "<option value=""list.asp?boardid="&rs(0)&""" "
if boardid=rs(0) then
response.write "selected"
end if
response.write ">"
if rs(2)>0 then
for i=1 to rs(2)
response.write "-"
next
end if
response.write rs(1)&"</option>"
rs.MoveNext
loop
set rs=nothing

response.write "</select><div></td></tr></table>"

end sub

sub freetopic()
if request.form("announceid")="" then
	founderr=true
	Errmsg=Errmsg+"<br>"+"<li>请指定相关帖子。"
	exit sub
end if
Dim id,trs,ars
Dim FoundID,MyID
dim bbsnum,topicnum,todaynum
dim haveaudit
bbsnum=0
topicnum=0
todaynum=0
for i=1 to request.form("Announceid").count
	ID=replace(request.form("Announceid")(i),"'","")
	if request("actiontype")=2 then
		set rs=conn.execute("select rootid from "&NowUsebbs&" where parentid=0 and Announceid="&id)
		if not (rs.eof and rs.bof) then
			conn.execute("delete from topic where topicid="&rs(0))
			conn.execute("delete from "&NowUseBBS&" where rootid="&rs(0))
			FoundID=rs(0)
		else
			conn.execute("delete from "&NowUseBBS&" where Announceid="&id)
			FoundID=0
		end if
		if FoundID>0 then
			set rs=conn.execute("select count(*) from "&NowUsebbs&" where isaudit=1 and not parentid=0 and rootid="&FoundID)
			MyID=rs(0)
			if isnull(MyID) then MyID=0
			if MyID=0 then
			conn.execute("update "&NowUsebbs&" set isaudit=0 where parentid=0 and rootid="&FoundID)
			end if
		end if
	elseif cint(request("actiontype"))=1 then
		set rs=conn.execute("select rootid,dateandtime,PostUserID from "&NowUsebbs&" where parentid=0 and Announceid="&id)
		if not (rs.eof and rs.bof) then
			bbsnum=bbsnum+1
			topicnum=topicnum+1
			if datediff("d",rs(1),Now())=0 then todaynum=todaynum+1
			conn.execute("update topic set locktopic=0 where topicid="&rs(0))
			conn.execute("update "&NowUseBBS&" set locktopic=0,isaudit=0 where Announceid="&id)
			conn.execute("update [user] set article=article+1,userWealth=userWealth+"&Forum_user(2)&",UserEP=UserEP+"&Forum_user(7)&",UserCP=UserCP+"&Forum_user(12)&" where userid="&rs(2))
			set ars=conn.execute("select count(*) from "&NowUseBBS&" where locktopic=3 and rootid="&rs(0))
			haveaudit=ars(0)
			if isnull(haveaudit) or haveaudit=0 then conn.execute("update "&NowUseBBS&" set isaudit=0 where rootid="&rs(0))
		else
			set trs=conn.execute("select rootid,dateandtime,PostUserID from "&NowUseBBS&" where Announceid="&id)
			if not (trs.eof and trs.bof) then
			'更新主题最后回复数据和回复数
			bbsnum=bbsnum+1
			topicnum=topicnum+1
			if datediff("d",trs(1),Now())=0 then todaynum=todaynum+1
			conn.execute("update "&NowUseBBS&" set locktopic=0,isaudit=0 where Announceid="&id)
			conn.execute("update [user] set article=article+1,userWealth=userWealth+"&Forum_user(2)&",UserEP=UserEP+"&Forum_user(7)&",UserCP=UserCP+"&Forum_user(12)&" where userid="&trs(2))
			set ars=conn.execute("select count(*) from "&NowUseBBS&" where locktopic=3 and rootid="&trs(0))
			haveaudit=ars(0)
			if isnull(haveaudit) or haveaudit=0 then conn.execute("update "&NowUseBBS&" set isaudit=0 where rootid="&trs(0))
			IsEndReply(trs(0))
			end if
		end if
	end if
next
set rs=nothing
'更新论坛总数据和版面数据
if cint(request("actiontype"))=1 then
	update boardid,bbsnum,topicnum,todaynum
end if
sucmsg="<br><li>操作成功!"
call dvbbs_suc()
end sub

function IsEndReply(TopicID)
isEndReply=false
dim trs
dim LastPostInfo,iTotalUseTable
dim LastTopic,body,LastRootid,LastPostTime,LastPostUser
dim LastPost,uploadpic_n,LastPostUserID,LastID
set trs=conn.execute("select LastPost,PostTable from Topic where Topicid="&Topicid)
if not (trs.eof and trs.bof) then
	LastPostInfo=split(trs(0),"$")
	iTotalUseTable=trs(1)
end if
set trs=conn.execute("select top 1 topic,body,Announceid,dateandtime,username,PostUserid,rootid from "&iTotalUseTable&" where rootid="&TopicID&" and locktopic<2 order by Announceid desc")
if not(trs.eof and trs.bof) then
	body=trs(1)
	LastRootid=trs(2)
	LastPostTime=trs(3)
	LastPostUser=replace(trs(4),"$","")
	LastTopic=left(replace(body,"$",""),20)
	LastPostUserID=trs(5)
	LastID=trs(6)
else
	LastTopic="无"
	LastRootid=0
	LastPostTime=now()
	LastPostUser="无"
	LastPostUserID=0
	LastID=0
end if
LastPost=LastPostUser & "$" & LastRootid & "$" & LastPostTime & "$" & replace(left(replace(LastTopic,"'",""),20),"$","") & "$" & LastPostInfo(4) & "$" & LastPostUserID & "$" & LastID & "$" & BoardID
conn.execute("update topic set LastPost='"&LastPost&"',child=child+1,LastPostTime='"&LastPostTime&"' where topicid="&TopicID)
set trs=nothing
end function


'更新论坛总数据和版面数据
function update(boardid,bbsnum,topicnum,todaynum)
dim lastpost_1,trs
dim LastTopic,LastRootid,LastPostTime,LastPostUser
dim LastPost,uploadpic_n,Lastpostuserid,Lastid
dim UpdateBoardID
'本论坛和上级论坛ID
UpdateBoardID=BoardParentStr & "," & BoardID
'版面最后回复数据
set trs=conn.execute("select top 1 T.title,b.Announceid,b.dateandtime,b.username,b.postuserid,b.rootid from "&NowUseBBS&" b inner join Topic T on b.rootid=T.TopicID where b.boardid="&boardid&" and b.locktopic<2 order by b.announceid desc")
if not(trs.eof and trs.bof) then
	Lasttopic=replace(left(replace(trs(0),"'",""),15),"$","")
	LastRootid=trs(1)
	LastPostTime=trs(2)
	LastPostUser=trs(3)
	LastPostUserid=trs(4)
	Lastid=trs(5)
else
	LastTopic="无"
	LastRootid=0
	LastPostTime=now()
	LastPostUser="无"
	LastPostUserid=0
	Lastid=0
end if
set trs=nothing
LastPost=LastPostUser & "$" & LastRootid & "$" & LastPostTime & "$" & LastTopic & "$" & uploadpic_n & "$" & LastPostUserID & "$" & LastID & "$" & BoardID
'总版面最后回复数据
set trs=conn.execute("select top 1 T.title,b.Announceid,b.dateandtime,b.username,b.postuserid,b.rootid from "&NowUseBBS&" b inner join Topic T on b.rootid=T.TopicID where b.locktopic<2 order by b.announceid desc")
if not(trs.eof and trs.bof) then
	Lasttopic=replace(left(replace(trs(0),"'",""),15),"$","")
	LastRootid=trs(1)
	LastPostTime=trs(2)
	LastPostUser=trs(3)
	LastPostUserid=trs(4)
	Lastid=trs(5)
else
	LastTopic="无"
	LastRootid=0
	LastPostTime=now()
	LastPostUser="无"
	LastPostUserid=0
	Lastid=0
end if
LastPost_1=LastPostUser & "$" & LastRootid & "$" & LastPostTime & "$" & LastTopic & "$" & uploadpic_n & "$" & LastPostUserID & "$" & LastID & "$" & BoardID

Dim SplitUpBoardID,SplitLastPost
SplitUpBoardID=split(UpdateBoardID,",")
For i=0 to ubound(SplitUpBoardID)
	set trs=conn.execute("select LastPost from board where boardid="&SplitUpBoardID(i))
	if not (trs.eof and trs.bof) then
	SplitLastPost=split(trs(0),"$")
	if isnull(SplitLastPost(1)) then SplitLastPost(1)=0
	if ubound(SplitLastPost)=7 and clng(LastRootID)<>clng(SplitLastPost(1)) then
		conn.execute("update board set LastPost='"&LastPost&"' where boardid="&SplitUpBoardID(i))
	end if
	end if
Next
conn.execute("update board set  LastBbsNum=Lastbbsnum+"&bbsnum&",LastTopicNum=LastTopicNum+"&TopicNum&",TodayNum=TodayNum+"&todaynum&" where boardid in ("&UpdateBoardID&")")
conn.execute("update config set  BbsNum=bbsnum+"&bbsnum&",TopicNum=TopicNum+"&TopicNum&",TodayNum=TodayNum+"&todaynum&",LastPost='"&LastPost_1&"' where active=1")
set trs=nothing
end function
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -