📄 manage.asp
字号:
<!--#include file="dbpath.asp"-->
<%response.buffer=true
if request.cookies("loginok")="" then
response.redirect "login.asp"
end if
%>
<html>
<head>
<title>极可爱留言板</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
dim MaxPerPage
dim sql
dim rs
dim gstBookID
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
%>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body bgcolor="#2F79BD">
<%
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 %>
<p align="center"> 还 没 有 任 何 留 言</p>
<% else
rs.pagesize=10
totalPut=rs.recordcount '记录总数
totalPage=rs.pagecount
MaxPerPage=rs.pagesize
if currentpage<1 then
currentpage=1
end if
if currentpage>totalPage then
currentpage=totalPage
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
end if
end if
rs.close
end if
set rs=nothing
conn.close
set conn=nothing
sub showContent
dim i
dim k
k=(totalPut-MaxPerPage*(currentPage-1))+1
i=0
%> <%
do while not (rs.eof or err)
k=k-1
%>
<table width="95%" border="0" cellspacing="0" cellpadding="0" align="center" height="210" class="bk" bgcolor="#FFFFFF">
<tr>
<td height="210" width="20%" bgcolor="#86C2FF">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%" class="y">
<tr>
<td colspan="2" width="123" height="10" style="border-right: 1 solid #000000"></td>
</tr>
<tr valign="top">
<td colspan="2" width="123" height="28" style="border-right: 1 solid #000000"> <font color="#000000"> 帖子数量:<%=k%></font></td>
</tr>
<tr valign="top" align="center">
<td colspan="2" width="123" height="74" style="border-right: 1 solid #000000">
<p><font color="#000000"><img
src="<%=rs("face")%>"><br>
<br>
<%=rs("name")%></font></p>
</td>
</tr>
<% if rs("email")<>"" then %>
<tr>
<td width="26%" height="28">
<div align="right"><a href="mailto:<%=rs("email")%>"><font color="#000000"><img src="images/email.GIF" width="24" height="24" border="0" alt="邮箱:<%=rs("email")%>"></font></a></div>
</td>
<td height="28" width="74%" style="border-right: 1 solid #000000"><a href="mailto:<%=rs("email")%>" title="邮箱:<%=rs("email")%>"><font color="#000000">写信给我</font></a></td>
</tr>
<% end if
if rs("homepage")<>"" and rs("homepage")<>"http://" then
%>
<tr>
<td width="26%" height="28">
<div align="right"><a href="<%=rs("homepage")%>" target="_blank"><font color="#000000"><img src="images/homepage.gif" width="24" height="24" border="0" alt="主页:<%=rs("homepage")%>"></font></a></div>
</td>
<td width="74%" height="28" style="border-right: 1 solid #000000"><a href="<%=rs("homepage")%>" target="_blank" title="邮箱:<%=rs("homepage")%>"><font color="#000000">我的主页</font></a></td>
</tr>
<% end if
if rs("oicq")<>"" then
%>
<tr>
<td width="26%" height="28">
<div align="right"><font color="#000000"><img src="images/oicq.GIF" width="24" height="24" alt="OICQ号:<%=rs("oicq")%>" border="0"></font></div>
</td>
<td width="74%" height="28" style="border-right: 1 solid #000000"><span class="p9"><font color="#000000"><%=rs("oicq")%></font></span></td>
</tr>
<%
end if
%>
<tr>
<td colspan="2" width="123" height="10" style="border-right: 1 solid #000000"></td>
</tr>
</table>
</td>
<td height="210" width="80%" bgcolor="#86C2FF">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="210">
<tr>
<td colspan="3" height="10"></td>
</tr>
<tr>
<td width="11%" height="35" valign="top">
<div align="center"><font color="#000000"><img src="images/zt.GIF" width="24" height="24"><br>
主题</font></div>
</td>
<td height="35" colspan="2">
<div align="left"><font color="#000000"><%=rs("subject")%></font></div>
</td>
</tr>
<tr>
<td colspan="3" height="1"></td>
</tr>
<tr>
<td width="11%" height="93" valign="top">
<div align="center"><font color="#000000"><img src="images/ly.GIF" width="24" height="24"><br>
留言</font></div>
</td>
<td height="93" valign="top" colspan="2">
<div align="left"><font color="#000000"><%=rs("Memo")%></font></div>
</td>
</tr>
<%
if rs("anser")<>"" then%>
<tr>
<td width="11%" height="40" valign="top" rowspan="2">
<div align="center"><font color="#000000"><img src="images/hf.GIF" width="24" height="24"><br>
回复</font></div>
</td>
<td height="1" width="41%" valign="top"></td>
<td height="1" width="48%" valign="top" ></td>
</tr>
<tr>
<td height="39" colspan="2"><font color="#000000"><%=rs("anser")%></font></td>
</tr>
<%end if%>
<tr>
<td colspan="3" height="1"></td>
</tr>
<tr>
<td colspan="3" height="20">
<div align="right"><font color="#000000"> <% if rs("ip")<>"" then %>
来自:<% = rs("ip") %> <% end if %>发表于:<%
=rs("time")
%> <%
if rs("anser")<>"" then%> 回复于:<%Response.Write rs("ansertime")%><% end if %> </font></div>
</td>
</tr>
<tr>
<td colspan="3" height="10">
<div align="right"><font color="#000000"><%Response.Write "<A HREF=reply.asp?userid=" & cstr(rs("id")) & "&cpage=" & cstr(currentpage) & ">[输入(修改)回复]</A>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -