<%
Set rs = Server.CreateObject("ADODB.Recordset")
SQL = "Select * from News where showit='Y' order by posttime Desc"
rs.Open SQL,conn,3,3
If rs.RecordCount = 0 then
%>
目前尚無任何公告訊息!
<%
Else
%>
<%
rs.MoveFirst
While Not rs.EOF
%>
<%
If Month(rs("posttime")) < 10 then
MonthVal = "0" & Month(rs("posttime"))
Else
MonthVal = Month(rs("posttime"))
End If
If Day(rs("posttime")) < 10 then
DayVal = "0" & Day(rs("posttime"))
Else
DayVal = Day(rs("posttime"))
End If
If DateDiff("d", rs("posttime"), Now) < 4 then
%>