<%@Language="VBScript"%> <%Option Explicit%> <% Public Function Main() Dim v, l, i Dim n Dim sEvents DocHeader "" BodyStart True, False, "" CenterText "WSS&PS is a unit of United States Power Squadrons Sail and Power Boating



" Response.Write("") v = ExecSQLArray("SELECT NewsDate, NewsTitle, NewsText " & _ "FROM News " & _ "WHERE ((NewsExpire IS NULL) AND (NewsDate > (Now - 30))) " & _ "OR (NewsExpire > Now) " & _ "ORDER BY NewsDate DESC", l) If (l > 0) Then Response.Write("") End If Response.Write("
") ShowSmartMiscText "Welcome", "{para:centertitle}Welcome!" sEvents = "" v = ExecSQLArray("SELECT COUNT(*) FROM Events WHERE (EventDate > (Now - 1)) AND (EventDate < (Now + 7))", l) If (l > 0) Then n = FixupNumber(v(0, 0)) If (n > 0) Then sEvents = "There " & IIf(n = 1, "is ", "are ") & CStr(n) & " event" & IIf(n = 1, "", "s") & " coming up in the next week" End If End If v = ExecSQLArray("SELECT COUNT(*) FROM Events WHERE (EventDate > (Now - 1)) AND (EventDate < (Now + 30))", l) If (l > 0) Then n = FixupNumber(v(0, 0)) If (n > 0) Then If (Len(sEvents) > 0) Then sEvents = sEvents & ", and " Else sEvents = "There " & IIf(n = 1, "is ", "are ") End If sEvents = sEvents & CStr(n) & " event" & IIf(n = 1, "", "s") & " coming up in the next month" End If End If If (Len(sEvents) > 0) Then sEvents = sEvents & ".
Click here to see what's coming up!" Else sEvents = "Click here to see what events are coming up!" End If CenterText "" & sEvents & "" Response.Write("
") CenterTitle "News" For i = LBound(v, 2) To UBound(v, 2) If (i > LBound(v, 2)) Then Response.Write("
") ParaStart "ctr" If (Not IsNull(v(0, i))) Then BoldText FormatLongDate(CDate(v(0, i))) If ((Not IsNull(v(0, i))) And (Not IsNull(v(1, i)))) Then Response.Write(" - ") If (Not IsNull(v(1, i))) Then BoldText v(1, i) If (Not IsNull(v(2, i))) Then Break CenterText ParseSmartText(v(2, i)) End If ParaEnd Next Response.Write("
") BodyEnd Response.Write("


") DocFooter End Function Main %>