?? adminbook.asp
字號(hào):
<%@ LANGUAGE="VBSCRIPT" %>
<%
if request.cookies("adminok")="" then
response.redirect "shoplogin.htm"
end if
%>
<!--#include file="conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>顯 示 留 言</title>
<style type="text/css">
body { font-family: 宋體; font-size: 9pt; }
table { font-family: 宋體; font-size: 9pt; }
a { text-decoration: none;color:3366ff}
a:active { text-decoration: none }
a:hover { color: red; font-size: 9pt; text-decoration: underline }
</style>
<%
const MaxPerPage=10 '分頁(yè)顯示的紀(jì)錄個(gè)數(shù)
dim sql
dim rs
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
dim pass
pass=request("pass")
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
set rs=server.createobject("adodb.recordset")
%>
<link rel="stylesheet" type="text/css" href="../style.css">
</head>
<body>
<!--#include file="indextop.asp" -->
<div align="center">
<center>
<table border="0" width="700">
<tr>
<td>
<p align="center">
<b>
〖刪除留言內(nèi)容〗
<% sql="select * from book order by id desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'>還沒(méi)有任何留言!</p>"
else
totalPut=rs.recordcount
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
showpages
showContent
showpages
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showpages
showContent
showpages
else
currentPage=1
showContent
end if
end if
rs.close
end if
set rs=nothing
conn.close
set conn=nothing
sub showContent
dim i
i=0
do while not (rs.eof or err) %>
</b>
</td>
</tr>
</table>
</center>
</div>
<div align="center">
<center>
<table border="0" cellspacing="1" width="700" bgcolor="#006699"><tr><td nowrap width="70" valign="top"><p align="right"><strong><font color="#FFFFFF">大名:</font></strong>
</td><td nowrap valign="top"><p align="left"><font color="#FFFFFF"><%=rs("name")%>
</font>
<a href="delbook.asp?id=<%=rs("ID")%>"><font color="#FFFFFF">刪除</font></a>
<a href="rebook.asp?id=<%=rs("ID")%>"><font color="#FFFFFF">回復(fù)</font></a>
</td></tr>
<%if rs("email")<>"" then%>
<tr> <td nowrap width="70" valign="top" bgcolor="#E6F2F2"><p align="right"><strong><font color="#004040"
face="Times New Roman">E-Mail</font><font color="#004040">:</font></strong></td>
<td nowrap valign="top" bgcolor="#E6F2F2" ><p align="left"><font
color="#000000"><a href="mailto:<%=rs("email")%>"><%=rs("email")%></a> </font></td>
</tr><%end if%><%if rs("homepage")<>"" and rs("homepage")<>"http://" then%><tr>
<td nowrap width="70" valign="top" bgcolor="#E6F2F2"><p align="right"><font color="#004040"><strong>主
頁(yè):</strong></font></td>
<td nowrap valign="top" bgcolor="#E6F2F2"><p align="left"><font color="#000000"><a
href="<%=rs("homepage")%>" target="_blank"><%=rs("homepage")%></a> </font></td>
</tr>
<%end if%>
<tr>
<td nowrap width="70" valign="top" bgcolor="#E6F2F2"><p align="right"><font color="#004040"><strong>主
題:</strong></font></td>
<td nowrap valign="top" bgcolor="#E6F2F2" ><p align="left"><font color="#000000"><%=rs("title")%> (<%=rs("time")%>)</font></td>
</tr>
<tr>
<td nowrap width="70" valign="top" bgcolor="#E6F2F2"><p align="right"><font color="#004040"><strong>內(nèi)
容:</strong></font></td>
<td valign="top" bgcolor="#E6F2F2"><font
color="#000000"><%=rs("content")%></font></td>
</tr>
<tr>
<td nowrap width="70" valign="top" bgcolor="#E6F2F2">
<p align="center"><b>回復(fù)留言</b></p>
</td>
<td valign="top" bgcolor="#E6F2F2"><b><font color="#808000"><%=rs("rebook")%></font></b></td>
</tr>
</table>
<p>
</center>
</div>
<div align="center">
<center>
<table border="0" width="700" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
<% i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
end sub
sub showpages()
dim n
if (totalPut mod MaxPerPage)=0 then
n= totalPut \ MaxPerPage
else
n= totalPut \ MaxPerPage + 1
end if
if n=1 then
response.write "留言簿管理界面"
response.write "</p>"
exit sub
end if
dim k
response.write "<p align='left'>>> 留言分頁(yè) "
for k=1 to n
if k=currentPage then
response.write "[<b>"+Cstr(k)+"</b>] "
else
response.write "[<b>"+"<a href='adminbook.asp?page="+cstr(k)+"'>"+Cstr(k)+"</a></b>] "
end if
next
response.write "</p>"
end sub
%>
<p> </td>
</tr>
</center>
</div>
<p align="center"> </p>
</body>
</html>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -