<% set rs=server.CreateObject("Adodb.recordset")
sql="select top 10 newsid,topic from news where audit=1 order by ntime desc"
rs.open sql,conn,1,1
dim i
i=1
if rs.eof and rs.bof then
response.write"没有任何相关新闻!"
else
%>
<table width="92%" border="0" align="center" cellpadding="0" cellspacing="0">
<%do while rs.eof<>true and i<6%>
<tr>
<td width="30" height="22" align="center"><img src="images/039.jpg" width="4" height="8"></td>
<td width="260">
<%topic=rs("topic")
if len(trim(topic))>17 then
topic=left(topic,17)&"..."
end if
response.write "<a href=news/shownews.asp?newsid="&rs("newsid")&" target=_blank>"&topic&"</a>"
%>
</td>
<% rs.movenext
if rs.eof then
exit do
end if
%>
<td width="30" align="center"><img src="images/039.jpg" width="4" height="8"></td>
<td><% if rs.eof<>true then
topic=rs("topic")
if len(trim(topic))>15 then
topic=left(topic,15)&"..."
end if
response.write "<a href=news/shownews.asp?newsid="&rs("newsid")&" target=_blank>"&topic&"</a>"
end if
%>
</td>
</tr>
<%
rs.movenext
i=i+1
loop
%>
</table>
<% end if
rs.close
set rs=nothing
%>