📄 index.asp
字号:
<!--#include file="setup.asp"-->
<%
if (session("username")="") then
response.Redirect("../index.asp")
end if
%>
<meta http-equiv="content-type" content="text/html;charset=gb2312">
<%
on error resume next '找不到留言资料时忽略错误
Set Rs1 = Server.CreateObject("ADODB.Recordset")
sql1="select * from admin"
Rs1.open sql,conn,3,2
if date <> today_time then
Rs1("today_count") = 0
end if
Rs1("today_time") = date
Rs1.update
Rs1.close
set Rs1 = nothing
sql="select * from gbook order by id desc"
set Rs = Server.CreateObject("ADODB.Recordset")
Rs.open sql,conn,1,1
Rs.pagesize=pagesize
page=Request("page")
if (page-Rs.pagecount) > 0 then
page=Rs.pagecount
elseif page = "" or page < 1 then
page = 1
end if
Rs.absolutepage=page
%>
<html>
<head>
<link rel="stylesheet" href="../css/admin.css">
</head>
<body topmargin=0 vlink="#000000" link="#000000" alink="#000000" text="#000000">
<table width=600 height="27" border=1 bordercolor="#FFFFFF"align="center" cellpadding=0 cellspacing=0 background="" style="border: 1px solid #CCCCCC;">
<tr>
<td height="27">
<DIV align=right> 【<a href="index.asp">查看留言</a>】 【<a href="write.asp">签写留言</a>】</DIV></td>
</tr>
</table>
<table width="600" height="73" border="0" align="center" cellpadding="0" cellspacing="1" background="images/main_bg.gif">
<tr>
<td width="599" valign="top" bgcolor="#f7f7f7" background="images/main_bg.gif">
<%
do while not Rs.eof
i = i + 1
if i > Rs.pagesize then
exit do
end if
ips=split(rs("ip"),".")
ip=""&ips(0)&"."&ips(1)&".*.*"
%>
<table width=100% height=183 border=0 align=center cellPadding=3 cellSpacing=1 bgcolor=#CCCCCC>
<tr>
<td height="18" colspan="2" background="images/title.gif" bgcolor=#efefef>
<table width="99%" height="20" border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td width="72%"><font color="#006600"> 主题:</font><%=Rs("zt")%> </td>
<td width="28%"> <img src="images/posttime.gif" border="0" align=absmiddle>:<%=Rs("addtime")%> </td>
</tr>
</table></td>
<tr >
<td width="20%" height="154" align="center" valign='top' border="0" cellspacing="0" cellpadding="2" bgcolor=#f7f7f7><img src=<%=Rs("face")%> ><br>
<br>
【留言者】<br> <%=Rs("username")%></td>
<td width="80%" valign='top' bgcolor=#f7f7f7><table width="100%" height="148" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="53" valign="top"> <img src=<%=Rs("brow")%> align=absmiddle>
<%=Rs("body")%> </td>
</tr>
<tr>
<td height="20"> <%
sql = "select * from reply where replyid="& Rs("id") &" order by id desc"
set Rss = Server.CreateObject("ADODB.Recordset")
Rss.open sql,conn,1,1
do while not Rss.eof
%> <font color=#006633>
<hr align="center" width="99%" color="#B4C9E7" size="1">
[管理员回复:] <br>
<%=Rss("reply")%> (<%=Rss("replytime")%>) </font> <%
Rss.movenext
loop
Rss.close
set Rss = nothing
%> </td>
</tr>
<tr>
<td height="20" valign="bottom"><a href='mailto:<%=Rs("email")%>' title=给<%=Rs("username")%>发信>
</a> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="1" bgcolor="#bbbbbb"></td>
</tr>
<tr>
<td height="20"><a href='mailto:<%=Rs("email")%>' title=给<%=Rs("username")%>发信><img border=0 src=images/mail.gif> </a>
<a href=<%=Rs("homeurl")%> target=_blank title=访问<%=Rs("username")%>的主页><img border=0 src=images/home.gif> </a>
<img alt=<%=Rs("username")%>的QQ号码:<%=Rs("qq")%> src=images/qq.gif>
<img align=absmiddle alt=<%=Rs("username")%>的IP地址是:<%=ip%> border=0 src=images/ip.gif >
<a href=reply.asp?replyid=<%=Rs("id")%> title=回复该留言>
<img border=0 src=images/reply.gif align=absmiddle> </a>
<a href=del.asp?id=<%=Rs("id")%> title=删除该留言> <img border=0 src=images/del.gif align=absmiddle ></a></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<%
Rs.movenext
loop
%> </td>
</tr>
</table>
<br>
<table width=600 height="22" align="center" border=0 cellpadding=0 cellspacing=1 style="border: 1px solid #CCCCCC;">
<tr>
<td align="center" bgcolor="#f7f7f7">总计留言<%=Rs.recordcount%>条 共有<%=page%>/<%=Rs.pagecount%>页
跳到第
<% for go=1 to Rs.pagecount%>
<a href=index.asp?page=<%=go%>><%=go%></a>
<%next%>
页
<% if page=1 then %>
<%else%>
<a href=index.asp?page=<%=page-1%>>上一页</a>
<%end if%>
<% if Rs.pagecount-page <> 0 then %>
<a href=index.asp?page=<%=page+1%>>下一页</a>
<%else%>
<%end if%>
</td>
</tr></table>
<br>
<TABLE border=0 cellPadding=0 cellSpacing=0 align="center" background="images/bottom_bar.gif">
<FORM name=SearchForm action=search.asp method=post>
<TR>
<TD width="600" height=30 align="center">
<INPUT onfocus=this.select();
maxLength=50 size=18 value=关键字 name=keyword align="middle">
<INPUT type=submit value=搜索 name=Submit align="right">
</TD></TR></FORM>
</TABLE></td>
</tr>
</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -