📄 guestbook.asp
字号:
<!--#include file="include/conn.asp"-->
<!--#include file="include/config.asp"-->
<!--#include file="admin/char.inc"-->
<%
const MaxPerPage=10
dim totalPut
dim CurrentPage
dim TotalPages
dim a,j
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
if request.cookies("key")="super" then
aaas=1
set urs=server.createobject("adodb.recordset")
sql="select * from admin where username='"&Request.cookies("username")&"'"
urs.open sql,conn,1,3
if urs.bof or urs.eof then
aaas=0
end if
IF Request.cookies("passwd")<>urs("passwd") THEN
aaas=0
END IF
urs.close
set urs=nothing
end if
%>
<html>
<head>
<title>留言本_<%=jjgn%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="news.css" rel=stylesheet type=text/css>
<style type="text/css">
<!--
.zbk1 {
border: 1px solid #CCCCCC;
}
.zbk2 {
border-top: 1px none #CCCCCC;
border-right: 1px solid #CCCCCC;
border-bottom: 1px solid #CCCCCC;
border-left: 1px solid #CCCCCC;
}
.style1 {
color: #FFFFFF;
font-size: 12px;
font-family: Verdana, "宋体", "黑体", "仿宋_GB2312";
}
body {
background-image: url(zqcindex.files/bgz.gif);
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.style3 {color: #3D8AC5}
-->
</style>
</head>
<body bgcolor="white" text="#000000" topmargin="0">
<!--#include file="include/top.asp"-->
<!--#include file="include/top2.asp"-->
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="white" class="zbk2">
<tr valign="top">
<td width="776"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" height="30" background="img/type_bg.gif" class="6"> <img src="img/type01.gif" width="12" height="12" align="absmiddle"> 当前位置: <a href="./">网站首页 -
</a> <a href="guestbook.asp">请您留言</a>
<strong><span class="style1"><img src="img/type03.gif" width="9" height="9" border="0"> <a href="guestadd.asp" class=class>发表留言</a> <a href="guestadd.asp" class=class><img src="img/type02.gif" width="9" height="9" border="0"></a> <a class=class href="javascript:window.location.reload()">刷新</a> </span></strong></td>
</tr>
</table>
<table width="100%" class="TableLine" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><%
set rs=server.createobject("adodb.recordset")
sql="select * from review where newsid is null order by reviewid desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align=center>还 没 有 任 何 留 言</p>"
else
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
showContent
showpage totalput,MaxPerPage,"guestbook.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showContent
showpage totalput,MaxPerPage,"guestbook.asp"
else
currentPage=1
showContent
showpage totalput,MaxPerPage,"guestbook.asp"
end if
end if
rs.close
end if
set rs=nothing
conn.close
set conn=nothing
sub showContent
do while not rs.eof
%>
</td>
</tr>
<tr>
<td valign="middle"><table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="8"></td>
</tr>
</table>
<table width="96%" border="0" align="center" cellpadding="0" cellspacing="0" class="zbk1" >
<tr>
<td width="20%" rowspan="2" valign="middle" bgcolor="white"><table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td height="105" valign="top" bgcolor="white"><table width="95%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="105" valign="top"><br>
<img src="images/<%if trim(rs("face"))<>"" then%><%=rs("face")%><%else%>Image1.gif<%end if%>"><br>
<br>
身份:<font color="red">
<%if rs("shengfen")<>"" then%>
<%=rs("shengfen")%>
<%else%>
保密
<%end if%>
</font> <br>
姓名:<%=rs("author")%> <br>
<% if rs("from")<>"" then %>
来自:<%=rs("from")%>
<%end if%>
<br>
<%if aaas=1 then %>
IP:<%=rs("reviewip")%>
<%end if%>
</td>
</tr>
</table></td>
</tr>
</table></td>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td width="1" bgcolor="white"><img name="" src="" width="1" height="1" alt=""> </td>
<td width="9" bgcolor="white"></td>
<td bgcolor="#f5f5f5"><%if rs("email")<>"" then %>
<a href="mailto:<%=rs("email")%>">
<%end if %>
<img src="images/EMAIL.GIF" border="0"></a>
<%if rs("homepage")<>"" then%>
<a href="<%=rs("homepage")%>" target="_blank">
<%end if%>
<img src="images/homepage.gif" border="0"></a>
<% if rs("oicq")<>"" then%>
<a href="http://search.tencent.com/cgi-bin/friend/user_show_info?ln=<%=rs("oicq")%>" >
<%end if%>
<img src="images/OICQ.gif" border="0"></a> <a href="guestedit.asp?reviewid=<%=rs("reviewid")%>"><img src="images/EDIT.GIF" border="0"></a>
<%if aaas=1 then %>
<a href="guestreply.asp?reviewid=<%=rs("reviewid")%>"><img src="images/reply.GIF" border="0"></a> <a href="guestdel.asp?reviewid=<%=rs("reviewid")%>"><img src="images/delete.GIF" border="0"></a>
<%end if%>
<%if rs("newsid")<>"" then%>
<a target="_blank" href="readnews.asp?newsid=<%=rs("newsid")%>"><img src="images/reply1.GIF" width="0" height="0" border="0"></a>
<%end if%>
</td>
<td bgcolor="#f5f5f5">发表于:<%=rs("updatetime")%> </td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top"><table width="100%" height="100" border="0" cellpadding="0" cellspacing="0" style="table-layout:fixed; word-break:break-all;border-collapse: collapse">
<tr bgcolor="white">
<td width="1" ><img name="" src="" width="1" height="1" alt=""><img name="" src="" width="1" height="1" alt=""> </td>
<td width="9" height="1" ><img name="" src="" width="1" height="1" alt=""></td>
<td height="1" ><img name="" src="" width="1" height="1" alt=""></td>
</tr>
<tr>
<td width="1" bgcolor="white" ></td>
<td width="9" ></td>
<td ><%=rs("title")%>
<% response.write rs("content")
%>
<%if rs("reply")<>"" then %>
<p><font color="#3D8AC5"><b><img src="IMAGES/base.gif" align="absmiddle"> </b></font><span class="style3">站长回复:</span><font color="#3D8AC5"><br>
<%=rs("reply")%> </font></p>
<%end if%></td>
</tr>
</table></td>
</tr>
<tr bgcolor="white">
<td height="1" colspan="2" align="right" valign="top"><img name="" src="" width="1" height="1" alt=""></td>
</tr>
</table></td>
</tr>
<tr>
<td valign="middle"><div align="center">
<%
a=a+1
if a>=MaxPerPage then exit do
rs.movenext
loop
end sub
%>
<%
function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
n=totalnumber \ maxperpage
else
n=totalnumber \ maxperpage + 1
end if
response.write "<form method=post action="&filename&">"
response.write "<p> "
if CurrentPage<2 then
response.write "<font color='#b9b9b9' style='font-family: 宋体; font-size: 9pt'>首页 上一页</font> "
else
response.write "<a class=class href="&filename&"?page=1>首页</a> "
response.write "<a class=class href="&filename&"?page="&CurrentPage-1&">上一页</a> "
end if
if n-currentpage<1 then
response.write "<font color='#b9b9b9' style='font-family: 宋体; font-size: 9pt'>下一页 尾页</font>"
else
response.write "<a class=class href="&filename&"?page="&(CurrentPage+1)&">下一页</a> "
response.write "<a class=class href="&filename&"?page="&n&">尾页</a>"
end if
response.write "<font color='#000080' style='font-family: 宋体; font-size: 9pt'> 共<b>"&totalnumber&"</b>条留言 <b>"&maxperpage&"</b> 条留言/页</font> "
response.write "<font color='#000080' style='font-family: 宋体; font-size: 9pt'>转到:</font><input class=smallInput type='text' name='page' size=4 maxlength=10 value="&Currentpage&">"
response.write "<input class=buttonface type='submit' value='Go' name='cndok'></p></form>"
end function
%>
</div></td>
</tr>
<tr>
<td valign="middle"></td>
</tr>
</table></td>
</tr>
</table>
<!--#include file="include/bottom.asp"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -