<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp"-->
<!--#include file="pagination.asp"-->
<%
exec = "select * from news where id="& request.QueryString("id")
Set rs = server.CreateObject("adodb.recordset")
rs.Open exec, conn, 1, 1
%>
<!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><%=rs("title")%>-<%=rs("keywords")%>-<%=site_info("title")%></title>
<meta name="keywords" content="<%=rs("keywords")%>" />
<meta name="description" content="<%=rs("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 where id="& request.QueryString("id") 
set rs=server.createobject("adodb.recordset") 
rs.open exec,conn,1,1 
%>
<div class="list_title">新闻详情</div>
<div class="list_content">
<h1><%=rs("title")%></h1>
      <%
set rs = server.createobject("adodb.recordset") 
curid=request("id") 
sql = "UPDATE news SET hit = hit + 1 WHERE id = " + cstr(curid) 
conn.execute sql 
sql = "SELECT * FROM news WHERE id = " + cstr(curid) 
rs.open sql,conn,1,1
%>
<div class="xian">来源：<%=rs("source")%>　作者：<%=rs("author")%>　日期：<%=rs("data")%>　浏览次数：<%=rs("hit")%></div>
<%=ContentPagination(rs("body"))%>
      <hr />
      <%
Dim rsnp, next_title, previous_title
Set rsnp = server.CreateObject("adodb.recordset")
rsnp.Open "select top 1 id, title from news where id>" & request.QueryString("id") & " order by id asc", conn, 1, 1
If Not rsnp.EOF Then
    next_title = "<a href=""news_view.asp?id=" & rsnp(0) & """>" & rsnp(1) & "</a>"
Else
    next_title = "暂无"
End If
rsnp.Close
rsnp.Open "select top 1 id, title from news where id<" & request.QueryString("id") & " order by id desc"
If Not rsnp.EOF Then
    previous_title = "<a href=""news_view.asp?id=" & rsnp(0) & """>" & rsnp(1) & "</a>"
Else
    previous_title = "暂无"
End If
rsnp.Close
Set rsnp = Nothing
%>
      <p>上一条新闻：<%=previous_title%>   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;下一条新闻：<%=next_title%></p>
</div>
</div>
<div class="clear"></div>

<!--#include file="footer.asp"-->
