?? 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
'*
'* 版權(quán)所有: 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 "扣除作者積分數(shù)只能是數(shù)字,點擊 <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 "刪除貼子完畢,系統(tǒng)正在返回主題列表,如果您不想等待,請點擊 <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 + -