📄 otherlist.asp
字号:
<!--#include file="up.asp"--><!--#include file="inc/page.asp"-->
<%
checklg()
dim sql,pagesetup,topicinfo,retopic,reinfo,usedtable,tablestr,action
if isnull(lguserid) or lguserid="" then
tl=" 操 作 失 败"
mes="<b>对不起,你不能够执行本页面。可能存在以下问题:</b><br>·你还没有<a href=login.asp>登陆</a>。"
call sendinfo(tl,mes)
call down
response.end
end if
dim userid
userid=Request.QueryString("userid")
action=request.querystring("action")
usedtable=application(prefix&"usedtable")
usedtable=split(usedtable,"|")
for i=1 to ubound(usedtable)
tablestr=tablestr&"<a href=?action=withmetop&totable="&usedtable(i)&">"&usedtable(i)&"</a> "
next
%>
<div class=otherlistlan>
<a href="Rss.asp?action=today" target=_blank><img border="0" src="images/rss.png" align="absmiddle" title="订阅今日新贴"></a> | <a href="?action=today">今日新帖</a> | <a href="?action=good">论坛精华区</a> | <a href="?action=mytop">我发表的帖子</a> | <a href="?action=withmetop">我参与的帖子</a> [<%=tablestr%>]</div>
<%
'_____________________________________________________________________________________________________________________________________________
dim wzcount,wzrep,wzpagecount,wzpage,pagestr,urlstr,renum,hot,repage,width,face,n,nn
urlstr="bd="&bd&"&action="&action
wzrep=25
if action="" then action="today"
select case action
case "today"
sql="select*from topic where edittime>now()+"×et&"/24-1 and type<>3 order by edittime desc"
case "mytop"
sql="select*from topic where userid="&lguserid&" and type<>3 order by edittime desc"
case "withmetop"
sql="select*from topic where id in(select bid from bbs"&totable&" where userid="&lguserid&") and type<>3 order by edittime desc"
case "good"
if isnumeric(userid) and userid<>"" then
sql="select*from topic where type=1 and userid="&userid&" order by edittime desc"
else
sql="select*from topic where type=1 order by edittime desc"
end if
end select
set rs = server.createobject("adodb.recordset")
rs.Open sql,conn,1
if rs.eof or rs.bof then
response.write"<div class=norecord>暂无记录</div>"
else
wzcount=rs.recordcount
wzpagecount = abs(int(-abs(wzcount/wzrep)))
wzpage = clng(request.querystring("page"))
if len(wzpage) = 0 or wzpage = 0 then wzpage = 1
rs.absoluteposition=rs.absoluteposition+((abs(wzpage)-1)*wzrep)
pagestr="每页<font color=red>"&wzrep&"</font>条 共<font color=red>"&wzpagecount&"</font>页 ["&pagination(wzpagecount,urlstr)&"] "
response.write"<div class=otherlistpagestr>"&pagestr&"</div>"
%>
<div class=alltopic>
<div class=topictop><div class=tface>表情</div><div class=ttopic>主题 (点击表情在新窗口打开)</div><div class=tauthor>作者</div><div class=thits>回复/人气</div><div class=tlastre>最后回复</div></div>
<%
for i = 0 to wzrep-1
if rs.eof then exit for
topicinfo=rs("topicinfo")
topicinfo=split(topicinfo,"|")
retopic=rs("retopic")
if isnull(retopic) or retopic="" then
reinfo="——"
retopic="未有人回复。|——|0"
retopic=split(retopic,"|")
else
retopic=split(retopic,"|")
reinfo="<a href=userinfo.asp?userid="&retopic(2)&">"&checktitle(retopic(1))&"</a>"
end if
renum=rs("renum")
hot=checknum(application(prefix&"showbbspage"))
if renum/hot>(renum\hot) then
repage=(renum\hot)+1
else
repage=renum\hot
end if
width=35
face=topicinfo(0)
if rs("type")=1 then face="jing"
if rs("type")=2 then face="lock"
if rs("top")=1 then face="top"
if rs("top")=2 then face="alltop"
if repage>1 then width=25
response.write"<div class=topiclist><div class=tlface><img border=0 src=images/face/"&face&".gif></div><div class=tltopic><a href='showbbs.asp?bd="&rs("bd")&"&id="&rs("id")&"&totable="&rs("totable")&"' title='最后回复:"&checktitle(retopic(0))&"'>"&topicinfo(3)&" <font color="&replacecolor(checktitle(topicinfo(1)))&">"&lefttrue(checktitle(topicinfo(1)),width)&"</font></a>"
if repage>1 then
response.write" <img align=absmiddle border=0 src=images/hot.gif> <span class=hotfont>[</span><b> "
if repage<=4 then
for n=1 to repage
response.write"<a href=showbbs.asp?id="&rs("id")&"&bd="&rs("bd")&"&totable="&rs("totable")&"&topage="&n&"><span class=hotfont>"&n&"</span></a> "
next
else
for nn=1 to 3
response.write"<a href=showbbs.asp?id="&rs("id")&"&bd="&rs("bd")&"&totable="&rs("totable")&"&topage="&nn&"><span class=hotfont>"&nn&"</span></a> "
next
response.write"... <a href=showbbs.asp?id="&rs("id")&"&bd="&rs("bd")&"&totable="&rs("totable")&"&topage="&repage&"><span class=hotfont>"&repage&"</span></a> "
end if
response.write" </b><span class=hotfont>]</span>"
end if
response.write"</div><div class=tlauthor><a href=userinfo.asp?userid="&rs("userid")&">"&checktitle(topicinfo(2))&"</a></div><div class=tlhits>"&renum&"/"&rs("hits")&"</div><div class=tllastre>"&reinfo&"<br><span class=tllasttime>"&rs("edittime")&"</span></div></div>"
rs.movenext
next%>
</div>
<%
response.write"<div class=otherlistpagestr>"&pagestr&"</div>"
end if
rs.Close
set rs=nothing
%>
<%call down%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -