<% Option Explicit%> <% Call HandleCookies() %> <% Dim objRS, objConn, strSQL, strAddress, strFaith, strDenomination, strVenue Dim intID, strLeader, strAddress1, strAddress2, strTown, strPostcode, fltLatitude, fltLongitude, strServices, strMiscellaneous Dim strHREF, strDescription Dim strWholeAddress, strTelephone, strFax, strEmail, strModifiedEmail, strWebsite, strModifiedWebsite Dim strContactName, strContactAddress Dim strContactAddress1, strContactAddress2, strContactTown, strContactCity, strContactPostcode, strContactTelephone, strContactEmail Dim strPicture, strLocalFaithLinks Dim strRoomsAvailable, strSizeOfRooms, strEquipment, strKitchenFacilities, strToilets, strParking, strAccessibility, strRestrictions, strCosts Dim strPromotion Dim intFaithID, intDenominationID Dim arySplit, i, arySubSplit, strLastDay, strDay Dim strSource g_intCurrentTab = -1 Sub OutputActivities(intType) Dim strSQL, strContactInfo, strDetails strSQL = "SELECT JoinActivity.ID AS ActivityID, Activities.Name AS Activity, JoinActivity.Description, JoinActivity.Details, Contacts.* " strSQL = strSQL & "FROM Contacts RIGHT JOIN (Activities INNER JOIN JoinActivity ON Activities.ID = JoinActivity.ActivityID) ON Contacts.ID = JoinActivity.ContactID " strSQL = strSQL & "WHERE JoinActivity.VenueID = " & intID strSQL = strSQL & "AND JoinActivity.TypeID = " & intType strSQL = strSQL & " ORDER BY Activities.Name, JoinActivity.Description" objRS.Open strSQL, objConn, 0, 1 If objRS.EOF Then OutputLine(" No Information") Else Do While Not objRS.EOF strContactName = GetRSValue(objRS, "Name") strContactAddress1 = GetRSValue(objRS, "Address1") strContactAddress2 = GetRSValue(objRS, "Address2") strContactTown = GetRSValue(objRS, "Town") strContactCity = GetRSValue(objRS, "City") strContactPostcode = GetRSValue(objRS, "Postcode") strContactTelephone = GetRSValue(objRS, "Telephone") strContactEmail = GetRSValue(objRS, "Email") strDescription = GetRSValue(objRS, "Description") strDetails = GetRSValue(objRS, "Details") strHREF = "javascript:toggleview('" & "activity" & GetRSValue(objRS, "ActivityID") & "');" OutputLine("
  " & objRS("Activity") ) If objRS("Activity") <> strDescription And strDescription <> "" Then OutputLine(" (" & strDescription & ")") End If OutputLine("
") '----------------------------------------------------------------------------------------------- OutputLine("
") OutputLine("") If strContactName<>"" Then OutputLine("") OutputLine("") End If If strDetails <> "" Then OutputLine("") OutputLine("") End If If Not (strContactName<>"" Or strDetails <> "") Then OutputLine("") End If OutputLine("
 Contact Details") strContactInfo = strContactName If strContactAddress1 <>"" Then strContactInfo = strContactInfo & ", " & strContactAddress1 If strContactAddress2 <>"" Then strContactInfo = strContactInfo & ", " & strContactAddress2 If strContactTown <>"" Then strContactInfo = strContactInfo & ", " & strContactTown If strContactCity <>"" Then strContactInfo = strContactInfo & ", " & strContactCity If strContactPostcode <>"" Then strContactInfo = strContactInfo & ", " & strContactPostcode If strContactTelephone <>"" Then strContactInfo = strContactInfo & ", " & strContactTelephone If strContactEmail <>"" Then strContactInfo = strContactInfo & ", " & strContactEmail & "" OutputLine(strContactInfo & "
 Information" & Replace(strDetails, VbCrLf, "
") & "
 No Contact Details
") '----------------------------------------------------------------------------------------------- OutputLine("
") OutputLine("
") objRS.MoveNext Loop End If objRS.Close End Sub Set objRS = Server.CreateObject("ADODB.RecordSet") Set objConn = Server.CreateObject("ADODB.Connection") objConn.Open("DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.Mappath("Faith Resources.mdb") & ";") If IsNumeric(Request("ID")) Then intID = CInt(Request("ID")) Else intID = CInt(-1) End If strSource = Trim(Request("src")) strSQL = "SELECT Faiths.Name AS Faith, Denominations.Name AS Denomination " strSQL = strSQL + "FROM Denominations INNER JOIN (Faiths INNER JOIN Venues ON Faiths.ID = Venues.FaithID) ON Denominations.ID = Venues.DenominationID " strSQL = strSQL + "WHERE Venues.ID=" & intID objRS.Open strSQL, objConn, 0, 1 If Not objRS.EOF Then strFaith = Trim(objRS("Faith")) strDenomination = Trim(objRS("Denomination")) End If objRS.Close strSQL = "SELECT Venues.FaithID, Venues.DenominationID, Venues.Name As Venue, Venues.*, Towns.Name AS Town FROM Towns INNER JOIN Venues ON Towns.ID = Venues.TownID WHERE Venues.ID=" & intID objRS.Open strSQL, objConn, 0, 1 If Not objRS.EOF Then strVenue = GetRSValue(objRS, "Venue") strLeader = GetRSValue(objRS, "Leader") intFaithID = GetRSValue(objRS, "FaithID") intDenominationID = GetRSValue(objRS, "DenominationID") strAddress1 = GetRSValue(objRS, "Address1") strAddress2 = GetRSValue(objRS, "Address2") strTown = GetRSValue(objRS, "Town") strPostcode = GetRSValue(objRS, "Postcode") strTelephone = GetRSValue(objRS, "Telephone") strFax = GetRSValue(objRS, "Fax") strEmail = GetRSValue(objRS, "Email") strWebsite = GetRSValue(objRS, "Website") fltLatitude = GetRSValue(objRS, "Latitude") fltLongitude = GetRSValue(objRS, "Longitude") strPicture = GetRSValue(objRS, "Picture") strServices = GetRSValue(objRS, "Services") strMiscellaneous = GetRSValue(objRS, "Miscellaneous") strLocalFaithLinks = GetRSValue(objRS, "LocalFaithLinks") strRoomsAvailable = GetRSValue(objRS, "RoomsAvailable") strSizeOfRooms = GetRSValue(objRS, "SizeOfRooms") strEquipment = GetRSValue(objRS, "Equipment") strKitchenFacilities = GetRSValue(objRS, "KitchenFacilities") strToilets = GetRSValue(objRS, "Toilets") strParking = GetRSValue(objRS, "Parking") strAccessibility = GetRSValue(objRS, "Accessibility") strRestrictions = GetRSValue(objRS, "Restrictions") strCosts = GetRSValue(objRS, "Costs") strPromotion = GetRSValue(objRS, "Promotion") End If objRS.Close ' -------------------------------------------------------------------------------- strWholeAddress="" If strVenue <> "" Then strWholeAddress = strWholeAddress & strVenue & "
" If strAddress1 <> "" Then strWholeAddress = strWholeAddress & strAddress1 & "
" If strAddress2 <> "" Then strWholeAddress = strWholeAddress & strAddress2 & "
" If strTown <> "" Then strWholeAddress = strWholeAddress & strTown & "
" If strPostcode <> "" Then strWholeAddress = strWholeAddress & strPostcode & "
" '-------------------------------------------------------------------------------- ' CONTACTS -------------------------------------------------------------------------------------------- strSQL = "SELECT Contacts.* " strSQL = strSQL + "FROM Venues INNER JOIN Contacts ON Venues.ContactID = Contacts.ID " strSQL = strSQL + "WHERE Venues.ID=" & intID objRS.Open strSQL, objConn, 0, 1 If Not objRS.EOF Then strContactName = GetRSValue(objRS, "Name") strContactAddress1 = GetRSValue(objRS, "Address1") strContactAddress2 = GetRSValue(objRS, "Address2") strContactTown = GetRSValue(objRS, "Town") strContactCity = GetRSValue(objRS, "City") strContactPostcode = GetRSValue(objRS, "Postcode") strContactTelephone = GetRSValue(objRS, "Telephone") strContactEmail = GetRSValue(objRS, "Email") End If objRS.Close ' -------------------------------------------------------------------------------------------- %> <% Call OutputStyleSheetLine() %> South Warwickshire faith directory entry"> ", ", ")%> Warwickshire, Warwick, Leamington, Stratford, Church, Churches, Religion, Faith, Resource, Community, Directory"> <%=strVenue & ", " & strTown%> - FAIR South Warwickshire <% Call OutputGoogleScript() %>
FAIR South Warwickshire
<% 'Tabs table OutputLine("") Call DisplayNavigationTabs(g_intCurrentTab) Response.Write("") If strPicture <> "" Then OutputLine("") End If OutputLine("
") %>

<% OutputLine("
") If strPicture <> "" Then OutputLine("
") OutputLine("
") End If %>
<% OutputLine("") If strSource <> "" Then OutputLine("
") If Left(strSource, 8) = "list.asp" Then Response.Write("Back to list") ElseIf Left(strSource, 10) = "search.asp" Then Response.Write("Back to search results") End If OutputLine("
") End If OutputLine("") OutputLine("
" & strVenue & "
") OutputLine("") OutputLine("") If strDenomination = "N/A" Then OutputLine("
Faith" & strFaith & "
") Else OutputLine("
" & strFaith & "
") End If OutputLine("") OutputLine("") If strDenomination = "N/A" Then OutputLine("
Denomination" & strDenomination & "
") Else OutputLine("" & strDenomination & "") End If OutputLine("") OutputLine("") OutputLine("
Faith Leader" & strLeader & "
") OutputLine("") OutputLine("") OutputLine("
Address") If strAddress1<>"" Then OutputLine(strAddress1 & "
") If strAddress2<>"" Then OutputLine(strAddress2 & "
") If strTown<>"" Then OutputLine("" & strTown & "
") If strPostcode<>"" Then OutputLine(strPostcode & "
") OutputLine("
") If strTelephone<>"" Then OutputLine("") OutputLine("") OutputLine("
Telephone" & strTelephone & "
") OutputLine("
") End If If strFax<>"" Then OutputLine("") OutputLine("") OutputLine("
Fax" & strFax & "
") OutputLine("
") End If If strEmail<>"" Then strModifiedEmail = Replace(strEmail, "@", "@ ") strModifiedEmail = Replace(strModifiedEmail, "-", "-
") OutputLine("") OutputLine("") OutputLine("
Email" & strModifiedEmail & "
") OutputLine("
") End If If strWebsite<>"" Then strModifiedWebsite = Replace(strWebsite, ".", ".
") strModifiedWebsite = Replace(strModifiedWebsite, "-", "-
") strModifiedWebsite = Replace(strModifiedWebsite, "
", " ") OutputLine("") OutputLine("") OutputLine("
Website" & strModifiedWebsite & "
") OutputLine("
") End If '----------------------------------------------------------------------------------------------- If strContactName<>"" Or strContactAddress1 <> "" Or strContactTelephone<>"" Or strContactEmail <>"" Then Call BeginHeader("Contact Details", "contact") End If If strContactName<>"" Then OutputLine("") OutputLine("") OutputLine("
Name" & strContactName & "
") OutputLine("
") End If If strContactAddress1 <> "" Then OutputLine("") OutputLine("") OutputLine("
Address") If strContactAddress1 <>"" Then OutputLine(strContactAddress1 & "
") If strContactAddress2 <>"" Then OutputLine(strContactAddress2 & "
") If strContactTown <>"" Then OutputLine(strContactTown & "
") If strContactCity <>"" Then OutputLine(strContactCity & "
") If strContactPostcode <>"" Then OutputLine(strContactPostcode & "
") OutputLine("
") End If If strContactTelephone<>"" Then OutputLine("") OutputLine("") OutputLine("
Telephone" & strContactTelephone & "
") OutputLine("
") End If If strContactEmail<>"" Then strModifiedEmail = Replace(strContactEmail, "@", "@ ") strModifiedEmail = Replace(strModifiedEmail, "-", "-
") OutputLine("") OutputLine("") OutputLine("
Email" & strModifiedEmail & "") OutputLine("
") End If If strContactName<>"" Or strContactAddress1 <> "" Or strContactTelephone<>"" Or strContactEmail <>"" Then Call EndHeader() End If '----------------------------------------------------------------------------------------------- If strServices <> "" Then Call BeginHeader("Faith Services", "faithservices") arySplit = Split(strServices, VbCRLf) strLastDay = "" For i=0 To UBound(arySplit) arySubSplit = Split(arySplit(i), "|") ' If arySubSplit(0) <> strLastDay Then ' strDay = arySubSplit(0) ' Else strDay = arySubSplit(0) ' End If OutputLine("") OutputLine("") OutputLine("") OutputLine("") OutputLine("
" & strDay & "" & arySubSplit(1) & "" & arySubSplit(2) & "
") OutputLine("
") strLastDay = arySubSplit(0) Next Call EndHeader() End If '----------------------------------------------------------------------------------------------- If strMiscellaneous<> "" Then Call BeginHeader("Ethos, Beliefs or Mission Statement", "misc") OutputLine("") OutputLine("") OutputLine("") OutputLine("") OutputLine("
") OutputLine("") OutputLine(Replace(strMiscellaneous, VbCrLf, "
") & "

") Call EndHeader() End If '----------------------------------------------------------------------------------------------- If strLocalFaithLinks <> "" Then Call BeginHeader("Links with Local Faith Organisations", "links") arySplit = Split(strLocalFaithLinks, VbCrLf) OutputLine("") OutputLine("") OutputLine("
") For i=0 To UBound(arySplit) OutputLine(" • " & arySplit(i) & "
") Next OutputLine("
") Call EndHeader() End If '----------------------------------------------------------------------------------------------- OutputLine("
") ' Force this div to be in position, don't mess! Call BeginHeader("Facilities", "facilities") OutputLine("
") OutputLine("") OutputLine("") OutputLine("") OutputLine("") OutputLine("") OutputLine("") OutputLine("") OutputLine("") OutputLine("") OutputLine("") OutputLine("") OutputLine("
Rooms for Hire") If Len(strRoomsAvailable)>0 Then OutputLine(Replace(strRoomsAvailable, VbCrLf, "
")) Else OutputLine("N/A") End If OutputLine("
Equipment") If Len(strEquipment)>0 Then OutputLine(Replace(strEquipment, VbCrLf, "
")) Else OutputLine("N/A") End If OutputLine("
Toilets") If Len(strToilets)>0 Then OutputLine(Replace(strToilets, VbCrLf, "
")) Else OutputLine("N/A") End If OutputLine("
Accessibility") If Len(strAccessibility)>0 Then OutputLine(Replace(strAccessibility, VbCrLf, "
")) Else OutputLine("N/A") End If OutputLine("
Costs") If Len(strCosts)>0 Then OutputLine(Replace(strCosts, VbCrLf, "
")) Else OutputLine("N/A") End If OutputLine("
") OutputLine("
") OutputLine("") OutputLine("") OutputLine("") OutputLine("") OutputLine("") OutputLine("") OutputLine("") OutputLine("") OutputLine("") OutputLine("
Size of Rooms") If Len(strSizeOfRooms)>0 Then OutputLine(Replace(strSizeOfRooms, VbCrLf, "
")) Else OutputLine("N/A") End If OutputLine("
Kitchen Facilities") If Len(strKitchenFacilities)>0 Then OutputLine(Replace(strKitchenFacilities, VbCrLf, "
")) Else OutputLine("N/A") End If OutputLine("
Parking") If Len(strParking)>0 Then OutputLine(Replace(strParking, VbCrLf, "
")) Else OutputLine("N/A") End If OutputLine("
Restrictions") If Len(strRestrictions)>0 Then OutputLine(Replace(strRestrictions, VbCrLf, "
")) Else OutputLine("N/A") End If OutputLine("
") OutputLine("
") Call EndHeader() OutputLine("
") ' float:left '----------------------------------------------------------------------------------------------- If strPromotion <> "" Then OutputLine("
") ' Force this div to be in position, don't mess! Call BeginHeader("Promotion", "promotion") OutputLine("") OutputLine("") OutputLine("") OutputLine("") OutputLine("
") OutputLine("") OutputLine(Replace(strPromotion, VbCrLf, "
") & "

") Call EndHeader() OutputLine("
") ' Force this div to be in position, don't mess! End If '----------------------------------------------------------------------------------------------- OutputLine("
") ' Force this div to be in position, don't mess! Call BeginHeader("Faith Based Services", "faith") Call OutputActivities(2) Call EndHeader() Call BeginHeader("Community Based Services", "community") Call OutputActivities(1) Call EndHeader() OutputLine("
") 'float:left OutputLine("
") ' Force this div to be in position, don't mess! Call BeginHeader("Local Venues", "localvenues") Call GetLocalLinks() Sub GetLocalLinks() Dim strSQL, strAddress strSQL = "SELECT * FROM LocalLinks WHERE VenueID=2" strSQL = "SELECT Venues.ID, Venues.Leader, Venues.Name, Venues.Address1, Venues.Address2, Venues.Postcode, Towns.Name AS Town, LocalLinks.Distance " strSQL = strSQL & "FROM Towns INNER JOIN (LocalLinks INNER JOIN Venues ON LocalLinks.LinkedID = Venues.ID) ON Towns.ID = Venues.TownID " strSQL = strSQL & "WHERE LocalLinks.VenueID = " & intID & " " strSQL = strSQL & "ORDER BY LocalLinks.Distance" Response.Write("") objRS.Open strSQL, objConn, 0, 1 Do While Not objRS.EOF strAddress = "" If Trim(objRS("Address1")) <> "" Then strAddress = strAddress + Trim(objRS("Address1")) End If If Trim(objRS("Address2")) <> "" Then If strAddress <> "" Then strAddress = strAddress + ", " strAddress = strAddress + Trim(objRS("Address2")) End If If strAddress <> "" Then strAddress = strAddress + ", " strAddress = strAddress + Trim(objRS("Town")) If Trim(objRS("Postcode")) <> "" Then If strAddress <> "" Then strAddress = strAddress + ", " strAddress = strAddress + Trim(objRS("Postcode")) End If Response.Write("") objRS.MoveNext Loop objRS.Close Response.Write("
" & Trim(objRS("Name")) & " (" & FormatNumber(objRS("Distance"),1) & " miles)
") Response.Write(strAddress & "
") End Sub Call EndHeader() OutputLine("
") 'float:left '----------------------------------------------------------------------------------------------- objConn.Close Set objConn = Nothing Set objRS = Nothing %> <% Call OutputPageFooter() %>