<!--#include file="conn.asp"-->
<!--#include file="inc/function.asp"-->
<%
Dim AskD,inHtml
Set AskD = Server.CreateObject("KwAsk.FunAsk")
	opendb
	set AskD.myConn =conn
	AskD.myPredb =predb
	AskD.Getsetting()
	siteinfo=AskD.siteinfo
	setting=AskD.setting
	AskD.GetTemplate("T-announce.html")
    inHtml=RexHtml(AskD.tempbody)
    inHtml=RexHtml_IF(inHtml)
    Response.Write(inHtml)
	set AskD.myConn =Nothing
    closedb
Set AskD = Nothing

Function announcelist()
  dim rs,str
  set rs=conn.execute("select id,title,addtime from "&predb&"Announce order by isnew desc,id desc")
  do while not rs.eof
  str=str&"<div class=""an-line"">"&vbcrlf
  str=str&"<div class=""an-title""> ·<a href=""AnnounceS.asp?id="&rs("id")&""">"&rs("title")&"</a></div>"&vbcrlf
  str=str&"<div class=""an-time"">"&Formatdatetime(rs("addtime"),vbshortdate)&"</div>"&vbcrlf
  str=str&"</div>"&vbcrlf
  rs.movenext
  loop
  set rs=nothing
  announcelist=str
End Function
%>