getFullName(); $addname=$person->getAddName(); $title = /* I18N: %s is a person's name */ WT_I18N::translate('Compact tree of %s', $person->getFullName()); $controller=new WT_Controller_Base(); $controller->setPageTitle($title); $controller->pageHeader(); if ($ENABLE_AUTOCOMPLETE) require WT_ROOT.'js/autocomplete.js.htm'; // LBox ===================================================================================== if (WT_USE_LIGHTBOX) { require WT_ROOT.WT_MODULES_DIR.'lightbox/functions/lb_call_js.php'; } // ========================================================================================== $cellwidth = max(strlen($title)*4, '420'); echo '
'; echo '

', $title, '

'; // -- print the form ?>
'; echo ''; echo ''; // NOTE: Root ID echo ''; echo ''; // NOTE: submit echo ''; if ($SHOW_HIGHLIGHT_IMAGES) { echo ''; echo ''; echo ''; } echo '
'; echo WT_I18N::translate('Root Person ID'), help_link('rootid'), ''; echo ''; print_findindi_link('rootid',''); echo ''; echo ''; echo '
'; echo WT_I18N::translate('Show highlight images in people boxes'), help_link('SHOW_HIGHLIGHT_IMAGES'); echo ''; echo '
'; echo '
'; echo '
'; // process the tree $treeid = ancestry_array($rootid, 5); echo "
"; echo ""; // 1 echo ""; print_td_person(16); echo ""; echo ""; echo ""; print_td_person(18); echo ""; print_td_person(24); echo ""; echo ""; echo ""; print_td_person(26); echo ""; // 2 echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; // 3 echo ""; print_td_person(8); echo ""; print_td_person(4); echo ""; print_td_person(9); echo ""; print_td_person(12); echo ""; print_td_person(6); echo ""; print_td_person(13); echo ""; // 4 echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; // 5 echo ""; print_td_person(17); print_td_person(19); echo ""; print_td_person(25); print_td_person(27); echo ""; // 6 echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; // 7 echo ""; echo ""; echo ""; print_td_person(2); echo ""; echo ""; echo ""; print_td_person(3); echo ""; echo ""; echo ""; // 8 echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; // 9 echo ""; print_td_person(20); print_td_person(22); echo ""; print_td_person(28); print_td_person(30); echo ""; // 10 echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; // 11 echo ""; print_td_person(10); echo ""; print_td_person(5); echo ""; print_td_person(11); echo ""; print_td_person(14); echo ""; print_td_person(7); echo ""; print_td_person(15); echo ""; // 12 echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; // 13 echo ""; print_td_person(21); echo ""; echo ""; echo ""; print_td_person(23); echo ""; print_td_person(29); echo ""; echo ""; echo ""; print_td_person(31); echo ""; echo "
"; print_arrow_person(16, "up"); echo ""; print_arrow_person(18, "up"); echo ""; print_arrow_person(24, "up"); echo ""; print_arrow_person(26, "up"); echo "
"; print_arrow_person(8, "left"); echo ""; print_arrow_person(9, "right"); echo ""; print_arrow_person(12, "left"); echo ""; print_arrow_person(13, "right"); echo "
"; print_arrow_person(17, "down"); echo ""; print_arrow_person(4, "up"); echo ""; print_arrow_person(19, "down"); echo ""; print_arrow_person(25, "down"); echo ""; print_arrow_person(6, "up"); echo ""; print_arrow_person(27, "down"); echo "
     
"; echo ""; echo ""; echo ""; print_td_person(1); echo ""; echo "
"; print_arrow_person(2, "left"); echo ""; print_arrow_person(3, "right"); echo "
"; echo "
"; echo "
 "; print_arrow_person(5, "down"); echo ""; print_arrow_person(7, "down"); echo "
"; print_arrow_person(20, "up"); echo ""; print_arrow_person(22, "up"); echo ""; print_arrow_person(28, "up"); echo ""; print_arrow_person(30, "up"); echo "
"; print_arrow_person(10, "left"); echo ""; print_arrow_person(11, "right"); echo ""; print_arrow_person(14, "left"); echo ""; print_arrow_person(15, "right"); echo "
"; print_arrow_person(21, "down"); echo ""; print_arrow_person(23, "down"); echo ""; print_arrow_person(29, "down"); echo ""; print_arrow_person(31, "down"); echo "
"; echo "
"; function print_td_person($n) { global $treeid, $WT_IMAGES; global $SHOW_HIGHLIGHT_IMAGES; global $showthumbs; $text = ""; $pid = $treeid[$n]; if ($pid) { $indi=WT_Person::getInstance($pid); $name=$indi->getFullName(); $addname=$indi->getAddName(); if ($showthumbs && $SHOW_HIGHLIGHT_IMAGES) { $object=find_highlighted_object($pid, WT_GED_ID, $indi->getGedcomRecord()); $birth_date=$indi->getBirthDate(); $death_date=$indi->getDeathDate(); $img_title=$name.' - '.$birth_date->Display(false).' - '.$death_date->Display(false); $img_id='box-'.$pid; if (!empty($object)) { $mediaobject=WT_Media::getInstance($object['mid']); $text=$mediaobject->displayMedia(array('display_type'=>'pedigree_person','img_id'=>$img_id,'img_title'=>$img_title)); } else { $text=display_silhouette(array('sex'=>$indi->getSex(),'display_type'=>'pedigree_person','img_id'=>$img_id,'img_title'=>$img_title)); // may return '' } } $text .= "getHtmlUrl()."\">"; $text .= $name; if ($addname) $text .= "
" . $addname; $text .= "
"; $text .= "
"; if ($indi->canDisplayDetails()) { $text.=""; $text.=$indi->getLifeSpan(); $age=WT_Date::GetAgeYears($indi->getBirthDate(), $indi->getDeathDate()); if ($age) { $text.=" ".PrintReady("({$age})").""; } $text.=""; } } // -- empty box if (empty($text)) { $text = " 
 
"; } // -- box color $isF=""; if ($n==1) { if ($indi->getSex()=='F') { $isF="F"; } } elseif ($n%2) { $isF="F"; } // -- box size if ($n==1) { echo ""; echo $text; echo ""; } function print_arrow_person($n, $arrow_dir) { global $treeid, $showthumbs, $TEXT_DIRECTION, $WT_IMAGES; $pid = $treeid[$n]; $arrow_swap = array("l"=>"0", "r"=>"1", "u"=>"2", "d"=>"3"); $arrow_dir = substr($arrow_dir,0,1); if ($TEXT_DIRECTION=="rtl") { if ($arrow_dir=="l") { $arrow_dir="r"; } elseif ($arrow_dir=="r") { $arrow_dir="l"; } } $text = ""; if ($pid) { $indi=WT_Person::getInstance($pid); $title=WT_I18N::translate('Compact tree of %s', $indi->getFullName()); $title=htmlspecialchars(strip_tags($title)); $arrow_img = "$title"; $text .= ""; $text .= $arrow_img.""; } // -- arrow to empty box does not have a url attached. else $text = ""; echo $text; }