<%@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 where id = "&request.QueryString("ID")&""
    rs.Open sql, conn, 1, 1
    If rs.EOF Then
    	Call infoback("不存在此数据，或者相关数据已被删除！")
    Else
        pf_news_name = rs("pf_news_name")
        pf_news_sources = rs("pf_news_sources")
        pf_news_author = rs("pf_news_author")
        pf_news_category = rs("pf_news_category")
        pf_news_keywords = rs("pf_news_keywords")
        pf_news_content = rs("pf_news_content")
        pf_news_date = rs("pf_news_date")
        pf_news_hits = rs("pf_news_hits")
        pf_news_modify_date = rs("pf_news_modify_date")
    End If
    rs.Close
    Set rs = Nothing
	Set rs = Nothing
sql = "update pf_news set pf_news_hits = pf_news_hits + 1 where id="&request.QueryString("ID")&""
conn.Execute sql
    Set rs = server.CreateObject("adodb.recordset")
    sql = "select * from pf_news where id < "&request.QueryString("ID")&" order by id desc "
    rs.Open sql, conn, 1, 1
    If rs.EOF Then
        pf_next_news = "暂无"
    Else
        pf_next_news = ("<a href='news_view.asp?id="&rs("id")&"' title='"&rs("pf_news_name")&"'>"&Left(rs("pf_news_name"), 8)&"</a>")
    End If
    rs.Close
    Set rs = Nothing
    Set rs = server.CreateObject("adodb.recordset")
    sql = "select * from pf_news where id > "&request.QueryString("ID")&""
    rs.Open sql, conn, 1, 1
    If rs.EOF Then
        pf_previous_news = "暂无"
    Else
        pf_previous_news = ("<a href='news_view.asp?id="&rs("id")&"' title='"&rs("pf_news_name")&"'>"&Left(rs("pf_news_name"), 8)&"</a>")
    End If
    rs.Close
    Set rs = Nothing

Set rs = server.CreateObject("adodb.recordset")
sql = "select * from pf_news_category where id="&pf_news_category&""
rs.Open sql, conn, 1, 1
pf_news_category = "<a href='news_category.asp?id="&rs("ID")&"'>"&rs("pf_news_category_name")&"</a>"
rs.Close
Set rs = Nothing
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=pf_site_name%> - 新闻详情</title>
<meta name="author" content="<%=pf_site_url%>">
<meta name="keywords" content="<%=pf_news_keywords%>">
<meta name="description" content="<%=pf_site_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>新闻详情</h2>
			</div>
			<div class="right_body">
				<h2 class="news_title"><%=pf_news_name%></h2>
				<div class="news_info">
					<p>来源：<%=pf_news_sources%>　作者：<%=pf_news_author%>　发布：<%=formatdatetime(pf_news_date,2)%>　修改：<%=formatdatetime(pf_news_modify_date,2)%></p>
					<p>隶属：<%=pf_news_category%>　点击：<span class="blue"><%=pf_news_hits%></span></p>
				</div>
				<div class="news_content"><%=pf_news_content%></div>
				<div class="news_next">
					<p>上一个新闻：<%=pf_previous_news%></p>
					<p>下一个新闻：<%=pf_next_news%></p>
				</div>
			</div>
			<div class="right_bottom"></div>
			<div class="right_title"></span>
				<h2>同类新闻</h2>
			</div>
			<div class="right_body">
				<ul class="news">
					<%
Set rsc = server.CreateObject("adodb.recordset")
sql = "select * from pf_news where id="&request.QueryString("ID")&""
rsc.Open sql, conn, 1, 1
Set rs = server.CreateObject("adodb.recordset")
sql = "select top 6 * from pf_news where pf_news_category = "&rsc("pf_news_category")&" order by id desc"
rs.Open sql, conn, 1, 1
Do While Not rs.EOF

%>
					<li><span class="float_right"><%=formatdatetime(rs("pf_news_date"),2)%></span> <a href="news_view.asp?id=<%=rs("ID")%>" title="<%=rs("pf_news_name")%>"><%=left(rs("pf_news_name"),30)%></a></li>
					<%
rs.movenext
Loop
rs.Close
Set rs = Nothing
rsc.Close
Set rsc = Nothing

%>
				</ul>
			</div>
			<div class="right_bottom"></div>
		</div>

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