<!--#include file="inc_common.asp"-->
<!--#include file="UBB.asp"-->
<link href="../b2b_includefile/css.css" rel="stylesheet" type="text/css">
<body topmargin="0" leftmargin="0">
<%
dim n
	n=10		'n为要显示的留言数，可自己修改之
sql="Select top "&n&" * from [topic] where checked=1 and whisper=0 order by usertime desc"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1

if rs.eof and rs.bof then
	Response.Write "没有留言。"
	rs.close
	set rs=nothing
else
	dim usertitle
	while not rs.eof
	if rs("usertitle")="" then
		usertitle="无标题"
	else
		if len(HTMLencode(rs("usertitle")))>24 then
			usertitle=left(HTMLencode(rs("usertitle")),24)&"..."
		else
			usertitle=HTMLencode(rs("usertitle"))
		end if
	end if
	Response.Write "<A HREF='index.asp' title='点击查看留言' target='_parent'>"&usertitle&"</A>--"&year(rs("usertime"))&"年"&month(rs("usertime"))&"月"&day(rs("usertime"))&"日<br>"
	rs.movenext
	wend
	rs.close
	set rs=nothing
end if
%>