⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 topic.asp

📁 一个不错的ASP论坛源码
💻 ASP
📖 第 1 页 / 共 4 页
字号:
<%
'########## Snitz Forums 2000 Version 3.1 SR4 ####################
'#                                                               #
'#  汉化修改: 资源搜罗站                                         #
'#  电子邮件: cgier@21cn.com                                     #
'#  主页地址: http://www.sdsea.com                               #
'#            http://www.99ss.net                                #
'#            http://www.cdown.net                               #
'#	     http://www.wzdown.com                               #
'#	     http://www.13888.net                                #
'#  论坛地址:http://ubb.yesky.net                                #
'#  最后修改日期: 2001/03/12    中文版本:Version 3.1 SR4        #
'#################################################################
'# 原始来源                                                      #
'# Snitz Forums 2000 Version 3.1 SR4                             #
'# Copyright 2000 http://forum.snitz.com - All Rights Reserved   #
'#################################################################
'#【版权声明】                                                   #
'#                                                               #
'# 本软体为共享软体(shareware)提供个人网站免费使用,请勿非法修改,#
'# 转载,散播,或用于其他图利行为,并请勿删除版权声明。          #
'# 如果您的网站正式起用了这个脚本,请您通知我们,以便我们能够知晓#
'# 如果可能,请在您的网站做上我们的链接,希望能给予合作。谢谢!  #
'#################################################################
'# 请您尊重我们的劳动和版权,不要删除以上的版权声明部分,谢谢合作#
'# 如有任何问题请到我们的论坛告诉我们                            #
'#################################################################

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 
 %>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_functions.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
Member_ID = getNewMemberNumber()
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

%>
<!--#INCLUDE FILE="inc_top.asp" -->
<% 
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
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
strSql = "SELECT " & strTablePrefix & "FORUM.F_STATUS, " & strTablePrefix & "FORUM.F_PRIVATEFORUMS "
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")

'## Forum_SQL - Find out if the Topic is Locked or Un-Locked and if it Exists
strSql = "SELECT " & strTablePrefix & "TOPICS.T_STATUS " 
strSql = strSql & " FROM " & strTablePrefix & "TOPICS "
strSql = strSql & " WHERE " & strTablePrefix & "TOPICS.TOPIC_ID = " & Request.QueryString("TOPIC_ID")

set rsTStatus = my_Conn.Execute (StrSql)

if rsCStatus.EOF or rsCStatus.BOF or rsFStatus.EOF or rsFStatus.BOF or rsTStatus.EOF or rsTStatus.BOF then
	Response.Redirect(strForumURL)
else
	mypage = request("whichpage")

	if mypage = "" then
	   mypage = 1
	end if

'####################################
	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 language="JavaScript">
<!--
function jumpTo(s) {if (s.selectedIndex != 0) top.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 
 %>
<table border="0" width="100%">
  <tr>
	<td width="100%" align="left" nowrap><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
	<img src="<%=strImageURL %>icon_folder_open.gif" height=15 width=15 border="0">&nbsp;<a href="default.asp">返回论坛首页</a>&nbsp;<img src="<%=strImageURL %>icon_folder_open.gif" height=15 width=15 border="0">&nbsp;<a href="FORUM.asp?FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>"><% =ChkString(Request.QueryString("FORUM_Title"),"display") %></a>
<% call PostingOptions() %>
    </font></td><form action="<% =Request.ServerVariables("SCRIPT_NAME") & "?" & Request.Querystring  %>" method="post" name="SortFilter">
<td align=right> 
<select name="SortChoice" onchange="javascript:setSort();">
      <option value="0" <% if sortorder = "0" then Response.Write(" SELECTED")%>>旧文章排前面</option>
      <option value="1" <% if sortorder = "1" then Response.Write(" SELECTED")%>>新文章排前面</option>
      <option value="2" <% if sortorder = "2" then Response.Write(" SELECTED")%>>先显示原文章再从最新排起</option>
    </select>
   
  </td></form></tr>
<% '#################################### %>
  <tr>
  <table border="0" width="100%" cellspacing="0" cellpadding="3" align="center">
  <tr>
     <td align=left>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -