<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#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_info("title")%>-<%=site_info("keywords")%></title>
<meta name="keywords" content="<%=site_info("keywords")%>" />
<meta name="description" content="<%=site_info("description")%>" />
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<!--#include file="header.asp"-->
<div class="layout">
  <!--#include file="left_news.asp"-->
<div class="list">
      <% 
exec="select * from [news_category] where id="& request.QueryString("id") 
set rs=server.createobject("adodb.recordset") 
rs.open exec,conn,1,1 
%>
<div class="list_title"><%=rs("title")%></div>
<div class="list_content">
<ul class="news">
        <%	
set rs=server.createobject("adodb.recordset") 
exec="select * from [news] where category="& request.QueryString("id") &" order by id desc  " 
rs.open exec,conn,1,1 
if rs.eof then
response.Write "&nbsp;该分类暂无新闻！"
else
rs.PageSize =6 '每页记录条数
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><a href="news_view_<%=rs("id")%>.htm" 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>")
rs.close
set rs=nothing
%>
</div>
</div>
</div>
  <div class="clear"></div>
<!--#include file="footer.asp"-->
