📄 showcomment.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="top.asp"-->
<%
dim flashname,id,currentpage,maxperpage,i,totalpage,totalrecords
dim comment,strfile
flashname=checkstr(request("flashname"))
id=request("id")
if not isinteger(id) then
call mb("请正确指定您要查看的Flash作品!","",0)
end if
if flashname="" then
call mb("丢数:Flash作品名称丢失!","",0)
end if
currentpage=request("page")
if not isinteger(currentpage) then
currentpage=1
else
currentpage=clng(currentpage)
end if
maxperpage=10
totalpage=1
totalrecords=0
i=1
strfile="?id="&id
set rs=server.createobject("adodb.recordset")
sql="select * from comment where id="&id
rs.open sql,conn,1,1
if not (rs.bof and rs.eof) then
rs.pagesize=maxperpage
rs.absolutepage=currentpage
totalpage=rs.pagecount
totalrecords=rs.recordcount
end if
%>
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="112" height="308"> </td>
<td width="658" valign="top"><table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
<tr>
<td height="25" align="center">网友对Flash作品:<font color=red><%=flashname%></font>
的所有评论</td>
</tr>
<tr>
<td height="1" background="images/bg_hline.gif" ></td>
</tr>
<%do until rs.eof or i>maxperpage%>
<tr>
<td height="25"> 网友:<font color=blue><%=rs("name")%></font> 于 <%=rs("dateandtime")%>
发表评论说:</td>
</tr>
<tr>
<td height="25">
<%comment=rs("comment")
comment=replace(comment,chr(13),"<br>")
comment=replace(comment," "," ")
response.write comment
%>
</td>
</tr>
<tr>
<td height="1" background="images/bg_hline.gif"></td>
</tr>
<%rs.movenext
i=i+1
loop
%>
<tr>
<td height="25"><%if totalrecords>0 then call showpage(strfile,totalrecords,maxperpage,true,true,"条评论")%></td>
</tr>
</table></td>
</tr>
</table>
<!--#include file="bottom.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -