%@ 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
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.Position]='National Dressage Chair' OR [National_Positions.Position]='National Disciplines Chair' OR [National_Positions.Position]='National Testing Chair' OR [National_Positions.Position]='National Education Chair' OR [National_Positions.Position]='National Show Jumping Chair' OR [National_Positions.Position]='National Quiz Chair' OR [National_Positions.Position]='National Rally Chair' OR [National_Positions.Position]='National PPG Chair' OR [National_Positions.Position]='National Tetrathlon Chair' OR [National_Positions.Position]='National Communications Chair') ORDER BY National_Positions.Priority, IIf(Not [Position]='',[Position],[Region]);"
rsThisCommittee.CursorType = adOpenStatic
rsThisCommittee.LockType = adLockReadOnly
rsThisCommittee.Open
%>
Canadian Pony Club National Directory
National Discipline Chairs
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 "
"
end if %>
<% =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 %>
<%
rsThisCommittee.MoveNext
Loop
%>
<%
'** Clean Up
rsThisCommittee.Close
Set rsThisCommittee = Nothing
strConnect.Close
Set strConnect=Nothing
if LeftSide=0 then
Response.Write "