<% Dim dt,title_array,z,cd title_array=Array("This Week","Next Week","The Week After Next") dt=Request.QueryString("weeknumber") If Len(dt)=0 Or Not IsNumeric(dt) Then dt=0 Else dt=CLng(dt) End If If dt<0 Or dt>Ubound(title_array) Then dt=0 End If %> What's on at Epworth Church during <%=Lcase(title_array(dt))%>
The Methodist Church logo
Epworth Methodist Church
Home Page
An Introduction
Our Vision
3Rs Development
Whats On
A Week In Our Life
Boys Brigade
Girls Brigade
Parents And Toddlers
Drop In Lunch
Junior Church
Fellowship Groups
Pastoral Care
Room Bookings
Where To Find Us
Useful Web Sites

What's on at Epworth Church during <%=Lcase(title_array(dt))%>

<% cd=Date+(dt*7) While Weekday(cd)<>1 cd=cd-1 Wend cd=CLng(cd) sql="SELECT Format(Date_Time,'dddd d mmmm yyyy'),Format(Date_Time,'h:nn am/pm'),Activity,Venue,Leader" & _ " FROM Main_Diary"& _ " WHERE Date_Time Between " & cd & " And " & cd+7 & _ " ORDER BY Date_Time;" recset.Open sql,dblink,0,1,1 recset.ActiveConnection=Nothing If recset.EOF Then Response.write "

Sorry, there are no diary entries for " & title_array(dt) & "!

" Else Response.write "" & VbCrLf While Not recset.EOF If dt<>recset(0) Then Response.write "" & VbCrLf dt=recset(0) End If Response.write "" & VbCrLf recset.MoveNext Wend Response.write "
" & recset(0) & "
" & recset(1) & "" & recset(2) & "" & recset(3) & "" & recset(4) & "
" End If recset.Close %>
<% sql="SELECT Format(Max(Date_Updated),'d mmmm yyyy') FROM Main_Diary;" recset.Open sql,dblink,0,1,1 recset.ActiveConnection=Nothing dblink.Close Set dblink=Nothing Response.write "This page was last updated on " & recset(0) recset.Close Set recset=Nothing %>