";
echo "| ", ++$n, " | ";
//-- Indi name(s)
$tdclass = "list_value_wrap";
if (!$person->isDead()) $tdclass .= " alive";
if (!$person->getChildFamilyIds()) $tdclass .= " patriarch";
echo "getListName()), "\">";
list($surn, $givn)=explode(',', $person->getSortName());
// If we're showing search results, then the highlighted name is not
// necessarily the person's primary name.
$primary=$person->getPrimaryName();
$names=$person->getAllNames();
foreach ($names as $num=>$name) {
// Exclude duplicate names, which can occur when individuals have
// multiple surnames, such as in Spain/Portugal
$dupe_found=false;
foreach ($names as $dupe_num=>$dupe_name) {
if ($dupe_num>$num && $dupe_name['type']==$name['type'] && $dupe_name['full']==$name['full']) {
// Take care not to skip the "primary" name
if ($num==$primary) {
$primary=$dupe_num;
}
$dupe_found=true;
break;
}
}
if ($dupe_found) {
continue;
}
if ($title=$name['type']=='_MARNM') {
$title='title="'.translate_fact('_MARNM').'"';
} else {
$title='';
}
if ($num==$primary) {
$class='list_item name2';
$sex_image=$person->getSexImage();
list($surn, $givn)=explode(',', $name['sort']);
} else {
$class='list_item';
$sex_image='';
}
echo '', PrintReady($name['list']), '', $sex_image, " ";
}
// Indi parents
echo $person->getPrimaryParentsNames("parents_$table_id details1", 'none');
echo ' | ';
//-- GIVN/SURN
echo '', $givn, ',', $surn, ' | ';
echo '', $surn, ',', $givn, ' | ';
//-- SOSA
if ($option=='sosa') {
echo
'', $key, ' | ';
}
//-- Birth date
echo '';
if ($birth_dates=$person->getAllBirthDates()) {
foreach ($birth_dates as $num=>$birth_date) {
if ($num) {
echo ' ', $birth_date->Display(!$SEARCH_SPIDER), ' ';
} else {
echo '';
}
}
if ($birth_dates[0]->gregorianYear()>=1550 && $birth_dates[0]->gregorianYear()<2030) {
$birt_by_decade[floor($birth_dates[0]->gregorianYear()/10)*10] .= $person->getSex();
}
} else {
$birth_date=$person->getEstimatedBirthDate();
$birth_jd=$birth_date->JD();
if ($SHOW_EST_LIST_DATES) {
echo '';
} else {
echo ' '; // span needed for alive-in-year filter
}
$birth_dates[0]=new GedcomDate('');
}
echo ' | ';
//-- Birth anniversary
if ($tiny) {
echo '';
$bage =GedcomDate::GetAgeYears($birth_dates[0]);
if (empty($bage)) {
echo " ";
} else {
echo '', $bage, '';
}
echo ' | ';
}
//-- Birth place
echo '';
if ($birth_places=$person->getAllBirthPlaces()) {
foreach ($birth_places as $birth_place) {
if ($SEARCH_SPIDER) {
echo get_place_short($birth_place), ' ';
} else {
echo '';
}
}
} else {
echo ' ';
}
echo ' | ';
//-- Number of children
if ($tiny) {
echo "";
echo "getLinkUrl()), "\" class=\"list_item\" name=\"", $person->getNumberOfChildren(), "\">", $person->getNumberOfChildren(), "";
echo " | ";
}
//-- Death date
echo "";
if ($death_dates=$person->getAllDeathDates()) {
foreach ($death_dates as $num=>$death_date) {
if ($num) {
echo ' ', $death_date->Display(!$SEARCH_SPIDER), ' ';
} else if ($death_date->MinJD()!=0) {
echo '';
}
}
if ($death_dates[0]->gregorianYear()>=1550 && $death_dates[0]->gregorianYear()<2030) {
$deat_by_decade[floor($death_dates[0]->gregorianYear()/10)*10] .= $person->getSex();
}
} else {
$death_date=$person->getEstimatedDeathDate();
$death_jd=$death_date->JD();
if ($SHOW_EST_LIST_DATES) {
echo '';
} else if ($person->isDead()) {
echo '', i18n::translate('Yes'), ' ';
} else {
echo ' '; // span needed for alive-in-year filter
}
$death_dates[0]=new GedcomDate('');
}
echo " | ";
//-- Death anniversary
if ($tiny) {
print "";
if ($death_dates[0]->isOK())
echo "", GedcomDate::GetAgeYears($death_dates[0]), "";
else
echo " ";
print ' | ';
}
//-- Age at death
print "";
if ($birth_dates[0]->isOK() && $death_dates[0]->isOK()) {
$age = GedcomDate::GetAgeYears($birth_dates[0], $death_dates[0]);
$age_jd = $death_dates[0]->MinJD()-$birth_dates[0]->MinJD();
echo '', $age, '';
$deat_by_age[max(0, min($max_age, $age))] .= $person->getSex();
} else {
echo ' ';
}
echo " | ";
//-- Death place
echo '';
if ($death_places=$person->getAllDeathPlaces()) {
foreach ($death_places as $death_place) {
if ($SEARCH_SPIDER) {
echo get_place_short($death_place), ' ';
} else {
echo '';
}
}
} else {
echo ' ';
}
echo ' | ';
//-- Last change
if ($tiny && $SHOW_LAST_CHANGE) {
echo "", $person->LastChangeTimestamp(empty($SEARCH_SPIDER)), " | ";
}
//-- Sorting by gender
echo "";
echo $person->getSex();
echo " | ";
//-- Filtering by birth date
echo "";
if (!$person->canDisplayDetails() || GedcomDate::Compare($birth_dates[0], $d100y)>0) {
echo "Y100";
} else {
echo "YES";
}
echo " | ";
//-- Filtering by death date
echo "";
if ($person->isDead()) {
if (GedcomDate::Compare($death_dates[0], $d100y)>0) {
echo "Y100";
} else {
echo "YES";
}
} else {
echo "N";
}
echo " | ";
//-- Roots or Leaves ?
echo "";
if (!$person->getChildFamilyIds()) {
echo "R"; // roots
} elseif (!$person->isDead() && $person->getNumberOfChildren()<1) {
echo "L"; // leaves
}
echo " | ";
echo "
\n";
}
echo "