<!--#include file="SiteInfo.asp"-->
<%
ID=trim(request.QueryString("ID"))
if ID<>"" then 
set RsA = server.createobject("adodb.recordset")
RsA.source = "select * from NewTree where ID="&ID&""
RsA.open RsA.source,conn,1,3
Pid=RsA("Pid")
if Pid=0 then
   Content="<a>"&RsA("Content")&"</a>"
   Locality=""&RsA("Content")
else
   set RsB = server.createobject("adodb.recordset")
   RsB.source = "select * from NewTree where ID="&Pid&""
   RsB.open RsB.source,conn,1,1
   Content="&gt;<a>"&RsB("Content")&"</a>&nbsp;&gt;&gt;&nbsp;<a>"&RsA("Content")&"</a>"
   Locality=""&RsB("Content")&""&RsA("Content")
   RsB.Close
   set RsB=nothing
end if
RsA.Close
set RsA=nothing
end if
'===========================
%>
<%
ID=trim(request.QueryString("ID"))
TID=trim(request.QueryString("TID"))
if ID<>"" then 
set RsA = server.createobject("adodb.recordset")
RsA.source = "select * from NewTree where ID="&TID&""
RsA.open RsA.source,conn,1,3
Pid=RsA("Pid")
if Pid=0 then
   Content="&nbsp;&gt;&gt;&nbsp;<a href='News.asp?id="&RsA("id")&"'>"&RsA("Content")&"</a>"
   Locality=""&RsA("Content")
else
   set RsB = server.createobject("adodb.recordset")
   RsB.source = "select * from NewTree where ID="&Pid&""
   RsB.open RsB.source,conn,1,1
   Content="&nbsp;&gt;&gt;&nbsp;<a href='News.asp?id="&RsA("Pid")&"'>"&RsB("Content")&"</a>&nbsp;&gt;&gt;&nbsp;<a href='News.asp?id="&RsA("id")&"'>"&RsA("Content")&"</a>"
   Locality=""&RsB("Content")&""&RsA("Content")
   RsB.Close
   set RsB=nothing
end if
RsA.Close
set RsA=nothing
end if
'===========================
%>
<%
dim i,intPage,page,pre,last,filepath
set RsP = server.createobject("adodb.recordset")
PSQL= "select id,Newtitle,addtime from News where TreeID like '%"&ID&"%' and Putout=true order by id desc"
RsP.PageSize = 20  '这里设定每页显示的记录数
RsP.CursorLocation = 3
RsP.Open PSQL,conn,0,2,1  
pre = true
last = true
page = trim(Request.QueryString("page"))
if len(page) = 0 then
   intpage = 1
   pre = false
else
   if cint(page) =< 1 then
      intpage = 1
      pre = false
   else
      if cint(page)>=RsP.PageCount then
         intpage = RsP.PageCount
         last = false
      else
         intpage = cint(page)
      end if
   end if
end if
if not RsP.eof then
   RsP.AbsolutePage = intpage
end if

if RsP.Bof or Rsp.EOF then ContentList="还没有相关内容！"

for i=1 to RsP.PageSize
  if RsP.EOF or RsP.BOF then  exit for
  ContentList=ContentList&"<li><span>"&RsP("addtime")&"</span><a target='_blank' href='NewsView.asp?id="&RsP("id")&"'>"&RsP("Newtitle")&"</a></li>" 
  RsP.movenext
next
ContentList="<ul class='postlist'>"&ContentList&"</ul>"
'===========================
%>
<%
Sub Pagination()
    response.write"<div class='page_news'>"
    if RsP.pagecount>0 then 
	   response.write"     <span>当前页<label id=total>"&intpage&"</label>/"&RsP.PageCount&"</span>"
    else 
       response.write"<span>当前页<label id=total>0/0</label></span>"
    end if
    response.write"<span>共有<label id=total>"&RsP.recordcount&"</label>条信息</span><span>每页<label id=total>"&RsP.PageSize&"</label>条</span><a href='News.asp?page=1&id="&ID&"'>首页</a>"
    if pre then
       response.write"<a href='News.asp?page="&intpage -1&"&id="&id&"'>上页</a>"
    end if
    if last then
       response.write"<a href='News.asp?page="&intpage +1&"&id="&ID&"'>下页</a>"
    end if
    response.write"<a href='News.asp?page="&RsP.PageCount&"&id="&ID&"'>尾页</a>&nbsp;&nbsp;&nbsp;&nbsp;转到第"
    response.write"<select name='sel_page' onChange='javascript:location=this.options[this.selectedIndex].value;'>"
    for i = 1 to RsP.PageCount
       if i = intpage then 
          response.write"<option value='News.asp?page="&i&"&id="&id&"' selected>"&i&"</option>"
       else
          response.write"<option value='News.asp?page="&i&"&id="&id&"'>"&i&"</option>"
       end if
    next
    response.write"</select>页</div>"
	RsP.Close
    set RsP=nothing
End Sub
'===========================
%>
<!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>新闻中心_<%=Locality%>_<%=sitename%>_powered by 启动力cms</title>
<meta name="Keywords" content="<%=Locality%>|<%=sitename%>|<%=Keywords%>">
<meta name="description" content="<%=Locality%>|<%=description%>">
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="css/functions.js"></script>
<!--#include file=admin/ini.sys -->
</HEAD>
<body>
<!--#include file="Top.asp" -->
<div style="margin:15px auto; width:980px;"><img src="Images/003.jpg" width="980" height="200" /></div>
<div id="content_body">
<div id="left">
<!--#include file="news_left.asp" -->
			<div class="left_bottom"></div>
<!--#include file="so.asp"-->
			<div class="left_bottom"></div>
<!--#include file="contact.asp"-->
			<div class="left_bottom"></div>
  </div>
<div id="right">
			<div class="right_title"><span class="float_right">
			  <div class="current_location"><strong><font color="#1c529b"></font></strong>当前位置：<a href="index.asp">首页</a> &gt; 新闻中心 &gt; <%=Locality%></div>
			</span>
				<h2>新闻中心</h2>
	</div>
	<div  class="right_pro"><%=ContentList%><% Call Pagination() %></div>

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