<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!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">
<!--#include file="pcfinal.asp"-->
<%call noid
    Set rs = server.CreateObject("adodb.recordset")
    sql = "select * from pf_news_category where id = "&request.QueryString("ID")&""
    rs.Open sql, conn, 1, 1
    If rs.EOF Then
    	Call infoback("不存在此数据，或者相关数据已被删除！")
    Else
        pf_news_category_name = rs("pf_news_category_name")
        pf_news_category_keywords = rs("pf_news_category_keywords")
        pf_news_category_description = rs("pf_news_category_description")
        pf_news_category_content = rs("pf_news_category_content")
    End If
    rs.Close
    Set rs = Nothing
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=pf_site_name%> - <%=pf_news_category_name%></title>
<meta name="author" content="<%=pf_site_url%>">
<meta name="keywords" content="<%=pf_news_category_keywords%>">
<meta name="description" content="<%=pf_news_category_description%>">
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/pcfinal.js"></script>
<!--[if lte IE 6]>
<script type="text/javascript" src="js/minmax.js"></script>
<![endif]-->
</head>
<body>
<!--#include file="header.asp"-->
<div id="content_main">
	<div id="content" class="layout_center">
		<!--#include file="news_left.asp"-->
		<div id="right">
			<div class="right_title"></span>
				<h2><%=pf_news_category_name%></h2>
			</div>
			<div class="right_body">
			<%=pf_news_category_content%>
				<ul class="news">
					<%
	Set rs = server.CreateObject("adodb.recordset")
    sql = "select * from pf_news_category where pf_news_category_parent = "&request.QueryString("ID")&" order by pf_news_category_order asc"
    rs.Open sql, conn, 1, 1
    Do While Not rs.EOF
        sub_id = sub_id&","&rs("ID")
        rs.movenext
    Loop
    rs.Close
    Set rs = Nothing
    allid = request.QueryString("ID")&sub_id
    Set rsa = server.CreateObject("adodb.recordset")
    sql = "select * from pf_news where pf_news_category in ("&allid&") order by pf_news_order desc"
    rsa.Open sql, conn, 1, 1
    If rsa.EOF Then
    Else
        rsa.PageSize = 20
        allpage = rsa.RecordCount
        iPageSize = rsa.PageSize
        maxpage = rsa.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
        rsa.AbsolutePage = Page
        If page = maxpage Then
            x = allpage - (maxpage -1) * iPageSize
        Else
            x = iPageSize
        End If
        For i = 1 To x
%>
					<li><span class="float_right"><%=formatdatetime(rsa("pf_news_date"),2)%></span> <a href="news_view.asp?id=<%=rsa("ID")%>" title="<%=rsa("pf_news_name")%>"><%=str_left(rsa("pf_news_name"),80,"...")%></a></li>
					<%
        rsa.movenext
        Next
		rsa.Close
		Set rsa = Nothing
    End If
			%>
				</ul>
				<div class="page">
					<%
			 if allpage <> "" then
			 call pcfinal_page
			 end if
			 %>
				</div>
			</div>
			<div class="right_bottom"></div>
		</div>

		<div class="float_clear"></div>
	</div>
</div>
<!--#include file="footer.asp"-->
</body>
</html>
