📄 active.asp
字号:
<% if (mlev = 4 or mlev = 3) or (lcase(strNoCookies) = "1") then %>
<td align="center" bgcolor="<% =strHeadCellColor %>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"> </font></b></td>
<% end if %>
</tr>
<%If rs.EOF or rs.BOF then %>
<tr>
<td colspan="6" bgcolor="<% =strForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>没有找到任何有新文章的主题</b></font></td>
<% if (mlev = 4 or mlev = 3) or (lcase(strNoCookies) = "1") then %>
<td align="center" bgcolor="<% =strForumCellColor %>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"> </font></b></td>
<% end if %>
</tr>
<%else
currForum = 0
fDisplayCount = 0
currTopic = 0
do until rs.EOF
'## Forum_SQL - Find out if the Category is Locked or Un-Locked and if it Exists
strSql = "SELECT " & strTablePrefix & "CATEGORY.CAT_STATUS "
strSql = strSql & " FROM " & strTablePrefix & "CATEGORY "
strSql = strSql & " WHERE " & strTablePrefix & "CATEGORY.CAT_ID = " & rs("CAT_ID")
set rsCStatus = my_Conn.Execute (StrSql)
'## Forum_SQL - Find out if the Topic is Locked or Un-Locked and if it Exists
strSql = "SELECT " & strTablePrefix & "FORUM.F_STATUS "
strSql = strSql & " FROM " & strTablePrefix & "FORUM "
strSql = strSql & " WHERE " & strTablePrefix & "FORUM.FORUM_ID = " & rs("FORUM_ID")
if currTopic <> rs("TOPIC_ID") then
set rsFStatus = my_Conn.Execute (StrSql)
if ChkForumAccess(rs("FORUM_ID")) then
if (mLev = 4) or ((chkForumModerator(rs("FORUM_ID"), Session(strCookieURL & "username"))= "1") and mLev = 3) or ((chkForumModerator(rs("FORUM_ID"), Request.Cookies(strUniqueID & "User")("Name")) = "1") and mlev = 3) or (lcase(strNoCookies) = "1") then
AdminAllowed = 1
else
AdminAllowed = 0
end if
fDisplayCount = fDisplayCount + 1
if currForum <> rs("FORUM_ID") then %>
<tr>
<td height="20" colspan="6" bgcolor="<% =strCategoryCellColor %>" valign="center" ><a href="<% Response.Write("FORUM.asp?FORUM_ID=" & rs("FORUM_ID") & "&CAT_ID=" & rs("CAT_ID") & "&Forum_Title=" & ChkString(rs("F_SUBJECT"),"urlpath")) %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>"><b><% =ChkString(rs("F_SUBJECT"),"display") %></b></font></a></td>
<% if (AdminAllowed = 1) or (lcase(strNoCookies) = "1") then %>
<td align="center" bgcolor="<% =strCategoryCellColor %>" nowrap valign="center"><% ForumAdminOptions() %></td>
<%elseif (mLev = 3) then%>
<td align="center" bgcolor="<% =strCategoryCellColor %>" nowrap valign="center"> </td>
<% end if %>
</tr>
<% end if %>
<tr>
<td bgcolor="<% =strForumCellColor %>" align="center" valign="center">
<% if rsCStatus("CAT_STATUS") <> 0 and rsFstatus("F_STATUS") <> 0 and rs("T_STATUS") <> 0 then
if lcase(strHotTopic) = "1" then
if rs("T_REPLIES") >= intHotTopicNum Then %>
<a href="topic.asp?TOPIC_ID=<% =rs("TOPIC_ID") %>&FORUM_ID=<% =rs("FORUM_ID") %>&CAT_ID=<% =rs("CAT_ID") %>&Topic_Title=<% =ChkString(left(rs("T_SUBJECT"), 50),"urlpath") %>&Forum_Title=<% =ChkString(rs("F_SUBJECT"),"urlpath") %>"><img src="<%=strImageURL %>icon_folder_new_hot.gif" height="15" width="15" border="0" hspace="0" alt="热门主题"></a>
<% else%>
<a href="topic.asp?TOPIC_ID=<% =rs("TOPIC_ID") %>&FORUM_ID=<% =rs("FORUM_ID") %>&CAT_ID=<% =rs("CAT_ID") %>&Topic_Title=<% =ChkString(left(rs("T_SUBJECT"), 50),"urlpath") %>&Forum_Title=<% =ChkString(rs("F_SUBJECT"),"urlpath") %>"><img src="<%=strImageURL %>icon_folder_new.gif" alt="发表新主题" border="0"></a>
<% end if
end if
else %>
<a href="topic.asp?TOPIC_ID=<% =rs("TOPIC_ID") %>&FORUM_ID=<% =rs("FORUM_ID") %>&CAT_ID=<%=rs("CAT_ID") %>&Topic_Title=<% =ChkString(left(rs("T_SUBJECT"), 50),"urlpath") %>&Forum_Title=<%=ChkString(rs("F_SUBJECT"),"urlpath") %>"><img src="<%=strImageURL %>icon_folder_new_locked.gif"
<% if rsCStatus("CAT_STATUS") = 0 then
Response.Write ("alt='分类已锁定'")
elseif rsFStatus("F_STATUS") = 0 then
Response.Write ("alt='讨论区已锁定'")
else
Response.Write ("alt='主题已锁定'")
end if %>
border="0"></a>
<% end if %>
</td>
<td bgcolor="<% =strForumCellColor %>" valign="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="topic.asp?TOPIC_ID=<% =rs("TOPIC_ID") %>&FORUM_ID=<% =rs("FORUM_ID") %>&CAT_ID=<% =rs("CAT_ID") %>&Topic_Title=<% =ChkString(left(rs("T_SUBJECT"), 50),"urlpath") %>&Forum_Title=<% =ChkString(rs("F_SUBJECT"),"urlpath") %>"><% =ChkString(left(rs("T_SUBJECT"), 50),"display") %></a> </font><% if strShowPaging = "1" then TopicPaging() end if%></td>
<td bgcolor="<% =strForumCellColor %>" valign="center" align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strForumFontColor %>"><% =ChkString(getMemberName(rs("T_AUTHOR")),"display") %></font></td>
<td bgcolor="<% =strForumCellColor %>" valign="center" align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strForumFontColor %>"><% =rs("T_REPLIES") %></font></td>
<td bgcolor="<% =strForumCellColor %>" valign="center" align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strForumFontColor %>"><% =rs("T_VIEW_COUNT") %></font></td>
<%
if rs("T_LAST_POST_AUTHOR") = "" then
strLastAuthor = ""
else
strLastAuthor = "<br>作者:"
if strUseExtendedProfile then
strLastAuthor = strLastAuthor & "<a href=""pop_profile.asp?mode=display&id="& rs("T_LAST_POST_AUTHOR") & """>"
else
strLastAuthor = strLastAuthor & "<a href=""JavaScript:openWindow2('pop_profile.asp?mode=display&id=" & rs("T_LAST_POST_AUTHOR") & "')"">"
end if
strLastAuthor = strLastAuthor & getMemberName(rs("T_LAST_POST_AUTHOR")) & "</a>"
end if
%>
<td bgcolor="<% =strForumCellColor %>" valign="center" align="center" nowrap><font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>" color="<% =strForumFontColor %>"><b><% =ChkDate(rs("T_LAST_POST")) %></b> <% =ChkTime(rs("T_LAST_POST")) %><%=strLastAuthor%></font></td>
<% if (AdminAllowed = 1) or (lcase(strNoCookies) = "1") then %>
<td bgcolor="<% =strForumCellColor %>" valign="center" align="center" nowrap><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
<% if rsCStatus("CAT_STATUS") = 0 then %>
<a href="JavaScript:openWindow('pop_open.asp?mode=Category&CAT_ID=<% =rs("CAT_ID") %>')"><img src="<%=strImageURL %>icon_unlock.gif" alt="解开分类锁定" border="0" hspace="0"></a>
<% else
if rsFStatus("F_STATUS") = 0 then %>
<a href="JavaScript:openWindow('pop_open.asp?mode=Forum&FORUM_ID=<% =rs("FORUM_ID") %>&CAT_ID=<% =rs("CAT_ID") %>&Forum_Title=<% =ChkString(rs("F_SUBJECT"),"JSurlpath")%>')"><img src="<%=strImageURL %>icon_unlock.gif" alt="解开讨论区锁定" border="0" hspace="0"></a>
<% else
if rs("T_STATUS") <> 0 then %>
<a href="JavaScript:openWindow('pop_lock.asp?mode=Topic&TOPIC_ID=<% =rs("TOPIC_ID")%>&FORUM_ID=<% =rs("FORUM_ID") %>&CAT_ID=<% =rs("CAT_ID") %>&Topic_Title=<% =ChkString(rs("T_SUBJECT"),"JSurlpath")%>')"><img src="<%=strImageURL %>icon_lock.gif" alt="锁定讨论区" border="0" hspace="0"></a>
<% else %>
<a href="JavaScript:openWindow('pop_open.asp?mode=Topic&TOPIC_ID=<% =rs("TOPIC_ID")%>&FORUM_ID=<% =rs("FORUM_ID") %>&CAT_ID=<% =rs("CAT_ID") %>&Topic_Title=<% =ChkString(rs("T_SUBJECT"),"JSurlpath")%>')"><img src="<%=strImageURL %>icon_unlock.gif" alt="解开主题锁定" border="0" hspace="0"></a>
<% end if
end if
end if
if (AdminAllowed = 1) or (rsCStatus("CAT_STATUS") <> 0 and rsFStatus("F_STATUS") <> 0 and rs("T_STATUS") <> 0) then %>
<a href="post.asp?method=EditTopic&TOPIC_ID=<% =rs("TOPIC_ID") %>&FORUM_ID=<% =rs("FORUM_ID") %>&CAT_ID=<% =rs("CAT_ID") %>&auth=<% =rs("T_AUTHOR") %>&Forum_Title=<% =ChkString(rs("F_SUBJECT"),"urlpath") %>&Topic_Title=<% =ChkString(rs("T_SUBJECT"),"urlpath") %>"><img src="<%=strImageURL %>icon_pencil.gif" alt="编辑讯息" border="0" hspace="0"></a>
<% end if %>
<a href="JavaScript:openWindow('pop_delete.asp?mode=Topic&TOPIC_ID=<% =rs("TOPIC_ID") %>&FORUM_ID=<% =rs("FORUM_ID") %>&CAT_ID=<% =rs("CAT_ID") %>&Topic_Title=<% =ChkString(rs("T_SUBJECT"),"JSurlpath") %>')"><img src="<%=strImageURL %>icon_trashcan.gif" alt="删除主题" border="0" hspace="0"></a>
<a href="post.asp?method=Reply&TOPIC_ID=<% =rs("TOPIC_ID") %>&FORUM_ID=<% =rs("FORUM_ID") %>&CAT_ID=<% =rs("CAT_ID") %>&Forum_Title=<% =ChkString(rs("F_SUBJECT"),"urlpath") %>&Topic_Title=<% =ChkString(left(rs("T_SUBJECT"), 50),"urlpath") %>"><img src="<%=strImageURL %>icon_reply_topic.gif" alt="回覆主题" height=15 width=15 border=0></a>
</font></b>
</td>
<% elseif (mLev = 3) then%>
<td bgcolor="<% =strForumCellColor %>" valign="center" align="center" nowrap> </td>
<% end if %>
</tr>
<% end if
currForum = rs("FORUM_ID")
currTopic = rs("TOPIC_ID")
end if %>
<% rs.MoveNext
loop
if fDisplayCount = 0 then %>
<tr>
<td colspan="6" bgcolor="<% =strForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>暂时没有任何新主题</b></font></td>
<% if (AdminAllowed = 1) or (lcase(strNoCookies) = "1") then %>
<td align="center" bgcolor="<% =strForumCellColor %>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"> </font></b></td>
<% end if
end if
end if %>
</table>
<table width=100% border=0 align=center>
<tr>
<td>
</td>
<td align=right>
<!--#INCLUDE FILE="inc_jump_to.asp" -->
</td>
</tr>
</table>
<SCRIPT>
<!--
if (document.ReloadFrm.RefreshTime.options[document.ReloadFrm.RefreshTime.selectedIndex].value > 0) {
reloadTime = 60000 * document.ReloadFrm.RefreshTime.options[document.ReloadFrm.RefreshTime.selectedIndex].value
self.setInterval('autoReload()', 60000 * document.ReloadFrm.RefreshTime.options[document.ReloadFrm.RefreshTime.selectedIndex].value)
}
//-->
</SCRIPT>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
sub ForumAdminOptions()
if (AdminAllowed = 1) or (lcase(strNoCookies) = "1") then
if rsCStatus("CAT_STATUS") = 0 then
if mlev = 4 then %>
<a href="JavaScript:openWindow('pop_open.asp?mode=Category&CAT_ID=<% =rs("CAT_ID") %>')"><img src="<%=strImageURL %>icon_folder_unlocked.gif" alt="解开分类锁定" height=15 width=15 border=0></a>
<% else %>
<img src="<%=strImageURL %>icon_folder_locked.gif" alt="锁定分类" height=15 width=15 border=0>
<% end if
else
if rsFStatus("F_STATUS") <> 0 then %>
<a href="JavaScript:openWindow('pop_lock.asp?mode=Forum&FORUM_ID=<% =rs("FORUM_ID") %>&CAT_ID=<% =rs("CAT_ID") %>&Forum_Title=<% =ChkString(rs("F_SUBJECT"),"JSurlpath")%>')"><img src="<%=strImageURL %>icon_folder_locked.gif" alt="锁定论坛" height=15 width=15 border=0></a>
<% else %>
<a href="JavaScript:openWindow('pop_open.asp?mode=Forum&FORUM_ID=<% =rs("FORUM_ID") %>&CAT_ID=<% =rs("CAT_ID") %>&Forum_Title=<% =ChkString(rs("F_SUBJECT"),"JSurlpath")%>')"><img src="<%=strImageURL %>icon_folder_unlocked.gif" alt="解开论坛锁定" height=15 width=15 border=0></a>
<% end if
end if
if (rsCStatus("CAT_STATUS") <> 0 and rsFStatus("F_STATUS") <> 0) or (AdminAllowed = 1) then %>
<a href="post.asp?method=EditForum&FORUM_ID=<% =rs("FORUM_ID") %>&CAT_ID=<% =rs("CAT_ID") %>&Forum_Title=<% =ChkString(rs("F_SUBJECT"),"urlpath") %>&type=0"><img src="<%=strImageURL %>icon_folder_pencil.gif" alt="编辑论坛属性" border="0" hspace="0"></a>
<% end if %>
<a href="JavaScript:openWindow('pop_delete.asp?mode=Forum&FORUM_ID=<% =rs("FORUM_ID") %>&CAT_ID=<% =rs("CAT_ID") %>&Forum_Title=<% =ChkString(rs("F_SUBJECT"),"JSurlpath") %>')"><img src="<%=strImageURL %>icon_folder_delete.gif" alt="删除论坛" height=15 width=15 border=0></a>
<a href="post.asp?method=Topic&FORUM_ID=<% =rs("FORUM_ID")%>&CAT_ID=<% =rs("CAT_ID")%>&Forum_Title=<% =ChkString(rs("F_SUBJECT"),"urlpath") %>"><img src="<%=strImageURL %>icon_folder_new_topic.gif" alt="发表新主题" height=15 width=15 border=0></a>
<% end if
end sub
sub TopicPaging()
mxpages = (rs("T_REPLIES") / strPageSize)
if mxPages <> cint(mxPages) then
mxpages = int(mxpages) + 1
end if
if mxpages > 1 then
Response.Write("<table border=0 cellspacing=0 cellpadding=0><tr><td valign=""center""><font face=" & strDefaultFontFace & " size=" & strFooterFontSize & "><img src=""" & strImageURL & "icon_posticon.gif"" border=""0""></font></td>")
for counter = 1 to mxpages
ref = "<td align=right valign=""center"" bgcolor=" & strForumCellColor & "><font face=" & strDefaultFontFace & " size=" & strFooterFontSize & ">"
if ((mxpages > 9) and (mxpages > strPageNumberSize)) or ((counter > 9) and (mxpages < strPageNumberSize)) then
ref = ref & " "
end if
ref = ref & widenum(counter) & "<a href='topic.asp?"
ref = ref & "TOPIC_ID=" & rs("TOPIC_ID")
ref = ref & "&FORUM_ID=" & rs("FORUM_ID")
ref = ref & "&CAT_ID=" & rs("CAT_ID")
ref = ref & "&Topic_Title=" & ChkString(left(rs("T_SUBJECT"), 50),"urlpath")
ref = ref & "&Forum_Title=" & ChkString(rs("F_SUBJECT"),"urlpath")
ref = ref & "&whichpage=" & counter
ref = ref & "'>" & counter & "</a></font></td>"
Response.Write ref
if counter mod strPageNumberSize = 0 then
Response.Write("</tr><tr><td> </td>")
end if
next
Response.Write("</tr></table>")
end if
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -