?? admin_review.asp
字號:
<!--#include file="Include/xbqq_Setup.asp"-->
<!--#include file="Conn.asp"-->
<!--#include file="include/char.asp" -->
<!--#include file="Include/check.asp"-->
<!--#include FILE="Include/Admin_Function.asp"-->
<link href="other/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="http://www.kuhang.cn">刪除</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 + -