📄 putopicadmin.asp
字号:
<% Option Explicit %>
<!--#include file="conn.asp" -->
<%
Response.Buffer = True
Dim rsSelectForum
Dim lngTopicID
Dim intForumID
Dim intNewForumID
Dim strSubject
Dim intTopicPriority
Dim blnLockedStatus
Dim strCatName
Dim intBoardID
Dim strForumName
Dim lngfid
Dim lngPollID
lngTopicID = CLng(Request("tid"))
If lngTopicID = "" Then
Set rsConn = Nothing
adoCon.Close
Set adoCon = Nothing
Response.Redirect("index.asp")
End If
strSQL = "SELECT timestopic.* "
strSQL = strSQL & "FROM timestopic "
strSQL = strSQL & "WHERE timestopic.topicid = " & lngTopicID & ";"
rsConn.CursorType = 2
rsConn.LockType = 3
rsConn.Open strSQL, adoCon
If NOT rsConn.EOF Then
intForumID = CInt(rsConn("bbsid"))
End If
If blnAdmin = False Then blnModerator = isModerator(intForumID, intGroupID)
If Request.Form("postBack") Then
strSubject = Trim(Mid(Request.Form("subject"), 1, 41))
intTopicPriority = CInt(Request.Form("priority"))
blnLockedStatus = CBool(Request.Form("locked"))
intNewForumID = CInt(Request.Form("forum"))
strSubject = removeAllTags(strSubject)
strSubject = formatInput(strSubject)
With rsConn
If intNewForumID <> 0 Then .Fields("bbsid") = intNewForumID
If intNewForumID <> 0 AND intNewForumID <> intForumID Then .Fields("moved") = intForumID
.Fields("Subject") = strSubject
.Fields("Priority") = intTopicPriority
.Fields("Locked") = blnLockedStatus
.Update
.ReQuery
updateTopicPostCount(intForumID)
End With
End If
%>
<html>
<head>
<title>主题管理</title>
<script language="JavaScript">
function CheckForm () {
var errorMsg = "";
if (document.frmTopicAdmin.subject.value==""){
errorMsg += "\n\t贴子 \t- 为你的新贴子定一个主题";
}
if (errorMsg != ""){
msg = "_______________________________________________________________\n\n";
msg += "表单不完整,请填写完全\n";
msg += "请修正后再发表\n";
msg += "_______________________________________________________________\n\n";
msg += "以下区域需要修改:\n";
errorMsg += alert(msg + errorMsg + "\n\n");
return false;
}
return true;
}
</script>
<!--#include file="includes/skin.asp" -->
</head>
<body bgcolor="<% = strBgColour %>" text="<% = strTextColour %>" background="<% = strBgImage %>" marginheight="0" marginwidth="0" topmargin="0" leftmargin="0" OnLoad="self.focus();">
<div align="center" class="heading"><p> </p>
</div>
<br /><%
If rsConn.EOF OR (blnAdmin = False AND blnModerator = False) OR bannedIP() Then
rsConn.Close %>
<div align="center">
<span class="lgText">没有找到相关主题或访问被拒绝</span><br /><br /><br />
</div>
<% Else
intForumID = CInt(rsConn("bbsid"))
strSubject = rsConn("Subject")
intTopicPriority = CInt(rsConn("Priority"))
blnLockedStatus = CBool(rsConn("Locked"))
lngPollID = CLng(rsConn("pollid"))
rsConn.Close
%>
<form name="frmTopicAdmin" method="post" action="putopicadmin.asp" onSubmit="return CheckForm();" onReset="return confirm('你确认要重新填写此表单?');">
<table border="0" align="center" cellpadding="0" cellspacing="1" width="350" bgcolor="<% = strTableBgColour %>">
<tr height="25" align="center" class="text">
<td colspan="2" background="<% = strTableTitleBgImage %>" >管理主题</td>
</tr>
<tr bgcolor="#ffffff" class="text">
<td align="right">主 题:</td>
<td ><input type="text" name="subject" size="30" maxlength="41" value="<% = strSubject %>"/></td>
</tr>
<tr bgcolor="<% = strTableColour %>" class="text">
<td align="right">优先级:</td>
<td ><select name="priority">
<option value="0"<% If intTopicPriority = 0 Then Response.Write(" selected") %>>一般主题</option>
<option value="1"<% If intTopicPriority = 1 Then Response.Write(" selected") %>>置顶主题</option>
<option value="2"<% If intTopicPriority = 2 Then Response.Write(" selected") %>>顶端(此论坛)</option><%
If blnAdmin = True Then %>
<option value="3"<% If intTopicPriority = 3 Then Response.Write(" selected") %>>顶端(所有论坛)</option><%
End If
%>
</select></td>
</tr>
<tr bgcolor="#ffffff" >
<td align="right" class="text">锁定主题:</td>
<td><input type="checkbox" name="locked" value="true" <% If blnLockedStatus = True Then Response.Write(" checked") %> /></td>
</tr>
<tr bgcolor="#ffffff" >
<td align="right" class="text">移动主题:</td>
<td><select name="forum">
<%
Set rsSelectForum = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT timesboard.boardname, timesboard.boardid FROM timesboard ORDER BY timesboard.boardnum ASC;"
rsConn.Open strSQL, adoCon
Do while NOT rsConn.EOF
strCatName = rsConn("boardname")
intBoardID = Cint(rsConn("boardid"))
Response.Write vbCrLf & " <option value=""0"">" & strCatName & "</option>"
strSQL = "SELECT timesbbs.bbsname, timesbbs.bbsid FROM timesbbs WHERE timesbbs.boardid = " & intBoardID & " ORDER BY timesbbs.bbsnum ASC;"
rsSelectForum.Open strSQL, adoCon
Do while NOT rsSelectForum.EOF
strForumName = rsSelectForum("bbsname")
lngfid = CLng(rsSelectForum("bbsid"))
Response.Write vbCrLf & " <option value=""" & lngfid & """"
If CInt(Request.QueryString("fid")) = lngfid OR intForumID = lngfid Then Response.Write " selected"
Response.Write "> - " & strForumName & "</option>"
rsSelectForum.MoveNext
Loop
rsSelectForum.Close
rsConn.MoveNext
Loop
rsConn.Close
Set rsSelectForum = Nothing
Set rsConn = Nothing
adoCon.Close
Set adoCon = Nothing
%>
</select></td>
</tr><%
If lngPollID <> 0 Then
%>
<tr bgcolor="#ffffff">
<td align="right" class="text">投票</td>
<td><a href="delpoll.asp?tid=<% = lngTopicID %>" onClick="return confirm('你确定要删除此投票');">删除投票</a></td>
</tr><%
End If
%>
<tr bgcolor="#ffffff" align="center">
<td valign="top" colspan="2">
<input type="hidden" name="tid" value="<% = lngTopicID %>" />
<input type="hidden" name="postBack" value="true" />
<input type="submit" name="Submit" value="更新" />
<input type="reset" name="Reset" value="复原" />
</td>
</tr>
</table>
</form>
<form name="frmDeleteTopic" method="post" action="deltopic.asp" OnSubmit="return confirm('你确认删除此主题?')">
<table width="96%" border="0" cellspacing="0" cellpadding="1" align="center">
<tr>
<td align="center">
<input type="hidden" name="tid" value="<% = lngTopicID %>" />
<input type="submit" name="Submit" value="删除主题" />
</td>
</tr>
</table>
</form><br /><%
End If
%>
<table width="96%" border="0" cellspacing="0" cellpadding="1" align="center">
<tr>
<td align="center">
<a href="JavaScript:onClick=window.opener.location.href = window.opener.location.href; window.close();">关闭窗口</a>
</td>
</tr>
</table>
<br /><br />
<!-- #include file="includes/footer.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -