📄 delpost.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.
'****************************************************************
postID = trim(request.QueryString("postID"))
if Not(IsNumeric(postID)) or postID = "0" then
response.Write("<META HTTP-EQUIV='REFRESH' CONTENT='0; URL="&BBSHomeUrl&"'>")
response.End()
else
set rs = Conn.ExeCute("select JBB_thread.thread_title,JBB_thread.pollid,JBB_thread.Board_ID,JBB_post.threadID,JBB_post.posttitle,JBB_post.postcontent,JBB_post.user_id,JBB_post.user_name,JBB_post.beginpost from JBB_thread left JOIN JBB_post on(JBB_post.threadID=JBB_thread.threadID) where JBB_post.postID="&postID)
if Not rs.eof then
threadID = rs("threadID")
posttitle = rs("posttitle")
postcontent = rs("postcontent")
postuserid = trim(rs("user_id"))
poster = trim(rs("user_name"))
pollid= trim(rs("pollid"))
if rs("beginpost") then beginpost = true
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
set rs = Nothing
response.Write("<META HTTP-EQUIV='REFRESH' CONTENT='0; URL="&BBSHomeUrl&"'>")
response.End()
End if
set rs = Nothing
End if
%>
<!--#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)&" - "& Board_Config(2) &" - 删除贴子"%></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""> 删除贴子:"&posttitle
response.Write "</td></tr></table>"
if Board_Config(17) = True or Board_Config(18) = True then
if usergroup <= 4 then
enter = true
End if
else
enter = true
End if
'-----------------------------------------------
if beginpost = true then
b = true
beginpost = " and Mod_del_ferstPost=yes"
beginpost2 = " and delthread=yes"
End if
'-----------------------------------------------
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_edit_post=yes"&beginpost)
if Not rs.eof then
delpost = true
End if
set rs = nothing
elseif usergroup = 3 then
set rs = Conn.ExeCute("select Mod_del_post from JBB_Mod where Mod_nameID="&userid &" and Mod_del_post=yes and Mod_stop=0 and Mod_BoardID="&BoardID&beginpost)
if Not(rs.eof and rs.bof) then
delpost = true
End if
set rs = nothing
End if
'------------------------------------------------
if user_group(12)=True and b<>True and userid=postuserid then delpost = true
if user_group(15)=True and user_group(12)=True and b=True and userid=postuserid then delpost = true
'------------------------------------------------
'response.Write(userid&"<br>"&postuserid)
'response.Write(delpost&"-"&enter)
if delpost <> true or enter <> true then
loginform "对不起,您不可以删除此贴子或者您还没有登录,点击 <a href=""javascript:history.back()"">这里</a> 返回<br>"
Call Bottom()
response.End()
End if
'-----------------------------------------
action = trim(request.QueryString("action"))
if action = "del" then
if postuserid <> userid then
poster_1 = " /作者:"&poster
delR = replace(trim(request.Form("delR")),"'","''")
Cent = replace(trim(request.Form("Cent")),"-","")
Cent = replace(Cent,"+","")
if Cent <> "" then
xCent = " /扣除作者论坛积分"&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> 返回"
Call Bottom()
response.End()
else
delR = "原因:"&delR
End if
End if
if b = true then
conn.ExeCute("delete from JBB_thread where threadID="&threadID)
conn.ExeCute("delete from JBB_post where threadID="&threadID)
else
conn.ExeCute("delete from JBB_post where postID="&postID)
End if
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_thread set replycount=replycount-1 where threadID="&threadID)
if xCent <> "" then
Conn.ExeCute("update JBB_user set Cent=Cent-"&Cent&" where userid="&postuserid)
End if
Conn.ExeCute("insert into JBB_log(userid,username,reason,logC,logtime,logIP,oldcontent) values("& userid &",'"& username &"','"& delR & xCent &"','删除贴子:"& posttitle & poster_1 &"','"& Now() &"','"& userip &"','"& postcontent &"')")
ShowMsg "删除贴子完毕,系统正在返回主题列表,如果您不想等待,请点击 <a href=""Board.asp?BoardID="& BoardID &""">这里</a>."
response.Write("<META HTTP-EQUIV='REFRESH' CONTENT='2; URL=Board.asp?BoardID="& BoardID &"'>")
else
%>
<br>
<br>
<form name="form1" method="post" action="?action=del&postid=<%=postid%>">
<table width="566" border="0" align="center" cellpadding="4" cellspacing="1" class="table">
<tr class="table-title">
<td> <div align="center">删除贴子:<%=posttitle%></div></td>
</tr>
<tr class="table-light">
<td height="38" class="table-light"> <div align="center">您确定删除此贴子吗?如果此贴为主题开头贴,这将会使此主题所有的跟贴一并删除!</div></td>
</tr>
<%
if postuserid <> userid then
%>
<tr class="table-light">
<td height="28" 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="delR2" 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>
<%
end if
%>
<tr class="table-light">
<td><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>
<%
End if
'--------------------------------------
Call Bottom()
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -