getFullName();
function print_descendency($person, $count) {
global $show_spouse, $dgenerations, $bwidth, $bheight, $bhalfheight;
global $TEXT_DIRECTION, $WT_IMAGES, $generations, $box_width, $show_full;
if ($count>=$dgenerations) {
return 0;
}
$pid=$person->getXref();
echo "
";
return $numkids;
}
function print_person_pedigree($person, $count) {
global $generations, $SHOW_EMPTY_BOXES, $WT_IMAGES, $bheight, $bhalfheight;
if ($count>=$generations || !$person) return;
$hheight = ($bhalfheight+3) * pow(2,($generations-$count-1));
foreach ($person->getChildFamilies() as $family) {
echo "";
$height="100%";
echo "";
if ($count<$generations-1) {
echo " | ";
echo " | ";
}
echo "";
print_pedigree_person($family->getHusband());
echo " | ";
echo "";
print_person_pedigree($family->getHusband(), $count+1);
echo " | ";
echo "
 |
";
if ($count<$generations-1) {
echo " | ";
echo " | ";
}
echo "";
print_pedigree_person($family->getWife());
echo " | ";
echo "";
print_person_pedigree($family->getWife(), $count+1);
echo " | ";
echo "
";
if ($count<$generations-1) {
echo " |
";
}
echo "
";
}
}
function print_family_book($person, $descent) {
global $generations, $dgenerations, $firstrun;
if ($descent==0 || !$person->canDisplayName()) {
return;
}
$families=$person->getSpouseFamilies();
if (count($families)>0 || empty($firstrun)) {
$firstrun=true;
echo
'',
/* I18N: A title/heading. %s is a person's name */ WT_I18N::translate('Family of %s', $person->getFullName()),
'
| ';
$dgenerations = $generations;
print_descendency($person, 1);
echo ' | ';
print_person_pedigree($person, 1);
echo ' |
';
foreach ($families as $family) {
foreach ($family->getChildren() as $child) {
print_family_book($child, $descent-1);
}
}
}
}
print_header(/* I18N: %s is a person's name */ WT_I18N::translate('Family book of %s', $person->getFullName()));
if ($ENABLE_AUTOCOMPLETE) require WT_ROOT.'js/autocomplete.js.htm';
// LBox =====================================================================================
if (WT_USE_LIGHTBOX) {
require WT_ROOT.WT_MODULES_DIR.'lightbox/lb_defaultconfig.php';
require WT_ROOT.WT_MODULES_DIR.'lightbox/functions/lb_call_js.php';
}
// ==========================================================================================
echo '';
echo ''.WT_I18N::translate('Family book of %s', $person->getFullName()), help_link('family_book_chart'), '';
?>
| |
|
';
print_family_book($person, $descent);
echo '';
print_footer();