<% @LANGUAGE="VBScript" %> <% Option Explicit %> <% 'create variables Dim SQL Dim strDate Dim strEventID 'Set variable to todays date strDate = Date 'Call our database connection from include file 'maybe if we continue to get errors, need to Close first? Call OpenDB() 'Create SQL query SQL = "Select * FROM Events ORDER BY EventDate, EventName, EventID;" 'Open recordset and execute query Set RS = dbConn.Execute(SQL) %> MAX - Men's Associated Exchange

MAX Home   



 

MAXonline is the Internet home of MAX, a San Francisco Bay Area social club for gay men.
 

JOIN US AT OUR NEXT EVENT

<% 'Start our loop through the database looking for the first event 'whose date is today or later. DO UNTIL RS.EOF 'Check to see if the event has been reviewed for publishing. 'Also, if it is older than today we don't want it IF UCase(RS("Reviewed")) = "Y" AND RS("EventDate") >= strDate Then Exit Do 'We found the next upcoming event to put on the front page RS.MoveNext Loop Dim theMonthName, theMonthNameAbbr, theDay 'Get month number theMonthName = Month(RS("EventDate")) 'Convert month number to month name - True means abbreviated month name theMonthName = MonthName(theMonthName) 'Get the Day theDay = Day(RS("EventDate")) 'The ShortDescription field contains a concise event description that is 'more appropriate for the home page of the web site. If it isn't filled in, 'then the complete description is used. Dim TheDescription If (RS("ShortDescription")) <> "" then TheDescription = (RS("ShortDescription")) else TheDescription = (RS("Description")) end if %>
Event Name:  <%=FixForHTML(RS("EventName"))%>
Date:  <%=RS("EventDate")%>  <%=RS("DayOfWeek")%>
Description: <%=FixForHTML(TheDescription)%>
Time:  <%=RS("EventTime")%>
Cost:  <%=RS("Cost")%>
Location:  <%=RS("Location")%>
Champion:  <%=RS("Champion")%>
Champion
Contact:
 <%=RS("ChampionPhone")%>
 
<% 'Close and destroy connections Set RS = Nothing Call CloseDB() %>