📄 manage.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--#INCLUDE FILE="conn.asp"-->
<%
dim RS1,SQL
SQL="select * from Login"
set Rs1=Conn.execute(SQL)
%>
<%if session("password")<>rs1("password")or session("username")<>rs1("username") then
response.Redirect"login.htm"%>
<%end if%>
<%
dim page,RS,strSQL
strSQL="select * from Book order By Num desc"
set Rs=server.CreateObject("adodb.Recordset")
Rs.source=strSQL
Rs.ActiveConnection=Conn
Rs.CursorType=3
Rs.open
Rs.pagesize=5
%>
<%if rs.eof=true or rs.bof=true then
Response.Write "<script Language=Javascript>alert('记录集为空,请添加第一条!');location.href = 'addpage.asp';</script>"
else
%>
<%
if request("page")=""then
page=1
else
page=Cint(request("page"))
end if
rs.absolutepage=page
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>君应有语留言本</title>
<style type="text/css">
<!--
.style1 {
font-size: 14px;
color: #6666FF;
}
a:link {
color: #6666FF;
text-decoration: none;
}
a:visited {
color: #6666FF;
text-decoration: none;
}
a:hover {
color: #FF00FF;
text-decoration: underline;
}
a:active {
color: #9999FF;
text-decoration: none;
}
.style3 {font-size: 12px; color: #6666FF; }
body {
background-image: url(images/beijing.gif);
}
.style4 {font-size: 12}
.style5 {font-size: 12px}
.style6 {color: #6666FF}
-->
</style>
</head>
<body topmargin="0" bgproperties="fixed">
<div align="center">
<!--#INCLUDE FILE="top.asp"-->
<table width="650" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="145"><div align="left"><span class="style3">共<%=rs.pagecount%>页,当前为第<%=page%>页!</span></div></td>
<td width="50">
<div align="left" class="style3">
<%if page>1 then%>
<a href="manage.asp?page=<%=(page-1)%>" class="style3">上一页</a>
<%end if%>
</div></td>
<td width="455" class="style1">
<div align="left" class="style3">
<%if page<rs.pagecount then%>
<a href="manage.asp?page=<%=(page+1)%>" class="style3">下一页</a>
<%end if%>
</div></td>
</tr>
</table>
<%for j=1 to rs.pagesize%>
<table width="650" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="20" colspan="4"><img src="images/top1.gif" width="650" height="20"></td>
</tr>
<tr>
<td height="22" colspan="4" background="images/bg.gif"><table width="650" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="564"><div align="left"><span class="style5"> </span><span class="style1"><img src="images/topicnew.gif" width="18" height="18"></span><span class="style3"><%=rs("sex")%> <%=rs("name")%>留言于<img src="images/date.gif" width="18" height="18"><%=rs("date")%> </span></div></td>
<td width="31"><div align="left"><a href="listedit.asp?Num=<%=rs("Num")%>"><img src="images/edit.gif" width="16" height="16" border="0"></a></div></td>
<td width="55"><div align="left"><a href="del.asp?Num=<%=rs("Num")%>"><img src="images/del.gif" width="18" height="18" border="0"></a></div></td>
</tr>
</table></td>
</tr>
<tr>
<td width="3" rowspan="3" background="images/leftline.gif"></td>
<td width="90" height="84" rowspan="3">
<div align="center">
<table width="84" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center">
<%
if(rs("sex")="Boy") then
response.write("<img src='images/Boy.gif'>")
else
response.write("<img src='images/G.gif'>")
end if
%>
</div></td>
</tr>
<tr>
<td><div align="center" class="style3"><%=rs("name")%></div></td>
</tr>
</table>
</div></td>
<td width="554" height="47" class="style3"><div align="left"><%=rs("main")%></div></td>
<td width="3" rowspan="3" background="images/rightline.gif"></td>
</tr>
<tr>
<td height="13" class="style3"><div align="left"><FONT class="style6">〖回复〗:<%=rs("reply")%></FONT></div></td>
</tr>
<tr>
<td height="18" class="style1"><div align="left"><img src="images/home.gif" width="18" height="18"><span class="style4"> <a href="<%=rs("web")%>" target="_blank"><%=rs("web")%></a> <img src="images/mail.gif" width="18" height="18"> <a href="mailto:<%=rs("email")%>"><%=rs("email")%></a> <img src="images/OICQ.gif" width="18" height="18"> <%=rs("qq")%></span></div></td>
</tr>
<tr>
<td height="15" colspan="4"><img src="images/low.gif" width="650" height="15"></td>
</tr>
</table>
<p class="style3">
<%
rs.movenext
if rs.eof then
exit for
end if
next
%>
</p>
<table width="650" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center"></div>
<div align="center" class="style3">
<%for i=1 to rs.pagecount%>
<a href="manage.asp?page=<%=i%>">[<%=i%>]</a>
<%next%>
</div></td>
</tr>
</table>
<br>
<!--#INCLUDE FILE="copyright.asp"-->
</div>
</body>
</html>
<%end if%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -