📄 new.asp
字号:
<!-- #include file="conn.asp" -->
<%
SiteSettings=Conn.Execute("[Wo_SiteSettings]")
'=========================================================
' 调用代码
'<script type="text/javascript" src="http://www.***.com/New.asp?TopicCount=10&TitleLen=15&Showtime=1&icon=◎"></script>
'---------------------------------------------------------
'调用的参数及说明:
' ForumID: 指定群组的ID(若不指定,调用整个群组)
' TopicCount: 显示多少条主题(最高100条)
' TimeLimit: 显示多长时间内的主题(单位:天)
' Sort: 排序方式 ThreadID[新主题] 、TotalViews[人气主题] 、TotalReplies[热门主题] 、IsGood[精华主题]
' icon: 标题前的符号(如:"◎")
' TitleLen: 显示标题的长度
' Showtime: 是否显示发表时间 1=是 0=否
'=========================================================
ForumID=RequestInt("ForumID")
TopicCount=RequestInt("TopicCount")
TitleLen=RequestInt("TitleLen")
TimeLimit=RequestInt("TimeLimit")
icon=HTMLEncode(Request("icon"))
Sort=HTMLEncode(Request("Sort"))
if Sort = empty then
SqlSort="ThreadID"
else
SqlSort=Sort
end if
if TitleLen=0 then
SqlTitleLen=100
else
SqlTitleLen=TitleLen
end if
if TopicCount=0 then
SqlTopicCount=10
elseif TopicCount>100 then
SqlTopicCount=100
else
SqlTopicCount=TopicCount
end if
if ForumID > 0 then SqlForumID=" and ForumID="&ForumID&""
if TimeLimit > 0 then SqlTimeLimit=" and PostTime>"&SqlNowString&"-"&TimeLimit&""
sql="select top "&SqlTopicCount&" * from [Wo_Threads] where IsDel=0 and IsApproved=1 "&SqlForumID&" "&SqlTimeLimit&" order by "&SqlSort&" desc"
Set Rs=Conn.Execute(sql)
do while Not Rs.Eof
Topic=ReplaceText(Rs("Topic"),"<[^>]*>","")
if Request("Showtime")=1 then Showtime=" ["&Rs("PostTime")&"]"
list=list&""&icon&" <a href="&SiteURL&"ShowPost.asp?ThreadID="&Rs("ThreadID")&" target=wh>"&Left(Topic,SqlTitleLen)&"</a>"&Showtime&"<br>"
Rs.MoveNext
Loop
Rs.close
%>
document.write("<%=list%>")
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -