📄 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
dim userid
userid=Request.QueryString("userid")
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+'&userid="&userid&"';}</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 bordercolor="<%=c1%>" 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"><font color="<%=c3%>"> 用户助手:</font></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 bordercolor="<%=c1%>" align="center" class=td1 border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="<%=tbw%>" bgcolor="<%=c1%>" background="<%=tbg%>" height="28">
<tr>
<td width="5%" align="center"><font color="<%=c3%>">表情</font></td>
<td align="center" width="45%"><font color="<%=c3%>">主题 (点击表情在新窗口打开)</font></td>
<td align="center" width="10%"><font color="<%=c3%>">作者</font></td>
<td align="center" width="10%"><font color="<%=c3%>">回复/人气</font></td>
<td align="center" width="20%"><font color="<%=c3%>">最后更新时间</font></td>
<td align="center" width="10%"><font color="<%=c3%>">最后回复</font></td>
</tr>
</table>
<%
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
response.write"<table bordercolor="&c1&" border=1 align=center cellpadding=0 cellspacing=0 style='border-collapse: collapse; border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1' width="&tbw&" height=28 bgcolor=#ffffff>"
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"<tr><td width=5% height=28 align=center><a target=_blank href='show.asp?bd="&rs("bd")&"&id="&rs("id")&"&totable="&rs("totable")&"' title='最后回复:"&kbbs(retopic(0))&"'><img border=0 src=images/face/"&topicinfo(0)&".gif></a></td><td width=45% > <a href='show.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>"
i=i+1
if i>pagesetup then exit do
rs.movenext
loop
end if
response.write"</table>"
rs.Close
set rs=nothing
href1="<a href=elselist.asp?userid="&userid&"&topage=1&action="&action&"&totable="&totable&">"
response.write"<TABLE bordercolor="&c1&" 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="&c3&"><img border='0' src='pic/fl.gif'> 本版面共有</font><font color=red> "&TotalPage&" </font><font color="&c3&">页,<font color=red> "&count&" </font>张帖子,每页有<font color=red> "&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=elselist.asp?userid="&userid&"&topage="& i &"&action="&action&"&totable="&totable&">"
href3="<a href=elselist.asp?userid="&userid&"&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="&c3&">页码:<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 + -