📄 forum.asp
字号:
<% end if %>
<a href="JavaScript:openWindow('pop_delete.asp?mode=Topic&TOPIC_ID=<% =rs("TOPIC_ID") %>&FORUM_ID=<% =rs("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Topic_Title=<% =ChkString(rs("T_SUBJECT"),"JSurlpath") %>')">删除</a>
<a href="post.asp?method=Reply&TOPIC_ID=<% =rs("TOPIC_ID") %>&FORUM_ID=<% =rs("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Topic_Title=<% =ChkString(rs("T_SUBJECT"),"urlpath") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>">回复</a>
</td>
<% end if %>
<td bgcolor="<% =strForumCellColor %>" valign="center" align="center" width="10%"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strForumFontColor %>"><% =ChkString(rs("M_NAME"),"display") %></font></td>
<td bgcolor="<% =strForumCellColor %>" valign="center" align="center" width="5%"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strForumFontColor %>"><% =rs("T_REPLIES") %></font></td>
<td bgcolor="<% =strForumCellColor %>" valign="center" align="center" width="5%"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strForumFontColor %>"><% =rs("T_VIEW_COUNT") %></font></td>
<%
if IsNull(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 & rs("LAST_POST_AUTHOR_NAME") & "</a>"
end if
%>
<td bgcolor="<% =strForumCellColor %>" valign="center" align="center" nowrap><font face="<% =strDefaultFontFace %>" color="<% =strForumFontColor %>" size="<% =strFooterFontSize %>"><b><% =ChkDate(rs("T_LAST_POST")) %></b> <% =ChkTime(rs("T_LAST_POST")) %><%=strLastAuthor%></font></td>
</tr>
<% rec = rec + 1
rs.MoveNext
loop
end if %>
</table>
</td>
</tr>
<tr>
<td colspan=5>
<% if maxpages > 1 then %>
<table border=0 align="left">
<tr>
<td valign="top"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">共有 <b><% =maxpages %></b> 页: </font></td>
<td valign="top"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><% Call Paging() %></font></td>
</tr>
</table>
<% else %>
<% end if %>
</td>
</tr>
</table>
<table width="100%">
<tr>
<td align="center" valign="top" width="33%">
<table>
<tr>
<td>
<p><font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>">
<img alt="新文章" src="<%=strImageURL %>icon_folder_new.gif" width="8" height="9"> 有新文章<br>
<img alt="旧文章" src="<%=strImageURL %>icon_folder.gif" width="8" height="9"> 开放的主题<% if lcase(strHotTopic) = "1" then %>(<img alt="热门主题" src="<%=strImageURL %>icon_folder_hot.gif" width="8" height="9">超过 <% =intHotTopicNum %> 个回复的主题)<% end if %><br>
<img alt="锁定的主题" src="<%=strImageURL %>icon_folder_locked.gif" width="8" height="9"> 锁定的主题<br>
</font></p>
</td>
</tr>
</table>
</td>
<td align="center" valign="top" width="33%">
<% if (mlev = 4 or mlev = 3 or mlev = 2 or mlev = 1) or (lcase(strNoCookies) = "1") then %>
<p align="center"><center><% call PostNewTopic() %></center></p>
<% else %>
<% end if %>
</td>
<td align="center" valign="top" width="33%">
<!--#INCLUDE FILE="inc_jump_to.asp" -->
</td>
</tr>
</table>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
Function ChkIsNew(dt)
if lcase(strHotTopic) = "1" then
if dt > Session(strCookieURL & "last_here_date") then
if rs("T_REPLIES") >= intHotTopicNum Then
ChkIsNew = "<img src='" & strImageURL & "icon_folder_new_hot.gif' height=15 width=15 border=0 hspace=0 alt='Hot Topic'>"
else
ChkIsNew = "<img src='" & strImageURL & "icon_folder_new.gif' height=15 width=15 border=0 hspace=0 alt='New Topic'>"
end if
Else
if rs("T_REPLIES") >= intHotTopicNum Then
ChkIsNew = "<img src='" & strImageURL & "icon_folder_hot.gif' height=15 width=15 border=0 hspace=0 alt='Hot Topic'>"
else
ChkIsNew = "<img src='" & strImageURL & "icon_folder.gif' height=15 width=15 border=0 hspace=0>"
end if
end if
else
if dt > Session(strCookieURL & "last_here_date") then
ChkIsNew = "<img src='" & strImageURL & "icon_folder_new.gif' height=15 width=15 border=0 hspace=0 alt='New Topic'>"
Else
ChkIsNew = "<img src='" & strImageURL & "icon_folder.gif' height=15 width=15 border=0 hspace=0>"
end if
end if
End Function
sub PostNewTopic()
%>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
<%'############### READ/WRITE ACCESS ###########################
if cInt(strPrivateForums) < 11 or AdminAllowed = 1 then
if rsCStatus("CAT_STATUS") = 0 or rsFStatus("F_STATUS") = 0 then
if (AdminAllowed = 1) then %>
<a href="post.asp?method=Topic&FORUM_ID=<% =Request.QueryString("FORUM_ID")%>&CAT_ID=<% =Request.QueryString("CAT_ID")%>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>"><img src="<%=strImageURL %>icon_folder_locked.gif" alt="锁定分类" height=15 width=15 border=0></a> <a href="post.asp?method=Topic&FORUM_ID=<% =Request.QueryString("FORUM_ID")%>&CAT_ID=<% =Request.QueryString("CAT_ID")%>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>">发表新主题</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="post.asp?method=Topic&FORUM_ID=<% =Request.QueryString("FORUM_ID")%>&CAT_ID=<% =Request.QueryString("CAT_ID")%>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>"><img src="<%=strImageURL %>icon_folder_new_topic.gif" alt="发表新主题" height=15 width=15 border=0></a> <a href="post.asp?method=Topic&FORUM_ID=<% =Request.QueryString("FORUM_ID")%>&CAT_ID=<% =Request.QueryString("CAT_ID")%>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>">发表新主题</a>
<% else %>
<img src="<%=strImageURL %>icon_folder_locked.gif" alt="锁定论坛" height=15 width=15 border=0> 论坛已锁定
<% end if
end if
end if%>
</font>
<%
end sub
sub ForumAdminOptions()
%>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
<% 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=<% =Request.QueryString("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=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"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=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"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=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"JSurlpath") %>&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=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"JSurlpath") %>')"><img src="<%=strImageURL %>icon_folder_delete.gif" alt="删除讨论区" height=15 width=15 border=0></a>
<a href="post.asp?method=Topic&FORUM_ID=<% =Request.QueryString("FORUM_ID")%>&CAT_ID=<% =Request.QueryString("CAT_ID")%>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"JSurlpath") %>"><img src="<%=strImageURL %>icon_folder_new_topic.gif" alt="发表新主题" height=15 width=15 border=0></a>
<% end if %>
</font>
<%
end sub
sub Paging()
if maxpages > 1 then
if mypage = "" then
pge = 1
else
pge = mypage
end if
scriptname = request.servervariables("script_name")
Response.Write("<table border=0 cellspacing=0 cellpadding=1 valign=top><tr>")
for counter = 1 to maxpages
if counter <> cint(pge) then
ref = "<td align=right bgcolor=" & strPageBGColor & "><font face=" & strDefaultFontFace & " size=" & strDefaultFontSize & ">" & " " & widenum(counter) & "<a href='" & scriptname
ref = ref & "?FORUM_ID=" & Request.QueryString("FORUM_ID")
ref = ref & "&CAT_ID=" & Request.QueryString("CAT_ID")
ref = ref & "&Forum_Title=" & ChkString(Request.QueryString("FORUM_TITLE"),"urlpath")
ref = ref & "&whichpage=" & counter
'############################################
if sortorder <> "" then
ref = ref & "&sort=" & sortorder
end if
'############################################
ref = ref & "'>" & counter & "</a></font></td>"
Response.Write ref
else
Response.Write("<td align=right bgcolor=" & strPageBGColor & "><font face=" & strDefaultFontFace & " size=" & strDefaultFontSize & ">" & " " & widenum(counter) & "<b>" & counter & "</b></font></td>")
end if
if counter mod strPageNumberSize = 0 then
Response.Write("</tr><tr>")
end if
next
Response.Write("</tr></table>")
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 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(Request.QueryString("FORUM_Title"),"urlpath")
ref = ref & "&whichpage=" & counter
'############################################
if sortorder <> "" then
ref = ref & "&sort=" & sortorder
end if
'############################################
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 + -