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

📄 new.asp

📁 BBS论坛的开发和设计
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="admin/BBSConfig.asp"-->
<%
bbsPath = "" '论坛在根目录请留空,否则请输入论坛所在空间文件夹名,请在论坛所在文件夹名前后加"/",比如:bbsPath = "/bbs/"

action = trim(request.QueryString("action"))
n = trim(request.QueryString("n"))
if not(IsNumeric(n)) then n = 10
if action = "new" then
	sql = "select top "& n &" threadID,thread_title,posttime,pollid,openpost,bestpost,displayorder,toppost,replycount,viewcount,postuserid,postusername,lastpost,lastposterid,lastposter,lastcontent,moveid,icons,rating from JBB_thread order by lastpost desc"
else
	sql = "select top "& n &" threadID,thread_title,posttime,pollid,openpost,bestpost,displayorder,toppost,replycount,viewcount,postuserid,postusername,lastpost,lastposterid,lastposter,lastcontent,moveid,icons,rating from JBB_thread order by viewcount desc"
End if
set rs = server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
if Not(rs.eof and rs.bof) then	
	response.write"document.write('<table width=""100%"" border=""0"" align=""center"" cellspacing=""1"">');"
	for i = 1 to n
		if rs.eof then exit for
		response.write"document.write('<tr><td width=18>');"
		if trim(rs("icons")) <> 0 then
			response.write"document.write('<img src="""&bbsPath&"images/posticon/icon"& trim(rs("icons")) &".gif"">');"
		End if
		if rs("moveid") > 0 then
			threadURL = rs("moveid")
		else
			threadURL = rs("threadID")
		End if
		response.write"document.write('</td><td><a href="""&bbsPath&"showthread.asp?threadid="& threadURL &""" target=""_blank"">"& rtrim(rs("thread_title")) &"</a>');"
		if rs("postuserID") <> 0 then
			response.write"document.write(' [<a href="""&bbsPath&"user.asp?userID="& rs("postuserID") &""" target=""_blank"">"& rtrim(rs("postusername")) &"</a>]');"
		else
			response.write"document.write(' [游客]');"
		End if
		response.write"document.write('</td></tr>');"
	rs.MoveNext
	Next'i
	response.write"document.write('</table>');"
End if
rs.close
set conn = nothing
%>

⌨️ 快捷键说明

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