28,391
社区成员
发帖
与我相关
我的任务
分享
<%
if page<>"" then
currentPage=cint(page)
else
currentPage=1
end if
Set rs=Server.CreateObject("Adodb.RecordSet")
sql="select * from "&sysfilename&"newsmment where AicleID="&ID&" and Pased=1 order by CommentID desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write"<li>信息正在更新中...</li>"
else
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showContent
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showContent
else
currentPage=1
showContent
end if
end if
sub showContent
dim ArticleNum,aryReturn,ip
ArticleNum=0
do while not rs.eof
aryReturn = Split(rs("ip"),".")
ip=aryReturn(0)&"."&aryReturn(1)&"."&aryReturn(2)&".*"%>
<table width="720" border="0" cellspacing="0" cellpadding="0" style="border-bottom:#999999 1px dashed;">
<tr>
<td>网友:<%=ip%> 于 <%=rs("WriteTime")%> 发表评论,内容如下:</td>
</tr>
<tr>
<td style="text-indent:2em;"><%=rs("content")%></td>
</tr>
</table>
<%ArticleNum=ArticleNum+1
if ArticleNum>=MaxPerPage then exit do
rs.movenext
loop
end sub
rs.close
set rs=nothing
end if
%>