<!--#include file="conn.asp"-->
<!--#include file="include/safe.asp"-->
<!--#include file="include/function.asp"-->
<!--#include file="include/config.asp"-->
<%
Call noid
Dim rsn, news_on, news_down
Set rsn = conn.Execute("select * from news where id="& request.QueryString("id"))
If rsn.EOF Then
    Call infoback("无效参数值！")
End If
Set news_on = conn.Execute("select * from news where id<"& request.QueryString("id") &" and main_id="&rsn("main_id")&" order by id desc")
Set news_down = conn.Execute("select * from news where id>"& request.QueryString("id") &" and main_id="&rsn("main_id")&" order by id")
%>
<!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")%>" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes" />
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<!--#include file="header.asp"-->
<div id="content">
  <%
Set rs = Server.CreateObject("ADODB.RecordSet")
sql = "select news_name,news_content,data,hits,news_author,news_sources from news where id="& request.QueryString("id")
rs.Open sql, conn, 1, 3
If rs.EOF Then
    Call infoback("不存在此数据，或者相关数据已被删除！")
Else

%>
  <div class="wap_title"> <span class="tag">资讯详情</span> </div>
  <div class="w_body">
    <h1><%=rs("news_name")%></h1>
    <div class="news_detail"><span class="newsa">来源</span>：<%=rs("news_sources")%> <span class="newsa">作者</span>：<%=rs("news_author")%>　<span class="newsa">浏览</span>：<%=rs("hits")%></div>
    <%=rs("news_content")%>
    <div>
      <p>上一条新闻：
        <%
If Not news_on.EOF Then
    Response.Write("<a href=""news_view.asp?id="&news_on("id")&""">"&news_on("news_name")&"</a>")
Else
    Response.Write("已经最前一条了！")
End If

%>
      </p>
      <p>下一条新闻：
        <%
If Not news_down.EOF Then
    Response.Write("<a href=""news_view.asp?id="&news_down("id")&""">"&news_down("news_name")&"</a>")
Else
    Response.Write("已经是最后一条了！")
End If

%>
      </p>
    </div>
  </div>
  <%
rs("hits") = rs("hits") + 1
rs.update
End If
Call close_rs
%>
</div>
<div class="clear"></div>
</div>
</div>
<!--#include file="foot.asp"-->
</body>
</html>
