📄 postedit.asp
字号:
<% Option Explicit %>
<!-- #include file="includes/header.asp" -->
<!--#include file="functions/editpost.asp" -->
<!--#include file="includes/emoticons.asp" -->
<%
Response.Buffer = True
Dim strMode
Dim intForumID
Dim lngTopicID
Dim strTopicSubject
Dim intTopicPriority
Dim lngMessageID
Dim lngPostUserID
Dim blnForumLocked
Dim blnEmailNotify
Dim strPostPage
Dim intRecordPositionPageNum
Dim strMessage
Dim strForumName
Dim intIndexPosition
Dim intNumberOfOuterLoops
Dim intLoop
Dim intInnerLoop
If bannedIP() Then
Set rsConn = Nothing
adoCon.Close
Set adoCon = Nothing
Response.Redirect("nopermission.asp?M=IP")
End If
lngMessageID = CLng(Request.QueryString("pid"))
intRecordPositionPageNum = Request.QueryString("tpn")
strMode = "edit"
strSQL = "SELECT timestopic.topicid, timestopic.bbsid, timestopic.Subject, timestopic.Priority, timestopic.startdtm, timestopic.Locked, timespost.userid, timespost.Message, timespost.msgdtm "
strSQL = strSQL & "FROM timestopic, timespost "
strSQL = strSQL & "WHERE timestopic.topicid = timespost.topicid AND timespost.postid=" & lngMessageID & ";"
rsConn.Open strSQL, adoCon
lngTopicID = CLng(rsConn("topicid"))
intForumID = CInt(rsConn("bbsid"))
strMessage = rsConn("Message")
lngPostUserID = CLng(rsConn("userid"))
strTopicSubject = rsConn("Subject")
intTopicPriority = CInt(rsConn("Priority"))
If blnForumLocked = False Then blnForumLocked = CBool(rsConn("Locked"))
strMessage = EditPostConvertion(strMessage)
If rsConn("startdtm") = rsConn("msgdtm") Then strMode = "editTopic"
rsConn.Close
strSQL = "SELECT timesbbs.* FROM timesbbs WHERE bbsid = " & intForumID & ";"
rsConn.Open strSQL, adoCon
If NOT rsConn.EOF Then
blnForumLocked = CBool(rsConn("Locked"))
strForumName = rsConn("bbsname")
Call forumPermisisons(intForumID, intGroupID, CInt(rsConn("Read")), CInt(rsConn("Post")), CInt(rsConn("replypost")), CInt(rsConn("editpost")), CInt(rsConn("delpost")), CInt(rsConn("toppost")), CInt(rsConn("addpoll")), CInt(rsConn("Vote")), CInt(rsConn("Attachments")), CInt(rsConn("imgup")))
End If
If (blnRead = False AND blnModerator = False AND blnAdmin = False) Then blnForumLocked = True
rsConn.Close
%>
<title>编辑回复</title>
<script language="JavaScript">
function CheckForm () {
var errorMsg = "";
if (document.frmAddMessage.message.value==""){
errorMsg += "\n\t贴子\t- 输入贴子内容后发送";
}
if (errorMsg != ""){
msg = "\n\t贴子\t- 输入贴子内容后发送\n\n";
msg += "表单不完整,请填写完全\n";
msg += "请修正后再发表\n";
msg += "以下区域需要修改\n\n";
msg += "你确认要重新填写此表单?\n";
errorMsg += alert(msg + errorMsg + "\n\n");
return false;
}
document.frmAddMessage.action = "postmess.asp?pn=<% = Request.QueryString("pn") %>"
document.frmAddMessage.target = "_self";
return true;
}
// -->
</script>
<table width="96%" border="0" cellspacing="0" cellpadding="3" align="center">
<tr>
<td align="left" width="71%" class="bold"><img src="images/open.gif" border="0" align="absmiddle"> <a href="index.asp" target="_self" class="boldLink"><% = strMainForumName %></a><% = strNavSpacer %><% Response.Write ("<a href=""topic.asp?fid=" & intForumID & """ target=""_self"" class=""boldLink"">" & strForumName & "</a>" & strNavSpacer) %><a href="postedit.asp" target="_self" class="boldLink">编辑回复</a><br /></td>
</tr>
</table>
<%
Set rsConn = Nothing
adoCon.Close
Set adoCon = Nothing
If (lngLoggedInUserID = lngPostUserID OR blnAdmin OR blnModerator) AND (blnActiveMember) AND (blnForumLocked = False OR blnAdmin) AND (blnEdit OR blnAdmin) Then
If IEWin = True AND blnIEEditor = True AND blnWYsiWYGEditor = True Then
%><!--#include file="includes/repost.asp" --><%
Else
%><!--#include file="includes/message.asp" --><%
End If
%>
<br />
<%
ElseIf blnForumLocked = True Then %>
<div align="center"><br /><br /><br /><span class="text">对不起, 论坛被管理员锁定</span><br /><br /><br /><br /><br /></div>
<% Else %>
<div align="center"><br /><br /><br /><span class="text">你没有编辑此帖的权限</span><br /><br />
<a href="javascript:history.back(1)" target="_self">回到论坛主题</a><br /><br /><br /><br /></div>
<% End If %>
<br /> <br />
<!-- #include file="includes/footer.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -