setPageTitle(/* I18N: %s is a person's name */ WT_I18N::translate('Pedigree map of %s', $controller->getPersonName()));
$controller->pageHeader();
echo '';
if ($ENABLE_AUTOCOMPLETE) require WT_ROOT.'js/autocomplete.js.htm';
echo '
';
echo '
', $controller->getPageTitle(), '
';
// -- print the form to change the number of displayed generations
?>
treesize); $i++) {
// -- check to see if we have moved to the next generation
if ($i+1 >= pow(2, $curgen)) {$curgen++;}
$person = WT_Person::getInstance($controller->treeid[$i]);
if (!empty($person)) {
$pid = $controller->treeid[$i];
$name = $person->getFullName();
if ($name == WT_I18N::translate('Private')) $priv++;
$place = $person->getBirthPlace();
if (empty($place)) {
$latlongval[$i] = NULL;
} else {
$latlongval[$i] = get_lati_long_placelocation($person->getBirthPlace());
if ($latlongval[$i] != NULL && $latlongval[$i]["lati"]=='0' && $latlongval[$i]["long"]=='0') {
$latlongval[$i] = NULL;
}
}
if ($latlongval[$i] != NULL) {
$lat[$i] = str_replace(array('N', 'S', ','), array('', '-', '.'), $latlongval[$i]["lati"]);
$lon[$i] = str_replace(array('E', 'W', ','), array('', '-', '.'), $latlongval[$i]["long"]);
if (($lat[$i] != NULL) && ($lon[$i] != NULL)) {
$count++;
}
else { // The place is in the table but has empty values
if (!empty($name)) {
if (!empty($missing)) $missing .= ",\n ";
$addlist = ''. $name . '';
$missing .= $addlist;
$miscount++;
}
}
}
else { // There was no place, or not listed in the map table
if (!empty($name)) {
if (!empty($missing)) $missing .= ",\n ";
$addlist = ''. $name . '';
$missing .= $addlist;
$miscount++;
}
}
}
}
//
//
echo '
';
echo "
\n";
echo "
\n";
echo "\n";
echo "\n";
if (WT_USER_IS_ADMIN) {
echo "
";
// print summary statistics
if (isset($curgen)) {
$total=pow(2,$curgen)-1;
$miss=$total-$count-$priv;
echo WT_I18N::plural(
'%1$d individual displayed, out of the normal total of %2$d, from %3$d generations.',
'%1$d individuals displayed, out of the normal total of %2$d, from %3$d generations.',
$count,
$count, $total, $curgen
), ' ';
echo "
\n";
echo "
\n";
echo "
\n";
echo "
\n";
if ($priv) {
echo WT_I18N::plural('%s individual is private.', '%s individuals are private.', $priv, $priv), ' ';
}
if ($count+$priv != $total) {
if ($miscount == 0) {
echo WT_I18N::translate('No ancestors in the database.'), " \n";
} else {
echo /* I18N: %1$d is a count of individuals, %2$s is a list of their names */ WT_I18N::plural(
'%1$d individual is missing birthplace map coordinates: %2$s.',
'%1$d individuals are missing birthplace map coordinates: %2$s.',
$miscount, $miscount, $missing),
' ';
}
}
}
echo "