📄 book.asp
字号:
<%@ LANGUAGE="VBSCRIPT" %>
<% option explicit %>
<%response.buffer=false
%>
<!--#include file="conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>显 示 留 言</title>
<script>
function openbag(id) { window.open("eshop.asp?cpbm="+id,"","height=400,width=630,left=200,top=0,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");}
</script>
<script
language="javascript">
<!--
function winopen(url)
{
window.open(url,"search","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=yes,width=640,height=450,top=200,left=100");
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
<%
const MaxPerPage=10 '分页显示的纪录个数
dim sql
dim rs
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
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>
<div align="center">
<table width="764" height="1" border="0" align="center" cellPadding="0" cellSpacing="0" bgcolor="336699">
<tbody>
<tr>
<td width="100%" height="1" valign="top">
<img border="0" src="images/logo.gif"> </td>
</table>
</td>
</tr>
</tbody>
</table>
<div align="center">
<table border="0" width="764" cellspacing="0" cellpadding="0" height="60">
<center>
<tr>
<td width="100%" height="16" bgcolor="#336699">
<div align="right">
<table border=0 cellspacing=0 cellpadding=0 width="610">
<tr align=center>
<td width=25><img src=images/left.gif></td>
<td width=86 background="images/bgguide.gif"><a href="index.asp" class="guide">首 页</a></td>
<td background="images/bgguide.gif"><img src=images/guide.gif></td>
<td width=86 background="images/bgguide.gif"><a href="zxsp.asp" class="guide">最新商品</a></td>
<td background="images/bgguide.gif"><img src=images/guide.gif></td>
<td width=86 background="images/bgguide.gif"><a href="reguser.htm" class="guide">会员注册</a></td>
<td background="images/bgguide.gif"><img src=images/guide.gif></td>
<td width=86 background="images/bgguide.gif"><a href="javascript:openbag()">察看购物车</a></td>
<td background="images/bgguide.gif"><img src=images/guide.gif></td>
<td width=86 background="images/bgguide.gif">购物帮助</td>
<td background="images/bgguide.gif"><img src=images/guide.gif></td>
<td width=86 background="images/bgguide.gif"><a href="book.asp">顾客留言</a></td>
<td width=25><img src=images/right.gif></td>
</tr>
</table>
</div>
</td>
</tr>
</center>
<center>
<tr>
<td width="100%" valign="top" height="95">
<table cellSpacing="4" width="763" border="0" bordercolorlight="#FFFFFF" bgcolor="#FFFFFF">
<tbody>
<tr>
<td vAlign="top" bgcolor="#FFFFFF" width="100%"><img height="1" src="images/stretch.gif" width="146" border="0">
</center>
<div align="center">
<table border="0" width="90%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><% 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'> 还 没 有 任 何 留 言</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) %></td>
</tr>
</table>
</div>
<div align="center">
<table border="0" cellspacing="1"
bordercolordark="#FFFFFF" width="90%" bgcolor="#336699"><tr><td nowrap width="70" valign="top" bgcolor="#0099CC" align="center"><p><font color="#FFFFFF">大名:</font>
</td>
<center>
<td nowrap valign="top" bgcolor="#0099CC"><p align="left"><font color="#FFFFFF"><%=rs("name")%>
</font></td></tr>
<%if rs("email")<>"" then%>
</center>
<tr> <td nowrap width="70" valign="top" bgcolor="#F7F7E7" align="center"><p><font color="#004040">E-Mail</font></td>
<center>
<td nowrap valign="top" bgcolor="#F7F7E7" ><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%>
</center>
<tr>
<td nowrap width="70" valign="top" bgcolor="#F7F7E7" align="center"><p><font color="#004040">主
页</font></td>
<center>
<td nowrap valign="top" bgcolor="#F7F7E7"><p align="left"><font color="#000000"><a
href="<%=rs("homepage")%>" target="_blank"><%=rs("homepage")%></a> </font></td>
</tr>
<%end if%>
</center>
<tr>
<td nowrap width="70" valign="top" bgcolor="#F7F7E7" align="center"><p><font color="#004040">主
题</font></td>
<center>
<td nowrap valign="top" bgcolor="#F7F7E7" ><p align="left"><font color="#000000"><%=rs("title")%> (<%=rs("time")%>)</font></td>
</tr>
</center>
<tr>
<td nowrap width="70" valign="top" bgcolor="#F7F7E7" align="center"><p><font color="#004040">内
容</font></td>
<center>
<td valign="top" bgcolor="#F7F7E7"><font
color="#000000"><%=rs("content")%></font></td>
</tr>
</table>
<p>
</center>
</div>
<div align="center">
<table border="0" width="90%" 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 "<p align='left'><a href=guestbook.asp>写写留言</a>"
response.write "</p>"
exit sub
end if
dim k
response.write "<p align='left'>>> 留言分页 "
for k=1 to n
if k=currentPage then
response.write"["+Cstr(k)+"]"
else
response.write"["+"<a href='book.asp?page="+cstr(k)+"'>"+Cstr(k)+"</a>]"
end if
next
response.write " <a href=guestbook.asp>请你签写留言</a>"
response.write "</p>"
end sub
%>
<p> </td>
</tr>
</table>
</div>
</td>
<!-- this is the shade the right of the Portlet -->
</tr>
</tbody>
</table>
</td>
</tr>
</table>
</div>
<center>
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width=764 height="122" bgcolor="#FFFFFF">
<TBODY>
<TR>
<TD class=unnamed1 height=122 width=100%> <DIV align=center>
<hr size="1" color="#000000">
<p align="center" style="word-spacing: 0; margin-top: 0; margin-bottom: 0">版权信息
| 关于我们 | 隐私保护 | 合作事项 | 广告刊登 | 联系方式 | </p>
<p align="center" style="word-spacing: 0; margin-top: 0; margin-bottom: 0"><br>
www.eshop.net.cn 版权所有 Email:<a href="web@dginfo.com">web@dginfo.com</a></p>
</DIV></TD>
</TR>
</TBODY>
</TABLE>
</center>
</div>
<div align="center">
<center>
</center>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -