📄 list.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="includes\conleft.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新闻列表</title>
</head>
<body>
<table width="75%" height="359" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#999999">
<tr>
<td height="23" colspan="2" bgcolor="#FFFFFF">>>新闻列表: </td>
</tr>
<td height="23" colspan="2" bgcolor="#FFFFFF">
<%
sql="select * from news order by id desc"
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1
rs.pagesize=10 '设置一页显示多少条记录
if not rs.eof then
pageno=request("pageno")
if Not IsNumeric(pageno) or pageno="" then
pageno=1
else
pageno=cint(pageno)
end if
rs.absolutepage=pageno
else
pageno=0
end if
if not rs.eof then
for i=1 to rs.pagesize%>
<tr>
<td width="70%" height="10" bgcolor="#FFFFFF"><font color="#663399" size="2" TEXT-DECORATION:none><a href="display.asp?id=<%=rs("id")%>" target="_blank"><%call conleft(rs("title"),8)%></a></font></td>
<td width="30%" bgcolor="#FFFFFF"><font color="#663399" size="2"><%=rs("addtime")%></font></td>
</td>
</tr>
<%rs.movenext
if rs.EOF then Exit For
next
end if
%>
<%
response.Write pagecute(rs.pagecount,pageno,"admin.asp",5)
rs.close
set rs=nothing
call CloseDB()
%>
<font color="#FF0000"><a href="index.asp">返回首页</a></font>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -