<%@ Language=VBScript %> <% if session("DIRECTORYACCESS") <>"Yes" and Request.QueryString("Type")="Full" then Response.Redirect "login.asp" end if %> Canadian Pony Club National Directory <% Dim rsCommittee Dim Committee, RequestType, ContactData, Testing, LeftSide Committee = Request.QueryString("Committee") RequestType = Request.QueryString("Type") '** Create the recordset and connection adOpenStatic=3 adLockReadOnly=1 Set strConnect = Server.CreateObject("ADODB.Connection") Set rsThisCommittee = Server.CreateObject("ADODB.Recordset") strConnect.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("/admin/db/NationalDirectory.mdb") & "" set rsThisCommittee.ActiveConnection = strConnect rsThisCommittee.Source = "SELECT National_Positions.*, Personal_Info.*, 'National ' & [Report List] AS Title, IIf(Not [Position]='',[Position],[Region]) AS Expr1, [FirstName] & ' ' & [LastName] AS FullName FROM Personal_Info INNER JOIN National_Positions ON Personal_Info.ID = National_Positions.ID WHERE (((National_Positions.[Report List])='" & Committee & "')) ORDER BY National_Positions.Priority, IIf(Not [Position]='',[Position],[Region]);" rsThisCommittee.CursorType = adOpenStatic rsThisCommittee.LockType = adLockReadOnly rsThisCommittee.Open %>
" end if %> <% rsThisCommittee.MoveNext Loop %> <% '** Clean Up rsThisCommittee.Close Set rsThisCommittee = Nothing strConnect.Close Set strConnect=Nothing if LeftSide=0 then Response.Write "" end if %>

Canadian Pony Club National Directory

<% =rsThisCommittee("Title") %>

To keep this directory accurate and up to date, please send all changes as soon as they happen to Directory@CanadianPonyClub.Org

<% '** Show entries LeftSide=1 Do While Not rsThisCommittee.EOF if LeftSide=1 then Response.Write "
<% =rsThisCommittee("Expr1") %>
<% =rsThisCommittee("FullName") %>

<%if RequestType = "Full" then Response.Write "
" & rsThisCommittee("Street") & "
" & rsThisCommittee("City") & "
" & rsThisCommittee("PostalCode") & "
Phone: " & rsThisCommittee("telephone") & "
Cell: " & rsThisCommittee("Cell") & "
    Fax: " & rsThisCommittee("Fax") & "
Email: " & rsThisCommittee("Email1") & "
     " & rsThisCommittee("Email2") & "" else Testing=rsThisCommittee("Email1") if isnull(Testing) then ContactData=rsThisCommittee("telephone") else ContactData="" & rsThisCommittee("Email1") & "" end if Response.Write ContactData end if if LeftSide=1 then LeftSide=0 else LeftSide=1 end if %>