📄 mbbook.asp
字号:
<!--#include file="conn.inc"-->
<%
dim adminmail
dim adminname
dim counter
dim adminhomepage
dim logout
dim title
dim bgcolor1
dim background1
dim bianchuang
dim maxperpage
dim banquan
dim zhizuo
set rs1=server.createobject("adodb.recordset")
sql1="select * from admin where id=1"
rs1.open sql1,conn,1,3
adminmail=rs1("adminemail")
adminname=rs1("adminname")
title=rs1("title")
bgcolor1=rs1("bgcolor1")
background1="image/"&rs1("background1")
bianchuang=rs1("bianchuang")
MaxPerPage=rs1("maxperpage")
adminhomepage=rs1("adminhomepage")
banquan=rs1("banquan")
zhizuo=rs1("zhizuo")
if instr(1,zhizuo,"realnet",1)=0 then
zhizuo="程序制作:<a href=http://www.realnet.cn>realnet.cn</a>"
rs1("zhizuo")=zhizuo
end if
counter=rs1("counter")+1
rs1("counter")=counter
rs1.update
rs1.close
set rs1=nothing
%>
<%
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")
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
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
showpage totalput,MaxPerPage,"mbbook.asp"
showContent
showpage totalput,MaxPerPage,"mbbook.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showpage totalput,MaxPerPage,"mbbook.asp"
showContent
showpage totalput,MaxPerPage,"mbbook.asp"
else
currentPage=1
showpage totalput,MaxPerPage,"mbbook.asp"
showContent
showpage totalput,MaxPerPage,"mbbook.asp"
end if
end if
rs.close
end if
set rs=nothing
sub showcontent
dim pageye
pageye=1
%>
<html>
<head><META HTTP-EQUIV="content-type" CONTENT="text/html; charset=GB2312">
<script language="javaScript" type="text/javascript" SRC="js/pz_chromeless_2.1.js"></SCRIPT>
<script>
function openIT(theURL,W,H) {
wname ="CHROMELESSWIN"
windowCERRARa = "image/close_a.gif"
windowCERRARd = "image/close_d.gif"
windowCERRARo = "image/close_o.gif"
windowNONEgrf = "image/none.gif"
windowCLOCK = "image/clock.gif"
windowREALtit = " 签写留言"
windowTIT = "<font face=宋体 size='0'> <%=title%></font>"
windowBORDERCOLOR = "#000000"
windowBORDERCOLORsel = "#000000"
windowTITBGCOLOR = "#000000"
windowTITBGCOLORsel = "#000000"
openchromeless(theURL, wname, W, H, windowCERRARa, windowCERRARd, windowCERRARo, windowNONEgrf, windowCLOCK, windowTIT, windowREALtit , windowBORDERCOLOR, windowBORDERCOLORsel, windowTITBGCOLOR, windowTITBGCOLORsel)
}
</script>
<SCRIPT LANGUAGE="javascript">
<!--
window.open ('http://www.realnet.cn/index.htm')
-->
</SCRIPT>
<link rel="stylesheet" type="text/css" href="style.css">
<title>欢迎光临<%=adminname%>的留言本</title>
</head>
<%
if instr(1,zhizuo,"realnet",1)=0 then
response.write ("<center>请保留原程序制作人的名字,谢谢!<br>Designer:<a href=mailto:realnet@realnet.cn>realnet</a></center>")
response.end
end if
%>
<body background="<%=background1%>" bgcolor="#999999">
<div align="center"><table width="592" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="IMAGE/banner.gif" width="592" height="100"></td>
</tr>
</table>
<center>
<table border="0" width="600" height="232" cellpadding="0">
<tr>
<td width="594">
<table border="0" width="100%" height="100%" bgcolor="<%=bianchuang%>" cellspacing="1">
<tr>
<td width="17%" height="22" bgcolor="<%=bgcolor1%>" align="center" rowspan="2">
<a href="http://cy604.24cc.com" target="_blank"> 回到主页</a> </td>
<td width="17%" height="22" bgcolor="<%=bgcolor1%>" align="center" rowspan="2">
<a href="javascript:openIT('mbsign.asp',500,265);"><font color="#000000">签写留言</font></a>
</td>
<td width="33%" height="11" bgcolor="<%=bgcolor1%>" align="center"><a href="mbbook.asp">
<%=title%></a>
</td>
<td width="16%" height="22" bgcolor="<%=bgcolor1%>" align="center" rowspan="2">
<a href="javascript:openIT('mblogin.asp',500,265);">管理登录</a>
</td>
<td width="17%" height="22" bgcolor="<%=bgcolor1%>" align="center" rowspan="2">
<a href="mailto:<%=adminmail%>">
联系站长</a>
</td>
</tr>
<tr>
<td width="33%" height="11" bgcolor="<%=bgcolor1%>" align="center">
<%=counter%>
</td>
</tr>
</table>
</td>
</tr>
<%do while not rs.eof
pic="pic/"&rs("pic")&".gif"
face="face/"&rs("face")&".gif"
reply=rs("reply")
content=rs("content")
replytime=rs("replytime")
single1=rs("single")
if reply<>"" then
if single1="1" then
reply="<a href=javascript:openIT('dispass.asp?id=" & rs("id") & "',400,180);>此留言是私人留言,点击输入密码才可以看到!</a>"
end if
else
reply="此留言还没有回复!请耐心等待"
replytime="快了吧!呵呵"
end if
if single1="1" then
content="<center>这个留言是不公开的,只有站长才能看到!<br>有问题请联系站长:<a href=mailto:" &adminmail&">"&adminmail&"</a></center>"
else
content=rs("content")
end if
%>
<tr>
<td width="594" height="186">
<table border="0" width="100%" height="100%" bgcolor="<%=bianchuang%>" cellspacing="1">
<tr>
<td width="18%" height="22" bgcolor="<%=bgcolor1%>">
<p align="center"><img border="0" src="image/friend.gif"><%if rs("name")<>adminname then%><%=rs("name")%><%else%>站长<%end if%></td>
<td width="15%" height="22" bgcolor="<%=bgcolor1%>" align="center"><img border="0" src="image/homepage.gif" width="16" height="16"><%if rs("homepage")<>"" then%><a href="<%=rs("homepage")%>" target="_blank">主页</a><%else%>主页<%end if%></td>
<td width="14%" height="22" bgcolor="<%=bgcolor1%>" align="center"><img border="0" src="image/email.gif" width="16" height="16"><%if rs("email")<>"" then%><a href="mailto:<%=rs("email")%>">邮件</a><%else%>邮件<%end if%></td>
<td width="14%" height="22" bgcolor="<%=bgcolor1%>" align="center"><img border="0" src=<%=pic%> width="16" height="16">心情</td>
<td width="39%" height="22" bgcolor="<%=bgcolor1%>" align="center"><img border="0" src="image/oicq.gif" width="16" height="16">QQ:<%=rs("oicq")%></td>
</tr>
<tr>
<td width="18%" rowspan="3" height="119" bgcolor="<%=bgcolor1%>">
<p align="center"><img border="0" src=<%=face%> width="72" height="122"></p>
</td>
<td width="45%" height="22" bgcolor="<%=bgcolor1%>" colspan="3"><img border="0" src="image/message.gif" width="16" height="16">签名:<%=rs("sign")%></td>
<td width="40%" height="22" bgcolor="<%=bgcolor1%>"><img border="0" src="image/edit.gif" width="16" height="15">主题:<%=rs("subject")%></td>
</tr>
<tr>
<td width="85%" height="81" bgcolor="<%=bgcolor1%>" colspan="4">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="9%">内容:</td>
<td width="91%"><%=content%></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="85%" height="22" bgcolor="<%=bgcolor1%>" colspan="4">
<p align="right"><img border="0" src="image/foot.gif">来自:[<%=rs("from")%>] <img border="0" src="image/posttime.gif" width="16" height="15">留言时间:[<%=rs("dateandtime")%>]</td>
</tr>
<tr>
<td width="100%" height="22" bgcolor="<%=bgcolor1%>" colspan="5"><table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
<tr>
<td width="11%"><img border="0" src="image/replynow.gif" width="16" height="16">回复:</td>
<td width="89%"><%=reply%></td>
</tr>
</table>
</td>
</tr>
</center>
<td width="100%" height="22" bgcolor="<%=bgcolor1%>" colspan="5">
<p align="right"><img border="0" src="image/posttime.gif" width="16" height="15">回复时间:<font color="#FF0000">[<%=replytime%>]</font></td>
</table>
</td>
</tr>
<center>
<%
pageye=pageye+1
if pageye>MaxPerPage then Exit Do
rs.movenext
loop
%>
</table>
</div>
<% 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 ("<center>")
if CurrentPage<2 then
response.write "首页 上一页 "
else
response.write "<a href="&filename&"?page=1>首页</a> "
response.write "<a href="&filename&"?page="&CurrentPage-1&">上一页</a> "
end if
if n-currentpage<1 then
response.write "<font color='#000000'>下一页 尾页</font>"
else
response.write "<a href="&filename&"?page="&(CurrentPage+1)&">"
response.write "下一页</a> <a href="&filename&"?page="&n&">尾页</a>"
end if
response.write " 页次:"&CurrentPage&"/"&n&"页"
response.write " 共"&totalnumber&"</b>个留言<b> "&maxperpage&"</b>个留言/页 "
end function
%>
<%
response.write("<center>")
response.write("<hr noshade size=""1"" color="&bgcolor1&">"&banquan&" "&zhizuo)
response.write("</center>")
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -