shownews.asp

来自「软件信息如下: 软件名称:郑州聚鑫打包带厂网站源代码免费版 软件版本:V」· ASP 代码 · 共 83 行

ASP
83
字号
<% myself=request.servervariables("path_info")%>
<!--#include file="../inc/conn.asp" -->
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../inc/test.css" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table width="100%" border="0" cellspacing="0" cellpadding="5">
  <tr> 
    <td align="center" bgcolor="#f1f1f1">新闻列表</td>
  </tr>
  <tr> 
    <td> 
      <%
set rs=Server.CreateObject("Adodb.RecordSet")
	  sql="select * from news order by id desc"
	  rs.open sql,conn,3,3
if rs.eof then
response.write""
else
rs.Pagesize=20
page=clng(request("page"))

if page<1 or page=empty then page=1
if page>rs.pagecount then page=rs.pagecount
rs.Absolutepage=page
%>
      <form name="form1" method="post" action="">
        <table width="100%" border="0" cellspacing="0" cellpadding="5" bgcolor="#000000">
          <%a=0
		  do while not rs.eof
		  a=a+1
		  %>
          <tr bgcolor="#FFFFFF"> 
            <td width="30" bgcolor="#FFFFFF" align="center"><%=a%>.</td>
            <td><a href=shownewsinfo.asp?id=<%=rs("id")%> onMouseDown="MM_openBrWindow('shownewsinfo.asp?id=<%=rs("id")%>','','width=600,height=600')"><%=rs("newstitle")%></a></td>
          </tr>
          <%i=i+1
	  if i>15 then exit do
		rs.movenext
		loop
		%>
        </table>
        <br>
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr> 
            <td align="center"> &nbsp;&nbsp; 
              <%
if page<>1 then %>
              <a href=<%=myself%>?page=1>第一页</a> 
              <a href=../admin/<%=myself%>?page=<%=(page-1)%>>上一页</a> 
              <%
end if
if page<>rs.pagecount then
%>
              <a href=../admin/<%=myself%>?page=<%=(page+1)%>>下一页</a> 
              <a href=../admin/<%=myself%>?page=<%=rs.pagecount%>>最后一页</a> 
              <% end if %>
              <font style="font-size:9pt">&nbsp;</font><font style="font-size:9pt">页次:</font><font color=red style="font-size:9pt"><%=page%>/<%=rs.pagecount%></font> 共有记录<font color=red style="font-size:9pt"><%=rs.recordcount %></font>条</td>
          </tr>
        </table>
      </form>
    </td>
  </tr>
</table>
<%
end if
rs.close
set rs=nothing
set conn=nothing%>
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?