pageHeader(); if ($ENABLE_AUTOCOMPLETE) require WT_ROOT.'js/autocomplete.js.htm'; // LightBox if (WT_USE_LIGHTBOX) { require WT_ROOT.WT_MODULES_DIR.'lightbox/functions/lb_call_js.php'; } echo '
'; echo '

', WT_I18N::translate('Pedigree tree of %s', $controller->name), '

'; // -- echo the form to change the number of displayed generations ?>
 
WT_I18N::translate('Portrait'), 1=>WT_I18N::translate('Landscape'), 2=>WT_I18N::translate('Oldest at top'), 3=>WT_I18N::translate('Oldest at bottom')), null, $talloffset); ?> "/>
', WT_I18N::translate('Click on any of the boxes to get more information about that person.'), '
'; } ?>
treesize-1); $i>=0; $i--) { // -- check to see if we have moved to the next generation if ($i < floor($controller->treesize / (pow(2, $curgen)))) { $curgen++; } $prevxoffset = $xoffset; $prevyoffset = $yoffset; if ($talloffset < 2) { $xoffset = $controller->offsetarray[$i]["x"]; $yoffset = $controller->offsetarray[$i]["y"]; } else { $xoffset = $controller->offsetarray[$i]["y"]; $yoffset = $controller->offsetarray[$i]["x"]; } // -- if we are in the middle generations then we need to draw the connecting lines if (($curgen > 0 && $talloffset > 1) || (($curgen > $talloffset) && ($curgen < $controller->PEDIGREE_GENERATIONS))) { if ($i%2==1) { if ($SHOW_EMPTY_BOXES || ($controller->treeid[$i]) || ($controller->treeid[$i+1])) { if ($talloffset < 2) { $vlength = $prevyoffset-$yoffset; } else { $vlength = $prevxoffset-$xoffset; } if (!$SHOW_EMPTY_BOXES && (empty($controller->treeid[$i+1]))) { $parent = ceil(($i-1)/2); $vlength = $controller->offsetarray[$parent]["y"]-$yoffset; } $linexoffset = $xoffset; if ($talloffset < 2) { echo '
'; echo ''; echo '
'; } else { echo '
'; echo ''; } else { echo ($linexoffset-2+$controller->pbwidth/2+$vlength/2), 'px; top:', ($yoffset+1+$controller->pbheight/2+10), 'px; z-index: 0;">'; echo ''; } echo '
'; echo '
'; echo ''; echo '
'; } } } } // -- draw the box if (!empty($controller->treeid[$i]) || $SHOW_EMPTY_BOXES) { // Work around a bug in FireFox that mis-places some boxes in Portrait RTL, resulting in // vertical lines that themselves appear to be mis-placed. if ($TEXT_DIRECTION=="rtl") { $xoffset += $brborder; // Account for thickness of right box border } if ($yoffset>$maxyoffset) { $maxyoffset=$yoffset; } $widthadd = 0; if ($i==0) { $iref = rand(); } else { $iref = $i; } // Can we go back to an earlier generation? $can_go_back=$curgen==1 && WT_Person::getInstance($controller->treeid[$i]) && WT_Person::getInstance($controller->treeid[$i])->getChildFamilies(); if ($can_go_back) { $widthadd = 20; } elseif ($curgen >2 && $curgen < $controller->PEDIGREE_GENERATIONS) { $widthadd = 10; } if ($talloffset == 2) { echo '
'; if ($can_go_back) { $did = 1; if ($i > ($controller->treesize/2) + ($controller->treesize/4)-1) { $did++; } echo 'PEDIGREE_GENERATIONS, '&rootid=', $controller->treeid[$did], '&show_full=', $controller->show_full, '&talloffset=', $controller->talloffset, ' '; echo "onmouseover=\"swap_image('arrow$i', 2);\" onmouseout=\"swap_image('arrow$i', 2);\">"; echo "'; echo ''; } echo "
"; } // beginning of box setup and display echo "
treeid[$i])) { echo "$iref"; } else { echo $controller->treeid[$i]; } if ($TEXT_DIRECTION=="rtl") { echo ".1.$iref\" style=\"position:absolute; right:"; } else { echo ".1.$iref\" style=\"position:absolute; left:"; } if ($talloffset == 2) { $zindex = $PEDIGREE_GENERATIONS-$curgen; } else { $zindex = 0; } //Correct box spacing for Oldest on bottom if (($talloffset == 3) && ($curgen ==1)) { $yoffset +=25; } if (($talloffset == 3) && ($curgen ==2)) { $yoffset +=10; } echo $xoffset, "px; top:", $yoffset, "px; width:", ($controller->pbwidth+$widthadd), "px; height:", $controller->pbheight, "px; "; echo "z-index: ", $zindex, ";\">"; echo ""; if (($talloffset < 2) && ($curgen > $talloffset) && ($curgen < $controller->PEDIGREE_GENERATIONS)) { echo "
"; echo "\"\""; echo ""; } else { echo "
"; } if (!isset($controller->treeid[$i])) { $controller->treeid[$i] = false; } print_pedigree_person(WT_Person::getInstance($controller->treeid[$i]), 1, $iref, 1); if ($can_go_back) { $did = 1; if ($i > ($controller->treesize/2) + ($controller->treesize/4)-1) { $did++; } if ($talloffset==3) { echo "
"; echo "PEDIGREE_GENERATIONS}&rootid={$controller->treeid[$did]}&show_full={$controller->show_full}&talloffset={$controller->talloffset}\" "; echo "onmouseover=\"swap_image('arrow$i', 3);\" onmouseout=\"swap_image('arrow$i', 3);\">"; echo "\"\""; } elseif ($talloffset < 2) { echo ""; echo "PEDIGREE_GENERATIONS}&rootid={$controller->treeid[$did]}&show_full={$controller->show_full}&talloffset={$talloffset}\" "; if ($TEXT_DIRECTION=="rtl") { echo "onmouseover=\"swap_image('arrow$i', 0);\" onmouseout=\"swap_image('arrow$i', 0);\">"; echo "\"\""; } else { echo "onmouseover=\"swap_image('arrow$i', 1);\" onmouseout=\"swap_image('arrow$i', 1);\">"; echo "\"\""; } echo ""; } } echo "
"; } } if ($controller->rootPerson->canDisplayDetails()) { // -- echo left arrow for decendants so that we can move down the tree $yoffset += ($controller->pbheight / 2)-10; $famids = $controller->rootPerson->getSpouseFamilies(); //-- make sure there is more than 1 child in the family with parents $cfamids = $controller->rootPerson->getChildFamilies(); if (count($famids)>0) { echo "
"; if ($TEXT_DIRECTION=="rtl") { echo ""; echo "\"\""; } else { echo ""; echo "\"\""; } break; case 1: if ($PEDIGREE_GENERATIONS<4) $basexoffset += 60; echo $basexoffset, "px; top:", $yoffset, "px; width:10px; height:10px; \">"; if ($TEXT_DIRECTION=="rtl") { echo ""; echo "\"\""; } else { echo ""; echo "\"\""; } break; case 2: echo ($linexoffset-10+$controller->pbwidth/2+$vlength/2), "px; top:", ($yoffset+$controller->pbheight/2+10), "px; width:10px; height:10px; \">"; echo ""; echo "\"\""; break; case 3: echo ($linexoffset-10+$controller->pbwidth/2+$vlength/2), "px; top:", ($yoffset-$controller->pbheight/2-10), "px; width:10px; height:10px; \">"; echo ""; echo "\"\""; break; } echo ""; echo "
"; $yoffset += ($controller->pbheight / 2)+10; echo "
pbwidth, "px; height:", $controller->pbheight, "px; visibility: hidden;\">"; echo "
"; foreach ($famids as $family) { $spouse=$family->getSpouse(WT_Person::getInstance($controller->rootid)); if ($spouse) { echo "PEDIGREE_GENERATIONS}&rootid=".$spouse->getXref()."&show_full={$controller->show_full}&talloffset={$talloffset}\">getFullName(); if (hasRTLText($name)) { echo 'class="name2">'; } else { echo 'class="name1">'; } echo $name; echo '
'; } $children = $family->getChildren(); foreach ($children as $child) { echo "  PEDIGREE_GENERATIONS}&rootid=".$child->getXref()."&show_full={$controller->show_full}&talloffset={$talloffset}\">getFullName(); if (hasRTLText($name)) { echo "class=\"name2\">< "; } else { echo "class=\"name1\">< "; } echo $name; echo '
'; } } //-- echo the siblings foreach ($cfamids as $family) { if ($family!=null) { $children = $family->getChildren(); if (count($children)>2) { echo '
', WT_I18N::translate('Siblings'), '
'; } if (count($children)==2) { echo '
', WT_I18N::translate('Sibling'), '
'; } foreach ($children as $child) { if (!$controller->rootPerson->equals($child) && !is_null($child)) { echo "  PEDIGREE_GENERATIONS}&rootid=".$child->getXref()."&show_full={$controller->show_full}&talloffset={$talloffset}\">getFullName(); if (hasRTLText($name)) { echo 'class="name2"> '; } else { echo 'class="name1"> '; } echo $name; echo '
'; } } } } echo "
"; echo "
"; } } // -- print html footer $maxyoffset+=30; ?>