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('Ancestors of %s', $controller->name), '

'; // -- print the form to change the number of displayed generations echo WT_JS_START, 'var pastefield; function paste_id(value) {pastefield.value=value;}', WT_JS_END; ?>
 
% chart_style==0) { echo ' checked="checked"'; } echo ' onclick="statusDisable(\'cousins\');'; echo '" />', WT_I18N::translate('List'); echo '
chart_style==1) { echo ' checked="checked"'; } echo ' onclick="statusEnable(\'cousins\');'; echo '" />', WT_I18N::translate('Booklet'); ?>
chart_style==0) { echo 'disabled="disabled" '; } echo 'id="cousins" type="checkbox" value="'; if ($controller->show_cousins) { echo '1" checked="checked" onclick="document.people.show_cousins.value=\'0\';"'; } else { echo '0" onclick="document.people.show_cousins.value=\'1\';"'; } echo ' />'; echo WT_I18N::translate('Show cousins'); echo '
chart_style==2) { echo ' checked="checked" '; } echo ' onclick="statusDisable(\'cousins\');"'; echo ' />', WT_I18N::translate('Individuals'); echo '
chart_style==3) { echo ' checked="checked" '; } echo ' />', WT_I18N::translate('Families'); ?>
', WT_I18N::translate('Click on any of the boxes to get more information about that person.'), '

'; } switch ($controller->chart_style) { case 0: // List $pidarr=array(); echo ''; echo '
'; break; case 1: // TODO: this should be a parameter to a function, not a global $show_cousins=$controller->show_cousins; echo '
'; // Booklet // first page : show indi facts print_pedigree_person(WT_Person::getInstance($controller->rootid), 1, 1); // expand the layer echo WT_JS_START, 'expandbox("', $controller->rootid, '.1", 2);', WT_JS_END; // process the tree $treeid=ancestry_array($controller->rootid, $PEDIGREE_GENERATIONS-1); foreach ($treeid as $i=>$pid) { if ($pid) { $person=WT_Person::getInstance($pid); if ($person) { foreach ($person->getChildFamilies() as $family) { print_sosa_family($family->getXref(), $pid, $i); } } } } echo '
'; break; case 2: // Individual list $treeid=ancestry_array($controller->rootid, $PEDIGREE_GENERATIONS); echo '
'; echo format_indi_table($treeid, 'sosa'); echo '
'; break; case 3: // Family list $treeid=ancestry_array($controller->rootid, $PEDIGREE_GENERATIONS-1); $famlist=array(); foreach ($treeid as $pid) { $person=WT_Person::getInstance($pid); if (is_null($person)) { continue; } foreach ($person->getChildFamilies() as $famc) { $famlist[$famc->getXref()]=$famc; } } echo '
'; echo format_fam_table($famlist, WT_I18N::translate('Ancestors of %s', $controller->name)); echo '
'; break; }