📄 myreplytopic.asp
字号:
<!--#include file="Connections.asp" -->
<!--#include file="top.asp" -->
<%cpbtitle="我参与的主题"
call toptitle(l_title,cpbtitle)
call head(4,cpbusername&"的控制面板首页","userindex.asp",cpbtitle)
if cpbusername="" then
errormsg="<li>您还没有登陆,不能查看参与的主题,请先<a href=login.asp>登陆</a></li>"
call error(errormsg)
call login()
else
%>
<table border=1 borderColor=<%=tdc2%> cellPadding=1 cellSpacing=1 width=<%=tdc3%> style="border-collapse: collapse">
<% page=request.querystring("page")
if page="" then
page=1
end if
pages = ""&t_page&""
set rs = server.createobject("adodb.recordset")
sql="select distinct t_id from reply where r_username='"&cpbusername&"' order by t_id desc"
rs.open sql,conn,1,3
if not(rs.BOF or rs.EOF) then
rs.pagesize = pages
maxpagecount=rs.pagecount
r=cint(rs.RecordCount)'记录总数
rs.absolutepage = page '当前页数
rcount=0
%>
<tr align="center">
<td width="10%" <%=tColor%> class=tdc1 height=23>作者</td>
<td width="35%" <%=tColor%> class=tdc1>主题</td>
<td width="5%" <%=tColor%> class=tdc1>点击</td>
<td width="5%" <%=tColor%> class=tdc1>回复</td>
<td width="15%" <%=tColor%> class=tdc1>发表时间</td>
<td width="15%" <%=tColor%> class=tdc1>最后回复时间</td>
<td width="10%" <%=tColor%> class=tdc1>最新回复</td>
</tr>
<% do while not rs.eof and rcount <rs.pagesize
sql1="select t_username,t_id,l_id,t_replynum,t_count,t_lastusername,t_title,t_time,t_lasttime from topic where t_id="&rs("t_id")&""
set rs1=conn.execute(sql1)
if not rs1.eof then
%>
<tr align="left">
<td width="10%" bgcolor=<%=tColor2%> class=tdc height=22 align=center><a href="viewuser.asp?username=<%=rs1("t_username")%>" target=_blank><%=rs1("t_username")%></a></td>
<td width="35%" bgcolor=<%=tColor2%> class=tdc><a href=topic.asp?l_id=<%=rs1("l_id")%>&t_id=<%=rs1("t_id")%> title=<%=HTMLEncode(rs1("t_title"))%>><%=left(HTMLEncode(rs1("t_title")),30)%>...</td>
<td width="5%" bgcolor=<%=tColor2%> class=tdc align=center><%=rs1("t_count")%> </td>
<td width="5%" bgcolor=<%=tColor2%> class=tdc align=center><%=rs1("t_replynum")%> </td>
<td width="15%" bgcolor=<%=tColor2%> class=tdc align=center><%=rs1("t_time")%> </td>
<td width="15%" bgcolor=<%=tColor2%> class=tdc align=center><%=rs1("t_lasttime")%> </td>
<td width="10%" bgcolor=<%=tColor2%> class=tdc align=center><a href=viewuser.asp?username=<%=rs1("t_lastusername")%> target=_blank><%=rs1("t_lastusername")%></a> </td>
</tr>
<%
end if
set rs1=nothing
rs.MoveNext
rcount=rcount+1
loop
rs.close
set rs=nothing
%>
<tr>
<td colspan="7" bgcolor=<%=tColor2%> class=tdc height=22><% if maxpagecount="" then maxpagecount=1
if r="" then r=0
pagestart=page-5
pageend=page+5
if pagestart<1 then pagestart=1
if pageend>maxpagecount then pageend=maxpagecount
response.write(" [ ")
if maxpagecount > 6 then Response.Write ("<a href=?page=1>1</a> ... ")
for i=pagestart to pageend
if i<>int(page) then
Response.Write (" <a href=?page="&i&">" & i & "</a> ")
else
Response.Write ("<b>"&i&"</b> ")
end if
next
if maxpagecount > page +5 then Response.Write( " ... <a href=?page="&maxpagecount&">"&maxpagecount&"</a>")
response.write(" ] ")
response.write("..页次:"&page&"/"&maxpagecount&"页 每页:"&pages&" 记录数:"&r&" ")%>
</td></tr>
<%else
errormsg="<li>您还没有参与主题</li>"
call error(errormsg)
end if%>
</table>
</div>
<%
end if
%><!--#include file="bq.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -