<%@ LANGUAGE = VBScript %> <% Server.ScriptTimeout = 3600 %> <% startpage=Trim(Request.Form("startpage")) if startpage = "" then startpage=Trim(Request.Querystring("startpage")) end if if startpage = "" then startpage = "1" end if startpage=int(startpage) matchall=Trim(Request.Form("matchall")) if matchall = "" then matchall=Trim(Request.Querystring("matchall")) end if If matchall = "" Then ' default matchtype = " OR " Else matchtype = " AND " End If keywordsorg=Trim(Request.Form("keywords")) if keywordsorg = "" then keywordsorg = Trim(Request.Querystring("keywords")) end if keywords = UCase(keywordsorg) keywords20 = replace(keywordsorg," ","%20") dim keyarr keyarr = split(keywords) wherekeyword = " (" for i=0 to UBound(keyarr) if i>0 then wherekeyword = wherekeyword & matchtype end if wherekeyword = wherekeyword & "( UCase(ODBM_EventSeries.SeriesName) like '%" & keyarr(i) & "%' " wherekeyword = wherekeyword & " OR " wherekeyword = wherekeyword & "UCase(ODBM_EventSeries.Comment) like '%" & keyarr(i) & "%' ) " next wherekeyword = wherekeyword & ") " Dim numberofhits, hitsperpage SQLQuery = "SELECT Count(*) " &_ "FROM ODBM_EventSeries " &_ "WHERE ODBM_EventSeries.ID IN (SELECT ODBM_Reservations.EventSeriesID FROM ODBM_Reservations)" Set SELECTEvents = oDBConnection.Execute(SQLQuery) numberofhits = SELECTEvents ( 0 ) Set SELECTEvents = Nothing hitsperpage = 4 startrecord = ( ( startpage - 1 ) * hitsperpage ) + 1 endrecord = startrecord + hitsperpage - 1 numberofpages = ( ( numberofhits - 1 ) \ hitsperpage ) + 1 SQLQuery = "SELECT ODBM_EventSeries.ID, " &_ "ODBM_EventSeries.SeriesName, " &_ "ODBM_EventSeries.Comment, " &_ "ODBM_EventSeries.PlaceID, " &_ "ODBM_EventSeries.SeriesURL " &_ "FROM ODBM_EventSeries " &_ "WHERE ODBM_EventSeries.ID IN (SELECT ODBM_Reservations.EventSeriesID FROM ODBM_Reservations) " &_ "ORDER BY UCase(ODBM_EventSeries.SeriesName)" Set SELECTEvents = oDBConnection.Execute(SQLQuery) %>
boston cyberarts festival events
all events
hits: <%=numberofhits%>

<% pcnt = 0 dim keyindexarr(100) Do While not SELECTEvents.eof pcnt = pcnt + 1 SQLPlace = "SELECT * FROM ODBM_items WHERE ID = " & SELECTEvents("placeID") Set SELECTPlace = oDBConnection.Execute(SQLPlace) SQLEventID = "SELECT MIN(ID) FROM ODBM_Reservations WHERE ODBM_Reservations.EventSeriesID = " & SELECTEvents("ID") Set SELECTEventID = oDBConnection.Execute(SQLEventID) titletxt = SELECTEvents("SeriesName") desctxt = SELECTEvents("Comment") url = Trim(SELECTEvents("SeriesURL")) If Len(url) > 10 Then titletxt = "" & titletxt & "" Else titletxt = "" & titletxt & "" End If %> <% Set SELECTPlace = Nothing Set SELECTEventID = Nothing SELECTEvents.moveNext loop %>
<%=titletxt%>

<%=desctxt%>

location: <%=SELECTPlace("ItemName")%>

<%=j%>

<% If numberofhits > 0 Then %> <% End If %>
top

<% Set SELECTEvents = Nothing oDBConnection.Close Set oDBConnection= Nothing %>