<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <%'are we logged in? if session("allow")<>"true" then response.redirect("../login.asp") end if 'setup connection string set cn=server.createobject("ADODB.Connection") cn.open="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("..\db\mccullohreunion.mdb") & ";Persist Security Info=False" set rs=server.createobject("ADODB.Recordset") rs.activeconnection=cn set rs2=server.createobject("ADODB.Recordset") rs2.activeconnection=cn 'get info to fill in page 'personID pid=request("pid") if pid="get" then pid=request.form("quickfind") end if 'if it's the first view of the page, default to patriarch if pid="" then pid=59 end if 'initial values image=false link=false descendant=false misc=false spouse=false bio2=false obituary2=false sbio2=false sobituary2=false 'get person main info sql="SELECT * FROM [person] WHERE ID = " & pid rs.source=sql rs.open FullName=replace(rs("FullName"), "*ap*", "'") FirstName=replace(rs("FirstName"), "*ap*", "'") MiddleName=replace(rs("MiddleName"), "*ap*", "'") LastName=replace(rs("LastName"), "*ap*", "'") BirthDate=rs("BirthDate") DeathDate=rs("DeathDate") MarriageDate=rs("MarriageDate") Image1=rs("Image1") Bio=replace(rs("Bio"), "*ap*", "'") Obituary=replace(rs("Obituary"), "*ap*", "'") MiscText=replace(rs("Misc"), "*ap*", "'") MiscURL=replace(rs("MiscURL"), "*ap*", "'") if Bio<>"" then bio2=true end if if Obituary<>"" then obituary2=true end if if MiscText<>"" or MiscURL<>"" then misc=true end if rs.close 'get person image info sql="SELECT * FROM [image] WHERE pID = " & pid rs.source=sql rs.open str="" if not rs.eof then image=true do until rs.eof str=str & rs("ImageLabel") & "/" & rs("ImageURL") & ";" rs.movenext loop str=left(str,len(str)-1) arrImage=split(str,";") end if rs.close 'get person link info sql="SELECT * FROM [link] WHERE pID = " & pid rs.source=sql rs.open str="" if not rs.eof then link=true do until rs.eof str=str & rs("LinkLabel") & "," & rs("LinkURL") & ";" rs.movenext loop str=left(str,len(str)-1) arrLink=split(str,";") end if rs.close 'get person descendant info sql="SELECT * FROM [descendant] WHERE pID = " & pid rs.source=sql rs.open str="" if not rs.eof then descendant=true do until rs.eof str=str & rs("DescendantID") & ";" rs.movenext loop str=left(str,len(str)-1) arrDescendantID=split(str,";") end if rs.close 'get person spouse info sql="SELECT * FROM [spouse] WHERE pID = " & pid rs.source=sql rs.open str="" if not rs.eof then spouse=true do until rs.eof str=str & rs("SpouseID") & ";" rs.movenext loop str=left(str,len(str)-1) arrSpouseID=split(str,";") end if rs.close title=FirstName & " " & BirthDate %> <%=title%>






McCulloh Families
(<%=FullName%> <%=BirthDate%> - <%=DeathDate%>)




<%=FullName%> <%=BirthDate%> - <%=DeathDate%>

Parents

<% sql="SELECT descendant.pID, person.FirstName FROM [descendant] INNER JOIN [person] ON [descendant].pID = [person].ID WHERE descendant.DescendantID = " & pid rs.source=sql rs.open if rs.eof then %> No parents on record. <% else i=0 do until rs.eof parent=replace(rs("FirstName"), "*ap*", "'") parentid=rs("pID") %> <%=parent%> <%if i=0 then%> & <%end if%> <% i=i+1 rs.movenext loop end if rs.close %>

Spouse

<% 'get spouse main info if there is a spouse if spouse then for s = 0 to ubound(arrSpouseID) sid=cint(arrSpouseID(s)) sql="SELECT * FROM [person] WHERE ID = " & sid rs.source=sql rs.open if rs.eof then%> No spouse on record. <%else sFullName=replace(rs("FullName"), "*ap*", "'") sBirthDate=rs("BirthDate") sDeathDate=rs("DeathDate") %> <%=sFullName%> <%=sBirthDate%> - <%=sDeathDate%>
<%end if rs.close next end if %>

Descendants

<%if descendant then i=0 for each x in arrDescendantID if cint(x)<>-999 then 'blank descendant record - don't show it sql="SELECT FirstName FROM person WHERE ID = " & x 'response.write("sql: " & sql & "
") rs.source=sql rs.open dfname=replace(rs("FirstName"), "*ap*", "'") %> <%=dfname%> <%if ubound(arrDescendantID)<>i then%> - <%end if%> <% rs.close end if i=i+1 next else%> No descendants on record. <%end if%>

<%if bio2 or obituary2 then%>
 

<%end if%> <%if bio2 then%> <%end if%> <%if obituary2 then%> <%end if%> <%if image or link or misc then%>
 

<%end if%> <%if image then%> <% x=0 sql="SELECT count(*) FROM [image] WHERE pID = " & pid set rsCount=cn.execute(sql) imageCount=rsCount(0) sql="SELECT * FROM [image] WHERE pID = " & pid rs.source=sql rs.open do until rs.eof imagelabel=rs("ImageLabel") if imagelabel<>"" then imagelabel=replace(imagelabel,"*ap*","'") end if imageurl="http://www.mccullohreunion.org/images/" & rs("ImageURL") %> <%if x=0 then%>Photo Gallery<%end if%><%if x=0 then%> [<%=imageCount%> image<%if imageCount>1 then%>s<%end if%>]<%end if%> <% x=x+1 rs.movenext loop rs.close %> <%if imageCount>1 then%>
(Mouseover the image to move forward or backward in the gallery) <%end if%>

<%end if%> <%if image and link then%>
 

<%end if%> <%if link then%> Links
<% for each x in arrLink arrLink2=split(x, ",") linklabel=arrLink2(0) linkURL=arrLink2(1) %> <%=linklabel%>
<% next end if%>
<%if misc then%> Miscellaneous

<%end if%>
 

Contact Us

powered by geneology engine v0.1
© <%=year(date)%> Brian McCulloh Web Development