str="" <% function invert(str) invert=replace(replace(replace(replace(str,"<","<"),">",">"),"
","")," "," ") end function kind=request("kind") typeid=request("typeid") borderid=request("borderid") n=trim(request("n")) if n="" or IsNumeric(n)=false then n=7 end if set rs=server.createobject("adodb.recordset") if kind="img" then if borderid="" or IsNumeric(borderid)=false then sql="select top 1 * from news where imgsize<>0 and audit=1 order by newsid DESC" else sql="select top 1 * from news where borderid=" & cstr(borderid) & " and imgsize<>0 and audit=1 order by newsid DESC" end if end if if kind="hot" then if typeid="" or IsNumeric(typeid)=false then sql="select top " & n & " * from news where audit=1 order by hits DESC" else sql="select top " & n & " * from news where typeid=" & cstr(typeid) & " and audit=1 order by hits DESC" end if end if if kind="" then if typeid="" or IsNumeric(typeid)=false then if borderid="" or IsNumeric(borderid)=false then sql="select top " & n & " * from news where audit=1 order by newsid DESC" else sql="select top " & n & " * from news where borderid=" & cstr(borderid) & " and audit=1 order by newsid DESC" end if else if borderid="" or IsNumeric(borderid)=false then sql="select top " & n & " * from news where typeid=" & cstr(typeid) & " and audit=1 order by newsid DESC" else sql="select top " & n & " * from news where typeid=" & cstr(typeid) & " and borderid=" & cstr(borderid) & " and audit=1 order by newsid DESC" end if end if end if rs.open sql,conn,1,1 if not rs.eof and not rs.bof then if kind="img" then%> str=str + "" <%else %> str=str + "" <% end if end if rs.close set rs=nothing %> str=str+ "
<%=trim(rs("topic"))%>
<%=rs("topic")%>
" <% do while not rs.eof %> str=str+"
  • \" target=_blank><%if cstr(rs("imgsize")) <>0 then%>[ͼÎÄ]<%end if%><%=trim(rs("topic"))%>(<%theday=cstr(YEAR(rs("ntime")))&"-"&cstr(MONTH(rs("ntime")))&"-"&cstr(DAY(rs("ntime"))) response.write theday%>)<%if month(cdate(trim(rs("ntime"))))=month(now()) and clng(day(cdate(trim(rs("ntime"))))+1)>=clng(day(now())) then%><%end if%>" <% rs.movenext loop %> str=str + "
  • " document.write (str)