📄 review.asp
字号:
<%@ Language=VBScript%>
<!--#include file=include/conn.asp -->
<!--#include file=include/config.asp -->
<%
NewsID=Request.QueryString("NewsID")
reviewid=Request.QueryString("reviewid")
set rs=server.CreateObject("ADODB.RecordSet")
rs.Source="select * from review where NewsID=" & NewsID & " order by reviewid desc"
rs.Open rs.Source,conn,1,1
PageShowSize = 10 '每页显示多少个页
MyPageSize = 5 '每页显示多少条
If Not IsNumeric(Request("page")) Or IsEmpty(Request("page")) Or Request("page") <=0 Then
MyPage=1
Else
MyPage=Int(Abs(Request("page")))
End if
if rs.EOF then NoReview=1
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>文章评论_<%=redcaff%></title>
<LINK href=news.css rel=stylesheet>
</head>
<body topmargin="0"><form method="POST" action="AddReview.asp">
<!--#include file=include/top.asp -->
<table width="750" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="<%=border%>">
<tr valign="top">
<td height="1" width="1" ></td>
<td height="1" width="748" ></td>
<td height="1" width="1" ></td>
</tr>
<tr valign="top">
<td width="1"></td>
<td width="748" bgcolor="<%=t_m_bg%>"> </td>
<td width="1"></td>
</tr>
<tr valign="top">
<td height="1" width="1" ></td>
<td height="1" width="748" ></td>
<td height="1" width="1" ></td>
</tr>
</table>
<table width="750" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="<%=border%>">
<tr>
<td>
<table width="748" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff" align="center">
<tr>
<td width="20"> </td>
<td width="637" height="20">当前位置:<a class=class href="./" >首页</a>>>评论</td>
</tr>
</table>
</td>
</tr>
</table>
<table border="0" style="border-collapse: collapse" bordercolor="<%=border%>" width="750" align=center cellspacing="0" cellpadding="0" bgcolor="<%=m_main%>">
<tr>
<td width="100%">
<table border="0" width="100%" cellspacing="1" cellpadding="0" bgcolor="<%=border%>">
<tr>
<td width="95%" align="middle" valign="top" bgcolor="#FFFFFF">
<table border="0" width="98%">
<tr>
<td width="69%" align="center" valign="top">
<table border="0" cellpadding="3" cellspacing="0" width="85%">
<%
if NoReview then
Response.Write "<tr><td height=50>该信息当前没有评论!</td></tr>"
else
'if not NoReview then
Rs.PageSize = MyPageSize
MaxPages = Rs.PageCount
Rs.absolutepage = MyPage
total = Rs.RecordCount
i = 0
%>
<tr>
<td width="100%" height="57"> <b>共 <%=total%> 条,第 <%=Mypage%>/<%=Maxpages%>
页,每页 <%=MyPageSize%> 条</b></td>
</tr>
<% do until Rs.Eof or i = Rs.PageSize
author=server.HTMLEncode(trim(rs("author")))
email=server.HTMLEncode(trim(rs("email")))
content=trim(rs("content"))
content=replace(content,"<","<")
content=replace(content,">",">")
content=replace(content,chr(13),"<BR>")
%>
<tr>
<td colspan="2">
<table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr bgcolor="D1E4FC">
<td colspan="2">发表人:<%=author%></td>
</tr>
<tr bgcolor="D1E4FC">
<td colspan="2">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>发表人邮件:<a href='mailto:<%=email%>'><%=email%></a></td>
<td align="right">发表时间:<%=rs("updatetime")%></td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor=ffffff colspan="2">
<%
DisplayContent=Content
Response.Write " " & displaycontent
%>
</td>
</tr>
</table>
<hr size="1" noshade>
<%
Rs.MoveNext
i = i + 1
loop
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center">共 <%=total%> 条,第 <%=Mypage%>/<%=Maxpages%> 页,每页
<%=MyPageSize%> 条
<%
url="review.asp?NewsID=" & NewsID
PageNextSize=int((MyPage-1)/PageShowSize)+1
Pagetpage=int((total-1)/Rs.PageSize)+1
if PageNextSize >1 then
PagePrev=PageShowSize*(PageNextSize-1)
Response.write "<a class=black href='" & Url & "&page=" & PagePrev & "' title='上" & PageShowSize & "页'>上一翻页</a> "
Response.write "<a class=black href='" & Url & "&page=1' title='第1页'>页首</a> "
end if
if MyPage-1 > 0 then
Prev_Page = MyPage - 1
Response.write "<a class=black href='" & Url & "&page=" & Prev_Page & "' title='第" & Prev_Page & "页'>上一页</a> "
end if
if Maxpages>=PageNextSize*PageShowSize then
PageSizeShow = PageShowSize
Else
PageSizeShow = Maxpages-PageShowSize*(PageNextSize-1)
End if
If PageSizeShow < 1 Then PageSizeShow = 1
for PageCounterSize=1 to PageSizeShow
PageLink = (PageCounterSize+PageNextSize*PageShowSize)-PageShowSize
if PageLink <> MyPage Then
Response.write "<a class=black href='" & Url & "&page=" & PageLink & "'>[" & PageLink & "]</a> "
else
Response.Write "<B>["& PageLink &"]</B> "
end if
If PageLink = MaxPages Then Exit for
Next
if Mypage+1 <=Pagetpage then
Next_Page = MyPage + 1
Response.write "<a class=black href='" & Url & "&page=" & Next_Page & "' title='第" & Next_Page & "页'>下一页</A>"
end if
if MaxPages > PageShowSize*PageNextSize then
PageNext = PageShowSize * PageNextSize + 1
Response.write " <A class=black href='" & Url & "&page=" & Pagetpage & "' title='第"& Pagetpage &"页'>页尾</A>"
Response.write " <a class=black href='" & Url & "&page=" & PageNext & "' title='下" & PageShowSize & "页'>下一翻页</a>"
End if
End If
Rs.close
%>
</td>
</tr>
</table>
<hr size="1" noshade>
<br>
</td>
</tr>
<tr>
<td width="100%">
<table border="0" cellspacing="0" width="100%" cellpadding="4">
<input type=hidden name=NewsID value=<%=NewsID%>>
<input type=hidden name=url value="http://<%= Request.ServerVariables("SERVER_NAME") %><%=Request.ServerVariables("url")%>?<%=Request.ServerVariables("QUERY_STRING")%>">
<tr>
<td width="13%" align="right"><a name="send">姓名:</a></td>
<td width="87%">
<input type="text" name="Author" size="56">
</td>
</tr>
<tr>
<td width="13%" align="right">邮件:</td>
<td width="87%">
<input type="text" name="email" size="56"></td>
</tr>
<tr>
<td width="13%" align="right" valign="top">评论:</td>
<td width="87%">
<textarea rows="6" name="Content" cols="55" style="font-family: 宋体; font-size: 9pt"></textarea>
</td>
</tr>
<tr>
<td width="13%"></td>
<td width="87%" height="50">
<p>
<input type="hidden" name="editor" value="<%=editor%>">
<input type=submit value="发表评论">
<input type=reset value="重新填写">
</p>
<p> </p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--#include file=include/bottom.asp -->
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -