<%@LANGUAGE="VBSCRIPT"%> <% set rsTourDates = Server.CreateObject("ADODB.Recordset") rsTourDates.ActiveConnection = MM_connMySQL_CCO_STRING rsTourDates.Source = "SELECT tblID, Tour, Date1, Date2, Date3, Date4, Date5, Date6, Date7, Date8, Date9, Date10, Date11, Date12, Date13, Date14, Date15, NoOfDates FROM tblTD ORDER BY Date1" rsTourDates.CursorType = 0 rsTourDates.CursorLocation = 2 rsTourDates.LockType = 3 rsTourDates.Open() rsTourDates_numRows = 0 %> <% If (rsTourDates.EOF) Then Response.Redirect("tourdates_none.asp") End If 'MagicBeat Server Behavior - 1014 - by Jag S. Sidhu - www.magicbeat.com %> <% Dim Repeat1__numRows Repeat1__numRows = -1 Dim Repeat1__index Repeat1__index = 0 rsTourDates_numRows = rsTourDates_numRows + Repeat1__numRows %> <% ' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters ' create the list of parameters which should not be maintained MM_removeList = "&index=" If (MM_paramName <> "") Then MM_removeList = MM_removeList & "&" & MM_paramName & "=" MM_keepURL="":MM_keepForm="":MM_keepBoth="":MM_keepNone="" ' add the URL parameters to the MM_keepURL string For Each Item In Request.QueryString NextItem = "&" & Item & "=" If (InStr(1,MM_removeList,NextItem,1) = 0) Then MM_keepURL = MM_keepURL & NextItem & Server.URLencode(Request.QueryString(Item)) End If Next ' add the Form variables to the MM_keepForm string For Each Item In Request.Form NextItem = "&" & Item & "=" If (InStr(1,MM_removeList,NextItem,1) = 0) Then MM_keepForm = MM_keepForm & NextItem & Server.URLencode(Request.Form(Item)) End If Next ' create the Form + URL string and remove the intial '&' from each of the strings MM_keepBoth = MM_keepURL & MM_keepForm if (MM_keepBoth <> "") Then MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1) if (MM_keepURL <> "") Then MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1) if (MM_keepForm <> "") Then MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1) ' a utility function used for adding additional parameters to these strings Function MM_joinChar(firstItem) If (firstItem <> "") Then MM_joinChar = "&" Else MM_joinChar = "" End If End Function %> Untitled Document
 
<% While ((Repeat1__numRows <> 0) AND (NOT rsTourDates.EOF)) %> <% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 rsTourDates.MoveNext() Wend %>
"><%=(rsTourDates.Fields.Item("Tour").Value)%> <% dim strNumber, strMonthTo, strMonthFrom, strDates strNumber = "Date" + rsTourDates.Fields.Item("NoOfDates").Value strMonthTo = MonthName(Mid((rsTourDates.Fields.Item(strNumber).Value),5,2)) strMonthFrom = MonthName(Mid((rsTourDates.Fields.Item("Date1").Value),5,2)) if strMonthTo = strMonthFrom then Response.Write strMonthFrom & " " & Mid((rsTourDates.Fields.Item("Date1").Value),1,4) elseif Mid((rsTourDates.Fields.Item("Date1").Value),1,4) = Mid((rsTourDates.Fields.Item(strNumber).Value),1,4) then Response.Write strMonthFrom & " - " & strMonthTo & " " & Mid((rsTourDates.Fields.Item(strNumber).Value),1,4) else Response.Write strMonthFrom & " " & Mid((rsTourDates.Fields.Item("Date1").Value),1,4) & " - " & strMonthTo & " " & Mid((rsTourDates.Fields.Item(strNumber).Value),1,4) end if %>

<% rsTourDates.Close() %>