<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp"-->
<!--#include file="function.asp"-->

<!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>新闻中心-<%=i_title%></title>
<script src="js/YUI.js" type="text/javascript"></script>
<link href="css/shuanglang.css" rel="stylesheet" type="text/css" />
</head>

<body>
<table width="950" border="0" cellspacing="0" cellpadding="0" align="center"  style="background:#FFF;padding-right:5px;padding-left:5px;">
  <tr>
    <td valign="top">
<!--#include file="top.asp"-->


<table width="950" border="0" cellspacing="0" cellpadding="0" align="center" class="margin5" >
  <tr>
    <td   width="233"   valign="top"><div style="background:url(images/title_nav.png) no-repeat;font-weight:bold;line-height:30px;height:30px;width:213px;padding-left:25px;color:#FFF;">新闻中心</div>
	
	<div class="newclass">
	<ul>
	<%
	set rs=conn.execute("select * from news_class  order by id asc")
	do while not rs.eof
	%>
	<li style="line-height:30px;height:30px;background:url(images/title_nava.png) no-repeat; padding-left:25px;"><a href="newsclass.asp?id=<%=rs("id")%>"   ><%=rs("classname")%></a></li>
	<%
	rs.movenext
	loop
	rs.close
	set rs=nothing
	%>
	</ul>
	</div>
	<div style="height:5px;width:100%;"></div>
	
	
	</td><td width="10"></td><td width="707" valign="top" >
	<div style="border-bottom:1px solid #EEE;margin-left:5px;height:30px;line-height:30px;">您当前的位置：<a href="/" style="color:#666;text-decoration:none;">首页</a> > <a href="news.asp" style="color:#666;text-decoration:none;">新闻中心</a> </div>
	<div style="height:10px;"></div>
<%
set rs=server.createobject("adodb.recordset")
sql="select id,title,addtime,classid from news order by id desc" 
rs.open sql,conn,1,1			
If rs.EOF Then
response.write("<p align=center>暂无</p>")
Else
 rs.PageSize = 15
        allpage = rs.RecordCount
        iPageSize = rs.PageSize
        maxpage = rs.PageCount
        page = request("page")
        If Not IsNumeric(page) Or page = "" Then
            page = 1
        Else
            page = CInt(page)
        End If
        If page<1 Then
            page = 1
        ElseIf page>maxpage Then
            page = maxpage
        End If
        rs.AbsolutePage = Page
        If page = maxpage Then
            x = allpage - (maxpage -1) * iPageSize
        Else
            x = iPageSize
        End If
        For i = 1 To x
		set rsa=conn.execute("select * from news_class where id="&rs("classid")&"")
		classname=rsa("classname")
		classid=rsa("id")
		rsa.close
		set rsa=nothing
		%>
		
		<table width="707" border="0" cellspacing="0" cellpadding="0"  style="border-bottom:1px dashed #DDD;" >
  <tr>
    <td height="30"  width="587"><div class="news"><a href="newsclass.asp?id=<%=classid%>" style="color:#FF0000;text-decoration:none;">[<%=classname%>]</a> <a href="newsinfo.asp?id=<%=rs("id")%>"><%=rs("title")%></a></div></td><td width="120" height="30" align="right">[ <%=formatdate(rs("addtime"),2)%> ]</td>
  </tr>
</table>
<%
		 rs.movenext
   Next
		rs.Close
		Set rs = Nothing
			end if
			%>
			<table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top:10px;">
  <tr>
    <td align=center>
	<%
If allpage <> "" Then
Call sl_page
End If
%></td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="15">&nbsp;</td>
  </tr>
</table>

	</td>
  </tr>
</table>
	</td>
  </tr>
</table>	  

	
<!--#include file="bottom.asp"-->
</body>
</html>
<%
call closeconn()
%>