<div align=center>

<table width="680" border="0" align="center" cellpadding="0" cellspacing="0">



<tr>
<td colspan="2">
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" >
<tr>

<td height="29" bgcolor="e7ebef" style="font-weight: bold" width="69%">
<p align="center">新 闻 标 题</td>
<td width="14%" bgcolor="e7ebef" style="font-weight: bold"><div align="center">
	新闻分类</div></td>
<td width="14%" bgcolor="e7ebef" style="font-weight: bold"><div align="center">日期</div></td>

<%

if id="" then

	set rs=server.createobject("adodb.recordset")
	sql="select * from ku_news where shenhe=1 and 1=1 "
else
	set rs=server.createobject("adodb.recordset")
	sql="select * from ku_news where shenhe=1 and class="&id
	end if


	
	sql=sql&" order by dateandtime desc"
	'response.write sql
	'response.End
	rs.open sql,conn,1,1
	
	dim a
	Set a=New PageList
	listLimit=22
	'模拟分页一页显示分页数
	pageLists=5
	'设置分页参数

If rs.BOF or rs.EOF Then 
%>
</tr>
<tr bgcolor="#C6E3F4">
  <td height="24" colspan="5" align="center" bgcolor="#FFFFFF">此类暂无新闻！</td>
  </tr>
<%
else

'分页循环开始
totalList=rs.recordcount
a.InitPara=array(totalList,listLimit,pageLists)
a.PageList()
rs.pagesize=listLimit
page = request("page")
If page="" Then
	page=1
End If
rs.absolutepage = page
for i=1 to rs.pagesize
%>
<tr>

<td height="24" width="69%">
<%if rs("mode")=2 then%> 
<img border="0" src="Ku_skin/newdown.gif" width="10" height="10">
<a href="<%=rs("url")%>" title="<%=rs("title")%>" target=_blank>
<%=Trim(rs("title"))%></a>
<%else%> <img border="0" src="Ku_skin/newdown.gif" width="10" height="10">
<a href="Ku_shownews.asp?id=<%=rs("id")%>" title="<%=rs("title")%>" >
<%=Trim(rs("title"))%></a>
<%end if%>
</td>
<%
cid=rs("class")
set kurs=server.createobject("adodb.recordset")
    csql="select * from ku_newskind where id="&cid
    kurs.open csql,conn,1,3
%>
<% do while not kurs.eof%>

<td align="center"><%=kurs("name")%></td>

<td align="center"><%=DateTimeFormat(rs("dateandtime"),4)%></td>


<%
   kurs.movenext
   loop
   kurs.close
   
%>	
</tr>
<%
rs.movenext
if rs.eof then exit for
next

end if
%>
</table></td>
  </tr>


</table>
</div>
<%
rs.close
set rs=nohing
%>