%@ Language=VBScript %> <% if len(Request.Form("SearchFamilySize"))> 0 then SearchNumChildren=cint(trim(Request.Form("SearchFamilySize"))) end if OutOfSchool=Request.Form("OutOfSchool") dim FamSearch FamSearch="No" FamSearch=Request.Form("FamSearch") ' Yes if search search form clicked dim FamilyList() ' Array to hold a list of families for navigation 'redim FamilyList(500) redim FamilyList(50) dim FamilyCount FamilyCount=0 %> <% 'Get list of Selected Commmunities if FamSearch="Yes" then session("FamSearch")="YES" dim SelectedCommunities() redim SelectedCommunities(100) ComCount=0 set YHConn=Server.CreateObject("ADODB.Connection") YHConn.Open ConnectS MyQuery = "select * from Community where archived = 0 " set YHCommunityRS= Server.CreateObject("ADODB.RecordSet") YHCommunityRS.Open MyQuery , YHConn, 3, 3 NumCom=YHCommunityRS.recordcount 'redim SelectedCommunities(NumCom-1) do while not YHCommunityRS.EOF com=cstr(YHCommunityRS("CommunityID")) if ucase(Request.Form(com)) = "ON" then SelectedCommunities(ComCount)=com ComCount=ComCount + 1 end if YHCommunityRS.movenext loop YHCommunityRS.close set YHCommunityRS=Nothing YHConn.close SET YHConn=nothing else session("FamSearch")="NO" End if %>
|
|||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||
Young Heroes Orphan Families |
|||||||||||||||||||||||||||||||||||||
|
We found the following families, which match your
search criteria: Please choose a family by clicking on a family code. You will see a full description of the family. <% set YHConn=Server.CreateObject("ADODB.Connection") YHConn.Open ConnectS MyCommunityQuery = "select * from Community" if FamSearch="Yes" then DoWhere="False" MySelect="" MySelect = MySelect & " Where " for x = 0 to ubound(SelectedCommunities) if len(SelectedCommunities(x)) > 0 then if x > 0 then MySelect = MySelect & " OR " end if MySelect = MySelect & " CommunityID=" & SelectedCommunities(x) & " " if SelectedCommunities(x) > 0 then DoWhere="True" end if next 'tmpMySelect = "" & MySelect & "" 'response.write(tmpMySelect) end if if DoWhere="True" then MyCommunityQuery = MyCommunityQuery & MySelect end if MySelect = MySelect & " and archived = 0 " MyCommunityQuery = MyCommunityQuery & " Order By CommunityName" set YHCommunityRS= Server.CreateObject("ADODB.RecordSet") YHCommunityRS.Open MyCommunityQuery , YHConn, 3, 3 do while not YHCommunityRS.EOF NumFam=GetCommunityNumFamily(YHCommunityRS("CommunityID")) %><%=YHCommunityRS("CommunityName")%> : <%=NumFam%> Families <%
MyQuery = "select * from Family where CommunityID=" & YHCommunityRS("CommunityID") & " and archived = 0 "
MyQuery=MyQuery & " order by FamilyCode, FamilySurname"
set YHFamilyRS= Server.CreateObject("ADODB.RecordSet")
YHFamilyRS.Open MyQuery , YHConn, 3, 3
do while not YHFamilyRS.EOF %> <% NumChild=cint(GetFamilyNumChildren(YHFamilyRS("FamilyCode")))%>
<% if SearchNumChildren > 0 then
DoPrint=False
if SearchNumChildren = Numchild then DoPrint=True
if SearchNumChildren = 4 and NumChild >=4 then DoPrint=True
%> <%if DoPrint=True then %> <%
if FamilyCount < ubound(FamilyList) then
FamilyList(FamilyCount) = YHFamilyRS.Fields("FamilyCode").Value
FamilyCount=FamilyCount + 1
End if
%>
" target="_self">
<%=YHFamilyRS("FamilyCode")%> : <%=YHFamilyRS("FamilySurname")%>
– <%=NumChild%> <%
if NumChild = 1 then
%> Child<%
else
%> Children<%
end if
%> " & FamilyCount & "") 'for x = LBound(FamilyList) to UBound(FamilyList) ' Response.Write("Click here to browse all families |
<% End if %>
|||||||||||||||||||||||||||||||||||||