www.gusucode.com > 仿MOP对开式论坛程序 1.0源码程序 > usertr.asp

    <%@Language="VBScript"%>
<!--#include file="title.asp"-->
<%
Dim topic,reply,i,page
contents=contents &"<title>用户帖子-"& caption &"</title>"&_
"</head>"&_
"<base target="""& bbssn &"right"">"&_
"<body>"&_
"<table border=""0"" cellpadding=""0"" cellspacing=""0"" width=""100%"">"&_
"<tr><td width=""5"" height=""15""></td><td background="""& theme &"02.gif"">&nbsp;</td><td width=""14"" height=""15""></td></tr>"&_
"</table>"&_
"<table border=""0"" cellpadding=""0"" cellspacing=""0"" width=""100%"" class=""tdc"">"
if bbsadmin>3 then
topic=Request.QueryString("topic")
reply=Request.QueryString("reply")
page=Request.QueryString("page")
if IsNumeric(page) then
page=Abs(Clng(page))
else
page=1
end if
if page=0 then page=1
if topic<>"" then
contents=contents &"<tr class=""toptr""><td class=""tdc"" height=""20"" background="""& theme &"02.gif"">用户 "& topic &" 发布的帖子</td></tr>"
rs.Open "Select title,gbmaduser,posttime,anonymity,click,link,reply,lastupdate,lastuser From topic Where deler is Null and gbmaduser='"& topic &"' Order by posttime Desc",conn,1,1
if Not rs.Eof then
rs.PageSize=100
if page>rs.PageCount then page=rs.PageCount
rs.AbsolutePage=page
contents=contents &"<tr class=""tds""><td>"&_
"当前在第"& page &"页 转到第 "
For i=1 to rs.PageCount
contents=contents &"<a href=""usertr.asp?topic="& topic &"&page="& i &""" target=""_self"">"& i &"</a> "
Next
contents=contents &"页 共有"& rs.PageCount &"页 共"& rs.RecordCount &"条"&_
"</td></tr>"
For i=1 to rs.PageSize
if rs("anonymity")<>"" then
contents=contents &"<tr height=""20"" onmouseover=""this.className='otr';"" onmouseout=""this.className='';""><td class=""tdc"">&nbsp;<a href=""topic/"& rs("link") &""" title=""帖子作者:神秘人物"& rs("anonymity") & vbcrlf &"发贴时间:"& rs("posttime") & vbcrlf &"最后回复:"& rs("lastuser") & vbcrlf &"更新时间:"& rs("lastupdate") & vbcrlf &"人气:("& rs("reply") &"/"& rs("click") &")"">"& rs("title") &"</a></td></tr>"
else
contents=contents &"<tr height=""20"" onmouseover=""this.className='otr';"" onmouseout=""this.className='';""><td class=""tdc"">&nbsp;<a href=""topic/"& rs("link") &""" title=""帖子作者:"& rs("gbmaduser") & vbcrlf &"发贴时间:"& rs("posttime") & vbcrlf &"最后回复:"& rs("lastuser") & vbcrlf &"更新时间:"& rs("lastupdate") & vbcrlf &"人气:("& rs("reply") &"/"& rs("click") &")"">"& rs("title") &"</a></td></tr>"
end if
rs.MoveNext
if rs.Eof then Exit For
Next
end if
rs.Close
elseif reply<>"" then
contents=contents &"<tr class=""toptr""><td class=""tdc"" height=""20"" background="""& theme &"02.gif"">用户 "& topic &" 回复的帖子</td></tr>"
rs.Open "Select content,posttime,anonymity,deler,topicid From reply Where gbmaduser='"& reply &"' Order by posttime Desc",conn,1,1
if Not rs.Eof then
rs.PageSize=20
if page>rs.PageCount then page=rs.PageCount
rs.AbsolutePage=page
contents=contents &"<tr class=""tds""><td>"&_
"当前在第"& page &"页 转到第 "
For i=1 to rs.PageCount
contents=contents &"<a href=""usertr.asp?reply="& reply &"&page="& i &""" target=""_self"">"& i &"</a> "
Next
contents=contents &"页 共有"& rs.PageCount &"页 共"& rs.RecordCount &"条"&_
"</td></tr>"
For i=1 to rs.PageSize
if rs("anonymity")<>"" then
contents=contents &"<tr height=""20"" onmouseover=""this.className='otr';"" onmouseout=""this.className='';""><td class=""tdc"">&nbsp;<a href=""myreply.asp?id="& rs("topicid") &""" title=""回复作者:神秘人物"& rs("anonymity") & vbcrlf &"回复时间:"& rs("posttime")
else
contents=contents &"<tr height=""20"" onmouseover=""this.className='otr';"" onmouseout=""this.className='';""><td class=""tdc"">&nbsp;<a href=""myreply.asp?id="& rs("topicid") &""" title=""回复作者:"& reply & vbcrlf &"回复时间:"& rs("posttime")
end if
if rs("deler")<>"" then
contents=contents & vbcrlf &"已经被 "& rs("deler") &" 删除"">"& rs("content") &"</a></td></tr>"
else
contents=contents &""">"& rs("content") &"</a></td></tr>"
end if
rs.MoveNext
if rs.Eof then Exit For
Next
end if
rs.Close
else
contents=contents &"<tr class=""toptr""><td class=""tdc"" height=""20"" background="""& theme &"02.gif"">出错</td></tr><tr><td><br> 非法调用或者程序出错。<br> 请确定你是通过正常方式进行操作。<br> 如果依旧出错,请<a href=""reporting.asp"">联系管理员报告错误</a>。<br><br></td></tr>"
end if
else
call connclose
Response.Redirect "login.asp"
end if
contents=contents &"</table>"&_
"<table border=""0"" cellpadding=""0"" cellspacing=""0"" width=""100%"">"&_
"<tr><td width=""5"" height=""15""><img border=""0"" src="""& theme &"02.gif""></td><td background="""& theme &"02.gif"">&nbsp;</td><td width=""14"" height=""15""><img border=""0"" src="""& theme &"02.gif""></td></tr>"&_
"</table>"
%>
<!--#include file="bottom.asp"-->