<% 
'##############################################
'更多新闻连接，如果是所有的新闻，不用指定newstype的参数，newstype得参数值可在后台管理的新闻类别管理里查看
'news_language=0表示是中文的新闻，news_language=1表示是英文的新闻
'##############################################

newstype=trim(replace(request("newstype"),"'",""))
if newstype="" then
 sql="select news.news_id,news_title,news_date,news_type,news_content from news,news_class where news.news_class_id=news_class.news_id and news_language=0 order by news_date DESC"  
else
 sql="select news.news_id,news_title,news_date,news_type,news_content from news,news_class where news.news_class_id=news_class.news_id and news_language=0 "
 sql=sql & " and news_type = '"&newstype&"' order by news_date DESC"	  
end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
 %>
              <%
if Not rs.EOF then
dim newsperpage
newsperpage=5 '每页显现6条新闻
rs.movefirst
rs.pagesize=newsperpage
if trim(request("page"))<>"" then
   page1=trim(request("page"))
       currentpage=clng(request("page"))
       if currentpage>rs.pagecount then
          currentpage=rs.pagecount
       End if
else
   currentpage=1
End if
   totalnews=rs.recordcount
   if currentpage<>1 then
       if (currentpage-1)*newsperpage<totalnews then
	       rs.move(currentpage-1)*newsperpage
		   dim bookmark
		   bookmark=rs.bookmark
	   End if
   End if
   if (totalnews mod newsperpage)=0 then
      totalpages=totalnews\newsperpage
   else
      totalpages=totalnews\newsperpage+1
   End if
i=0
Do While Not rs.EOF and i<newsperpage
%>
              <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="100%"  height="30" >· <a href="ShowNews.asp?news_id=<%=rs("news_id")%>"> <%=left(rs("news_title"),22)%> </a>&nbsp;&nbsp;( <%=rs("news_date")%> )</td>
                </tr>
              </table>
              <%
i=i+1
rs.movenext
loop
else
if rs.EOF and rs.BOF then
%>
              <%End if
End if
%>