📄 top.asp
字号:
<!--#include file="Inc.asp"-->
<%dim bbsurl,topicnum,Tsql,trs,topicbd,topicgood,topichot,goodnum
'调用方式
'调用某版面最新的贴子 : top.asp?boardID=版面序号
'调用某版面最新精华帖 : top.asp?boardID=版面序号&good=1
'调用某版面最新热帖 : top.asp?boardID=版面序号&hot=1
'调用所有版面最新精华帖:top.asp?good=1
'调用所有版面最新精华帖并且是热帖 : top.asp?good=1&hot=1
'调用所有版面最新热帖 : top.asp?hot=1
'调用某版面最新的精华并且是热帖: top.asp?boardID=版面序号&good=1&hot=1
bbsurl="http://www.lamking.com/bbs" '论坛地址绝对路径,末尾不能加上 /
topicnum=5'显示数目
goodnum=20 '热帖标准
topicbd=request.querystring("boardID")
topicgood=request.querystring("good")
topichot=request.querystring("hot")
'版面
If topicbd<>"" And BBS94KK.Fun.isInteger(topicbd) Then
topicbd=" boardid="&topicbd&" and "
Else
topicbd=""
End If
'精华
If topicgood<>"" And BBS94KK.Fun.isInteger(topicgood) Then
topicgood=" and isGood "
Else
topicgood=""
End If
'热帖
If topichot<>"" and BBS94KK.Fun.isInteger(topichot) Then
topichot=" and ReplyNum>"&goodnum&" "
Else
topichot=""
End If
%>
document.write("<style type='text/css'><!--.css { font-size: 9pt}--></style><table class=css border='1' cellpadding='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#f3f3f3' width='100%'>");
document.write("<%
tsql="select top "&topicnum&" TopicID,Name,Face,Caption,boardid,lasttime,SqlTableID From KK_topic where "&topicbd&" Not isdel "&topicgood&" "&topichot&" order by lasttime desc"
set trs=BBS94KK.Execute(tsql)
do while not trs.eof
response.write"<tr height='24'><td align='center' width='40'><img src="&bbsurl&"/pic/face/"&trs("face")&".gif align='absmiddle'></td>"
response.write"<td width=*> <a target='_blank' href="&bbsurl&"/Show.asp?BoardID="&trs("BoardID")&"&ID="&trs("topicid")&"&TB="&trs("SqlTableID")&">"&BBS94KK.Fun.StrLeft(trs("Caption"),30)&"</a></td>"
response.write"<td width='90'> <a target='_blank' href="&bbsurl&"/userinfo.asp?name="&trs("Name")&">"&trs("Name")&"</a></td>"
response.write"<td width='200'> "&trs("lasttime")&"</td></tr>"
trs.movenext
loop
trs.close
set trs=nothing
Set Cache=Nothing
Set BBS94KK = Nothing
%>");
document.write("</table>");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -