📄 elselist.asp
字号:
<!--#include file="up.asp"-->
<%
checklg()
dim sql,pagesetup,count,totalpage,pagecount,ii,iii,href1,href2,href3,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
action=request.querystring("action")
response.write"<script language='javascript'>function Check(){var Name=document.form.topage.value;document.location='?action="&action&"&totable="&totable&"&topage='+Name+'';}</script>"
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
%><table align="center" border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="<%=tbw%>" height="28">
<tr>
<td class=td1 width="120" bgcolor="<%=c1%>"background="<%=tbg%>"> <img border="0" src="pic/gl.gif"> 用户助手:</td>
<td bgcolor="<%=c2%>"> <a href="?action=today">·今日新帖</a> <a href="?action=good">·论坛精华区</a> <a href="?action=mytop">·我发表的帖子</a> <a href="?action=withmetop">·我参与的帖子</a> [<%=tablestr%>]</td>
</tr>
</table>
<br>
<%=ttop%><table align="center" class=td1 border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="<%=tbw%>" bgcolor="<%=c1%>" background="<%=tbg%>" height="28">
<tr>
<td width="5%" align="center">表情</td>
<td align="center" width="45%">主题 (点击表情在新窗口打开)</td>
<td align="center" width="10%">作者</td>
<td align="center" width="10%">回复/人气</td>
<td align="center" width="20%">最后更新时间</td>
<td align="center" width="10%">最后回复</td>
</tr>
</table>
<%
if action="" then action="today"
if action="today" then sql="select*from topic where edittime>now()+"×et&"/24-1 and type<>3 order by edittime desc"
if action="good" then sql="select*from topic where type=1 order by edittime desc"
if action="mytop" then sql="select*from topic where userid="&lguserid&" and type<>3 order by edittime desc"
if action="withmetop" then sql="select*from topic where id in(select bid from bbs"&totable&" where userid="&lguserid&") and type<>3 order by edittime desc"
set rs = server.createobject("adodb.recordset")
pagesetup=checknum(application(prefix&"topiclistpage"))
rs.Open sql,conn,1
TotalPage=0
Count=rs.recordcount
if not rs.eof then
If Count/pagesetup > (Count\pagesetup) then
TotalPage=(Count\pagesetup)+1
else TotalPage=(Count\pagesetup)
End If
pagecount= 0
rs.moveFirst
if Request.QueryString("ToPage")<>"" and isnumeric(Request.QueryString("ToPage")) then PageCount = cint(Request.QueryString("ToPage"))
if PageCount <=0 then PageCount = 1
if PageCount > TotalPage then PageCount = TotalPage
rs.move (PageCount-1) * pagesetup
i=1
do while not rs.eof
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)&">"&kbbs(retopic(1))&"</a>"
end if
response.write"<table border=1 align=center cellpadding=0 cellspacing=0 style='border-collapse: collapse;' width="&tbw&" height=28><tr><td width=5% align=center><a target=_blank href='showbbs.asp?bd="&rs("bd")&"&id="&rs("id")&"&totable="&rs("totable")&"' title='最后回复:"&kbbs(retopic(0))&"'><img border=0 src=face/"&topicinfo(0)&".gif></a></td><td width=45% > <a href='showbbs.asp?bd="&rs("bd")&"&id="&rs("id")&"&totable="&rs("totable")&"' title='最后回复:"&kbbs(retopic(0))&"'>"&topicinfo(3)&" <font color="&replacecolor(kbbs(topicinfo(1)))&">"&kbbs(topicinfo(1))&"</font></a></td><td align=center width=10% ><a href=userinfo.asp?userid="&rs("userid")&">"&kbbs(topicinfo(2))&"</a></td><td align=center width=10% >"&rs("renum")&"/"&rs("hits")&"</td><td align=center width=20% >"&rs("edittime")&"</td><td align=center width=10% >"&reinfo&"</td></tr></table>"
i=i+1
if i>pagesetup then exit do
rs.movenext
loop
end if
rs.Close
set rs=nothing
href1=" <a href=?topage=1&action="&action&"&totable="&totable&">"
response.write"<TABLE align='center' bgcolor="&c1&" cellSpacing=0 cellPadding=0 width='"&tbw&"' border=1 style='border-collapse: collapse; border-left-width: 1px; border-right-width: 1px; border-top-width: 1px'><TBODY><TR height=25><TD height=2><TABLE cellSpacing=0 cellPadding=3 width='100%' border=0 background='"&tbg&"' style='border-collapse: collapse; border-left-width:0; border-top-width:0; border-bottom-width:0'><TBODY><TR><TD><b><font color='#FFFFFF'><img border='0' src='pic/fl.gif'> 本版面共有</font><font color='#ffffff'> "&TotalPage&" </font><font color='#FFFFFF'>页,<font color='#ffffff'> "&count&" </font>张帖子,每页有<font color='#ffffff'> "&pagesetup&" </font> 张帖子 >> ["
ii=PageCount-5
iii=PageCount+5
if ii < 1 then
ii=1
end if
if iii > TotalPage then
iii=TotalPage
end if
if PageCount > 6 then
Response.Write ""&href1&"<font color=yellow>1</font></a> ... "
end if
for i=ii to iii
If i<>PageCount then
href2=" <a href=?topage="& i &"&action="&action&"&totable="&totable&">"
href3="<a href=?topage="&TotalPage&"&action="&action&"&totable="&totable&">"
Response.Write ""&href2&"<font color=yellow>" & i & "</font></a> "
else
Response.Write " <font color=red><b>"&i&"</b></font> "
end if
next
if TotalPage > PageCount+5 then
Response.Write " ... "&href3&"<font color=yellow>"&TotalPage&"</font></a>"
end if
response.write" ]</font></b></TD><form name=form method='POST' action=javascript:Check()><TD height=2 align='right'><font color='#FFFFFF'>页码: <input style=FONT-SIZE:9pt maxLength='6' size='6' name='topage' value='"&PageCount&"'> <input style=FONT-SIZE:9pt value='GO!' type='submit'></font></TD></form></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>"&tbottom&""
call down%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -