📄 topic.asp
字号:
<%'############### READ/WRITE ACCESS ###########################%>
<br><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>
<%
select case cInt(strPrivateForums)
case 10
response.write "只有管理者和版主可以在本讨论区回覆主题"
case 11
response.write "只有管理者和版主可以在本讨论区发表新主题"
case 12
response.write "这是唯读讨论区,无法发表"
case else
end select
%>
</b></font>
<%'############### READ/WRITE ACCESS ###########################%>
</td>
<td align="left"><a href="print.asp?<%=Request.QueryString%>"><img border="0" src="<%=strImageURL %>print.gif" border=0></a> <a href="print.asp?<%=Request.QueryString%>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize-1 %>">把本主题输出到打印机</font></a>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize-1 %>">
<a href="bookmark.asp?mode=add&id=<%=Request.querystring("Topic_ID")%>"><img border="0" src="<%=strImageURL %>icon_bookmark.gif" border=0></a> <a href="bookmark.asp?mode=add&id=<%=Request.querystring("Topic_ID")%>">将本主题添加进收藏夹</a></font></td>
<td align="right">
<% if maxpages > 1 then %>
<table border=0 align="right">
<tr>
<td valign="top"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>页数:</b></font></td>
<td valign="top"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><% Call Paging() %></font></td>
</tr>
</table>
<% else %>
<td align=right> </td>
<% end if %>
</td>
</tr>
</table>
</tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="0" align="center">
<tr>
<td bgcolor="<% =strTableBorderColor %>">
<table border="0" width="100%" cellspacing="1" cellpadding="4">
<tr>
<td align="center" bgcolor="<% =strHeadCellColor %>" width="<% =strTopicWidthLeft %>" <% if lcase(strTopicNoWrapLeft) = "1" then Response.Write(" nowrap") %>><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">作者</font></b></td>
<td align="left" bgcolor="<% =strHeadCellColor %>" width="<% =strTopicWidthRight %>" <% if lcase(strTopicNoWrapRight) = "1" then Response.Write(" nowrap") %>><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>"><% if strShowTopicNav = "1" then Call Topic_nav() else Response.Write("主题") end if%></font></b></td>
</tr>
<%
'####################################
if (sortorder <> "1") and MyPage = 1 then
Call GetFirst()
end if
'####################################
'## Forum_SQL - Get all topicsFrom DB
strSql ="SELECT " & strMemberTablePrefix & "MEMBERS.M_NAME, "
strsql = strsql & strMemberTablePrefix & "MEMBERS.M_PHOTO_URL, "
strSql = strSql & strMemberTablePrefix & "MEMBERS.M_ICQ, "
strSql = strSql & strMemberTablePrefix & "MEMBERS.M_YAHOO, "
strSql = strSql & strMemberTablePrefix & "MEMBERS.M_AIM, "
strSql = strSql & strMemberTablePrefix & "MEMBERS.M_TITLE, "
strSql = strSql & strMemberTablePrefix & "MEMBERS.MEMBER_ID, "
strSql = strSql & strMemberTablePrefix & "MEMBERS.M_Homepage, "
strSql = strSql & strMemberTablePrefix & "MEMBERS.M_LEVEL, "
strSql = strSql & strMemberTablePrefix & "MEMBERS.M_POSTS, "
strSql = strSql & strMemberTablePrefix & "MEMBERS.M_PMRECEIVE, "
strSql = strSql & strMemberTablePrefix & "MEMBERS.M_COUNTRY, "
strSql = strSql & strTablePrefix & "REPLY.REPLY_ID, "
strSql = strSql & strTablePrefix & "REPLY.R_AUTHOR, "
strSql = strSql & strTablePrefix & "REPLY.TOPIC_ID, "
strSql = strSql & strTablePrefix & "REPLY.R_MESSAGE, "
strSql = strSql & strTablePrefix & "REPLY.R_DATE "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS, " & strTablePrefix & "REPLY "
strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "REPLY.R_AUTHOR "
strSql = strSql & " AND TOPIC_ID = " & Request.QueryString("TOPIC_ID") & " "
'####################################
if sortorder = "2" then
strSql = strSql & " ORDER BY R_DATE DESC"
else
if sortorder = "1" then
strSql = strSql & " ORDER BY R_DATE DESC"
else
strSql = strSql & " ORDER BY R_DATE ASC"
end if
end if
'####################################
if strDBType = "mysql" then 'MySql specific code
if mypage > 1 then
intOffSet = CInt((mypage - 1) * strPageSize) - 1
strSql = strSql & " LIMIT " & intOffSet & ", " & CInt(strPageSize) & " "
end if
'## Forum_SQL - Get the total pagecount
strSql2 = "SELECT COUNT(" & strTablePrefix & "REPLY.TOPIC_ID) AS REPLYCOUNT "
strSql2 = strSql2 & " FROM " & strTablePrefix & "REPLY "
strSql2 = strSql2 & " WHERE TOPIC_ID = " & Request.QueryString("TOPIC_ID") & " "
set rsCount = my_Conn.Execute(strSql2)
if not rsCount.eof then
maxpages = (rsCount("REPLYCOUNT") \ strPageSize )
if rsCount("REPLYCOUNT") mod strPageSize <> 0 then
maxpages = maxpages + 1
end if
else
maxpages = 1
end if
set rs = Server.CreateObject("ADODB.Recordset")
' rs.cachesize = strPageSize
rs.open strSql, my_Conn, 3
else 'end MySql specific code
set rs = Server.CreateObject("ADODB.Recordset")
rs.cachesize = 20
rs.open strSql, my_Conn, 3
if not(rs.EOF or rs.BOF) then '## Replies found in DB
rs.movefirst
rs.pagesize = strPageSize
maxpages = cint(rs.pagecount)
rs.absolutepage = mypage
end if
end if
if rs.EOF or rs.BOF then '## No replies found in DB
Response.Write ""
else
'rs.movefirst
intI = 0
howmanyrecs = 0
rec = 1
do until rs.EOF or (mypage = 1 and rec > strPageSize) or (mypage > 1 and rec > strPageSize) '**
if intI = 0 then
CColor = strAltForumCellColor
else
CColor = strForumCellColor
end if
%>
<tr>
<td bgcolor="<% =CColor %>" valign="top" align="center">
<% if strUseExtendedProfile then %>
<a href="pop_profile.asp?mode=display&id=<% =rs("R_AUTHOR") %>">
<% else %>
<a href="JavaScript:openWindow3('pop_profile.asp?mode=display&id=<% =rs("R_AUTHOR") %>')">
<% end if %>
<font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b><% =ChkString(rs("M_NAME"),"display") %></a>
</b></font>
<% if Trim(rs("M_PHOTO_URL")) <> "" and lcase(rs("M_PHOTO_URL")) <> "http://" then %>
<br><img src="<% =rs("M_PHOTO_URL") %>" align="center">
<% end if %>
<% if strShowRank = 1 or strShowRank = 3 then %>
<br><font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"><% = ChkString(getMember_Level(rs("M_TITLE"), rs("M_LEVEL"), rs("M_POSTS")),"display") %></font>
<% end if %>
<% if strShowRank = 2 or strShowRank = 3 then %>
<br><% = getStar_Level(rs("M_LEVEL"), rs("M_POSTS")) %>
<% end if %>
<br>
<br><font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"><% =rs("M_COUNTRY") %></font>
<br><font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>">发表总数:<% =rs("M_POSTS") %></font></td>
<td bgcolor="<% =CColor %>" <% if (AdminAllowed = 1) then %>colspan="3"<% else %>colspan="2"<% end if %> valign="top"><img src="<%=strImageURL %>icon_posticon.gif" border="0" hspace="3"><font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>">发表於 - <% =ChkDate(rs("R_DATE")) %> : <% =ChkTime(rs("R_DATE")) %></font>
<% if strUseExtendedProfile then %>
<a href="pop_profile.asp?mode=display&id=<% =rs("MEMBER_ID") %>"><img src="<%=strImageURL %>1-profile.gif" alt="查看会员资料" border="0" align="absmiddle"></a>
<% else %>
<a href="JavaScript:openWindow3('pop_profile.asp?mode=display&id=<% =rs("MEMBER_ID") %>')"><img src="<%=strImageURL %>1-profile.gif" alt="查看会员资料" border="0" align="absmiddle"></a>
<% end if %>
<% if (lcase(strEmail) = "1") then
if (mlev <> 0) or (mlev = 0 and strLogonForMail <> "1") then
%> <a href="JavaScript:openWindow('pop_mail.asp?id=<% =rs("MEMBER_ID") %>')"><img src="<%=strImageURL %>1-email.gif" alt="电子邮件" border="0" align="absmiddle"></a>
<% end if
else
%> <a href="JavaScript:openWindow('pop_mail.asp?id=<% =rs("MEMBER_ID") %>')"><img src="<%=strImageURL %>1-email.gif" alt="电子邮件" border="0" align="absmiddle"></a>
<% end if %>
<% if (intPMessages = 1) and (rs("M_PMRECEIVE") = "1") then %>
<a href="privatesend.asp?method=Topic&mname=<% =rs("M_NAME") %>"><img src="<%=strImageURL %>1-pm.gif" alt="发送悄悄话" border="0" align="absmiddle"></a>
<% end if %>
<% if strHomepage = "1" then %>
<% if rs("M_Homepage") <> " " then %>
<a href="<% =rs("M_Homepage") %>"><img src="<%=strImageURL %>1-home.gif" alt="浏览 <% = ChkString(rs("M_NAME"),"display") %> 的主页" border="0" align="absmiddle"></a>
<% end if %>
<% end if %>
<% if (AdminAllowed = 1 or rs("MEMBER_ID") = Member_ID) or (strNoCookies = "1") then %>
<% if (rsCStatus("CAT_STATUS") <> 0 and rsFStatus("F_STATUS") <> 0 and rsTStatus("T_STATUS") <> 0) or (AdminAllowed = 1) then %>
<a href="post.asp?method=Edit&REPLY_ID=<% =rs("REPLY_ID") %>&TOPIC_ID=<% =Request.QueryString("TOPIC_ID") %>&FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&auth=<% =ChkString(rs("R_AUTHOR"),"urlpath") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>&Topic_Title=<% =ChkString(Request.QueryString("Topic_Title"),"urlpath") %>"><img src="<%=strImageURL %>1-edit.gif" alt="编辑讯息" border="0" align="absmiddle"></a>
<% end if %>
<% end if %>
<% if strICQ = "1" then %>
<% if Trim(rs("M_ICQ")) <> "" then %>
<a href="JavaScript:openWindow('pop_messengers.asp?mode=ICQ&ICQ=<% =ChkString(rs("M_ICQ"), "JSurlpath") %>&M_NAME=<% =ChkString(rs("M_NAME"),"JSurlpath") %>')"><img src="http://online.mirabilis.com/scripts/online.dll?icq=<% =ChkString(rs("M_ICQ"), "urlpath") %>&img=5" height=15 width=15 alt="发送ICQ讯息给 <% = ChkString(rs("M_NAME"),"display") %>" border="0" align="absmiddle"></a>
<% end if %>
<% end if %>
<% if strYAHOO = "1" then %>
<% if Trim(rs("M_YAHOO")) <> "" then %>
<a href="http://search.tencent.com/cgi-bin/friend/user_show_info?ln=<% =rs("M_YAHOO") %>" target=_blank><img align=absmiddle width=16 height=16 src="http://icon.tencent.com/<% =rs("M_YAHOO") %>/s/00/" alt="<% =rs("M_YAHOO") %>" border=0></a> <% =rs("M_YAHOO") %>
<% end if %>
<% end if %>
<% if (strAIM = "1") then %>
<% if Trim(rs("M_AIM")) <> "" then %>
<a href="JavaScript:openWindow('pop_messengers.asp?mode=AIM&AIM=<% =rs("M_AIM") %>&M_NAME=<% =ChkString(rs("M_NAME"),"urlpath") %>')"><img src="<%=strImageURL %>icon_aim.gif" height=15 width=15 alt="传AIM讯息给 <% =rs("M_NAME") %>" border="0" align="absmiddle" hspace="6"></a>
<% end if %>
<% end if %>
<%'############### READ/WRITE ACCESS ###########################%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -