📄 newslist.asp
字号:
<!--#include file="top.asp"--><table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="180" valign="top"> <br>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="180" valign="top"><!--#include file="login.asp"--><br>
<!--#include file="class.asp"-->
<br>
<!--#include file="search.asp"-->
</td>
<td width="580" valign="top"><table width="580" border="0" align="center" cellpadding="0" cellspacing="0">
<tr class="tabbgcolorli">
<td> <font color="#FFFFFF">☆ 新闻动态列表</font></td>
</tr>
</table>
<table width="580" height="42" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" class="border1">
<%
page=request.querystring("page")
if page="" then page=1
if not(isnumeric(page)) then page=1
if page<1 then page=1
page=int(page)
set rs=server.createobject("adodb.recordset")
sql="select * from news where sort='新闻动态' order by id desc"
rs.open sql,conn,1,1
if rs.eof then
response.write"<br><br><div align=center>暂时没有新闻动态</div><br><br>"
else
rs.pagesize=20
totalrec=rs.recordcount
totalpage=rs.pagecount
if page>totalpage then page=totalpage
rs.absolutepage=page
i=0
dim id(),title(),adddate()
do while not rs.eof and (i<rs.pagesize)
i=i+1
redim preserve id(i),title(i),adddate(i)
id(i)=rs("id")
title(i)=rs("title")
adddate(i)=rs("date")
rs.movenext
loop
rs.close
%>
<br>
<br>
<table width="72%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFA6DF">
<% for i=1 to ubound(id)%>
<tr>
<td bgcolor="#FFFFFF"> <a href=javascript:rewindow('newsinfo.ASP?id=<%=id(i)%>',500,380)><font color=#000000><%=title(i)%></font></a>--------[<%=adddate(i)%>]</td>
</tr>
<%next%>
</table> <br>
<table border="0" width="507" cellspacing="0" height="10" align="center">
<tr>
<td> <p align="center">共<font color=red><%=totalpage%></font>页
第<%=page%>页 <font color=666666>
<%if page-1>0 then%>
<a href="bigclass.asp?id=<%=gid%>&page=<%=page-1%>"><font color=#000000>上一页</font></a>
<%else%>
<font color=666666>上一页</font>
<%end if%>
<%if page+1<=totalpage then%>
<a href="bigclass.asp?id=<%=gid%>&page=<%=page+1%>"> <font color=#000000>下一页</font></a>
<%else%>
<font color=666666>下一页</font>
<%end if%>
共<font color=red><%=totalrec%></font>条记录 </font></p></td>
</tr>
<tr>
<td></td>
</tr>
</table>
<br>
<%
end if
set rs=nothing
conn.close
set conn=nothing
%>
</td>
</tr>
</table> </td>
</tr>
</table>
<br>
<!--#include file="bottom.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -