📄 batdelthread.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="admin/BBSConfig.asp"-->
<!--#include file="INC/online.asp"-->
<!--#include file="INC/ShowMsg.asp"-->
<!--#include file="INC/header.asp"-->
<!--#include file="INC/Board_Config.asp"-->
<%
'****************************************************************
'* joinboard BBS Ver2.3.0/友盟论坛 Ver2.3.0
'*
'* 版权所有: JoinBoard V2.3
'*
'* 程序制作: 友盟工作室
'*
'* 主页地址: http://joinboard.com 友盟论坛
'*
'* 论坛地址: http://bbs.joinboard.com/、http://youmeng.com
'*
'****************************************************************
'* Powered by: JoinBoard V2.3
'* Copyright 2003-2004. - All Rights Reserved.
'* JoinBoard is a trademark of YouMeng Studio.
'****************************************************************
Call checkUrl
threadids = Replace(trim(request.Form("threads"))," ","")
if threadids = "" then
response.Write("<META HTTP-EQUIV='REFRESH' CONTENT='0; URL="&BBSHomeUrl&"'>")
response.End()
End if
set rs = CreateObject("adodb.recordset")
rs.open"select thread_title,Board_ID,pollid,postuserid,postusername From JBB_thread where threadID in("&threadids&")",Conn,1,1
if Not rs.eof then
BoardID = rs("Board_ID")
rs.moveFirst
for t = 1 to rs.recordCount
thread_title = rtrim(rs("thread_title")) &" /作者:"&rtrim(rs("postusername"))
postuserid = rtrim(rs("postuserid"))
pollid = trim(rs("pollid"))
if cint(t) < cint(rs.recordCount) then
thread_titles = thread_titles & thread_title & "<br><hr size=1 width=""90%"">"
pollids = pollids & pollid & ","
postuserids = postuserids & postuserid & ","
else
thread_titles = thread_titles & thread_title
pollids = pollids & pollid
postuserids = postuserids & postuserid
end if
rs.movenext
next
'response.write pollids
Board_info BoardID
Board_Config = Application(JBBMasterCookies&"Board_Config"&BoardID)
title = Board_Config(2)
if Board_Config(6)=true then styleid = Board_Config(5)
else
%>
<!--#include file="INC/style.asp"-->
<%
rs.close
set rs = Nothing
response.Write("<html><head><title>"& BBS_Config(0) &" - 错误信息"&"</title><link href="&Css_path&" rel=""stylesheet"" type=""text/css""></head><body leftmargin=""0"" topmargin=""0"">")
Call top()
ShowMsg "文章不存在或者已经删除!~请点击 <a href=""javascript:history.back()"">这里</a> 返回"
Call bottom()
response.End()
End if
rs.close
set rs = Nothing
%>
<!--#include file="INC/style.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content="joinboard,forum,bbs,youmeng,友盟论坛">
<title><%=BBS_Config(0)&" - 批量删除主题:"&thread_title%></title>
<link href="<%=Css_path%>" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_callJS(jsStr) { //V2.3
return eval(jsStr)
}
//-->
</script>
</head>
<body leftmargin="0" topmargin="0">
<%
Call onlineuser()
call top()
response.Write "<table border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"" class=""path-table"">"
response.Write "<tr><td>"
response.Write "<img src="""& BBS_Skin(3) &"JBB_bullet.gif""> <a href="""&BBSHomeUrl&""">"& BBS_Config(0) &"</a> <img src="""& BBS_Skin(3) &"JBB_bullet.gif""> <a href=""board.asp?BoardID="& BoardID &""">"& Board_Config(2) &"</a> <img src="""& BBS_Skin(3) &"JBB_bullet.gif""> 批量删除主题</a>"
response.Write "</td></tr></table>"
if usergroup = 1 then
delpost = true
elseif usergroup = 2 then
set rs = Conn.ExeCute("select Mod_bat_del from JBB_Mod where Mod_nameID="&userid &" and Mod_stop=0 and Mod_del_ferstPost=1")
if Not rs.eof then
if rs("Mod_bat_del") then delpost = true
End if
set rs = nothing
elseif usergroup = 3 then
set rs = Conn.ExeCute("select Mod_bat_del,Mod_BoardID from JBB_Mod where Mod_nameID="&userid &" and Mod_del_ferstPost=1 and Mod_stop=0 and Mod_BoardID="&BoardID)
if Not rs.eof then
if rs("Mod_bat_del") then delpost = true
End if
set rs = nothing
End if
if delpost <> true then
ShowMsg "您没有权限删除这些贴子或者您还没有登录.请点击 <a href=""javascript:history.back()"">这里</a> 返回~"
Call Bottom()
response.End()
End if
'----------------------------------------------
action = trim(request.QueryString("action"))
if action = "del" then
delR = replace(trim(request.Form("delR")),"'","''")
if delR = "" then
ShowMsg "请输入删除理由,点击 <a href=""javascript:history.back()"">这里</a> 返回输入."
else
Conn.ExeCute("delete From JBB_thread where threadID in("& threadids &") or moveid in("& threadids &")")
Conn.ExeCute("delete From JBB_post where threadID in("& threadids &")")
pollidArr = Split(pollid,",")
For pl = 0 to UBound(pollidArr)
if isNumeric(pollidArr(pl)) then
Conn.ExeCute("delete From JBB_poll where pollid="&pollidArr(pl))
Conn.ExeCute("delete From JBB_polluser where pollid="&pollidArr(pl))
End if
Next
postuserArr = Split(postuserids,",")
For pu = 0 to UBound(postuserArr)
Conn.ExeCute("update JBB_user set threadcount=threadcount-1 where userid ="& postuserArr(pu))
Next
Conn.ExeCute("insert into JBB_log(userid,username,reason,logC,logtime,logIP) values("& userid &",'"& username &"','"& delR & xCent &"','<b>批量删除如下主题</b>:<br><hr size=1 width=""90%"">"& thread_titles &"','"& Now() &"','"& userip &"')")
ShowMsg "删除贴子完毕,系统正在返回主题列表,如果您不想等待,请点击 <a href=""Board.asp?BoardID="& BoardID &""">这里</a>."
response.Write("<META HTTP-EQUIV='REFRESH' CONTENT='2; URL=Board.asp?BoardID="& BoardID &"'>")
End if
else
%>
<form name="form1" method="post" action="?action=del&threadid=<%=threadid%>">
<table border="0" align="center" cellpadding="5" cellspacing="1" class="table">
<tr>
<td class="table-title">
<div align="center"> 以下操作将记录入论坛日志,请输入您删除这些主题的理由! </div></td>
</tr>
<tr>
<td class="table-light">
<table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td width="35%" height="29"> <div align="right"><font color="#FF0000">
<input name="threads" type="hidden" id="threads" value="<%=threadids%>">
请输入删除理由:</font></div></td>
<td width="65%"><font color="#FF0000">
<input name="delR" type="text" id="delR" size="36">
* </font></td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="table-title"><div align="center">
<input type="submit" name="Submit" value="确定删除">
<input name="Submit2" type="button" onClick="MM_callJS('history.back()')" value="返回">
</div></td>
</tr>
</table>
</form>
<br>
<br>
<%
End if
Call Bottom()
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -