<!--#include file="conn.asp"-->
<!--#include file="page.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=site("site_name")%>-<%=site("site_keywords")%></title>
<meta name="keywords" content="<%=site("site_keywords")%>" />
<meta name="description" content="<%=site("site_description")%>" />
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<!--#include file="header.asp"-->
<div id="content" class="layout">
  <!--#include file="news_left.asp"-->
  <div id="right">
    <div class="right_title">
      <h3><span class="tag">more</span>新闻资讯</h3>
    </div>
    <div class="right_body">
          <ul class="news">
            <%
Set rs = server.CreateObject("adodb.recordset")
sql = "select * from news where category="&request.QueryString("id")&" order by id desc"
rs.Open sql, conn, 1, 1
If rs.EOF Then
    response.Write "&nbsp;暂无新闻！"
Else
    rs.PageSize = 20
    iCount = rs.RecordCount
    iPageSize = rs.PageSize
    maxpage = rs.PageCount
    page = request("page")
    If Not IsNumeric(page) Or page = "" Then
        page = 1
    Else
        page = CInt(page)
    End If
    If page<1 Then
        page = 1
    ElseIf page>maxpage Then
        page = maxpage
    End If
    rs.AbsolutePage = Page
    If page = maxpage Then
        x = iCount - (maxpage -1) * iPageSize
    Else
        x = iPageSize
    End If
    For i = 1 To x
%>
        <li><span class="data"><%=rs("data")%></span><a href="news_view.asp?id=<%=rs("id")%>" title="<%=rs("title")%>"><%=left(rs("title"),35)%></a> </li>
            <%
rs.movenext
Next
End If
%>
          </ul>
      <%'以下显示分页
Call PageControl(iCount, maxpage, page, "border=0 align=center", "<p align=center>")
%>
    </div>
  </div>
</div>
<div class="clear"></div>
<!--#include file="foot.asp"-->
</body>
</html>
