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

📄 delthread.asp

📁 BBS论坛的开发和设计
💻 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.
'****************************************************************

threadid = trim(request.QueryString("threadid"))
if Not(IsNumeric(threadid)) or threadid = "0" then
	response.Write("<META HTTP-EQUIV='REFRESH' CONTENT='0; URL="&BBSHomeUrl&"'>")
	response.End()
End if
	set rs = Conn.ExeCute("select thread_title,pollid,postuserid,postusername,Board_ID From JBB_thread where threadID="&threadID)
	if Not rs.eof then
		thread_title = rtrim(rs("thread_title"))
		pollid = trim(rs("pollid"))
		postuserid = trim(rs("postuserid"))
		poster = trim(rs("postusername"))
		BoardID = rs("Board_ID")
		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"-->
<%
		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
	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"">&nbsp;<a href="""&BBSHomeUrl&""">"& BBS_Config(0) &"</a>&nbsp;<img src="""& BBS_Skin(3) &"JBB_bullet.gif"">&nbsp;<a href=""board.asp?BoardID="& BoardID &""">"& Board_Config(2) &"</a>&nbsp;<img src="""& BBS_Skin(3) &"JBB_bullet.gif"">&nbsp;删除主题:<a href=""showthread.asp?threadID="& threadID &"""><strong>"& thread_title &"</strong></a>"
response.Write "</td></tr></table>"

if usergroup = 1 then
	delpost = true
elseif usergroup = 2 then
	set rs = Conn.ExeCute("select Mod_del_post from JBB_Mod where Mod_nameID="&userid &" and Mod_stop=0 and Mod_del_ferstPost=yes")
	if Not rs.eof then
		if rs("Mod_del_post") then delpost = true
	End if
	set rs = nothing
elseif usergroup = 3 then	
	set rs = Conn.ExeCute("select Mod_del_post,Mod_BoardID from JBB_Mod where Mod_nameID="&userid &" and Mod_del_ferstPost=yes and Mod_stop=0 and Mod_BoardID="&BoardID)
	if Not rs.eof then
		if rs("Mod_del_post") 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")),"'","''")
	Cent = replace(trim(request.Form("Cent")),"-","")
	Cent = replace(Cent,"+","")
		if Cent <> "" then
			xCent = "&nbsp;/扣除作者论坛积分"&Cent
			if Not(IsNumeric(Cent)) then
				ShowMsg "扣除作者积分数只能是数字,点击 <a href=""javascript:history.back()"">这里</a> 返回"
				Call Bottom()
				response.End()
			end if
		end if
	if delR = "" then
		ShowMsg "请输入您删除贴子理由,点击 <a href=""javascript:history.back()"">这里</a> 返回输入."
	else
		poster_1 = "&nbsp;/作者:"&poster
		Conn.ExeCute("delete From JBB_thread where threadID="&threadID &" or moveid="&threadID)
		Conn.ExeCute("delete From JBB_post where threadID="&threadID)
		if pollid > 0 then
			Conn.ExeCute("delete From JBB_poll where pollid="&pollid)
			Conn.ExeCute("delete From JBB_polluser where pollid="&pollid)
		End if
		Conn.ExeCute("update JBB_user set threadcount=threadcount-1 where userid="&postuserid)
		Conn.ExeCute("insert into JBB_log(userid,username,reason,logC,logtime,logIP) values("& userid &",'"& username &"','"& delR & xCent &"','删除主题:"& thread_title & poster_1 &"','"& Now() &"','"& userip &"')")
		if xCent <> "" then
			Conn.ExeCute("update JBB_user set Cent=Cent-"&Cent&" where userid="&postuserid)
		End if
		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 width="339" 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">请输入删除理由:</font></div></td>
              <td width="65%"><font color="#FF0000"> 
                <input name="delR" type="text" id="delR" size="36">
                * </font></td>
            </tr>
            <tr> 
              <td><div align="right">扣除作者论坛积分:</div></td>
              <td> <input name="Cent" type="text" id="Cent2" size="8" maxlength="2">
              如果不扣请留空,此处只扣除主题作者积分,并不扣除回复作者积分.</td>
            </tr>
          </table>
        </td>
  </tr>
  <tr> 
    <td class="table-title"><div align="center">
            <input type="submit" name="Submit" value="确定删除">
            &nbsp; 
            <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 + -