📄 move.asp
字号:
<% Option Explicit %>
<!--#include file="conn.asp" -->
<%
Response.Buffer = True
Dim lngTopicID
Dim intForumID
Dim strSubject
Dim lngOldTopicID
Dim lngPostID
Dim strPostDateTime
If bannedIP() Then
Set rsConn = Nothing
adoCon.Close
Set adoCon = Nothing
Response.Redirect("nopermission.asp?M=IP")
End If
lngPostID = CLng(Request.Form("pid"))
strSQL = "SELECT timestopic.bbsid, timestopic.topicid, timespost.msgdtm "
strSQL = strSQL & "FROM timestopic, timespost "
strSQL = strSQL & "WHERE timestopic.topicid = timespost.topicid AND timespost.postid = " & lngPostID & ";"
rsConn.Open strSQL, adoCon
If NOT rsConn.EOF Then
intForumID = CInt(rsConn("bbsid"))
lngOldTopicID = CLng(rsConn("topicid"))
strPostDateTime = CDate(rsConn("msgdtm"))
End If
rsConn.Close
If blnAdmin = False Then blnModerator = isModerator(intForumID, intGroupID)
If blnAdmin = False AND blnModerator = False Then
Set rsConn = Nothing
adoCon.Close
Set adoCon = Nothing
Response.Redirect("index.asp")
Else
lngTopicID = CLng(Request.Form("topicSelect"))
intForumID = CInt(Request.Form("tofid"))
strSubject = Request.Form("subject")
If strSubject <> "" Then
strSubject = removeAllTags(strSubject)
strSubject = formatInput(strSubject)
strSQL = "SELECT TOP 1 timestopic.* FROM timestopic "
strSQL = strSQL & "WHERE bbsid =" & intForumID & " "
strSQL = strSQL & "ORDER By timestopic.topicid DESC;"
With rsConn
.CursorType = 2
.LockType = 3
.Open strSQL, adoCon
.AddNew
.Fields("bbsid") = intForumID
.Fields("Subject") = strSubject
.Fields("startdtm") = strPostDateTime
.Fields("lastdtm") = strPostDateTime
.Fields("pollid") = 0
.Fields("Priority") = 0
.Update
.Requery
.MoveLast
lngTopicID = CLng(rsConn("topicid"))
.Close
End With
End If
strSQL = "SELECT timespost.topicid FROM timespost WHERE postid =" & lngPostID & ";"
With rsConn
.CursorType = 2
.LockType = 3
.Open strSQL, adoCon
If NOT .EOF Then
.Fields("topicid") = lngTopicID
End If
.Update
.Requery
.Close
strSQL = "SELECT TOP 1 timespost.postid FROM timespost WHERE topicid =" & lngOldTopicID & ";"
.Open strSQL, adoCon
If .EOF Then
strSQL = "DELETE FROM timestopic WHERE topicid=" & lngOldTopicID & ";"
adoCon.Execute(strSQL)
End If
.Close
End With
End If
Set rsConn = Nothing
adoCon.Close
Set adoCon = Nothing
%>
<html>
<head>
<script language="JavaScript">
window.opener.location.href = "post.asp?tid=<% = lngTopicID %>"
window.close();
</script>
</head>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -