📄 topic.asp
字号:
<%
'#############################################################
'# 中国在线--极酷论坛 ver.2001 3.0
'#
'# 版权所有: 中国在线 (ChinaXP.Net)
'#
'# 制作人 : 周周 (SeeYa!)
'#
'#
'# 主页地址: http://www.ChinaXP.net/ 中国在线
'# http://bbs.ChinaXP.Net 中国在线--极酷论坛
'#
'#############################################################
%>
<%
if Request.QueryString("TOPIC_ID") = "" and Request.QueryString("mode") <> "getIP" and Request.Form("Method_Type") <> "login" and Request.Form("Method_Type") <> "logout" then
Response.Redirect "default.asp"
Response.End
end if
If Request("whichpage") = "" or Request("whichpage") <= 0 then
mypage = 1
Else
mypage = CINT(Request("whichpage"))
End If
%>
<!--#INCLUDE FILE="config.asp" -->
<%
SELECT CASE Request.QueryString("mode")
CASE "getIP"
%>
<!--#INCLUDE FILE="inc_top_short.asp"-->
<%
DisplayIP
IP = ""
Title = ""
%>
<!--#INCLUDE FILE="inc_footer_short.asp" -->
<%
Response.End
CASE else
'## Do Nothing - Continue
end SELECT
%>
<!--#INCLUDE FILE="inc_top.asp" -->
<%
if (strAuthType = "nt") then
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString
call NTauthenticate()
if (ChkAccountReg() = "1") then
call NTUser()
end if
end if
Member_ID = getNewMemberNumber()
%>
<!--#INCLUDE FILE="inc_functions.asp" -->
<!--#INCLUDE FILE="inc_functions2.asp" -->
<%
'########### Append By Guozi ###########
dim strOnlineUserList
strOnlineUserList = GetOnlineUserList()
'############# 2001-10-01 ##############
%>
<%
if strPrivateForums = "1" then
if Request("Method_Type") = "" then
chkUser4()
end if
end if
if (mLev = 4) or (chkForumModerator(Request.QueryString("FORUM_ID"), ChkString(STRdbntUserName, "decode"))= "1") or (lcase(strNoCookies) = "1") then
AdminAllowed = 1
else
AdminAllowed = 0
end if
'## Forum_SQL - Find out if the Category is Locked or Un-Locked and if it Exists
'##########################################
'## Forum_SQL - Get the Category Title
'##########################################
strSql = "SELECT " & strTablePrefix & "CATEGORY.CAT_STATUS "
strSql = strSql & " FROM " & strTablePrefix & "CATEGORY "
strSql = strSql & " WHERE " & strTablePrefix & "CATEGORY.CAT_ID = " & Request.QueryString("CAT_ID")
set rsCStatus = my_Conn.Execute (StrSql)
'## Forum_SQL - Find out if the Forum is Locked or Un-Locked and if it Exists
'##########################################
'## Forum_SQL - Get the Forum Title
'##########################################
strSql = "SELECT " & strTablePrefix & "FORUM.F_STATUS, " & strTablePrefix & "FORUM.F_PRIVATEFORUMS, "
strSql = strSql & strTablePrefix & "FORUM.F_SUBJECT "
strSql = strSql & " FROM " & strTablePrefix & "FORUM "
strSql = strSql & " WHERE " & strTablePrefix & "FORUM.FORUM_ID = " & Request.QueryString("FORUM_ID")
set rsFStatus = my_Conn.Execute (StrSql)
strPrivateForums =rsFStatus("F_PRIVATEFORUMS")
strSubForumTitle = rsFStatus("F_SUBJECT")
'##########################################
'## Forum_SQL - Get the Topic Title
'##########################################
strSql = "SELECT " & strTablePrefix & "TOPICS.T_STATUS, " & strTablePrefix & "TOPICS.T_SUBJECT "
strSql = strSql & " FROM " & strTablePrefix & "TOPICS "
strSql = strSql & " WHERE " & strTablePrefix & "TOPICS.TOPIC_ID = " & Request.QueryString("TOPIC_ID")
set rsTStatus = my_Conn.Execute (StrSql)
strTopicTitle = rsTStatus("T_SUBJECT")
'##########################################
if rsCStatus.EOF or rsCStatus.BOF or rsFStatus.EOF or rsFStatus.BOF or rsTStatus.EOF or rsTStatus.BOF then
Response.Redirect(strForumURL)
else
'####################################
sortorder = request("sortchoice")
if sortorder <> "" then
mypage = 1
Application.Lock
Application(strCookieURL & "strSortchoice") = sortorder
Application.UnLock
else
sortorder = Application(strCookieURL & "strSortchoice")
end if
'####################################
mySQL = request("strSql")
if mySQL = "" then
mySQL = SQLtemp
end if
'## Forum_SQL - Get all Forum Categories From DB
strSql = "SELECT CAT_ID "
strSql = strSql & " FROM " & strTablePrefix & "CATEGORY"
set rsCat = my_Conn.Execute (StrSql)
'####################################
%>
<script src="Screen.js"></script>
<script language="JavaScript">
<!--
function jumpTo(s) {if (s.selectedIndex != 0) location.href = s.options[s.selectedIndex].value;return 1;}
function setSort() {document.SortFilter.submit(); return 0;}
// -->
</script>
<%
'####################################
'## Forum_SQL
strSql ="SELECT " & strMemberTablePrefix & "MEMBERS.M_NAME, " & strMemberTablePrefix & "MEMBERS.M_ICQ, " & strMemberTablePrefix & "MEMBERS.M_YAHOO, " & strMemberTablePrefix & "MEMBERS.M_AIM, " & strMemberTablePrefix & "MEMBERS.M_TITLE, " & strMemberTablePrefix & "MEMBERS.M_TITLE, " & strMemberTablePrefix & "MEMBERS.M_Homepage, " & strMemberTablePrefix & "MEMBERS.M_LEVEL, " & strMemberTablePrefix & "MEMBERS.M_POSTS, " & strMemberTablePrefix & "MEMBERS.M_COUNTRY, " & strTablePrefix & "REPLY.REPLY_ID, " & strTablePrefix & "REPLY.R_AUTHOR, " & strTablePrefix & "REPLY.TOPIC_ID, " & strTablePrefix & "REPLY.R_MESSAGE, " & 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") & " "
strSql = strSql & " ORDER BY " & strTablePrefix & "REPLY.R_DATE"
if strDBType = "mysql" then 'MySql specific code
'## Forum_SQL - Get the total pagecount
strSql2 = "SELECT COUNT(" & strTablePrefix & "REPLY.TOPIC_ID) AS REPLYCOUNT "
strSql2 = strSql2 & " FROM " & strMemberTablePrefix & "MEMBERS, " & strTablePrefix & "REPLY "
strSql2 = strSql2 & " WHERE " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "REPLY.R_AUTHOR "
strSql2 = strSql2 & " AND 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
if not(RS.EOF) then
RS.movefirst
end if
else 'end MySql specific code
set rs = Server.CreateObject("ADODB.Recordset")
RS.cachesize = strPageSize
RS.open strSql, my_Conn, 3
If not (RS.EOF or RS.BOF) then '## No replies found in DB
RS.movefirst
RS.pagesize = strPageSize
RS.absolutepage = mypage
maxpages = cint(RS.pagecount)
end if
end if
i = 0
%>
<% '##################################
strForumUrl = "forum.asp?FORUM_ID=" & Request.Querystring("FORUM_ID")
strForumUrl = strForumUrl & "&CAT_ID=" & Request.Querystring("CAT_ID")
'#### 投票URL ####
if mlev>2 then
strRatingUrl = "userating.asp?topic_id="&Request.Querystring("TOPIC_ID")&"&forum_id="&Request.Querystring("FORUM_ID")&"&cat_id="&Request.Querystring("CAT_ID")&"&mode=login"
end if
'#################
if lCase(Request.Querystring("Mode"))<>"best" then
strForumUrl = strForumUrl & "&Mode=best"
end if
strScreenMode = Request.Cookies("ScreenMode")
if strScreenMode = "7" then
lngMaxShow = 36
elseif strScreenMode = "9" then
lngMaxShow = 48
elseif strScreenMode = "12" then
lngMaxShow = 60
elseif strScreenMode = "" then
lngMaxShow = 36
end if
%>
<TD width="70%" align="left" valign="top">
<TABLE border="0" width="85%" align=center>
<TR>
<TD width="33%" align="left" nowrap><font face="<% Response.Write strDefaultFontFace %>" size="<% Response.Write strDefaultFontSize %>"><a href="default.asp"><img src="<% =strImageURL %>icon_folder_open.gif" alt="返回论坛首页" border="0"> <% =strForumTitle %></a>
<BR><img src="<%=strImageURL %>icon_bar.gif" border="0"><img src="<% Response.Write("" & strImageURL & "icon_folder_open.gif") %>" border="0"> <a href="FORUM.asp?FORUM_ID=<% Response.Write Request.QueryString("FORUM_ID") %>&CAT_ID=<% Response.Write Request.QueryString("CAT_ID") %>"><% Response.Write ChkString(strSubForumTitle,"display") %></a>
<BR><img src="<%=strImageURL %>icon_blank.gif" border="0"><img src="<%=strImageURL %>icon_bar.gif" border="0"><img src="<% =strImageURL %>icon_folder_open_topic.gif" border="0"> <% =TrueWord(strTopicTitle, lngMaxShow, " ...") %>
</FONT></TD>
</TR>
</TABLE>
<TABLE border="0" width="100%" Align="center">
<TR>
<TD width="100%" align="right" valign="bottom" nowrap><font color="<% Response.Write strDefaultFontColor %>" face="<% Response.Write strDefaultFontFace %>" size="<% Response.Write strDefaultFontSize %>"><img src="<% =strImageURL %>icon.gif"> <A href="<% Response.Write strForumUrl %>">本版精华</A> <img src="<% =strImageURL %>icon.gif"> <A href="bookmark.asp">个人收藏</A> <img src="<% =strImageURL %>icon.gif"> <A href="cancel_replies.asp">回复通知</A><IMG src="" border=0 width="4" height=0></FONT></TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
<TABLE border="0" width="<% Response.Write strTableWidth %>" cellspacing="0" cellpadding="3" align="center">
<TR>
<TD align="left" height="26"><% call PostingOptions() %></TD>
<TD align="right"><% if strShowTopicNav = "1" then %><% Call Topic_nav() %><% end if %></TD>
</TR>
</TABLE>
<TABLE width="<% Response.Write strTableWidth %>" bgcolor="<% Response.Write strTableBorderColor %>" cellpadding=0 cellspacing=0 border=0 align=center>
<TR>
<TD height=1><img src="" height=1></TD>
</TR>
</TABLE>
<TABLE cellpadding=0 cellspacing=0 border=0 width="<% Response.Write strTableWidth %>" align=center>
<TR>
<TD bgcolor="<% Response.Write strTableBorderColor %>" valign=middle width=1 height=24><img src="" width=1></TD>
<TD bgcolor="<% Response.Write strHeadCellColor %>" colspan=2 align="left" valign="middle" width=*>
<TABLE cellpadding=0 cellspacing=1 width="<% Response.Write strTableWidth %>" border=0 Align="center">
<TR>
<TD bgcolor="<% Response.Write strHeadCellColor %>" align="left" valign="middle"> <font face="<% Response.Write strDefaultFontFace %>" size="<% Response.Write strDefaultFontSize %>" color="<% Response.Write strHeadFontColor %>"><b>* 贴子主题:<% Response.Write("<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>" & TrueWord(strTopicTitle, lngMaxShow + 18, " ...")) %></font></B></font>
<%
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -