<!--#INCLUDE file="config.asp"--> 
<%
classid=request("classid") & ""
if isnumeric(classid)=false then classid=""
Set rs = Server.CreateObject("ADODB.recordset")
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open connstr
strwhere=""
if classid<>"" then
	strsql="select classname from newsclass where id=" & classid
	rs.Open strsql,conn,1,1
	if not rs.EOF then
		classname=rs("classname") & ""
	end if
	rs.Close 
	strwhere=strwhere & " and classid=" & classid
end if
if classname & ""="" then classname="新闻中心"
%>
<!--#include file="inc-top.asp"-->
<div class="main">
  <div class="wrap clearfix">
    <div class="topbox">
      <div class="ctb png"> </div>
      <!--#include file="inc-top-qq.asp"-->
    </div>
<!--whole-->

<div class="left">
	<!--#include file="inc-news-left.asp"-->
</div>

<!--left over-->

<div class="right">
  <div class="title">
    <ul>
      <li><a href="index.asp">首页</a></li>
      <li>&lt;&lt;</li>
      <li><%=classname%></li>
    </ul>
    <h2><i><%=classname%></i>The latest info</h2>
  </div>
  <div class="clearfix">
    <!--div class="n_rec clearfix">
      <div class="l"><a href='default.htm' target='_blank'><img src='upload/link/2010111360890477.jpg' width='330' height='162' border=0 /></a></div>
      <div class="r">
        <ul class="newsList2">
		 
        </ul>
      </div>
    </div-->
      



<%
strsql="select id,title,pubdate,comments from newslist where 1=1 " & strwhere & " order by pubdate desc,id desc"
rs.Open strsql,conn,1,1



PSize=15
if rs.RecordCount>0 then
%>
    <dl class="el">
<%
	RCount=rs.RecordCount
	rs.PageSize=PSize
	PCount=rs.PageCount
	Page=Request("Page") & ""
	if isnumeric(Page)=false then Page=1
	if Cint(Page)>Cint(PCount) then Page=PCount
	rs.AbsolutePage=Page
	Row=1
	
	CurRec=(Page-1) * PSize +1
	LastRec=CurRec+PSize-1
	if Cint(Page)=Cint(PCount) then LastRec=RCount
	
	do while not rs.EOF and Cint(Row)<=Cint(PSize)
			id=rs("id") 
			title=rs("title") & ""
			pubdate=rs("pubdate") & ""
 
%>
      <dd title='<%=title%>'> <a href='Content_Display.asp?id=<%=id%>'><span><%=getdateformat(pubdate,"<b>dd</b>yyyy-mm")%></span>
        <h3><%=title%></h3>
        <p><%=comments%></p></a> </dd>

<%
	row=row+1
	rs.MoveNext
loop


%>
    </dl>

     <div style="width:700px;text-align:center" >
      共有 <%=RCount%> 条记录&nbsp;&nbsp;<%=TurnToPage(PCount,Page)%>
     </div>

 
<%
else
	Response.Write "<div><br><br>没有找到任何记录！<br><br></center></div>"
end if
rs.close
%>	

 
      


 
        

  </div>
</div>
<div class="clear"></div>
</div>
</div>
<Form name="GotoPage" method="post" action="<%=thispageurl%>">
			<input type="Hidden" name="Page" Value="<%=Page%>">
			<input type="Hidden" name="classid" Value="<%=classid%>">
</Form>
<!--#include file="inc-bottom.asp"-->
<%
closedatabase
%>