OJUG Upcoming Events

Switch to Calendar View

<% orderBy = request.querystring("orderby") SearchWhere = request("SearchWhere") SearchFor = request("SearchFor") If (SearchWhere = "All") Then SQL_SearchWhere = "(Event_Name LIKE ('%" & SearchFor & "%') OR Date LIKE ('%" & SearchFor & "%') OR Location LIKE ('%" & SearchFor & "%') OR Category LIKE ('%" & SearchFor & "%'))" Else SQL_SearchWhere = SearchWhere & " LIKE ('%" & SearchFor & "%')" End If If NOT (SearchFor = "") Then SQL_SearchFor = " WHERE " & SQL_SearchWhere Else SQL_SearchFor = " WHERE Date > #" & Date & "#" End If If orderBy = "Event_Name_Up" Then SQL_OrderBy = " ORDER BY Event_Name DESC" ElseIf orderBy = "Event_Name_Down" Then SQL_OrderBy = " ORDER BY Event_Name" ElseIf orderBy = "Date_Up" Then SQL_OrderBy = " ORDER BY Date DESC" ElseIf orderBy = "Date_Down" Then SQL_OrderBy = " ORDER BY Date" ElseIf orderBy = "Location_Up" Then SQL_OrderBy = " ORDER BY Location DESC" ElseIf orderBy = "Location_Down" Then SQL_OrderBy = " ORDER BY Location" ElseIf orderBy = "Category_Up" Then SQL_OrderBy = " ORDER BY Category DESC" ElseIf orderBy = "Category_Down" Then SQL_OrderBy = " ORDER BY Category" Else orderBy = "Date_Down" SQL_OrderBy = " ORDER BY Date" End If SQL = "SELECT * FROM Events" & SQL_SearchFor & SQL_OrderBy %>
Search for In


<% Set RS = Server.CreateObject("ADODB.Recordset") Dim colorchanger Dim color1 Dim color2 colorchanger = 0 color1 = "#C5D3E7" color2 = "#B0C4DE" dim intPage dim intPageCount dim intRecordCount If Request.QueryString("page") = "" Then intPage = 1 Else intPage = Request.QueryString("page") End If RS.CursorLocation = 3 RS.CursorType = 3 RS.ActiveConnection = Conn RS.Open SQL, Conn, 1, 3 RS.PageSize = 20 RS.CacheSize = RS.PageSize intPageCount = RS.PageCount intRecordCount = RS.RecordCount If NOT (RS.BOF AND RS.EOF) Then %> <% If CInt(intPage) > CInt(intPageCount) Then intPage = intPageCount If CInt(intPage) <= 0 Then intPage = 1 If intRecordCount > 0 Then RS.AbsolutePage = intPage intStart = RS.AbsolutePosition If CInt(intPage) = CInt(intPageCount) Then intFinish = intRecordCount Else intFinish = intStart + (RS.PageSize - 1) End if End If If intRecordCount > 0 Then For intRecord = 1 to RS.PageSize %> <% RS.MoveNext If colorchanger = 1 Then colorchanger = 0 color1 = "#C5D3E7" color2 = "#B0C4DE" Else colorchanger = 1 color1 = "#DAE3F0" color2 = "#C5D3E7" End If If RS.EOF Then Exit for Next %>
1<%Else%><%=intPage%><%End If%>&SearchFor=<%=SearchFor%>&SearchWhere=<%=SearchWhere%>"> Event Name 1<%Else%><%=intPage%><%End If%>&SearchFor=<%=SearchFor%>&SearchWhere=<%=SearchWhere%>"> 1<%Else%><%=intPage%><%End If%>&SearchFor=<%=SearchFor%>&SearchWhere=<%=SearchWhere%>"> Date & Time 1<%Else%><%=intPage%><%End If%>&SearchFor=<%=SearchFor%>&SearchWhere=<%=SearchWhere%>"> 1<%Else%><%=intPage%><%End If%>&SearchFor=<%=SearchFor%>&SearchWhere=<%=SearchWhere%>"> Location 1<%Else%><%=intPage%><%End If%>&SearchFor=<%=SearchFor%>&SearchWhere=<%=SearchWhere%>"> 1<%Else%><%=intPage%><%End If%>&SearchFor=<%=SearchFor%>&SearchWhere=<%=SearchWhere%>"> Category 1<%Else%><%=intPage%><%End If%>&SearchFor=<%=SearchFor%>&SearchWhere=<%=SearchWhere%>">
"><%=RS("Event_Name")%> <%=FormatDateTime(RS("Date"), vbShortDate)%>
<%=FormatDateTime(RS("Date"), vbLongTime)%>
<%=RS("Location")%> <%=RS("Category")%>
<%If cInt(intPage) > 1 Then%> << Prev <%End If%> <%If cInt(intPage) < cInt(intPageCount) Then%> Next >> <%End If%>

<%End If Else If (SearchFor = "") Then%>
There are currently no events.
<%Else%>
There are currently no events that match your search.
<%End If End If RS.close Set RS = Nothing %>
Maintained with the Ocean12 ASP Calendar Manager v1.01
©2001 Ocean12 Technologies, all rights reserved.
<%=RSBODY("Footer")%>