<%if request("keyword") = "" Then%>
<%sql="SELECT top 5 * FROM bzdt order by count DESC,d_title"
else
if Request("where") = "1" then
where="d_title"
else
where="d_content"
end if
keyword = Trim(Request("keyword"))
sql = "Select top 5 d_id,d_title,d_content,zz,count,date from bzdt where "&where&" like '%"& keyword &"%' order by count desc"
end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
Response.Write "<div align=""left"">" & vbCrLf
Response.Write "<table border=""0"" cellpadding=""0"" cellspacing=""0""
width=""100%"">" & vbCrLf
do while not rs.eof
Response.Write "<tr>" & vbCrLf
Response.Write "<td height=""21"" class=tl><a href=""show.asp?d_id="&rs("d_id")&"&1=bzdt"">"&rs("d_title")&" </a></td>" & vbCrLf
Response.Write "</tr>" & vbCrLf
rs.movenext
loop
if rs.eof and rs.bof then
Response.Write "<font color=""#666666"">目前尚无任何动态信息!</font>"
end if
rs.close
Response.Write "</table>" & vbCrLf
Response.Write "</div>" & vbCrLf
%>