📄 admin_review.asp
字号:
<!--#include file="Include/conn.asp"-->
<!--#include file="include/char.asp" -->
<!--#include file="Include/check.asp"-->
<!--#include FILE="Include/Admin_Function.asp"-->
<%
'* 个人版价格:500元 商业版价格:700元
'* 演示:http://Demo.wenday.com
'* 版本:Engine_WenDay网站信息系统 Ver 2.0 演示版
'* 版权所有: 一奔网络工作室(Wenday.Com)
'* 联系QQ: 42367091
'* Email :wenday@21cn.com
'* 程序开发: Wenday
%>
<link href="Img/Admin.css" rel="stylesheet" type="text/css">
<%
CheckAdmin2
if Request.QueryString("Action")="Del" then
ReViewID=request("ReViewID")
set rs=server.createobject("adodb.recordset")
Sql="delete from ReView where ReViewID="&ReViewID
rs.open Sql,conn,3,3
set rs=nothing
conn.close
Response.Redirect (request.servervariables("HTTP_REFERER"))
end if
MaxPerPage=8 '分页显示的纪录个数
dim sql
dim rs
dim gstBookID
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
sql="select * from Review ORDER BY ReTime DESC"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
rs.pagesize=MaxPerPage
If trim(Request("Page"))<>"" and IsNumeric(Request("Page")) then
CurrentPage= CLng(request("Page"))
If CurrentPage< 1 then
CurrentPage= 1
ElseIf CurrentPage> rs.PageCount then
CurrentPage = rs.PageCount
End If
Else
CurrentPage= 1
End If
if rs.eof then
response.write "<p align='center'>还没有评论信息...</p>"
else
totalPut=rs.recordcount '记录总数
if CurrentPage=1 then
showpages
showContent
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move(currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark '移动到开始显示的记录位置
showpages
showContent
else
currentPage=1
showContent
end if
end if
rs.close
end if
set rs=nothing
set conn=nothing
sub showContent
%>
<TABLE width="100%" align="center" cellspacing="2" >
<%
dim i
i=0
do while not (rs.eof or err)
%>
<tr>
<td height="19"> <div align="right"></div>
<div align="left">
<table width="500" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td height="24" colspan="2" bgcolor="#EAEAEA">评论:<a href="ViewInfo.asp?id=<%=rs("InfoID")%>" target="_blank"><%=rs("Title")%></a></td>
</tr>
<tr>
<td colspan="2" bgcolor="#FFFFFF">网友:<%=rs("Reply")%> Email:<a href="mailto:<%=rs("UserEmail")%>"><%=rs("UserEmail")%></a> <hr size="1">
评论:<%=rs("Content")%></td>
</tr>
<tr>
<td height="18" colspan="2" bgcolor="#EAEAEA"> <div align="right"><a href="Admin_Review.asp?Action=Del&ReViewID=<%=rs("ReViewID")%>">删除</a> </div></td>
</tr>
</table>
</div></td>
</tr>
<%
i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
</TABLE>
<%end sub%>
<%sub showpages()%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="28">
<div align="center">
<%
dim n,k
if (totalPut mod MaxPerPage)=0 then
n= totalPut \ MaxPerPage
else
n= totalPut \ MaxPerPage + 1
end if
%>
共有<%=rs.recordcount%>个记录
每页<%=MaxPerPage%>个记录
<%
k=currentPage
if k=1 then
response.write " 首页 "& vbCrLf
response.write " 上一页 "& vbCrLf
end if
if k<>1 then
response.write "<a href='Admin_Review.asp?page=1'> 首页 </a>"
response.write "<a href='Admin_Review.asp?page="+cstr(k-1)+"'> 上一页 </a>"
end if
if k=n then
response.write " 下一页 "& vbCrLf
response.write " 末页 "& vbCrLf
end if
if k<>n then
response.write "<a href='Admin_Review.asp?page="+cstr(k+1)+"'> 下一页 </a>"
response.write "<a href='Admin_Review.asp?page="+cstr(n)+"'> 末页 </a>"
end if
%>
</div></td>
</tr>
</table>
<%
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -