%@LANGUAGE="VBSCRIPT"%> <% Dim strToday IF Request.QueryString("d") <> "" THEN strDayChosen = Request.QueryString("d") strMonth = Request.QueryString("m") strYear = Request.QueryString("y") ELSE IF Request.Form("month") <> "" THEN strMonth = Request.Form("month") strYear = Request.Form("year") ELSE strMonth = Month(Now) If strMonth < 10 THEN strMonth = "0" & strMonth else strMonth = strMonth END IF strMonth = CStr(strMonth) strYear = CStr(Year(Now)) strDayChosen = Cstr(Day(Now)) END IF END IF strToday = Now() SET Recordset1 = Server.CreateObject("ADODB.Recordset") Recordset1.ActiveConnection = MM_phone_STRING Recordset1.Source = "SELECT * FROM chapelbar_calendar WHERE booking_month = '" & strMonth & "' AND booking_year = '" & strYear & "' AND live LIKE 'yes' ORDER BY booking_day ASC" Recordset1.CursorType = 0 Recordset1.CursorLocation = 2 Recordset1.LockType = 3 Recordset1.Open() 'Response.write Recordset1.Source Recordset1_numRows = 0 SET Recordset2 = Server.CreateObject("ADODB.Recordset") Recordset2.ActiveConnection = MM_phone_STRING Recordset2.CursorType = 0 Recordset2.CursorLocation = 2 Recordset2.LockType = 3 'Recordset2.Open() 'Response.write Recordset1.Source Recordset1_numRows = 0 %> <% Dim Repeat1__numRows Repeat1__numRows = -1 Dim Repeat1__index Repeat1__index = 0 Recordset1_numRows = Recordset1_numRows + Repeat1__numRows %> <% Dim strNoDays If strMonth = "01" THEN strNoDays = 31 strMonthName = "January" END IF If strMonth = "02" AND strYear = "2004" THEN strNoDays = 29 strMonthName = "February" END IF If strMonth = "02" AND strYear <> "2004" THEN strNoDays = 28 strMonthName = "February" END IF If strMonth = "03" THEN strNoDays = 31 strMonthName = "March" END IF If strMonth = "04" THEN strNoDays = 30 strMonthName = "April" END IF If strMonth = "05" THEN strNoDays = 31 strMonthName = "May" END IF If strMonth = "06" THEN strNoDays = 30 strMonthName = "June" END IF If strMonth = "07" THEN strNoDays = 31 strMonthName = "July" END IF If strMonth = "08" THEN strNoDays = 31 strMonthName = "August" END IF If strMonth = "09" THEN strNoDays = 30 strMonthName = "September" END IF If strMonth = "10" THEN strNoDays = 31 strMonthName = "October" END IF If strMonth = "11" THEN strNoDays = 30 strMonthName = "November" END IF If strMonth = "12" THEN strNoDays = 31 strMonthName = "December" END IF %>
![]() |