📄 lookdate.asp
字号:
<!--#include file="conn.asp"-->
<%
if session("user")="" or session("group")="" then
response.write("<script>alert('您还没有登陆或登陆超时');window.location.href('index.asp')</script>")
response.end
end if
%>
<%
dim page
page=cint(request.QueryString("id"))
if page<1 then
page=1
end if
%>
<%
set rs=server.CreateObject("adodb.recordset")
cmd="select * from riji"
rs.open cmd,conn,1,3
if rs.eof then
response.write("<script>alert('无任何记录');window.location.href('writedate.asp')</script>")
response.end
else
rs.pagesize=8
dim pagecounts,allcounts
pagecounts=rs.pagecount '总页数
allcounts=rs.recordcount '总记录数
if page>pagecounts then page=pagecounts
rs.absolutepage=page
end if
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.style1 {
color: #FFFFFF;
font-size: 12px;
}
.style3 {color: #FFFFFF}
.style4 {font-size: 12px}
.style6 {color: #FFFFFF; font-size: 12; }
.style8 {font-size: 12px; color: #6699CC; }
.style9 {color: #6699CC}
-->
</style>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<table width="700" border="0" bordercolor="#6699cc" bgcolor="#6699CC">
<tr>
<td colspan="5"><span class="style1">我的日记管理</span></td>
</tr>
<tr bgcolor="#7B869A">
<td width="65"><div align="center" class="style1">日记编号</div></td>
<td width="362"><div align="center" class="style4"><span class="style3">日记标题</span></div></td>
<td width="118"><div align="center"><span class="style6">撰写时间</span></div></td>
<td colspan="2"><div align="center" class="style1">管理操作</div></td>
</tr>
<%
dim i
i=1
do while not rs.eof and i<9
%>
<tr bgcolor="#FFFFFF">
<td><div align="center" class="style9"><span class="style4">
<% =rs("id") %>
</span></div></td>
<td><div align="left"><span class="style3"></span>
<span class="style8">
<% =rs("title")%>
</span></div></td>
<td><div align="center" class="style8">
<% =rs("time")%>
</div></td>
<td width="75"><div align="center"><a href="viewdatedo.asp?id=<%=rs("id")%>"><img src="images/voteView.gif" width="52" height="18" border="0"></a></span></div></td>
<td width="58"><a href="deldate.asp?id=<%=rs("id")%>"><img src="images/a_delete.gif" width="52" height="16" border="0"></a></td>
</tr>
<%
i=i+1
rs.movenext
loop
%>
</table>
<table width="700" border="0">
<tr>
<td><div align="center"><a href="lookdate.asp?id=<%=page-1%>" class="style8">上一页</a></span><a href="lookdate.asp?id=<%=page+1%>" class="style8"> 下一页</a> <a href="lookdate.asp?id=<%=pagecounts%>" class="style8">最后一页</a> <span class="style8">当前共有
<% =allcounts %>
篇日记</span></span></div></td>
</tr>
</table>
<p> </p>
</form>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -