📄 guestbook1.asp
字号:
<!--#include file="shoptop.asp"-->
<center>
<table width="775" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0" height="520">
<tr>
<td width="150" valign="top" align="left"> <table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="150" valign="top" align="left">
<!--#include file="leftlistcom.asp"-->
</td>
</tr>
</table>
</td>
<Td valign=top>
<!--#include file="include/convert.asp"-->
<%
dim page,maxPerPage
maxPerPage=6 '每页显示的记录数
page=Request("page")
if (page="" or isempty(page)) then page=1
thisUrl="guestbook1.asp?true=1"
sql="select * from userbook where user_company='"&user_company&"' order by id desc"
rs.open sql,conn,1,1
rs.pagesize=MaxPerPage
%>
<script language=Javascript>
<!--
function jumpTo(i){
if(i==1){
this.document.location="<%=thisUrl%>";}
if(i==2){
this.document.location="<%=thisUrl%>&page=<%=page-1%>";}
if(i==3){
this.document.location="<%=thisUrl%>&page=<%=page+1%>";}
if(i==4){
this.document.location="<%=thisUrl%>&page=<%=rs.pageCount%>";}
}
//-->
</script>
<table border="1" cellpadding="0" cellspacing="0" width="590" bordercolorlight="#FFCEAA" bordercolordark="#FFFFF7" align="center">
<tr>
<td height="280" valign="top">
<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<div align="right"><a href="guestbookAdd1.asp?user_company=<%=user_company%>">添加新留言</a></div>
</td>
</tr>
</table>
<%
i=1
if not (rs.eof or err) then rs.move (page-1)*maxPerPage
do while not (rs.eof or err)
%>
<table border="1" cellpadding="2" cellspacing="0" width="90%" bordercolorlight="#FF6D00" bordercolordark="#FFFFF7" align="center" bgcolor="#FFFFF7" style="TABLE-LAYOUT: fixed">
<tr bgcolor="#FFDDC4">
<td width="9%">
<div align="center">作者</div>
</td>
<td width="91%"><%=replace(rs("userName"),"<","<")%> 于 <%=rs("createDate")%></td>
</tr>
<%
email=replace(rs("email"),"<","<")
if email<>"" then
%>
<tr>
<td width="9%">
<div align="center">邮箱</div>
</td>
<td width="91%" style="LEFT: 0px; WIDTH: 100%; WORD-WRAP: break-word"><a href='mailto:<%=email%>'><%=email%></a> </td>
</tr>
<%
end if
homepage=replace(rs("homepage"),"<","<")
homepage="http://"&replace(homepage,"http://","")
if homepage<>"http://" then
%>
<tr>
<td width="9%">
<div align="center">主页</div>
</td>
<td width="91%" style="LEFT: 0px; WIDTH: 100%; WORD-WRAP: break-word"><a href='<%=homepage%>' target=_blank><%=homepage%></a> </td>
</tr>
<%end if %>
<tr>
<td width="9%">
<div align="center">主题</div>
</td>
<td width="91%" style="LEFT: 0px; WIDTH: 100%; WORD-WRAP: break-word"><%=replace(rs("title"),"<","<")%> </td>
</tr>
<tr>
<td width="9%">
<div align="center">内容</div>
</td>
<td width="91%" style="LEFT: 0px; WIDTH: 100%; WORD-WRAP: break-word"><%=convert(rs("content"))%> </td>
</tr>
<%
revert=rs("revert")
if revert<>"" then
%>
<tr bgcolor="#e9a7c4">
<td width="9%">
<div align="center">回复</div>
</td>
<td width="91%"><%=revert%> </td>
</tr>
<%end if %>
</table>
<%
i=i+1
if i>maxPerPage then exit do
rs.moveNext
loop
%>
<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="11%" nowrap><a href="guestbookAdd1.asp?user_company=<%=user_company%>">添加新留言</a></td>
<td width="89%">
<div align="right"><%=rs.recordCount%> 项 第<%=page%>/<%=rs.pageCount%>
页
<%if page>1 then%>
<input type="button" name="Submit3" value="首页" onClick="Javascript:jumpTo(1)">
<input type="submit" name="Submit4" value="上页" onClick="Javascript:jumpTo(2)">
<%else%>
<input type="button" name="Submit32" value="首页" disabled>
<input type="submit" name="Submit4" value="上页" disabled>
<%end if
if rs.recordCount>page*maxPerPage then%>
<input type="submit" name="Submit5" value="下页" onClick="Javascript:jumpTo(3)">
<input type="submit" name="Submit6" value="末页" onClick="Javascript:jumpTo(4)">
<%else%>
<input type="submit" name="Submit5" value="下页" disabled>
<input type="submit" name="Submit6" value="末页" disabled>
<%end if
rs.close%>
</div>
</td>
</tr>
</table>
<div align="right"> </div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellspacing="0">
<tr>
<td>
<!--#include file="copy.asp"-->
</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -