";
usort($myindilist, __NAMESPACE__ . '\GedcomRecord::compare');
foreach ($myindilist as $indi) {
$nam = $indi->getAllNames();
$wholename = rtrim($nam[0]['givn'], '*') . " " . $nam[0]['surname'];
$fulln = rtrim($nam[0]['givn'], '*') . " " . $nam[0]['surname'];
$fulln = str_replace('"', '\'', $fulln); // Replace double quotes
$fulln = str_replace("@N.N.", "(" . I18N::translate('unknown') . ")", $fulln);
$fulln = str_replace("@P.N.", "(" . I18N::translate('unknown') . ")", $fulln);
$givn = rtrim($nam[0]['givn'], '*');
$surn = $nam[0]['surname'];
if (isset($nam[1])) {
$fulmn = rtrim($nam[1]['givn'], '*') . " " . $nam[1]['surname'];
$fulmn = str_replace('"', '\'', $fulmn); // Replace double quotes
$fulmn = str_replace("@N.N.", "(" . I18N::translate('unknown') . ")", $fulmn);
$fulmn = str_replace("@P.N.", "(" . I18N::translate('unknown') . ")", $fulmn);
$marn = $nam[1]['surname'];
} else {
$fulmn = $fulln;
}
//-- Build Indi Parents Family to get FBP and MBP -----------
foreach ($indi->getChildFamilies() as $family) {
$father = $family->getHusband();
$mother = $family->getWife();
if (!is_null($father)) {
$FBP = $father->getBirthPlace();
}
if (!is_null($mother)) {
$MBP = $mother->getBirthPlace();
}
}
if (!isset($FBP)) { $FBP = "UNK, UNK, UNK, UNK"; }
if (!isset($MBP)) { $MBP = "UNK, UNK, UNK, UNK"; }
//-- Build Indi Spouse Family to get marriage Date ----------
foreach ($indi->getSpouseFamilies() as $family) {
$marrdate = $family->getMarriageDate();
$marrdate = ($marrdate->minimumJulianDay() + $marrdate->maximumJulianDay()) / 2; // Julian
$children = $family->getChildren();
}
if (!isset($marrdate)) { $marrdate = ""; }
//-- Get Children’s Name, DOB, DOD --------------------------
$chBLDarray = array();
if (isset($children)) {
foreach ($children as $key=>$child) {
$chnam = $child->getAllNames();
$chfulln = rtrim($chnam[0]['givn'], '*') . " " . $chnam[0]['surname'];
$chfulln = str_replace('"', "", $chfulln); // Must remove quotes completely here
$chfulln = str_replace("@N.N.", "(" . I18N::translate('unknown') . ")", $chfulln);
$chfulln = str_replace("@P.N.", "(" . I18N::translate('unknown') . ")", $chfulln); // Child’s Full Name
$chdob = ($child->getBirthDate()->minimumJulianDay() + $child->getBirthDate()->maximumJulianDay()) / 2; // Child’s Date of Birth (Julian)
if (!isset($chdob)) { $chdob = ""; }
$chdod = ($child->getDeathDate()->minimumJulianDay() + $child->getDeathDate()->maximumJulianDay()) / 2; // Child’s Date of Death (Julian)
if (!isset($chdod)) { $chdod = ""; }
$chBLD = ($chfulln . ", " . $chdob . ", " . $chdod);
array_push($chBLDarray, $chBLD);
}
}
if ($chBLDarray && $indi->getSex() == "F") {
$chBLDarray = implode("::", $chBLDarray);
} else {
$chBLDarray = '';
}
echo "- ";
// ==============================================================================================================================
// NOTES = is equivalent to= function pasterow(id, nam, mnam, label, gend, cond, dom, dob, age, dod, occu, birthpl, fbirthpl, mbirthpl, chilBLD) {
// ==============================================================================================================================
echo "getXref() . "', "; // id - Indi Id
echo "'" . addslashes(strip_tags($fulln)) . "', "; // nam - Name
echo "'" . addslashes(strip_tags($fulmn)) . "', "; // mnam - Married Name
echo "'-', "; // label - Relation to Head of Household
echo "'" . $indi->getSex() . "', "; // gend - Sex
echo "'S', "; // cond - Marital Condition
echo "'" . $marrdate . "', "; // dom - Date of Marriage
echo "'" . (($indi->getBirthDate()->minimumJulianDay() + $indi->getBirthDate()->maximumJulianDay()) / 2) . "' ,"; // dob - Date of Birth
echo "'" . (1901 - $indi->getbirthyear()) . "' ,"; // ~age~ - Census Date minus YOB (Preliminary)
echo "'" . (($indi->getDeathDate()->minimumJulianDay() + $indi->getDeathDate()->maximumJulianDay()) / 2) . "' ,"; // dod - Date of Death
echo "'', "; // occu - Occupation
echo "'" . Filter::escapeHtml($indi->getbirthplace()) . "', "; // birthpl - Birthplace
echo "'" . $FBP . "', "; // fbirthpl - Father’s Birthplace
echo "'" . $MBP . "', "; // mbirthpl - Mother’s Birthplace
echo "'" . $chBLDarray . "'"; // chilBLD - Array of Children (name, birthdate, deathdate)
echo ");";
echo "return false;\">";
echo "" . $indi->getFullName() . " "; // Name Link
echo "
", GedcomTag::getLabel('BIRT', $indi), " ", $indi->getbirthyear(), " ", $indi->getbirthplace(), "";
echo "";
echo " ";
echo " ";
}
echo ' |
';
} else {
echo "