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

📄 new.asp

📁 感谢您使用BBSXP
💻 ASP
字号:
<!-- #include file="Conn.asp" -->
<%
'=========================================================
' 调用标题代码
'<script src=New.asp?ForumID=1&TopicCount=10&Count=15&Showtime=1&icon=◎></script>
'---------------------------------------------------------
' 调用内容代码
'<script src=New.asp?Showcontent=1&icon=◎></script>
'---------------------------------------------------------
' ForumID:    指定论坛的ID
' TopicCount: 显示多少条主题
' Count:      标题 长度
' Showtime:   1=显示时间 0=不显示时间
' Showcontent:1=显示内容 0=不显示内容
' icon:       标题前的符号
'=========================================================
ForumID=int(Request("ForumID"))
if Request("TopicCount")=empty then
TopicCount=10
else
TopicCount=int(Request("TopicCount"))
end if
if TopicCount>100 then Response.End

if Request("Count")=empty then
Count=100
else
Count=int(Request("Count"))
end if



SiteURL=Conn.Execute("Select SiteURL From [BBSXP_SiteSettings]")(0)

	if ForumID <> empty then sqlForumID=" and ForumID="&ForumID&""
	sql="select top "&TopicCount&" * from [BBSXP_Threads] where IsDel=0 "&sqlForumID&" order by id desc"
	Set Rs=Conn.Execute(sql)
	do while Not Rs.Eof
	if Request("Showcontent")=1 then
	content=ReplaceText(Rs("content"),"<[^>]*>","")
	if len(content)>200 then content=Left(""&content&"",200)&"..."
	list=list&" <table border=0 width="&CHR(34)&"100%"&CHR(34)&" style=TABLE-LAYOUT:fixed><tr><td>"&Request("icon")&" <a href="&SiteURL&"ShowPost.asp?ThreadID="&Rs("id")&" target=_blank>"&Rs("Topic")&"</a><br><br>"&content&"</td></tr><tr><td align=right><a href="&SiteURL&"ShowPost.asp?ThreadID="&Rs("id")&" target=_blank><u> "&Rs("UserName")&" 发表于 "&Rs("Posttime")&" - "&Rs("replies")&" 个评论</u></a></td></tr></table><hr>"
	else
	Topic=ReplaceText(Rs("Topic"),"<[^>]*>","")
	if Request("Showtime")=1 then Showtime=" ["&Rs("lasttime")&"]"
	list=list&""&Request("icon")&" <a href="&SiteURL&"ShowPost.asp?ThreadID="&Rs("id")&" target=_blank>"&Left(Topic,Count)&"</a>"&Showtime&"<br>"
	end if
	Rs.MoveNext
	Loop
	set rs=nothing
	Conn.close
	set Conn=nothing

''''''''''替换模块START''''''''''''
Function ReplaceText(fString,patrn,replStr)
Set regEx = New RegExp  ' 建立正则表达式。
regEx.Pattern = patrn   ' 设置模式。
regEx.IgnoreCase = True ' 设置是否区分大小写。
regEx.Global = True     ' 设置全局可用性。 
ReplaceText = regEx.Replace(fString, replStr) ' 作替换。
Set reg=nothing
End Function
''''''''''替换模块END''''''''''''
%>
document.write("<%=list%>")

⌨️ 快捷键说明

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