summaryrefslogtreecommitdiff
path: root/modules_v3/GEDFact_assistant
diff options
context:
space:
mode:
authorfisharebest <fisharebest@gmail.com>2011-10-23 13:42:48 +0000
committerfisharebest <fisharebest@gmail.com>2011-10-23 13:42:48 +0000
commita63c59f5c29fc87ed502cf66e207ef62ec8aa3dd (patch)
tree268c1286c92a3b397203aa88542fe0bc4e1176b7 /modules_v3/GEDFact_assistant
parentf01016d65de84fac2f3bd5550aba3007ce2b32ad (diff)
downloadwebtrees-a63c59f5c29fc87ed502cf66e207ef62ec8aa3dd.tar.gz
webtrees-a63c59f5c29fc87ed502cf66e207ef62ec8aa3dd.tar.bz2
webtrees-a63c59f5c29fc87ed502cf66e207ef62ec8aa3dd.zip
Remove the LINK_ICONS and ZOOM_BOXES options (which control whether popup menus are activated on click, hover, etc.) These are unnecessary, confusing, and don't work properly.
Diffstat (limited to 'modules_v3/GEDFact_assistant')
-rw-r--r--modules_v3/GEDFact_assistant/_CENS/census_3_search_add.php1342
-rw-r--r--modules_v3/GEDFact_assistant/_MEDIA/media_1_ctrl.php642
2 files changed, 988 insertions, 996 deletions
diff --git a/modules_v3/GEDFact_assistant/_CENS/census_3_search_add.php b/modules_v3/GEDFact_assistant/_CENS/census_3_search_add.php
index b3dcd76783..3e576f282d 100644
--- a/modules_v3/GEDFact_assistant/_CENS/census_3_search_add.php
+++ b/modules_v3/GEDFact_assistant/_CENS/census_3_search_add.php
@@ -1436,7 +1436,7 @@ require_once 'includes/functions/functions_charts.php';
*/
function print_pedigree_person_nav2($pid, $style=1, $count=0, $personcount="1", $currpid, $censyear) {
- global $HIDE_LIVE_PEOPLE, $SHOW_LIVING_NAMES, $ZOOM_BOXES, $LINK_ICONS, $SCRIPT_NAME;
+ global $HIDE_LIVE_PEOPLE, $SHOW_LIVING_NAMES, $SCRIPT_NAME;
global $SHOW_HIGHLIGHT_IMAGES, $bwidth, $bheight, $PEDIGREE_FULL_DETAILS, $SHOW_PEDIGREE_PLACES;
global $TEXT_DIRECTION, $DEFAULT_PEDIGREE_GENERATIONS, $OLD_PGENS, $talloffset, $PEDIGREE_LAYOUT, $MEDIA_DIRECTORY;
global $WT_IMAGES, $ABBREVIATE_CHART_LABELS, $USE_MEDIA_VIEWER;
@@ -1470,736 +1470,732 @@ function print_pedigree_person_nav2($pid, $style=1, $count=0, $personcount="1",
$step_parentlinks = "";
$disp=$person->canDisplayDetails();
- if ($person->canDisplayName()) {
- if (empty($SEARCH_SPIDER)) {
- if ($LINK_ICONS!="disabled") {
- //-- draw a box for the family popup
+ if ($person->canDisplayName() && !$SEARCH_SPIDER) {
+ //-- draw a box for the family popup
- if ($TEXT_DIRECTION=="rtl") {
- $spouselinks .= "<table class=\"rtlnav person_box$isF\"><tr><td align=\"right\" style=\"font-size:10px;font-weight:normal;\" class=\"name2\" nowrap=\"nowrap\">";
- $spouselinks .= "<b>" . WT_I18N::translate('Family') . "</b> (" .$person->getFullName(). ")<br />";
- $parentlinks .= "<table class=\"rtlnav person_box$isF\"><tr><td align=\"right\" style=\"font-size:10px;font-weight:normal;\" class=\"name2\" nowrap=\"nowrap\">";
- $parentlinks .= "<b>" . WT_I18N::translate('Parents') . "</b> (" .$person->getFullName(). ")<br />";
- $step_parentlinks .= "<table class=\"rtlnav person_box$isF\"><tr><td align=\"right\" style=\"font-size:10px;font-weight:normal;\" class=\"name2\" nowrap=\"nowrap\">";
- $step_parentlinks .= "<b>" . WT_I18N::translate('Parents') . "</b> (" .$person->getFullName(). ")<br />";
- } else {
- $spouselinks .= "<table class=\"ltrnav person_box$isF\"><tr><td align=\"left\" style=\"font-size:10px;font-weight:normal;\" class=\"name2\" nowrap=\"nowrap\">";
- $spouselinks .= "<b>" . WT_I18N::translate('Family') . "</b> (" .$person->getFullName(). ")<br />";
- $parentlinks .= "<table class=\"ltrnav person_box$isF\"><tr><td align=\"left\" style=\"font-size:10px;font-weight:normal;\" class=\"name2\" nowrap=\"nowrap\">";
- $parentlinks .= "<b>" . WT_I18N::translate('Parents') . "</b> (" .$person->getFullName(). ")<br />";
- $step_parentlinks .= "<table class=\"ltrnav person_box$isF\"><tr><td align=\"left\" style=\"font-size:10px;font-weight:normal;\" class=\"name2\" nowrap=\"nowrap\">";
- $step_parentlinks .= "<b>" . WT_I18N::translate('Parents') . "</b> (" .$person->getFullName(). ")<br />";
- }
+ if ($TEXT_DIRECTION=="rtl") {
+ $spouselinks .= "<table class=\"rtlnav person_box$isF\"><tr><td align=\"right\" style=\"font-size:10px;font-weight:normal;\" class=\"name2\" nowrap=\"nowrap\">";
+ $spouselinks .= "<b>" . WT_I18N::translate('Family') . "</b> (" .$person->getFullName(). ")<br />";
+ $parentlinks .= "<table class=\"rtlnav person_box$isF\"><tr><td align=\"right\" style=\"font-size:10px;font-weight:normal;\" class=\"name2\" nowrap=\"nowrap\">";
+ $parentlinks .= "<b>" . WT_I18N::translate('Parents') . "</b> (" .$person->getFullName(). ")<br />";
+ $step_parentlinks .= "<table class=\"rtlnav person_box$isF\"><tr><td align=\"right\" style=\"font-size:10px;font-weight:normal;\" class=\"name2\" nowrap=\"nowrap\">";
+ $step_parentlinks .= "<b>" . WT_I18N::translate('Parents') . "</b> (" .$person->getFullName(). ")<br />";
+ } else {
+ $spouselinks .= "<table class=\"ltrnav person_box$isF\"><tr><td align=\"left\" style=\"font-size:10px;font-weight:normal;\" class=\"name2\" nowrap=\"nowrap\">";
+ $spouselinks .= "<b>" . WT_I18N::translate('Family') . "</b> (" .$person->getFullName(). ")<br />";
+ $parentlinks .= "<table class=\"ltrnav person_box$isF\"><tr><td align=\"left\" style=\"font-size:10px;font-weight:normal;\" class=\"name2\" nowrap=\"nowrap\">";
+ $parentlinks .= "<b>" . WT_I18N::translate('Parents') . "</b> (" .$person->getFullName(). ")<br />";
+ $step_parentlinks .= "<table class=\"ltrnav person_box$isF\"><tr><td align=\"left\" style=\"font-size:10px;font-weight:normal;\" class=\"name2\" nowrap=\"nowrap\">";
+ $step_parentlinks .= "<b>" . WT_I18N::translate('Parents') . "</b> (" .$person->getFullName(). ")<br />";
+ }
- $persons = "";
- $person_parent = "";
- $person_step = "";
+ $persons = "";
+ $person_parent = "";
+ $person_step = "";
- //-- Parent families --------------------------------------
- $fams = $person->getChildFamilies();
- foreach ($fams as $family) {
- $marrdate = $family->getMarriageDate();
- $married = WT_Date::Compare($censdate, $marrdate);
+ //-- Parent families --------------------------------------
+ $fams = $person->getChildFamilies();
+ foreach ($fams as $family) {
+ $marrdate = $family->getMarriageDate();
+ $married = WT_Date::Compare($censdate, $marrdate);
- if (!is_null($family)) {
- $husb = $family->getHusband($person);
- $wife = $family->getWife($person);
- $children = $family->getChildren();
- $num = count($children);
- $marrdate = $family->getMarriageDate();
+ if (!is_null($family)) {
+ $husb = $family->getHusband($person);
+ $wife = $family->getWife($person);
+ $children = $family->getChildren();
+ $num = count($children);
+ $marrdate = $family->getMarriageDate();
- //-- Get Parent Children's Name, DOB, DOD --------------------------
- if (isset($children)) {
- $chBLDarray = Array();
- foreach ($children as $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.", "(".WT_I18N::translate('unknown').")", $chfulln);
- $chfulln = str_replace("@P.N.", "(".WT_I18N::translate('unknown').")", $chfulln); // Child's Full Name
- $chdob = ($child->getBirthDate()->minJD()+$child->getBirthDate()->maxJD())/2; // Child's Date of Birth (Julian)
- $chdod = ($child->getDeathDate()->minJD()+$child->getDeathDate()->maxJD())/2; // Child's Date of Death (Julian)
- $chBLD = ($chfulln.", ".$chdob.", ".$chdod);
- array_push($chBLDarray, $chBLD);
+ //-- Get Parent Children's Name, DOB, DOD --------------------------
+ if (isset($children)) {
+ $chBLDarray = Array();
+ foreach ($children as $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.", "(".WT_I18N::translate('unknown').")", $chfulln);
+ $chfulln = str_replace("@P.N.", "(".WT_I18N::translate('unknown').")", $chfulln); // Child's Full Name
+ $chdob = ($child->getBirthDate()->minJD()+$child->getBirthDate()->maxJD())/2; // Child's Date of Birth (Julian)
+ $chdod = ($child->getDeathDate()->minJD()+$child->getDeathDate()->maxJD())/2; // Child's Date of Death (Julian)
+ $chBLD = ($chfulln.", ".$chdob.", ".$chdod);
+ array_push($chBLDarray, $chBLD);
+ }
+ }
+
+ //-- Parent Husband ------------------------------
+ if ($husb || $num>0) {
+ if ($husb) {
+ //-- Parent Husbands Parents ----------------------
+ $gparent=WT_Person::getInstance($husb->getXref());
+ $parfams = $gparent->getChildFamilies();
+ foreach ($parfams as $pfamily) {
+ if (!is_null($pfamily)) {
+ $phusb = $pfamily->getHusband($gparent);
+ $pwife = $pfamily->getWife($gparent);
}
+ if ($phusb) { $pHusbFBP = $phusb->getBirthPlace(); }
+ if ($pwife) { $pHusbMBP = $pwife->getBirthPlace(); }
}
+ //-- Parent Husbands Details ----------------------
+ $person_parent="Yes";
+ $tmp=$husb->getXref();
+ if ($husb->canDisplayName()) {
+ $nam = $husb->getAllNames();
+ $fulln = rtrim($nam[0]['givn'],'*')."&nbsp;".$nam[0]['surname'];
+ $fulln = str_replace("@N.N.", "(".WT_I18N::translate('unknown').")", $fulln);
+ $fulln = str_replace("@P.N.", "(".WT_I18N::translate('unknown').")", $fulln);
+ $givn = rtrim($nam[0]['givn'],'*');
+ $surn = $nam[0]['surn'];
+ for ($i=0; $i<count($nam); $i++) {
+ if ($nam[$i]['type']=='_MARNM') {
+ $fulmn = rtrim($nam[$i]['givn'],'*')."&nbsp;".$nam[$i]['surname'];
+ }
+ }
+ $parentlinks .= "<a class=\"linka\" href=\"javascript:insertRowToTable(";
+ $parentlinks .= "'".$husb->getXref()."',"; // pid = PID
+ $parentlinks .= "'".addslashes(strip_tags($fulln))."',"; // nam = Name
+ if (isset($fulmn)) {
+ $parentlinks .= "'".addslashes(strip_tags($fulln))."',"; // mnam = Full Married Name
+ } else {
+ $parentlinks .= "'".addslashes(strip_tags($fulln))."',"; // mnam = Full Name
+ }
+ if ($currpid=="Wife" || $currpid=="Husband") {
+ $parentlinks .= "'Father in Law',"; // label = 1st Gen Male Relationship
+ } else {
+ $parentlinks .= "'Grand-Father',"; // label = 2st Gen Male Relationship
+ }
+ $parentlinks .= "'".$husb->getSex()."',"; // sex = Gender
+ $parentlinks .= "''".","; // cond = Condition (Married etc)
+ if ($marrdate) {
+ $parentlinks .= "'".(($marrdate->minJD()+$marrdate->maxJD())/2)."',"; // dom = Date of Marriage (Julian)
+ }
+ $parentlinks .= "'".(($husb->getBirthDate()->minJD()+$husb->getBirthDate()->maxJD())/2)."',"; // dob = Date of Birth
+ if ($husb->getbirthyear()>=1) {
+ $parentlinks .= "'".$censyear-$husb->getbirthyear()."',"; // age = Census Year - Year of Birth
+ } else {
+ $parentlinks .= "''".","; // age = Undefined
+ }
+ $parentlinks .= "'".(($husb->getDeathDate()->minJD()+$husb->getDeathDate()->maxJD())/2)."',"; // dod = Date of Death
+ $parentlinks .= "''".","; // occu = Occupation
+ $parentlinks .= "'".addslashes($husb->getBirthPlace())."'".","; // birthpl = Individuals Birthplace
+ if (isset($pHusbFBP)) {
+ $parentlinks .= "'".addslashes($pHusbFBP)."'".","; // fbirthpl = Fathers Birthplace
+ } else {
+ $parentlinks .= "'UNK, UNK, UNK, UNK'".","; // fbirthpl = Fathers Birthplace
+ }
+ if (isset($pHusbMBP)) {
+ $parentlinks .= "'".addslashes($pHusbMBP)."'".","; // mbirthpl = Mothers Birthplace
+ } else {
+ $parentlinks .= "'UNK, UNK, UNK, UNK'".","; // mbirthpl = Mothers Birthplace
+ }
+ if (isset($chBLDarray) && $husb->getSex()=="F") {
+ $chBLDarray = implode("::", $chBLDarray);
+ $parentlinks .= "'".$chBLDarray."'"; // Array of Children (name, birthdate, deathdate)
+ } else {
+ $parentlinks .= "''";
+ }
+ $parentlinks .= ");\">";
+ $parentlinks .= $husb->getFullName(); // Full Name (Link)
+ $parentlinks .= "</a>";
+ } else {
+ $parentlinks .= WT_I18N::translate('Private');
+ }
+ $natdad = "yes";
+ }
+ }
- //-- Parent Husband ------------------------------
- if ($husb || $num>0) {
- if ($husb) {
- //-- Parent Husbands Parents ----------------------
- $gparent=WT_Person::getInstance($husb->getXref());
- $parfams = $gparent->getChildFamilies();
- foreach ($parfams as $pfamily) {
- if (!is_null($pfamily)) {
- $phusb = $pfamily->getHusband($gparent);
- $pwife = $pfamily->getWife($gparent);
- }
- if ($phusb) { $pHusbFBP = $phusb->getBirthPlace(); }
- if ($pwife) { $pHusbMBP = $pwife->getBirthPlace(); }
+ //-- Parent Wife ------------------------------
+ if ($wife || $num>0) {
+ if ($wife) {
+ //-- Parent Wifes Parents ----------------------
+ $gparent=WT_Person::getInstance($wife->getXref());
+ $parfams = $gparent->getChildFamilies();
+ foreach ($parfams as $pfamily) {
+ if (!is_null($pfamily)) {
+ $pwhusb = $pfamily->getHusband($gparent);
+ $pwwife = $pfamily->getWife($gparent);
+ }
+ if ($pwhusb) { $pWifeFBP = $pwhusb->getBirthPlace(); }
+ if ($pwwife) { $pWifeMBP = $pwwife->getBirthPlace(); }
+ }
+ //-- Parent Wifes Details ----------------------
+ $person_parent="Yes";
+ $tmp=$wife->getXref();
+ if ($wife->canDisplayName()) {
+ $married = WT_Date::Compare($censdate, $marrdate);
+ $nam = $wife->getAllNames();
+ $fulln = rtrim($nam[0]['givn'],'*')."&nbsp;".$nam[0]['surname'];
+ $fulln = str_replace("@N.N.", "(".WT_I18N::translate('unknown').")", $fulln);
+ $fulln = str_replace("@P.N.", "(".WT_I18N::translate('unknown').")", $fulln);
+ $givn = rtrim($nam[0]['givn'],'*');
+ $surn = $nam[0]['surname'];
+ $husbnam = null;
+
+ // Get wifes married name if available
+ if (isset($husb)) {
+ $husbnams = $husb->getAllNames();
+ if ($husbnams[0]['surname']=="@N.N." || $husbnams[0]['surname']=="") {
+ // Husband or his name is not known
+ } else {
+ $husbnam = $husb->getAllNames();
}
- //-- Parent Husbands Details ----------------------
- $person_parent="Yes";
- $tmp=$husb->getXref();
- if ($husb->canDisplayName()) {
- $nam = $husb->getAllNames();
- $fulln = rtrim($nam[0]['givn'],'*')."&nbsp;".$nam[0]['surname'];
- $fulln = str_replace("@N.N.", "(".WT_I18N::translate('unknown').")", $fulln);
- $fulln = str_replace("@P.N.", "(".WT_I18N::translate('unknown').")", $fulln);
- $givn = rtrim($nam[0]['givn'],'*');
- $surn = $nam[0]['surn'];
- for ($i=0; $i<count($nam); $i++) {
- if ($nam[$i]['type']=='_MARNM') {
- $fulmn = rtrim($nam[$i]['givn'],'*')."&nbsp;".$nam[$i]['surname'];
- }
- }
- $parentlinks .= "<a class=\"linka\" href=\"javascript:insertRowToTable(";
- $parentlinks .= "'".$husb->getXref()."',"; // pid = PID
- $parentlinks .= "'".addslashes(strip_tags($fulln))."',"; // nam = Name
- if (isset($fulmn)) {
- $parentlinks .= "'".addslashes(strip_tags($fulln))."',"; // mnam = Full Married Name
- } else {
- $parentlinks .= "'".addslashes(strip_tags($fulln))."',"; // mnam = Full Name
- }
- if ($currpid=="Wife" || $currpid=="Husband") {
- $parentlinks .= "'Father in Law',"; // label = 1st Gen Male Relationship
- } else {
- $parentlinks .= "'Grand-Father',"; // label = 2st Gen Male Relationship
- }
- $parentlinks .= "'".$husb->getSex()."',"; // sex = Gender
- $parentlinks .= "''".","; // cond = Condition (Married etc)
- if ($marrdate) {
- $parentlinks .= "'".(($marrdate->minJD()+$marrdate->maxJD())/2)."',"; // dom = Date of Marriage (Julian)
- }
- $parentlinks .= "'".(($husb->getBirthDate()->minJD()+$husb->getBirthDate()->maxJD())/2)."',"; // dob = Date of Birth
- if ($husb->getbirthyear()>=1) {
- $parentlinks .= "'".$censyear-$husb->getbirthyear()."',"; // age = Census Year - Year of Birth
- } else {
- $parentlinks .= "''".","; // age = Undefined
- }
- $parentlinks .= "'".(($husb->getDeathDate()->minJD()+$husb->getDeathDate()->maxJD())/2)."',"; // dod = Date of Death
- $parentlinks .= "''".","; // occu = Occupation
- $parentlinks .= "'".addslashes($husb->getBirthPlace())."'".","; // birthpl = Individuals Birthplace
- if (isset($pHusbFBP)) {
- $parentlinks .= "'".addslashes($pHusbFBP)."'".","; // fbirthpl = Fathers Birthplace
- } else {
- $parentlinks .= "'UNK, UNK, UNK, UNK'".","; // fbirthpl = Fathers Birthplace
- }
- if (isset($pHusbMBP)) {
- $parentlinks .= "'".addslashes($pHusbMBP)."'".","; // mbirthpl = Mothers Birthplace
- } else {
- $parentlinks .= "'UNK, UNK, UNK, UNK'".","; // mbirthpl = Mothers Birthplace
- }
- if (isset($chBLDarray) && $husb->getSex()=="F") {
- $chBLDarray = implode("::", $chBLDarray);
- $parentlinks .= "'".$chBLDarray."'"; // Array of Children (name, birthdate, deathdate)
- } else {
- $parentlinks .= "''";
- }
- $parentlinks .= ");\">";
- $parentlinks .= $husb->getFullName(); // Full Name (Link)
- $parentlinks .= "</a>";
+ }
+ for ($i=0; $i<count($nam); $i++) {
+ if ($nam[$i]['type']=='_MARNM') {
+ $fulmn = rtrim($nam[$i]['givn'],'*')."&nbsp;".$nam[$i]['surname'];
+ }
+ }
+
+ $parentlinks .= "<a class=\"linka\" href=\"javascript:insertRowToTable(";
+ $parentlinks .= "'".$wife->getXref()."',"; // pid = PID
+ $parentlinks .= "'".addslashes(strip_tags($fulln))."',"; // nam = Name
+ if (isset($fulmn)) {
+ $parentlinks .= "'".addslashes(strip_tags($fulmn))."',"; // mnam = Full Married Name
+ } else {
+ $parentlinks .= "'".addslashes(strip_tags($fulln))."',"; // mnam = Full Name
+ }
+ if ($currpid=="Wife" || $currpid=="Husband") {
+ $parentlinks .= "'Mother in Law',"; // label = 1st Gen Female Relationship
+ } else {
+ $parentlinks .= "'Grand-Mother',"; // label = 2st Gen Female Relationship
+ }
+ $parentlinks .= "'".$wife->getSex()."',"; // sex = Gender
+ $parentlinks .= "''".","; // cond = Condition (Married etc)
+ if ($marrdate) {
+ $parentlinks .= "'".(($marrdate->minJD()+$marrdate->maxJD())/2)."',"; // dom = Date of Marriage (Julian)
+ }
+ $parentlinks .= "'".(($wife->getBirthDate()->minJD()+$wife->getBirthDate()->maxJD())/2)."',"; // dob = Date of Birth
+ if ($wife->getbirthyear()>=1) {
+ $parentlinks .= "'".$censyear-$wife->getbirthyear()."',"; // age = Census Year - Year of Birth
+ } else {
+ $parentlinks .= "''".","; // age = Undefined
+ }
+ $parentlinks .= "'".(($wife->getDeathDate()->minJD()+$wife->getDeathDate()->maxJD())/2)."',"; // dod = Date of Death
+ $parentlinks .= "''".","; // occu = Occupation
+ $parentlinks .= "'".addslashes($wife->getBirthPlace())."'".","; // birthpl = Individuals Birthplace
+ if (isset($pWifeFBP)) {
+ $parentlinks .= "'".addslashes($pWifeFBP)."'".","; // fbirthpl = Fathers Birthplace
+ } else {
+ $parentlinks .= "'UNK, UNK, UNK, UNK'".","; // fbirthpl = Fathers Birthplace Not Known
+ }
+ if (isset($pWifeMBP)) {
+ $parentlinks .= "'".addslashes($pWifeMBP)."'".","; // mbirthpl = Mothers Birthplace
+ } else {
+ $parentlinks .= "'UNK, UNK, UNK, UNK'".","; // mbirthpl = Mothers Birthplace Not Known
+ }
+ if (isset($chBLDarray) && $wife->getSex()=="F") {
+ $chBLDarray = implode("::", $chBLDarray);
+ $parentlinks .= "'".$chBLDarray."'"; // Array of Children (name, birthdate, deathdate)
+ } else {
+ $parentlinks .= "''";
+ }
+ $parentlinks .= ");\">";
+ $parentlinks .= $wife->getFullName(); // Full Name (Link)
+ $parentlinks .= "</a>";
+ } else {
+ $parentlinks .= WT_I18N::translate('Private');
+ }
+ $natmom = "yes";
+ }
+ }
+ }
+ }
+
+ //-- Step families -----------------------------------------
+ $fams = $person->getChildStepFamilies();
+ foreach ($fams as $family) {
+ $marrdate = $family->getMarriageDate();
+ $married = WT_Date::Compare($censdate, $marrdate);
+ if (!is_null($family)) {
+ $husb = $family->getHusband($person);
+ $wife = $family->getWife($person);
+ $children = $family->getChildren();
+ $num = count($children);
+ $marrdate = $family->getMarriageDate();
+
+ //-- Get StepParent's Children's Name, DOB, DOD --------------------------
+ if (isset($children)) {
+ $chBLDarray = Array();
+ foreach ($children as $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.", "(".WT_I18N::translate('unknown').")", $chfulln);
+ $chfulln = str_replace("@P.N.", "(".WT_I18N::translate('unknown').")", $chfulln); // Child's Full Name
+ $chdob = ($child->getBirthDate()->minJD()+$child->getBirthDate()->maxJD())/2; // Child's Date of Birth (Julian)
+ $chdod = ($child->getDeathDate()->minJD()+$child->getDeathDate()->maxJD())/2; // Child's Date of Death (Julian)
+ $chBLD = ($chfulln.", ".$chdob.", ".$chdod);
+ array_push($chBLDarray, $chBLD);
+ }
+ }
+
+ //-- Step Husband --------------------------------------
+ if ($natdad == "yes") {
+ } else {
+ if (($husb || $num>0) && $husb->getLabel() != ".") {
+ if ($husb) {
+ //-- Step Husbands Parents -----------------------------
+ $gparent=WT_Person::getInstance($husb->getXref());
+ $parfams = $gparent->getChildFamilies();
+ foreach ($parfams as $pfamily) {
+ if (!is_null($pfamily)) {
+ $phusb = $pfamily->getHusband($gparent);
+ $pwife = $pfamily->getWife($gparent);
+ }
+ if ($phusb) { $pHusbFBP = $phusb->getBirthPlace(); }
+ if ($pwife) { $pHusbMBP = $pwife->getBirthPlace(); }
+ }
+ //-- Step Husband Details ------------------------------
+ $person_step="Yes";
+ $tmp=$husb->getXref();
+ if ($husb->canDisplayName()) {
+ $nam = $husb->getAllNames();
+ $fulln = rtrim($nam[0]['givn'],'*')."&nbsp;".$nam[0]['surname'];
+ $fulln = str_replace("@N.N.", "(".WT_I18N::translate('unknown').")", $fulln);
+ $fulln = str_replace("@P.N.", "(".WT_I18N::translate('unknown').")", $fulln);
+ //$fulln = strip_tags($husb->getFullName());
+ $givn = rtrim($nam[0]['givn'],'*');
+ $surn = $nam[0]['surname'];
+ for ($i=0; $i<count($nam); $i++) {
+ if ($nam[$i]['type']=='_MARNM') {
+ $fulmn = rtrim($nam[$i]['givn'],'*')."&nbsp;".$nam[$i]['surname'];
+ }
+ }
+ $parentlinks .= "<a class=\"linka\" href=\"javascript:insertRowToTable(";
+ $parentlinks .= "'".$husb->getXref()."',"; // pid = PID
+ $parentlinks .= "'".addslashes(strip_tags($fulln))."',"; // nam = Name
+ if (isset($fulmn)) {
+ $parentlinks .= "'".addslashes(strip_tags($fulln))."',"; // mnam = Full Married Name
} else {
- $parentlinks .= WT_I18N::translate('Private');
+ $parentlinks .= "'".addslashes(strip_tags($fulln))."',"; // mnam = Full Name
}
- $natdad = "yes";
+ if ($currpid=="Wife" || $currpid=="Husband") {
+ $parentlinks .= "'Step Father-in-Law',"; // label = 1st Gen Male Relationship
+ } else {
+ $parentlinks .= "'Step Grand-Father',"; // label = 2st Gen Male Relationship
+ }
+ $parentlinks .= "'".$husb->getSex()."',"; // sex = Gender
+ $parentlinks .= "''".","; // cond = Condition (Married etc)
+ if ($marrdate) {
+ $parentlinks .= "'".(($marrdate->minJD()+$marrdate->maxJD())/2)."',"; // dom = Date of Marriage (Julian)
+ }
+ $parentlinks .= "'".(($husb->getBirthDate()->minJD()+$husb->getBirthDate()->maxJD())/2)."',"; // dob = Date of Birth
+ if ($husb->getbirthyear()>=1) {
+ $parentlinks .= "'".$censyear-$husb->getbirthyear()."',"; // age = Census Year - Year of Birth
+ } else {
+ $parentlinks .= "''".","; // age = Undefined
+ }
+ $parentlinks .= "'".(($husb->getDeathDate()->minJD()+$husb->getDeathDate()->maxJD())/2)."',"; // dod = Date of Death
+ $parentlinks .= "''".","; // occu = Occupation
+ $parentlinks .= "'".addslashes($husb->getBirthPlace())."'".","; // birthpl = Individuals Birthplace
+ if (isset($pHusbFBP)) {
+ $parentlinks .= "'".addslashes($pHusbFBP)."'".","; // fbirthpl = Fathers Birthplace
+ } else {
+ $parentlinks .= "'UNK, UNK, UNK, UNK'".","; // fbirthpl = Fathers Birthplace
+ }
+ if (isset($pHusbMBP)) {
+ $parentlinks .= "'".addslashes($pHusbMBP)."'".","; // mbirthpl = Mothers Birthplace
+ } else {
+ $parentlinks .= "'UNK, UNK, UNK, UNK'".","; // mbirthpl = Mothers Birthplace
+ }
+ if (isset($chBLDarray) && $husb->getSex()=="F") {
+ $chBLDarray = implode("::", $chBLDarray);
+ $parentlinks .= "'".$chBLDarray."'"; // Array of Children (name, birthdate, deathdate)
+ } else {
+ $parentlinks .= "''";
+ }
+ $parentlinks .= ");\">";
+ $parentlinks .= $husb->getFullName(); // Full Name (Link)
+ $parentlinks .= "</a>";
+ } else {
+ $parentlinks .= WT_I18N::translate('Private');
}
}
+ }
+ }
- //-- Parent Wife ------------------------------
- if ($wife || $num>0) {
- if ($wife) {
- //-- Parent Wifes Parents ----------------------
- $gparent=WT_Person::getInstance($wife->getXref());
- $parfams = $gparent->getChildFamilies();
- foreach ($parfams as $pfamily) {
- if (!is_null($pfamily)) {
- $pwhusb = $pfamily->getHusband($gparent);
- $pwwife = $pfamily->getWife($gparent);
- }
- if ($pwhusb) { $pWifeFBP = $pwhusb->getBirthPlace(); }
- if ($pwwife) { $pWifeMBP = $pwwife->getBirthPlace(); }
+ //-- Step Wife ----------------------------------------
+ if ($natmom == "yes") {
+ } else {
+ if ($wife || $num>0) {
+ if ($wife) {
+ //-- Step Wifes Parents ---------------------------
+ $gparent=WT_Person::getInstance($wife->getXref());
+ $parfams = $gparent->getChildFamilies();
+ foreach ($parfams as $pfamily) {
+ if (!is_null($pfamily)) {
+ $pwhusb = $pfamily->getHusband($gparent);
+ $pwwife = $pfamily->getWife($gparent);
}
- //-- Parent Wifes Details ----------------------
- $person_parent="Yes";
- $tmp=$wife->getXref();
- if ($wife->canDisplayName()) {
- $married = WT_Date::Compare($censdate, $marrdate);
- $nam = $wife->getAllNames();
- $fulln = rtrim($nam[0]['givn'],'*')."&nbsp;".$nam[0]['surname'];
- $fulln = str_replace("@N.N.", "(".WT_I18N::translate('unknown').")", $fulln);
- $fulln = str_replace("@P.N.", "(".WT_I18N::translate('unknown').")", $fulln);
- $givn = rtrim($nam[0]['givn'],'*');
- $surn = $nam[0]['surname'];
- $husbnam = null;
-
- // Get wifes married name if available
- if (isset($husb)) {
- $husbnams = $husb->getAllNames();
- if ($husbnams[0]['surname']=="@N.N." || $husbnams[0]['surname']=="") {
- // Husband or his name is not known
- } else {
- $husbnam = $husb->getAllNames();
- }
- }
- for ($i=0; $i<count($nam); $i++) {
- if ($nam[$i]['type']=='_MARNM') {
- $fulmn = rtrim($nam[$i]['givn'],'*')."&nbsp;".$nam[$i]['surname'];
- }
- }
-
- $parentlinks .= "<a class=\"linka\" href=\"javascript:insertRowToTable(";
- $parentlinks .= "'".$wife->getXref()."',"; // pid = PID
- $parentlinks .= "'".addslashes(strip_tags($fulln))."',"; // nam = Name
- if (isset($fulmn)) {
- $parentlinks .= "'".addslashes(strip_tags($fulmn))."',"; // mnam = Full Married Name
- } else {
- $parentlinks .= "'".addslashes(strip_tags($fulln))."',"; // mnam = Full Name
- }
- if ($currpid=="Wife" || $currpid=="Husband") {
- $parentlinks .= "'Mother in Law',"; // label = 1st Gen Female Relationship
- } else {
- $parentlinks .= "'Grand-Mother',"; // label = 2st Gen Female Relationship
- }
- $parentlinks .= "'".$wife->getSex()."',"; // sex = Gender
- $parentlinks .= "''".","; // cond = Condition (Married etc)
- if ($marrdate) {
- $parentlinks .= "'".(($marrdate->minJD()+$marrdate->maxJD())/2)."',"; // dom = Date of Marriage (Julian)
- }
- $parentlinks .= "'".(($wife->getBirthDate()->minJD()+$wife->getBirthDate()->maxJD())/2)."',"; // dob = Date of Birth
- if ($wife->getbirthyear()>=1) {
- $parentlinks .= "'".$censyear-$wife->getbirthyear()."',"; // age = Census Year - Year of Birth
- } else {
- $parentlinks .= "''".","; // age = Undefined
- }
- $parentlinks .= "'".(($wife->getDeathDate()->minJD()+$wife->getDeathDate()->maxJD())/2)."',"; // dod = Date of Death
- $parentlinks .= "''".","; // occu = Occupation
- $parentlinks .= "'".addslashes($wife->getBirthPlace())."'".","; // birthpl = Individuals Birthplace
- if (isset($pWifeFBP)) {
- $parentlinks .= "'".addslashes($pWifeFBP)."'".","; // fbirthpl = Fathers Birthplace
- } else {
- $parentlinks .= "'UNK, UNK, UNK, UNK'".","; // fbirthpl = Fathers Birthplace Not Known
- }
- if (isset($pWifeMBP)) {
- $parentlinks .= "'".addslashes($pWifeMBP)."'".","; // mbirthpl = Mothers Birthplace
- } else {
- $parentlinks .= "'UNK, UNK, UNK, UNK'".","; // mbirthpl = Mothers Birthplace Not Known
- }
- if (isset($chBLDarray) && $wife->getSex()=="F") {
- $chBLDarray = implode("::", $chBLDarray);
- $parentlinks .= "'".$chBLDarray."'"; // Array of Children (name, birthdate, deathdate)
+ if ($pwhusb) { $pWifeFBP = $pwhusb->getBirthPlace(); }
+ if ($pwwife) { $pWifeMBP = $pwwife->getBirthPlace(); }
+ }
+ //-- Step Wife Details ------------------------------
+ $person_step="Yes";
+ $tmp=$wife->getXref();
+ if ($wife->canDisplayName()) {
+ $married = WT_Date::Compare($censdate, $marrdate);
+ $nam = $wife->getAllNames();
+ $fulln = rtrim($nam[0]['givn'],'*')."&nbsp;".$nam[0]['surname'];
+ $fulln = str_replace("@N.N.", "(".WT_I18N::translate('unknown').")", $fulln);
+ $fulln = str_replace("@P.N.", "(".WT_I18N::translate('unknown').")", $fulln);
+ //$fulln = strip_tags($wife->getFullName());
+ $givn = rtrim($nam[0]['givn'],'*');
+ $surn = $nam[0]['surname'];
+ $husbnam = null;
+
+ // Get wifes married name if available
+ if (isset($husb)) {
+ $husbnams = $husb->getAllNames();
+ if ($husbnams[0]['surname']=="@N.N." || $husbnams[0]['surname']=="") {
+ // Husband or his name is not known
} else {
- $parentlinks .= "''";
+ $husbnam = $husb->getAllNames();
}
- $parentlinks .= ");\">";
- $parentlinks .= $wife->getFullName(); // Full Name (Link)
- $parentlinks .= "</a>";
+ }
+ for ($i=0; $i<count($nam); $i++) {
+ if ($nam[$i]['type']=='_MARNM') {
+ $fulmn = rtrim($nam[$i]['givn'],'*')."&nbsp;".$nam[$i]['surname'];
+ }
+ }
+
+ $parentlinks .= "<a class=\"linka\" href=\"javascript:insertRowToTable(";
+ $parentlinks .= "'".$wife->getXref()."',"; // pid = PID
+ $parentlinks .= "'".addslashes(strip_tags($fulln))."',"; // nam = Name
+ if (isset($fulmn)) {
+ $parentlinks .= "'".addslashes(strip_tags($fulmn))."',"; // mnam = Full Married Name
+ } else {
+ $parentlinks .= "'".addslashes(strip_tags($fulln))."',"; // mnam = Full Name
+ }
+ if ($currpid=="Wife" || $currpid=="Husband") {
+ $parentlinks .= "'Step Mother-in-Law',"; // label = 1st Gen Female Relationship
+ } else {
+ $parentlinks .= "'Step Grand-Mother',"; // label = 2st Gen Female Relationship
+ }
+ $parentlinks .= "'".$wife->getSex()."',"; // sex = Gender
+ $parentlinks .= "''".","; // cond = Condition (Married etc)
+ if ($marrdate) {
+ $parentlinks .= "'".(($marrdate->minJD()+$marrdate->maxJD())/2)."',"; // dom = Date of Marriage (Julian)
+ }
+ $parentlinks .= "'".(($wife->getBirthDate()->minJD()+$wife->getBirthDate()->maxJD())/2)."',"; // dob = Date of Birth
+ if ($wife->getbirthyear()>=1) {
+ $parentlinks .= "'".$censyear-$wife->getbirthyear()."',"; // age = Census Year - Year of Birth
+ } else {
+ $parentlinks .= "''".","; // age = Undefined
+ }
+ $parentlinks .= "'".(($wife->getDeathDate()->minJD()+$wife->getDeathDate()->maxJD())/2)."',"; // dod = Date of Death
+ $parentlinks .= "''".","; // occu = Occupation
+ $parentlinks .= "'".addslashes($wife->getBirthPlace())."'".","; // birthpl = Individuals Birthplace
+ if (isset($pWifeFBP)) {
+ $parentlinks .= "'".addslashes($pWifeFBP)."'".","; // fbirthpl = Fathers Birthplace
+ } else {
+ $parentlinks .= "'UNK, UNK, UNK, UNK'".","; // fbirthpl = Fathers Birthplace Not Known
+ }
+ if (isset($pWifeMBP)) {
+ $parentlinks .= "'".addslashes($pWifeMBP)."'".","; // mbirthpl = Mothers Birthplace
} else {
- $parentlinks .= WT_I18N::translate('Private');
+ $parentlinks .= "'UNK, UNK, UNK, UNK'".","; // mbirthpl = Mothers Birthplace Not Known
}
- $natmom = "yes";
+ if (isset($chBLDarray) && $wife->getSex()=="F") {
+ $chBLDarray = implode("::", $chBLDarray);
+ $parentlinks .= "'".$chBLDarray."'"; // Array of Children (name, birthdate, deathdate)
+ } else {
+ $parentlinks .= "''";
+ }
+ $parentlinks .= ");\">";
+ $parentlinks .= $wife->getFullName(); // Full Name (Link)
+ $parentlinks .= "</a>";
+ } else {
+ $parentlinks .= WT_I18N::translate('Private');
}
}
}
}
+ }
+ }
- //-- Step families -----------------------------------------
- $fams = $person->getChildStepFamilies();
- foreach ($fams as $family) {
- $marrdate = $family->getMarriageDate();
- $married = WT_Date::Compare($censdate, $marrdate);
- if (!is_null($family)) {
- $husb = $family->getHusband($person);
- $wife = $family->getWife($person);
- $children = $family->getChildren();
- $num = count($children);
- $marrdate = $family->getMarriageDate();
+ // Spouse Families ------------------------------------------
+ $fams = $person->getSpouseFamilies();
+ foreach ($fams as $family) {
+ if (!is_null($family)) {
+ $spouse = $family->getSpouse($person);
+ $children = $family->getChildren();
+ $num = count($children);
+ $marrdate = $family->getMarriageDate();
+ $married = WT_Date::Compare($censdate, $marrdate);
+ $is_wife = $family->getWife();
+
+ //-- Get Spouse's Children's Name, DOB, DOD --------------------------
+ if (isset($children)) {
+ $chBLDarray = Array();
+ foreach ($children as $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.", "(".WT_I18N::translate('unknown').")", $chfulln);
+ $chfulln = str_replace("@P.N.", "(".WT_I18N::translate('unknown').")", $chfulln); // Child's Full Name
+ $chdob = ($child->getBirthDate()->minJD()+$child->getBirthDate()->maxJD())/2; // Child's Date of Birth (Julian)
+ $chdod = ($child->getDeathDate()->minJD()+$child->getDeathDate()->maxJD())/2; // Child's Date of Death (Julian)
+ $chBLD = ($chfulln.", ".$chdob.", ".$chdod);
+ array_push($chBLDarray, $chBLD);
+ }
+ }
+
+ //-- Spouse -----------------------------------------
+ if ($spouse || $num>0) {
+ if ($spouse) {
- //-- Get StepParent's Children's Name, DOB, DOD --------------------------
- if (isset($children)) {
- $chBLDarray = Array();
- foreach ($children as $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.", "(".WT_I18N::translate('unknown').")", $chfulln);
- $chfulln = str_replace("@P.N.", "(".WT_I18N::translate('unknown').")", $chfulln); // Child's Full Name
- $chdob = ($child->getBirthDate()->minJD()+$child->getBirthDate()->maxJD())/2; // Child's Date of Birth (Julian)
- $chdod = ($child->getDeathDate()->minJD()+$child->getDeathDate()->maxJD())/2; // Child's Date of Death (Julian)
- $chBLD = ($chfulln.", ".$chdob.", ".$chdod);
- array_push($chBLDarray, $chBLD);
+ //-- Spouse Parents -----------------------------
+ $gparent=WT_Person::getInstance($spouse->getXref());
+ $spousefams = $gparent->getChildFamilies();
+ foreach ($spousefams as $pfamily) {
+ if (!is_null($pfamily)) {
+ $phusb = $pfamily->getHusband($gparent);
+ $pwife = $pfamily->getWife($gparent);
}
+ if ($phusb) { $pSpouseFBP = $phusb->getBirthPlace(); }
+ if ($pwife) { $pSpouseMBP = $pwife->getBirthPlace(); }
}
- //-- Step Husband --------------------------------------
- if ($natdad == "yes") {
- } else {
- if (($husb || $num>0) && $husb->getLabel() != ".") {
- if ($husb) {
- //-- Step Husbands Parents -----------------------------
- $gparent=WT_Person::getInstance($husb->getXref());
- $parfams = $gparent->getChildFamilies();
- foreach ($parfams as $pfamily) {
- if (!is_null($pfamily)) {
- $phusb = $pfamily->getHusband($gparent);
- $pwife = $pfamily->getWife($gparent);
- }
- if ($phusb) { $pHusbFBP = $phusb->getBirthPlace(); }
- if ($pwife) { $pHusbMBP = $pwife->getBirthPlace(); }
- }
- //-- Step Husband Details ------------------------------
- $person_step="Yes";
- $tmp=$husb->getXref();
- if ($husb->canDisplayName()) {
- $nam = $husb->getAllNames();
- $fulln = rtrim($nam[0]['givn'],'*')."&nbsp;".$nam[0]['surname'];
- $fulln = str_replace("@N.N.", "(".WT_I18N::translate('unknown').")", $fulln);
- $fulln = str_replace("@P.N.", "(".WT_I18N::translate('unknown').")", $fulln);
- //$fulln = strip_tags($husb->getFullName());
- $givn = rtrim($nam[0]['givn'],'*');
- $surn = $nam[0]['surname'];
- for ($i=0; $i<count($nam); $i++) {
- if ($nam[$i]['type']=='_MARNM') {
- $fulmn = rtrim($nam[$i]['givn'],'*')."&nbsp;".$nam[$i]['surname'];
- }
- }
- $parentlinks .= "<a class=\"linka\" href=\"javascript:insertRowToTable(";
- $parentlinks .= "'".$husb->getXref()."',"; // pid = PID
- $parentlinks .= "'".addslashes(strip_tags($fulln))."',"; // nam = Name
- if (isset($fulmn)) {
- $parentlinks .= "'".addslashes(strip_tags($fulln))."',"; // mnam = Full Married Name
- } else {
- $parentlinks .= "'".addslashes(strip_tags($fulln))."',"; // mnam = Full Name
- }
- if ($currpid=="Wife" || $currpid=="Husband") {
- $parentlinks .= "'Step Father-in-Law',"; // label = 1st Gen Male Relationship
- } else {
- $parentlinks .= "'Step Grand-Father',"; // label = 2st Gen Male Relationship
- }
- $parentlinks .= "'".$husb->getSex()."',"; // sex = Gender
- $parentlinks .= "''".","; // cond = Condition (Married etc)
- if ($marrdate) {
- $parentlinks .= "'".(($marrdate->minJD()+$marrdate->maxJD())/2)."',"; // dom = Date of Marriage (Julian)
- }
- $parentlinks .= "'".(($husb->getBirthDate()->minJD()+$husb->getBirthDate()->maxJD())/2)."',"; // dob = Date of Birth
- if ($husb->getbirthyear()>=1) {
- $parentlinks .= "'".$censyear-$husb->getbirthyear()."',"; // age = Census Year - Year of Birth
- } else {
- $parentlinks .= "''".","; // age = Undefined
- }
- $parentlinks .= "'".(($husb->getDeathDate()->minJD()+$husb->getDeathDate()->maxJD())/2)."',"; // dod = Date of Death
- $parentlinks .= "''".","; // occu = Occupation
- $parentlinks .= "'".addslashes($husb->getBirthPlace())."'".","; // birthpl = Individuals Birthplace
- if (isset($pHusbFBP)) {
- $parentlinks .= "'".addslashes($pHusbFBP)."'".","; // fbirthpl = Fathers Birthplace
- } else {
- $parentlinks .= "'UNK, UNK, UNK, UNK'".","; // fbirthpl = Fathers Birthplace
- }
- if (isset($pHusbMBP)) {
- $parentlinks .= "'".addslashes($pHusbMBP)."'".","; // mbirthpl = Mothers Birthplace
- } else {
- $parentlinks .= "'UNK, UNK, UNK, UNK'".","; // mbirthpl = Mothers Birthplace
- }
- if (isset($chBLDarray) && $husb->getSex()=="F") {
- $chBLDarray = implode("::", $chBLDarray);
- $parentlinks .= "'".$chBLDarray."'"; // Array of Children (name, birthdate, deathdate)
- } else {
- $parentlinks .= "''";
- }
- $parentlinks .= ");\">";
- $parentlinks .= $husb->getFullName(); // Full Name (Link)
- $parentlinks .= "</a>";
- } else {
- $parentlinks .= WT_I18N::translate('Private');
- }
+ //-- Spouse Details -----------------------------
+ $tmp=$spouse->getXref();
+ if ($spouse->canDisplayName()) {
+ $married = WT_Date::Compare($censdate, $marrdate);
+ $nam = $spouse->getAllNames();
+ $fulln = rtrim($nam[0]['givn'],'*')."&nbsp;".$nam[0]['surname'];
+ $fulln = str_replace("@N.N.", "(".WT_I18N::translate('unknown').")", $fulln);
+ $fulln = str_replace("@P.N.", "(".WT_I18N::translate('unknown').")", $fulln);
+ $givn = rtrim($nam[0]['givn'],'*');
+ $surn = $nam[0]['surname'];
+
+ // If spouse is a wife, then get her married name or default to her birth name
+ for ($i=0; $i<count($nam); $i++) {
+ if ($nam[$i]['type']=='_MARNM' && $is_wife) {
+ $fulmn = rtrim($nam[$i]['givn'],'*')."&nbsp;".$nam[$i]['surname'];
+ } else {
+ $fulmn = $fulln;
}
}
- }
- //-- Step Wife ----------------------------------------
- if ($natmom == "yes") {
- } else {
- if ($wife || $num>0) {
- if ($wife) {
- //-- Step Wifes Parents ---------------------------
- $gparent=WT_Person::getInstance($wife->getXref());
- $parfams = $gparent->getChildFamilies();
- foreach ($parfams as $pfamily) {
- if (!is_null($pfamily)) {
- $pwhusb = $pfamily->getHusband($gparent);
- $pwwife = $pfamily->getWife($gparent);
- }
- if ($pwhusb) { $pWifeFBP = $pwhusb->getBirthPlace(); }
- if ($pwwife) { $pWifeMBP = $pwwife->getBirthPlace(); }
- }
- //-- Step Wife Details ------------------------------
- $person_step="Yes";
- $tmp=$wife->getXref();
- if ($wife->canDisplayName()) {
- $married = WT_Date::Compare($censdate, $marrdate);
- $nam = $wife->getAllNames();
- $fulln = rtrim($nam[0]['givn'],'*')."&nbsp;".$nam[0]['surname'];
- $fulln = str_replace("@N.N.", "(".WT_I18N::translate('unknown').")", $fulln);
- $fulln = str_replace("@P.N.", "(".WT_I18N::translate('unknown').")", $fulln);
- //$fulln = strip_tags($wife->getFullName());
- $givn = rtrim($nam[0]['givn'],'*');
- $surn = $nam[0]['surname'];
- $husbnam = null;
-
- // Get wifes married name if available
- if (isset($husb)) {
- $husbnams = $husb->getAllNames();
- if ($husbnams[0]['surname']=="@N.N." || $husbnams[0]['surname']=="") {
- // Husband or his name is not known
- } else {
- $husbnam = $husb->getAllNames();
- }
- }
- for ($i=0; $i<count($nam); $i++) {
- if ($nam[$i]['type']=='_MARNM') {
- $fulmn = rtrim($nam[$i]['givn'],'*')."&nbsp;".$nam[$i]['surname'];
- }
- }
-
- $parentlinks .= "<a class=\"linka\" href=\"javascript:insertRowToTable(";
- $parentlinks .= "'".$wife->getXref()."',"; // pid = PID
- $parentlinks .= "'".addslashes(strip_tags($fulln))."',"; // nam = Name
- if (isset($fulmn)) {
- $parentlinks .= "'".addslashes(strip_tags($fulmn))."',"; // mnam = Full Married Name
- } else {
- $parentlinks .= "'".addslashes(strip_tags($fulln))."',"; // mnam = Full Name
- }
- if ($currpid=="Wife" || $currpid=="Husband") {
- $parentlinks .= "'Step Mother-in-Law',"; // label = 1st Gen Female Relationship
- } else {
- $parentlinks .= "'Step Grand-Mother',"; // label = 2st Gen Female Relationship
- }
- $parentlinks .= "'".$wife->getSex()."',"; // sex = Gender
- $parentlinks .= "''".","; // cond = Condition (Married etc)
- if ($marrdate) {
- $parentlinks .= "'".(($marrdate->minJD()+$marrdate->maxJD())/2)."',"; // dom = Date of Marriage (Julian)
- }
- $parentlinks .= "'".(($wife->getBirthDate()->minJD()+$wife->getBirthDate()->maxJD())/2)."',"; // dob = Date of Birth
- if ($wife->getbirthyear()>=1) {
- $parentlinks .= "'".$censyear-$wife->getbirthyear()."',"; // age = Census Year - Year of Birth
- } else {
- $parentlinks .= "''".","; // age = Undefined
- }
- $parentlinks .= "'".(($wife->getDeathDate()->minJD()+$wife->getDeathDate()->maxJD())/2)."',"; // dod = Date of Death
- $parentlinks .= "''".","; // occu = Occupation
- $parentlinks .= "'".addslashes($wife->getBirthPlace())."'".","; // birthpl = Individuals Birthplace
- if (isset($pWifeFBP)) {
- $parentlinks .= "'".addslashes($pWifeFBP)."'".","; // fbirthpl = Fathers Birthplace
- } else {
- $parentlinks .= "'UNK, UNK, UNK, UNK'".","; // fbirthpl = Fathers Birthplace Not Known
- }
- if (isset($pWifeMBP)) {
- $parentlinks .= "'".addslashes($pWifeMBP)."'".","; // mbirthpl = Mothers Birthplace
- } else {
- $parentlinks .= "'UNK, UNK, UNK, UNK'".","; // mbirthpl = Mothers Birthplace Not Known
- }
- if (isset($chBLDarray) && $wife->getSex()=="F") {
- $chBLDarray = implode("::", $chBLDarray);
- $parentlinks .= "'".$chBLDarray."'"; // Array of Children (name, birthdate, deathdate)
- } else {
- $parentlinks .= "''";
- }
- $parentlinks .= ");\">";
- $parentlinks .= $wife->getFullName(); // Full Name (Link)
- $parentlinks .= "</a>";
- } else {
- $parentlinks .= WT_I18N::translate('Private');
- }
+ $spouselinks .= "<a href=\"javascript:insertRowToTable(";
+ $spouselinks .= "'".$spouse->getXref()."',"; // pid = PID
+ $spouselinks .= "'".addslashes(strip_tags($fulln))."',"; // nam = Name
+ if (isset($fulmn)) {
+ $spouselinks .= "'".addslashes(strip_tags($fulmn))."',"; // mnam = Full Married Name
+ } else {
+ $spouselinks .= "'".addslashes(strip_tags($fulln))."',"; // mnam = Full Name
+ }
+ if ($currpid=="Son" || $currpid=="Daughter") {
+ if ($spouse->getSex()=="M") {
+ $spouselinks .= "'Son in Law',"; // label = Male Relationship
+ } else {
+ $spouselinks .= "'Daughter in Law',"; // label = Female Relationship
+ }
+ } else {
+ if ($spouse->getSex()=="M") {
+ $spouselinks .= "'Brother in Law',"; // label = Male Relationship
+ } else {
+ $spouselinks .= "'Sister in Law',"; // label = Female Relationship
}
}
+ $spouselinks .= "'".$spouse->getSex()."',"; // sex = Gender
+ $spouselinks .= "''".","; // cond = Condition (Married etc)
+ if ($marrdate) {
+ $spouselinks .= "'".(($marrdate->minJD()+$marrdate->maxJD())/2)."',"; // dom = Date of Marriage (Julian)
+ }
+ $spouselinks .= "'".(($spouse->getBirthDate()->minJD()+$spouse->getBirthDate()->maxJD())/2)."',"; // dob = Date of Birth
+ if ($spouse->getbirthyear()>=1) {
+ $spouselinks .= "'".$censyear-$spouse->getbirthyear()."',"; // age = Census Year - Year of Birth
+ } else {
+ $spouselinks .= "''".","; // age = Undefined
+ }
+ $spouselinks .= "'".(($spouse->getDeathDate()->minJD()+$spouse->getDeathDate()->maxJD())/2)."',"; // dod = Date of Death
+ $spouselinks .= "''".","; // occu = Occupation
+ $spouselinks .= "'".addslashes($spouse->getBirthPlace())."'".","; // birthpl = Individuals Birthplace
+ if (isset($pSpouseFBP)) {
+ $spouselinks .= "'".addslashes($pSpouseFBP)."'".","; // fbirthpl = Fathers Birthplace
+ } else {
+ $spouselinks .= "'UNK, UNK, UNK, UNK'".","; // fbirthpl = Fathers Birthplace Not Known
+ }
+ if (isset($pSpouseMBP)) {
+ $spouselinks .= "'".addslashes($pSpouseMBP)."'".","; // mbirthpl = Mothers Birthplace
+ } else {
+ $spouselinks .= "'UNK, UNK, UNK, UNK'".","; // mbirthpl = Mothers Birthplace Not Known
+ }
+ if (isset($chBLDarray) && $spouse->getSex()=="F") {
+ $chBLDarray = implode("::", $chBLDarray);
+ $spouselinks .= "'".$chBLDarray."'"; // Array of Children (name, birthdate, deathdate)
+ } else {
+ $spouselinks .= "''";
+ }
+ $spouselinks .= ");\">";
+ $spouselinks .= $spouse->getFullName(); // Full Name (Link)
+ $spouselinks .= "</a>";
+ } else {
+ $spouselinks .= WT_I18N::translate('Private');
+ }
+ $spouselinks .= "</a>";
+ if ($spouse->getFullName() != "") {
+ $persons = "Yes";
}
}
}
- // Spouse Families ------------------------------------------
- $fams = $person->getSpouseFamilies();
- foreach ($fams as $family) {
- if (!is_null($family)) {
- $spouse = $family->getSpouse($person);
- $children = $family->getChildren();
- $num = count($children);
- $marrdate = $family->getMarriageDate();
- $married = WT_Date::Compare($censdate, $marrdate);
- $is_wife = $family->getWife();
-
- //-- Get Spouse's Children's Name, DOB, DOD --------------------------
- if (isset($children)) {
- $chBLDarray = Array();
- foreach ($children as $child) {
- $chnam = $child->getAllNames();
+ // Children -------------------------------------
+ $spouselinks .= "<ul class=\"clist ".$TEXT_DIRECTION."\">";
+ foreach ($children as $c=>$child) {
+ $cpid = $child->getXref();
+ if ($child) {
+ $persons="Yes";
+
+ //-- Childs Parents ---------------------
+ $gparent=WT_Person::getInstance($child->getXref());
+ $fams = $gparent->getChildFamilies();
+ $chfams = $gparent->getSpouseFamilies();
+ foreach ($fams as $family) {
+ if (!is_null($family)) {
+ $husb = $family->getHusband($gparent);
+ $wife = $family->getWife($gparent);
+ }
+ if ($husb) { $ChildFBP = $husb->getBirthPlace(); }
+ if ($wife) { $ChildMBP = $wife->getBirthPlace(); }
+ }
+
+ // Get Child's Children
+ $chBLDarray=Array();
+ foreach ($child->getSpouseFamilies() as $childfamily) {
+ $chchildren = $childfamily->getChildren();
+ foreach ($chchildren as $chchild) {
+ $chnam = $chchild->getAllNames();
$chfulln = rtrim($chnam[0]['givn'],'*')." ".$chnam[0]['surname'];
$chfulln = str_replace('"', "", $chfulln); // Must remove quotes completely here
$chfulln = str_replace("@N.N.", "(".WT_I18N::translate('unknown').")", $chfulln);
$chfulln = str_replace("@P.N.", "(".WT_I18N::translate('unknown').")", $chfulln); // Child's Full Name
- $chdob = ($child->getBirthDate()->minJD()+$child->getBirthDate()->maxJD())/2; // Child's Date of Birth (Julian)
- $chdod = ($child->getDeathDate()->minJD()+$child->getDeathDate()->maxJD())/2; // Child's Date of Death (Julian)
+ $chdob = ($chchild->getBirthDate()->minJD()+$chchild->getBirthDate()->maxJD())/2; // Child's Date of Birth (Julian)
+ $chdod = ($chchild->getDeathDate()->minJD()+$chchild->getDeathDate()->maxJD())/2; // Child's Date of Death (Julian)
$chBLD = ($chfulln.", ".$chdob.", ".$chdod);
array_push($chBLDarray, $chBLD);
}
}
-
- //-- Spouse -----------------------------------------
- if ($spouse || $num>0) {
- if ($spouse) {
-
- //-- Spouse Parents -----------------------------
- $gparent=WT_Person::getInstance($spouse->getXref());
- $spousefams = $gparent->getChildFamilies();
- foreach ($spousefams as $pfamily) {
- if (!is_null($pfamily)) {
- $phusb = $pfamily->getHusband($gparent);
- $pwife = $pfamily->getWife($gparent);
- }
- if ($phusb) { $pSpouseFBP = $phusb->getBirthPlace(); }
- if ($pwife) { $pSpouseMBP = $pwife->getBirthPlace(); }
- }
-
- //-- Spouse Details -----------------------------
- $tmp=$spouse->getXref();
- if ($spouse->canDisplayName()) {
- $married = WT_Date::Compare($censdate, $marrdate);
- $nam = $spouse->getAllNames();
- $fulln = rtrim($nam[0]['givn'],'*')."&nbsp;".$nam[0]['surname'];
- $fulln = str_replace("@N.N.", "(".WT_I18N::translate('unknown').")", $fulln);
- $fulln = str_replace("@P.N.", "(".WT_I18N::translate('unknown').")", $fulln);
- $givn = rtrim($nam[0]['givn'],'*');
- $surn = $nam[0]['surname'];
-
- // If spouse is a wife, then get her married name or default to her birth name
- for ($i=0; $i<count($nam); $i++) {
- if ($nam[$i]['type']=='_MARNM' && $is_wife) {
- $fulmn = rtrim($nam[$i]['givn'],'*')."&nbsp;".$nam[$i]['surname'];
- } else {
- $fulmn = $fulln;
- }
- }
- $spouselinks .= "<a href=\"javascript:insertRowToTable(";
- $spouselinks .= "'".$spouse->getXref()."',"; // pid = PID
- $spouselinks .= "'".addslashes(strip_tags($fulln))."',"; // nam = Name
- if (isset($fulmn)) {
- $spouselinks .= "'".addslashes(strip_tags($fulmn))."',"; // mnam = Full Married Name
- } else {
- $spouselinks .= "'".addslashes(strip_tags($fulln))."',"; // mnam = Full Name
- }
- if ($currpid=="Son" || $currpid=="Daughter") {
- if ($spouse->getSex()=="M") {
- $spouselinks .= "'Son in Law',"; // label = Male Relationship
- } else {
- $spouselinks .= "'Daughter in Law',"; // label = Female Relationship
- }
- } else {
- if ($spouse->getSex()=="M") {
- $spouselinks .= "'Brother in Law',"; // label = Male Relationship
- } else {
- $spouselinks .= "'Sister in Law',"; // label = Female Relationship
- }
- }
- $spouselinks .= "'".$spouse->getSex()."',"; // sex = Gender
- $spouselinks .= "''".","; // cond = Condition (Married etc)
- if ($marrdate) {
- $spouselinks .= "'".(($marrdate->minJD()+$marrdate->maxJD())/2)."',"; // dom = Date of Marriage (Julian)
- }
- $spouselinks .= "'".(($spouse->getBirthDate()->minJD()+$spouse->getBirthDate()->maxJD())/2)."',"; // dob = Date of Birth
- if ($spouse->getbirthyear()>=1) {
- $spouselinks .= "'".$censyear-$spouse->getbirthyear()."',"; // age = Census Year - Year of Birth
- } else {
- $spouselinks .= "''".","; // age = Undefined
- }
- $spouselinks .= "'".(($spouse->getDeathDate()->minJD()+$spouse->getDeathDate()->maxJD())/2)."',"; // dod = Date of Death
- $spouselinks .= "''".","; // occu = Occupation
- $spouselinks .= "'".addslashes($spouse->getBirthPlace())."'".","; // birthpl = Individuals Birthplace
- if (isset($pSpouseFBP)) {
- $spouselinks .= "'".addslashes($pSpouseFBP)."'".","; // fbirthpl = Fathers Birthplace
- } else {
- $spouselinks .= "'UNK, UNK, UNK, UNK'".","; // fbirthpl = Fathers Birthplace Not Known
- }
- if (isset($pSpouseMBP)) {
- $spouselinks .= "'".addslashes($pSpouseMBP)."'".","; // mbirthpl = Mothers Birthplace
- } else {
- $spouselinks .= "'UNK, UNK, UNK, UNK'".","; // mbirthpl = Mothers Birthplace Not Known
- }
- if (isset($chBLDarray) && $spouse->getSex()=="F") {
- $chBLDarray = implode("::", $chBLDarray);
- $spouselinks .= "'".$chBLDarray."'"; // Array of Children (name, birthdate, deathdate)
- } else {
- $spouselinks .= "''";
- }
- $spouselinks .= ");\">";
- $spouselinks .= $spouse->getFullName(); // Full Name (Link)
- $spouselinks .= "</a>";
- } else {
- $spouselinks .= WT_I18N::translate('Private');
- }
- $spouselinks .= "</a>";
- if ($spouse->getFullName() != "") {
- $persons = "Yes";
- }
+ // Get Childs marriage status ------------
+ $married="";
+ $marrdate="";
+ $chhusbnam=null;
+ foreach ($child->getSpouseFamilies() as $childfamily) {
+ $marrdate=$childfamily->getMarriageDate();
+ $married = WT_Date::Compare($censdate, $marrdate);
+ if ($childfamily->getHusband()) {
+ $chhusbnam = $childfamily->getHusband()->getAllNames();
}
}
+ // Childs Details -------------------------
+ $spouselinks .= "<li>";
+ if ($child->canDisplayName()) {
+ $nam = $child->getAllNames();
+ $fulln = rtrim($nam[0]['givn'],'*')."&nbsp;".$nam[0]['surname'];
+ $fulln = str_replace("@N.N.", "(".WT_I18N::translate('unknown').")", $fulln);
+ $fulln = str_replace("@P.N.", "(".WT_I18N::translate('unknown').")", $fulln);
+ $givn = rtrim($nam[0]['givn'],'*');
+ $surn = $nam[0]['surname'];
+ $husbnam = null;
+
+ // Get childs married name if available
+ $chfulmn=null;
+ $chnam = $child->getAllNames();
+ if ($chhusbnam[0]['surname']=="@N.N." || $chhusbnam[0]['surname']=="") {
+ // if Husband or his name is not known then use wifes birth name
+ $husbnam = $nam[0]['surname'];
+ } else {
+ $husbnam = $chhusbnam[0]['surname'];
+ }
+ for ($i=0; $i<count($nam); $i++) {
+ if ($chnam[$i]['type']=='_MARNM') {
+ $chfulmn = rtrim($chnam[$i]['givn'],'*')."&nbsp;".$husbnam;
+ }
+ }
- // Children -------------------------------------
- $spouselinks .= "<ul class=\"clist ".$TEXT_DIRECTION."\">";
- foreach ($children as $c=>$child) {
- $cpid = $child->getXref();
- if ($child) {
- $persons="Yes";
-
- //-- Childs Parents ---------------------
- $gparent=WT_Person::getInstance($child->getXref());
- $fams = $gparent->getChildFamilies();
- $chfams = $gparent->getSpouseFamilies();
- foreach ($fams as $family) {
- if (!is_null($family)) {
- $husb = $family->getHusband($gparent);
- $wife = $family->getWife($gparent);
- }
- if ($husb) { $ChildFBP = $husb->getBirthPlace(); }
- if ($wife) { $ChildMBP = $wife->getBirthPlace(); }
- }
-
- // Get Child's Children
- $chBLDarray=Array();
- foreach ($child->getSpouseFamilies() as $childfamily) {
- $chchildren = $childfamily->getChildren();
- foreach ($chchildren as $chchild) {
- $chnam = $chchild->getAllNames();
- $chfulln = rtrim($chnam[0]['givn'],'*')." ".$chnam[0]['surname'];
- $chfulln = str_replace('"', "", $chfulln); // Must remove quotes completely here
- $chfulln = str_replace("@N.N.", "(".WT_I18N::translate('unknown').")", $chfulln);
- $chfulln = str_replace("@P.N.", "(".WT_I18N::translate('unknown').")", $chfulln); // Child's Full Name
- $chdob = ($chchild->getBirthDate()->minJD()+$chchild->getBirthDate()->maxJD())/2; // Child's Date of Birth (Julian)
- $chdod = ($chchild->getDeathDate()->minJD()+$chchild->getDeathDate()->maxJD())/2; // Child's Date of Death (Julian)
- $chBLD = ($chfulln.", ".$chdob.", ".$chdod);
- array_push($chBLDarray, $chBLD);
- }
- }
-
- // Get Childs marriage status ------------
- $married="";
- $marrdate="";
- $chhusbnam=null;
- foreach ($child->getSpouseFamilies() as $childfamily) {
- $marrdate=$childfamily->getMarriageDate();
- $married = WT_Date::Compare($censdate, $marrdate);
- if ($childfamily->getHusband()) {
- $chhusbnam = $childfamily->getHusband()->getAllNames();
- }
+ $spouselinks .= "<a href=\"javascript:insertRowToTable(";
+ $spouselinks .= "'".$child->getXref()."',"; // pid = PID
+ $spouselinks .= "'".addslashes(strip_tags($fulln))."',"; // nam = Name
+ if (isset($chfulmn)) {
+ $spouselinks .= "'".addslashes(strip_tags($chfulmn))."',"; // mnam = Full Married Name
+ } else {
+ $spouselinks .= "'".addslashes(strip_tags($fulln))."',"; // mnam = Full Name
+ }
+ if ($currpid=="Son" || $currpid=="Daughter") {
+ if ($child->getSex()=="M") {
+ $spouselinks .= "'Grand-Son',"; // label = Male Relationship
+ } else {
+ $spouselinks .= "'Grand-Daughter',"; // label = Female Relationship
}
- // Childs Details -------------------------
- $spouselinks .= "<li>";
- if ($child->canDisplayName()) {
- $nam = $child->getAllNames();
- $fulln = rtrim($nam[0]['givn'],'*')."&nbsp;".$nam[0]['surname'];
- $fulln = str_replace("@N.N.", "(".WT_I18N::translate('unknown').")", $fulln);
- $fulln = str_replace("@P.N.", "(".WT_I18N::translate('unknown').")", $fulln);
- $givn = rtrim($nam[0]['givn'],'*');
- $surn = $nam[0]['surname'];
- $husbnam = null;
-
- // Get childs married name if available
- $chfulmn=null;
- $chnam = $child->getAllNames();
- if ($chhusbnam[0]['surname']=="@N.N." || $chhusbnam[0]['surname']=="") {
- // if Husband or his name is not known then use wifes birth name
- $husbnam = $nam[0]['surname'];
- } else {
- $husbnam = $chhusbnam[0]['surname'];
- }
- for ($i=0; $i<count($nam); $i++) {
- if ($chnam[$i]['type']=='_MARNM') {
- $chfulmn = rtrim($chnam[$i]['givn'],'*')."&nbsp;".$husbnam;
- }
- }
-
- $spouselinks .= "<a href=\"javascript:insertRowToTable(";
- $spouselinks .= "'".$child->getXref()."',"; // pid = PID
- $spouselinks .= "'".addslashes(strip_tags($fulln))."',"; // nam = Name
- if (isset($chfulmn)) {
- $spouselinks .= "'".addslashes(strip_tags($chfulmn))."',"; // mnam = Full Married Name
- } else {
- $spouselinks .= "'".addslashes(strip_tags($fulln))."',"; // mnam = Full Name
- }
- if ($currpid=="Son" || $currpid=="Daughter") {
- if ($child->getSex()=="M") {
- $spouselinks .= "'Grand-Son',"; // label = Male Relationship
- } else {
- $spouselinks .= "'Grand-Daughter',"; // label = Female Relationship
- }
- } else {
- if ($child->getSex()=="M") {
- $spouselinks .= "'Nephew',"; // label = Male Relationship
- } else {
- $spouselinks .= "'Niece',"; // label = Female Relationship
- }
- }
- $spouselinks .= "'".$child->getSex()."',"; // sex = Gender
- $spouselinks .= "''".","; // cond = Condition (Married etc)
- if ($marrdate) {
- $spouselinks .= "'".(($marrdate->minJD()+$marrdate->maxJD())/2)."',"; // dom = Date of Marriage (Julian)
- } else {
- $spouselinks .= "'nm'".",";
- }
- $spouselinks .= "'".(($child->getBirthDate()->minJD()+$child->getBirthDate()->maxJD())/2)."',"; // dob = Date of Birth
- if ($child->getbirthyear()>=1) {
- $spouselinks .= "'".$censyear-$child->getbirthyear()."',"; // age = Census Year - Year of Birth
- } else {
- $spouselinks .= "''".","; // age = Undefined
- }
- $spouselinks .= "'".(($child->getDeathDate()->minJD()+$child->getDeathDate()->maxJD())/2)."',"; // dod = Date of Death
- $spouselinks .= "''".","; // occu = Occupation
- $spouselinks .= "'".addslashes($child->getBirthPlace())."'".","; // birthpl = Individuals Birthplace
- if (isset($ChildFBP)) {
- $spouselinks .= "'".addslashes($ChildFBP)."'".","; // fbirthpl = Fathers Birthplace
- } else {
- $spouselinks .= "'UNK, UNK, UNK, UNK'".","; // fbirthpl = Fathers Birthplace Not Known
- }
- if (isset($ChildMBP)) {
- $spouselinks .= "'".addslashes($ChildMBP)."'".","; // mbirthpl = Mothers Birthplace
- } else {
- $spouselinks .= "'UNK, UNK, UNK, UNK'".","; // mbirthpl = Mothers Birthplace Not Known
- }
- if (isset($chBLDarray) && $child->getSex()=="F") {
- $chBLDarray = implode("::", $chBLDarray);
- $spouselinks .= "'".$chBLDarray."'"; // Array of Children (name, birthdate, deathdate)
- } else {
- $spouselinks .= "''";
- }
- $spouselinks .= ");\">";
- $spouselinks .= $child->getFullName(); // Full Name (Link)
- $spouselinks .= "</a>";
- $spouselinks .= "</li>";
+ } else {
+ if ($child->getSex()=="M") {
+ $spouselinks .= "'Nephew',"; // label = Male Relationship
} else {
- $spouselinks .= WT_I18N::translate('Private');
+ $spouselinks .= "'Niece',"; // label = Female Relationship
}
}
+ $spouselinks .= "'".$child->getSex()."',"; // sex = Gender
+ $spouselinks .= "''".","; // cond = Condition (Married etc)
+ if ($marrdate) {
+ $spouselinks .= "'".(($marrdate->minJD()+$marrdate->maxJD())/2)."',"; // dom = Date of Marriage (Julian)
+ } else {
+ $spouselinks .= "'nm'".",";
+ }
+ $spouselinks .= "'".(($child->getBirthDate()->minJD()+$child->getBirthDate()->maxJD())/2)."',"; // dob = Date of Birth
+ if ($child->getbirthyear()>=1) {
+ $spouselinks .= "'".$censyear-$child->getbirthyear()."',"; // age = Census Year - Year of Birth
+ } else {
+ $spouselinks .= "''".","; // age = Undefined
+ }
+ $spouselinks .= "'".(($child->getDeathDate()->minJD()+$child->getDeathDate()->maxJD())/2)."',"; // dod = Date of Death
+ $spouselinks .= "''".","; // occu = Occupation
+ $spouselinks .= "'".addslashes($child->getBirthPlace())."'".","; // birthpl = Individuals Birthplace
+ if (isset($ChildFBP)) {
+ $spouselinks .= "'".addslashes($ChildFBP)."'".","; // fbirthpl = Fathers Birthplace
+ } else {
+ $spouselinks .= "'UNK, UNK, UNK, UNK'".","; // fbirthpl = Fathers Birthplace Not Known
+ }
+ if (isset($ChildMBP)) {
+ $spouselinks .= "'".addslashes($ChildMBP)."'".","; // mbirthpl = Mothers Birthplace
+ } else {
+ $spouselinks .= "'UNK, UNK, UNK, UNK'".","; // mbirthpl = Mothers Birthplace Not Known
+ }
+ if (isset($chBLDarray) && $child->getSex()=="F") {
+ $chBLDarray = implode("::", $chBLDarray);
+ $spouselinks .= "'".$chBLDarray."'"; // Array of Children (name, birthdate, deathdate)
+ } else {
+ $spouselinks .= "''";
+ }
+ $spouselinks .= ");\">";
+ $spouselinks .= $child->getFullName(); // Full Name (Link)
+ $spouselinks .= "</a>";
+ $spouselinks .= "</li>";
+ } else {
+ $spouselinks .= WT_I18N::translate('Private');
}
- $spouselinks .= "</ul>";
}
}
- if ($persons != "Yes") {
- $spouselinks .= "(" . WT_I18N::translate('none') . ")</td></tr></table>";
- } else {
- $spouselinks .= "</td></tr></table>";
- }
+ $spouselinks .= "</ul>";
+ }
+ }
+ if ($persons != "Yes") {
+ $spouselinks .= "(" . WT_I18N::translate('none') . ")</td></tr></table>";
+ } else {
+ $spouselinks .= "</td></tr></table>";
+ }
- if ($person_parent != "Yes") {
- $parentlinks .= "(" . WT_I18N::translate_c('unknown family', 'unknown') . ")</td></tr></table>";
- } else {
- $parentlinks .= "</td></tr></table>";
- }
+ if ($person_parent != "Yes") {
+ $parentlinks .= "(" . WT_I18N::translate_c('unknown family', 'unknown') . ")</td></tr></table>";
+ } else {
+ $parentlinks .= "</td></tr></table>";
+ }
- if ($person_step != "Yes") {
- $step_parentlinks .= "(" . WT_I18N::translate_c('unknown family', 'unknown') . ")</td></tr></table>";
- } else {
- $step_parentlinks .= "</td></tr></table>";
- }
- }
+ if ($person_step != "Yes") {
+ $step_parentlinks .= "(" . WT_I18N::translate_c('unknown family', 'unknown') . ")</td></tr></table>";
+ } else {
+ $step_parentlinks .= "</td></tr></table>";
}
}
}
diff --git a/modules_v3/GEDFact_assistant/_MEDIA/media_1_ctrl.php b/modules_v3/GEDFact_assistant/_MEDIA/media_1_ctrl.php
index 6921dfd60c..d3ff2872ef 100644
--- a/modules_v3/GEDFact_assistant/_MEDIA/media_1_ctrl.php
+++ b/modules_v3/GEDFact_assistant/_MEDIA/media_1_ctrl.php
@@ -1042,7 +1042,7 @@ if ($pid=="") {
* @param int $count on some charts it is important to keep a count of how many boxes were printed
*/
function print_pedigree_person_nav2($pid, $style=1, $count=0, $personcount="1", $currpid, $censyear) {
- global $HIDE_LIVE_PEOPLE, $SHOW_LIVING_NAMES, $ZOOM_BOXES, $LINK_ICONS;
+ global $HIDE_LIVE_PEOPLE, $SHOW_LIVING_NAMES;
global $SHOW_HIGHLIGHT_IMAGES, $bwidth, $bheight, $PEDIGREE_FULL_DETAILS, $SHOW_PEDIGREE_PLACES;
global $TEXT_DIRECTION, $DEFAULT_PEDIGREE_GENERATIONS, $OLD_PGENS, $talloffset, $PEDIGREE_LAYOUT, $MEDIA_DIRECTORY;
global $WT_IMAGES, $ABBREVIATE_CHART_LABELS, $USE_MEDIA_VIEWER;
@@ -1074,365 +1074,361 @@ function print_pedigree_person_nav2($pid, $style=1, $count=0, $personcount="1",
$step_parentlinks = "";
$disp=$person->canDisplayDetails();
- if ($person->canDisplayName()) {
- if (empty($SEARCH_SPIDER)) {
- if ($LINK_ICONS!="disabled") {
- //-- draw a box for the family popup
- if ($TEXT_DIRECTION=="rtl") {
- $spouselinks .= "<table id=\"flyoutFamRTL\" class=\"person_box$isF\"><tr><td class=\"name2 font9 rtl\">";
- $spouselinks .= "<b>" . WT_I18N::translate('Family') . "</b> (" .$person->getFullName(). ")<br />";
- $parentlinks .= "<table id=\"flyoutParRTL\" class=\"person_box$isF\"><tr><td class=\"name2 font9 rtl\">";
- $parentlinks .= "<b>" . WT_I18N::translate('Parents') . "</b> (" .$person->getFullName(). ")<br />";
- $step_parentlinks .= "<table id=\"flyoutStepRTL\" class=\"person_box$isF\"><tr><td class=\"name2 font9 rtl\">";
- $step_parentlinks .= "<b>" . WT_I18N::translate('Parents') . "</b> (" .$person->getFullName(). ")<br />";
- } else {
- $spouselinks .= "<table id=\"flyoutFam\" class=\"person_box$isF\"><tr><td class=\"name2 font9 ltr\">";
- $spouselinks .= "<b>" . WT_I18N::translate('Family') . "</b> (" .$person->getFullName(). ")<br />";
- $parentlinks .= "<table id=\"flyoutPar\" class=\"person_box$isF\"><tr><td class=\"name2 font9 ltr\">";
- $parentlinks .= "<b>" . WT_I18N::translate('Parents') . "</b> (" .$person->getFullName(). ")<br />";
- $step_parentlinks .= "<table id=\"flyoutStep\" class=\"person_box$isF\"><tr><td class=\"name2 font9 ltr\">";
- $step_parentlinks .= "<b>" . WT_I18N::translate('Parents') . "</b> (" .$person->getFullName(). ")<br />";
- }
- $persons = "";
- $person_parent = "";
- $person_step = "";
-
- //-- parent families --------------------------------------
- foreach ($person->getChildFamilies() as $family) {
+ if ($person->canDisplayName() && !$SEARCH_SPIDER) {
+ //-- draw a box for the family popup
+ if ($TEXT_DIRECTION=="rtl") {
+ $spouselinks .= "<table id=\"flyoutFamRTL\" class=\"person_box$isF\"><tr><td class=\"name2 font9 rtl\">";
+ $spouselinks .= "<b>" . WT_I18N::translate('Family') . "</b> (" .$person->getFullName(). ")<br />";
+ $parentlinks .= "<table id=\"flyoutParRTL\" class=\"person_box$isF\"><tr><td class=\"name2 font9 rtl\">";
+ $parentlinks .= "<b>" . WT_I18N::translate('Parents') . "</b> (" .$person->getFullName(). ")<br />";
+ $step_parentlinks .= "<table id=\"flyoutStepRTL\" class=\"person_box$isF\"><tr><td class=\"name2 font9 rtl\">";
+ $step_parentlinks .= "<b>" . WT_I18N::translate('Parents') . "</b> (" .$person->getFullName(). ")<br />";
+ } else {
+ $spouselinks .= "<table id=\"flyoutFam\" class=\"person_box$isF\"><tr><td class=\"name2 font9 ltr\">";
+ $spouselinks .= "<b>" . WT_I18N::translate('Family') . "</b> (" .$person->getFullName(). ")<br />";
+ $parentlinks .= "<table id=\"flyoutPar\" class=\"person_box$isF\"><tr><td class=\"name2 font9 ltr\">";
+ $parentlinks .= "<b>" . WT_I18N::translate('Parents') . "</b> (" .$person->getFullName(). ")<br />";
+ $step_parentlinks .= "<table id=\"flyoutStep\" class=\"person_box$isF\"><tr><td class=\"name2 font9 ltr\">";
+ $step_parentlinks .= "<b>" . WT_I18N::translate('Parents') . "</b> (" .$person->getFullName(). ")<br />";
+ }
+ $persons = '';
+ $person_parent = '';
+ $person_step = '';
- if (!is_null($family)) {
- $husb = $family->getHusband($person);
- $wife = $family->getWife($person);
- // $spouse = $family->getSpouse($person);
- $children = $family->getChildren();
- $num = count($children);
- $marrdate = $family->getMarriageDate();
+ //-- parent families --------------------------------------
+ foreach ($person->getChildFamilies() as $family) {
- // Husband ------------------------------
- if ($husb || $num>0) {
- if ($husb) {
- $person_parent="Yes";
- $tmp=$husb->getXref();
- if ($husb->canDisplayName()) {
- $nam = $husb->getAllNames();
- // $fulln = rtrim($nam[0]['givn'],'*')."&nbsp;".$nam[0]['surn'];
- $fulln = $husb->getFullName();
- $givn = rtrim($nam[0]['givn'],'*');
- $surn = $nam[0]['surn'];
- if (isset($nam[1]) ) {
- $fulmn = rtrim($nam[1]['givn'],'*')."&nbsp;".$nam[1]['surn'];
- $marn = $nam[1]['surn'];
- }
- $parentlinks .= "<a href=\"javascript:opener.insertRowToTable(";
- $parentlinks .= "'".$husb->getXref()."', "; // pid = PID
- $parentlinks .= "'".$fulln."', "; // nam = Name
- if ($currpid=="Wife" || $currpid=="Husband") {
- $parentlinks .= "'Father in Law', "; // label = 1st Gen Male Relationship
- } else {
- $parentlinks .= "'Grand-Father', "; // label = 2st Gen Male Relationship
- }
- $parentlinks .= "'".$husb->getSex()."', "; // sex = Gender
- $parentlinks .= "''".", "; // cond = Condition (Married etc)
- $parentlinks .= "'".$husb->getbirthyear()."', "; // yob = Year of Birth
- if ($husb->getbirthyear()>=1) {
- $parentlinks .= "'".$censyear-$husb->getbirthyear()."', "; // age = Census Year - Year of Birth
- } else {
- $parentlinks .= "''".", "; // age = Undefined
- }
- $parentlinks .= "'Y'".", "; // Y/M/D = Age in Years/Months/Days
- $parentlinks .= "''".", "; // occu = Occupation
- $parentlinks .= "'".$husb->getcensbirthplace()."'"; // birthpl = Birthplace
- $parentlinks .= ");\">";
- $parentlinks .= $husb->getFullName();
- $parentlinks .= "</a>";
+ if (!is_null($family)) {
+ $husb = $family->getHusband($person);
+ $wife = $family->getWife($person);
+ // $spouse = $family->getSpouse($person);
+ $children = $family->getChildren();
+ $num = count($children);
+ $marrdate = $family->getMarriageDate();
- } else {
- $parentlinks .= WT_I18N::translate('Private');
- }
- $natdad = "yes";
+ // Husband ------------------------------
+ if ($husb || $num>0) {
+ if ($husb) {
+ $person_parent="Yes";
+ $tmp=$husb->getXref();
+ if ($husb->canDisplayName()) {
+ $nam = $husb->getAllNames();
+ // $fulln = rtrim($nam[0]['givn'],'*')."&nbsp;".$nam[0]['surn'];
+ $fulln = $husb->getFullName();
+ $givn = rtrim($nam[0]['givn'],'*');
+ $surn = $nam[0]['surn'];
+ if (isset($nam[1]) ) {
+ $fulmn = rtrim($nam[1]['givn'],'*')."&nbsp;".$nam[1]['surn'];
+ $marn = $nam[1]['surn'];
+ }
+ $parentlinks .= "<a href=\"javascript:opener.insertRowToTable(";
+ $parentlinks .= "'".$husb->getXref()."', "; // pid = PID
+ $parentlinks .= "'".$fulln."', "; // nam = Name
+ if ($currpid=="Wife" || $currpid=="Husband") {
+ $parentlinks .= "'Father in Law', "; // label = 1st Gen Male Relationship
+ } else {
+ $parentlinks .= "'Grand-Father', "; // label = 2st Gen Male Relationship
}
+ $parentlinks .= "'".$husb->getSex()."', "; // sex = Gender
+ $parentlinks .= "''".", "; // cond = Condition (Married etc)
+ $parentlinks .= "'".$husb->getbirthyear()."', "; // yob = Year of Birth
+ if ($husb->getbirthyear()>=1) {
+ $parentlinks .= "'".$censyear-$husb->getbirthyear()."', "; // age = Census Year - Year of Birth
+ } else {
+ $parentlinks .= "''".", "; // age = Undefined
+ }
+ $parentlinks .= "'Y'".", "; // Y/M/D = Age in Years/Months/Days
+ $parentlinks .= "''".", "; // occu = Occupation
+ $parentlinks .= "'".$husb->getcensbirthplace()."'"; // birthpl = Birthplace
+ $parentlinks .= ");\">";
+ $parentlinks .= $husb->getFullName();
+ $parentlinks .= "</a>";
+
+ } else {
+ $parentlinks .= WT_I18N::translate('Private');
}
+ $natdad = "yes";
+ }
+ }
- // Wife ------------------------------
- if ($wife || $num>0) {
- if ($wife) {
- $person_parent="Yes";
- $tmp=$wife->getXref();
- if ($wife->canDisplayName()) {
- $married = WT_Date::Compare($censdate, $marrdate);
- $nam = $wife->getAllNames();
- $fulln = rtrim($nam[0]['givn'],'*')."&nbsp;".$nam[0]['surname'];
- $givn = rtrim($nam[0]['givn'],'*');
- $surn = $nam[0]['surname'];
- if (isset($nam[1])) {
- //$fulmn = rtrim($nam[1]['givn'],'*')."&nbsp;".$nam[1]['surname'];
- $fulmn = $nam[1]['fullNN'];
- $marn = $nam[1]['surname'];
- }
- $parentlinks .= "<a href=\"javascript:opener.insertRowToTable(";
- $parentlinks .= "'".$wife->getXref()."',"; // pid = PID
- // $parentlinks .= "'".$fulln."',"; // nam = Name
+ // Wife ------------------------------
+ if ($wife || $num>0) {
+ if ($wife) {
+ $person_parent="Yes";
+ $tmp=$wife->getXref();
+ if ($wife->canDisplayName()) {
+ $married = WT_Date::Compare($censdate, $marrdate);
+ $nam = $wife->getAllNames();
+ $fulln = rtrim($nam[0]['givn'],'*')."&nbsp;".$nam[0]['surname'];
+ $givn = rtrim($nam[0]['givn'],'*');
+ $surn = $nam[0]['surname'];
+ if (isset($nam[1])) {
+ //$fulmn = rtrim($nam[1]['givn'],'*')."&nbsp;".$nam[1]['surname'];
+ $fulmn = $nam[1]['fullNN'];
+ $marn = $nam[1]['surname'];
+ }
+ $parentlinks .= "<a href=\"javascript:opener.insertRowToTable(";
+ $parentlinks .= "'".$wife->getXref()."',"; // pid = PID
+ // $parentlinks .= "'".$fulln."',"; // nam = Name
- //if ($married>=0 && isset($nam[1])) {
- // $parentlinks .= "'".$fulmn."',"; // nam = Full Married Name
- //} else {
- $parentlinks .= "'".$fulln."',"; // nam = Full Name
- //}
+ //if ($married>=0 && isset($nam[1])) {
+ // $parentlinks .= "'".$fulmn."',"; // nam = Full Married Name
+ //} else {
+ $parentlinks .= "'".$fulln."',"; // nam = Full Name
+ //}
- if ($currpid=="Wife" || $currpid=="Husband") {
- $parentlinks .= "'Mother in Law',"; // label = 1st Gen Female Relationship
- } else {
- $parentlinks .= "'Grand-Mother',"; // label = 2st Gen Female Relationship
- }
- $parentlinks .= "'".$wife->getSex()."',"; // sex = Gender
- $parentlinks .= "''".","; // cond = Condition (Married etc)
- $parentlinks .= "'".$wife->getbirthyear()."',"; // yob = Year of Birth
- if ($wife->getbirthyear()>=1) {
- $parentlinks .= "'".$censyear-$wife->getbirthyear()."',"; // age = Census Year - Year of Birth
- } else {
- $parentlinks .= "''".","; // age = Undefined
- }
- $parentlinks .= "'Y'".","; // Y/M/D = Age in Years/Months/Days
- $parentlinks .= "''".","; // occu = Occupation
- $parentlinks .= "'".$wife->getcensbirthplace()."'"; // birthpl = Birthplace
- //$parentlinks .= ");\"><div id='wifePar'>";
- $parentlinks .= ");\">";
- //if ($married>=0 && isset($nam[1])) {
- // $parentlinks .= $fulmn; // Full Married Name
- //} else {
- $parentlinks .= $wife->getFullName(); // Full Name
- //}
- // $parentlinks .= "</div></a>";
- $parentlinks .= "</a>";
- } else {
- $parentlinks .= WT_I18N::translate('Private');
- }
- $parentlinks .= "<br />";
- $natmom = "yes";
+ if ($currpid=="Wife" || $currpid=="Husband") {
+ $parentlinks .= "'Mother in Law',"; // label = 1st Gen Female Relationship
+ } else {
+ $parentlinks .= "'Grand-Mother',"; // label = 2st Gen Female Relationship
+ }
+ $parentlinks .= "'".$wife->getSex()."',"; // sex = Gender
+ $parentlinks .= "''".","; // cond = Condition (Married etc)
+ $parentlinks .= "'".$wife->getbirthyear()."',"; // yob = Year of Birth
+ if ($wife->getbirthyear()>=1) {
+ $parentlinks .= "'".$censyear-$wife->getbirthyear()."',"; // age = Census Year - Year of Birth
+ } else {
+ $parentlinks .= "''".","; // age = Undefined
}
+ $parentlinks .= "'Y'".","; // Y/M/D = Age in Years/Months/Days
+ $parentlinks .= "''".","; // occu = Occupation
+ $parentlinks .= "'".$wife->getcensbirthplace()."'"; // birthpl = Birthplace
+ //$parentlinks .= ");\"><div id='wifePar'>";
+ $parentlinks .= ");\">";
+ //if ($married>=0 && isset($nam[1])) {
+ // $parentlinks .= $fulmn; // Full Married Name
+ //} else {
+ $parentlinks .= $wife->getFullName(); // Full Name
+ //}
+ // $parentlinks .= "</div></a>";
+ $parentlinks .= "</a>";
+ } else {
+ $parentlinks .= WT_I18N::translate('Private');
}
+ $parentlinks .= "<br />";
+ $natmom = "yes";
}
}
+ }
+ }
- //-- step families -----------------------------------------
- $fams = $person->getChildStepFamilies();
- foreach ($fams as $family) {
- if (!is_null($family)) {
- $husb = $family->getHusband($person);
- $wife = $family->getWife($person);
- // $spouse = $family->getSpouse($person);
- $children = $family->getChildren();
- $num = count($children);
- $marrdate = $family->getMarriageDate();
-
- if ($natdad == "yes") {
- } else {
- // Husband -----------------------
- if (($husb || $num>0) && $husb->getLabel() != ".") {
- if ($husb) {
- $person_step="Yes";
- $tmp=$husb->getXref();
- if ($husb->canDisplayName()) {
- $nam = $husb->getAllNames();
- $fulln = rtrim($nam[0]['givn'],'*')."&nbsp;".$nam[0]['surname'];
- //$fulln = $husb->getFullName();
- $givn = rtrim($nam[0]['givn'],'*');
- $surn = $nam[0]['surname'];
- if (isset($nam[1])) {
- $fulmn = rtrim($nam[1]['givn'],'*')."&nbsp;".$nam[1]['surname'];
- $marn = $nam[1]['surname'];
- }
+ //-- step families -----------------------------------------
+ $fams = $person->getChildStepFamilies();
+ foreach ($fams as $family) {
+ if (!is_null($family)) {
+ $husb = $family->getHusband($person);
+ $wife = $family->getWife($person);
+ // $spouse = $family->getSpouse($person);
+ $children = $family->getChildren();
+ $num = count($children);
+ $marrdate = $family->getMarriageDate();
- $parentlinks .= "<a href=\"individual.php?pid={$tmp}&amp;tab={$tabno}&amp;gedcom=".WT_GEDURL."\">";
- $parentlinks .= $husb->getFullName();
- $parentlinks .= "</a>";
- } else {
- $parentlinks .= WT_I18N::translate('Private');
- }
- $parentlinks .= "<br />";
+ if ($natdad == "yes") {
+ } else {
+ // Husband -----------------------
+ if (($husb || $num>0) && $husb->getLabel() != ".") {
+ if ($husb) {
+ $person_step="Yes";
+ $tmp=$husb->getXref();
+ if ($husb->canDisplayName()) {
+ $nam = $husb->getAllNames();
+ $fulln = rtrim($nam[0]['givn'],'*')."&nbsp;".$nam[0]['surname'];
+ //$fulln = $husb->getFullName();
+ $givn = rtrim($nam[0]['givn'],'*');
+ $surn = $nam[0]['surname'];
+ if (isset($nam[1])) {
+ $fulmn = rtrim($nam[1]['givn'],'*')."&nbsp;".$nam[1]['surname'];
+ $marn = $nam[1]['surname'];
}
+
+ $parentlinks .= "<a href=\"individual.php?pid={$tmp}&amp;tab={$tabno}&amp;gedcom=".WT_GEDURL."\">";
+ $parentlinks .= $husb->getFullName();
+ $parentlinks .= "</a>";
+ } else {
+ $parentlinks .= WT_I18N::translate('Private');
}
+ $parentlinks .= "<br />";
}
+ }
+ }
- if ($natmom == "yes") {
- } else {
- // Wife ----------------------------
- if ($wife || $num>0) {
- if ($wife) {
- $person_step="Yes";
- $tmp=$wife->getXref();
- if ($wife->canDisplayName()) {
- $married = WT_Date::Compare($censdate, $marrdate);
- $nam = $wife->getAllNames();
- $fulln = rtrim($nam[0]['givn'],'*')."&nbsp;".$nam[0]['surname'];
- $givn = rtrim($nam[0]['givn'],'*');
- $surn = $nam[0]['surname'];
- if (isset($nam[1])) {
- $fulmn = rtrim($nam[1]['givn'],'*')."&nbsp;".$nam[1]['surname'];
- $marn = $nam[1]['surname'];
- }
- $parentlinks .= "<a href=\"individual.php?pid={$tmp}&amp;tab={$tabno}&amp;gedcom=".WT_GEDURL."\">";
- $parentlinks .= $wife->getFullName();
- $parentlinks .= "</a>";
- } else {
- $parentlinks .= WT_I18N::translate('Private');
- }
- $parentlinks .= "<br />";
+ if ($natmom == "yes") {
+ } else {
+ // Wife ----------------------------
+ if ($wife || $num>0) {
+ if ($wife) {
+ $person_step="Yes";
+ $tmp=$wife->getXref();
+ if ($wife->canDisplayName()) {
+ $married = WT_Date::Compare($censdate, $marrdate);
+ $nam = $wife->getAllNames();
+ $fulln = rtrim($nam[0]['givn'],'*')."&nbsp;".$nam[0]['surname'];
+ $givn = rtrim($nam[0]['givn'],'*');
+ $surn = $nam[0]['surname'];
+ if (isset($nam[1])) {
+ $fulmn = rtrim($nam[1]['givn'],'*')."&nbsp;".$nam[1]['surname'];
+ $marn = $nam[1]['surname'];
}
+ $parentlinks .= "<a href=\"individual.php?pid={$tmp}&amp;tab={$tabno}&amp;gedcom=".WT_GEDURL."\">";
+ $parentlinks .= $wife->getFullName();
+ $parentlinks .= "</a>";
+ } else {
+ $parentlinks .= WT_I18N::translate('Private');
}
+ $parentlinks .= "<br />";
}
}
}
+ }
+ }
- // Spouse Families -------------------------------------- @var $family Family
- foreach ($person->getSpouseFamilies() as $family) {
- if (!is_null($family)) {
- $spouse = $family->getSpouse($person);
- $children = $family->getChildren();
- $num = count($children);
- $marrdate = $family->getMarriageDate();
+ // Spouse Families -------------------------------------- @var $family Family
+ foreach ($person->getSpouseFamilies() as $family) {
+ if (!is_null($family)) {
+ $spouse = $family->getSpouse($person);
+ $children = $family->getChildren();
+ $num = count($children);
+ $marrdate = $family->getMarriageDate();
- // Spouse ------------------------------
- if ($spouse || $num>0) {
- if ($spouse) {
- $tmp=$spouse->getXref();
- if ($spouse->canDisplayName()) {
- $married = WT_Date::Compare($censdate, $marrdate);
- $nam = $spouse->getAllNames();
- $fulln = rtrim($nam[0]['givn'],'*')."&nbsp;".$nam[0]['surname'];
- $givn = rtrim($nam[0]['givn'],'*');
- $surn = $nam[0]['surname'];
- if (isset($nam[1])) {
- $fulmn = rtrim($nam[1]['givn'],'*')."&nbsp;".$nam[1]['surname'];
- $marn = $nam[1]['surname'];
- }
- $spouselinks .= "<a href=\"javascript:opener.insertRowToTable(";
- $spouselinks .= "'".$spouse->getXref()."',"; // pid = PID
- //$spouselinks .= "'".$fulln."',"; // nam = Name
- //if ($married>=0 && isset($nam[1])) {
- // $spouselinks .= "'".$fulmn."',"; // Full Married Name
- //} else {
- $spouselinks .= "'".$spouse->getFullName()."',"; // Full Name
- //}
- if ($currpid=="Son" || $currpid=="Daughter") {
- if ($spouse->getSex()=="M") {
- $spouselinks .= "'Son in Law',"; // label = Male Relationship
- } else {
- $spouselinks .= "'Daughter in Law',"; // label = Female Relationship
- }
- } else {
- if ($spouse->getSex()=="M") {
- $spouselinks .= "'Brother in Law',"; // label = Male Relationship
- } else {
- $spouselinks .= "'Sister in Law',"; // label = Female Relationship
- }
- }
- $spouselinks .= "'".$spouse->getSex()."',"; // sex = Gender
- $spouselinks .= "''".","; // cond = Condition (Married etc)
- $spouselinks .= "'".$spouse->getbirthyear()."',"; // yob = Year of Birth
- if ($spouse->getbirthyear()>=1) {
- $spouselinks .= "'".$censyear-$spouse->getbirthyear()."',"; // age = Census Year - Year of Birth
- } else {
- $spouselinks .= "''".","; // age = Undefined
- }
- $spouselinks .= "'Y'".","; // Y/M/D = Age in Years/Months/Days
- $spouselinks .= "''".","; // occu = Occupation
- $spouselinks .= "'".$spouse->getcensbirthplace()."'"; // birthpl = Birthplace
- $spouselinks .= ");\">";
- // $spouselinks .= $fulln;
- //if ($married>=0 && isset($nam[1])) {
- // $spouselinks .= "'".$fulmn."',"; // Full Married Name
- //} else {
- $spouselinks .= $spouse->getFullName(); // Full Name
- //}
- $spouselinks .= "</a>";
+ // Spouse ------------------------------
+ if ($spouse || $num>0) {
+ if ($spouse) {
+ $tmp=$spouse->getXref();
+ if ($spouse->canDisplayName()) {
+ $married = WT_Date::Compare($censdate, $marrdate);
+ $nam = $spouse->getAllNames();
+ $fulln = rtrim($nam[0]['givn'],'*')."&nbsp;".$nam[0]['surname'];
+ $givn = rtrim($nam[0]['givn'],'*');
+ $surn = $nam[0]['surname'];
+ if (isset($nam[1])) {
+ $fulmn = rtrim($nam[1]['givn'],'*')."&nbsp;".$nam[1]['surname'];
+ $marn = $nam[1]['surname'];
+ }
+ $spouselinks .= "<a href=\"javascript:opener.insertRowToTable(";
+ $spouselinks .= "'".$spouse->getXref()."',"; // pid = PID
+ //$spouselinks .= "'".$fulln."',"; // nam = Name
+ //if ($married>=0 && isset($nam[1])) {
+ // $spouselinks .= "'".$fulmn."',"; // Full Married Name
+ //} else {
+ $spouselinks .= "'".$spouse->getFullName()."',"; // Full Name
+ //}
+ if ($currpid=="Son" || $currpid=="Daughter") {
+ if ($spouse->getSex()=="M") {
+ $spouselinks .= "'Son in Law',"; // label = Male Relationship
} else {
- $spouselinks .= WT_I18N::translate('Private');
+ $spouselinks .= "'Daughter in Law',"; // label = Female Relationship
}
- $spouselinks .= "</a>";
- if ($spouse->getFullName() != "") {
- $persons = "Yes";
+ } else {
+ if ($spouse->getSex()=="M") {
+ $spouselinks .= "'Brother in Law',"; // label = Male Relationship
+ } else {
+ $spouselinks .= "'Sister in Law',"; // label = Female Relationship
}
}
+ $spouselinks .= "'".$spouse->getSex()."',"; // sex = Gender
+ $spouselinks .= "''".","; // cond = Condition (Married etc)
+ $spouselinks .= "'".$spouse->getbirthyear()."',"; // yob = Year of Birth
+ if ($spouse->getbirthyear()>=1) {
+ $spouselinks .= "'".$censyear-$spouse->getbirthyear()."',"; // age = Census Year - Year of Birth
+ } else {
+ $spouselinks .= "''".","; // age = Undefined
+ }
+ $spouselinks .= "'Y'".","; // Y/M/D = Age in Years/Months/Days
+ $spouselinks .= "''".","; // occu = Occupation
+ $spouselinks .= "'".$spouse->getcensbirthplace()."'"; // birthpl = Birthplace
+ $spouselinks .= ");\">";
+ // $spouselinks .= $fulln;
+ //if ($married>=0 && isset($nam[1])) {
+ // $spouselinks .= "'".$fulmn."',"; // Full Married Name
+ //} else {
+ $spouselinks .= $spouse->getFullName(); // Full Name
+ //}
+ $spouselinks .= "</a>";
+ } else {
+ $spouselinks .= WT_I18N::translate('Private');
}
-
- // Children ------------------------------ @var $child Person
- $spouselinks .= "<div id='spouseFam'>";
- $spouselinks .= "<ul class=\"clist ".$TEXT_DIRECTION."\">";
- foreach ($children as $c=>$child) {
- $cpid = $child->getXref();
- if ($child) {
- $persons="Yes";
- if ($child->canDisplayName()) {
- $nam = $child->getAllNames();
- $fulln = rtrim($nam[0]['givn'],'*')."&nbsp;".$nam[0]['surname'];
- $givn = rtrim($nam[0]['givn'],'*');
- $surn = $nam[0]['surname'];
- if (isset($nam[1])) {
- $fulmn = rtrim($nam[1]['givn'],'*')."&nbsp;".$nam[1]['surname'];
- $marn = $nam[1]['surname'];
- }
- $spouselinks .= "<li>";
- $spouselinks .= "<a href=\"javascript:opener.insertRowToTable(";
- $spouselinks .= "'".$child->getXref()."',"; // pid = PID
- //$spouselinks .= "'".$child->getFullName()."',"; // nam = Name
- $spouselinks .= "'".$fulln."',"; // nam = Name
- if ($currpid=="Son" || $currpid=="Daughter") {
- if ($child->getSex()=="M") {
- $spouselinks .= "'Grand-Son',"; // label = Male Relationship
- } else {
- $spouselinks .= "'Grand-Daughter',"; // label = Female Relationship
- }
- } else {
- if ($child->getSex()=="M") {
- $spouselinks .= "'Nephew',"; // label = Male Relationship
- } else {
- $spouselinks .= "'Niece',"; // label = Female Relationship
- }
- }
- $spouselinks .= "'".$child->getSex()."',"; // sex = Gender
- $spouselinks .= "''".","; // cond = Condition (Married etc)
- $spouselinks .= "'".$child->getbirthyear()."',"; // yob = Year of Birth
- if ($child->getbirthyear()>=1) {
- $spouselinks .= "'".$censyear-$child->getbirthyear()."',"; // age = Census Year - Year of Birth
- } else {
- $spouselinks .= "''".","; // age = Undefined
- }
- $spouselinks .= "'Y'".","; // Y/M/D = Age in Years/Months/Days
- $spouselinks .= "''".","; // occu = Occupation
- $spouselinks .= "'".$child->getcensbirthplace()."'"; // birthpl = Birthplace
- $spouselinks .= ");\">";
- $spouselinks .= $child->getFullName(); // Full Name
- $spouselinks .= "</a>";
- } else {
- $spouselinks .= WT_I18N::translate('Private');
- }
- $spouselinks .= "</li>";
- }
+ $spouselinks .= "</a>";
+ if ($spouse->getFullName() != "") {
+ $persons = "Yes";
}
- $spouselinks .= "</ul>";
- $spouselinks .= "</div>";
}
}
- if ($persons != "Yes") {
- $spouselinks .= "(" . WT_I18N::translate('none') . ")</td></tr></table>";
- } else {
- $spouselinks .= "</td></tr></table>";
+ // Children ------------------------------ @var $child Person
+ $spouselinks .= "<div id='spouseFam'>";
+ $spouselinks .= "<ul class=\"clist ".$TEXT_DIRECTION."\">";
+ foreach ($children as $c=>$child) {
+ $cpid = $child->getXref();
+ if ($child) {
+ $persons="Yes";
+ if ($child->canDisplayName()) {
+ $nam = $child->getAllNames();
+ $fulln = rtrim($nam[0]['givn'],'*')."&nbsp;".$nam[0]['surname'];
+ $givn = rtrim($nam[0]['givn'],'*');
+ $surn = $nam[0]['surname'];
+ if (isset($nam[1])) {
+ $fulmn = rtrim($nam[1]['givn'],'*')."&nbsp;".$nam[1]['surname'];
+ $marn = $nam[1]['surname'];
+ }
+ $spouselinks .= "<li>";
+ $spouselinks .= "<a href=\"javascript:opener.insertRowToTable(";
+ $spouselinks .= "'".$child->getXref()."',"; // pid = PID
+ //$spouselinks .= "'".$child->getFullName()."',"; // nam = Name
+ $spouselinks .= "'".$fulln."',"; // nam = Name
+ if ($currpid=="Son" || $currpid=="Daughter") {
+ if ($child->getSex()=="M") {
+ $spouselinks .= "'Grand-Son',"; // label = Male Relationship
+ } else {
+ $spouselinks .= "'Grand-Daughter',"; // label = Female Relationship
+ }
+ } else {
+ if ($child->getSex()=="M") {
+ $spouselinks .= "'Nephew',"; // label = Male Relationship
+ } else {
+ $spouselinks .= "'Niece',"; // label = Female Relationship
+ }
+ }
+ $spouselinks .= "'".$child->getSex()."',"; // sex = Gender
+ $spouselinks .= "''".","; // cond = Condition (Married etc)
+ $spouselinks .= "'".$child->getbirthyear()."',"; // yob = Year of Birth
+ if ($child->getbirthyear()>=1) {
+ $spouselinks .= "'".$censyear-$child->getbirthyear()."',"; // age = Census Year - Year of Birth
+ } else {
+ $spouselinks .= "''".","; // age = Undefined
+ }
+ $spouselinks .= "'Y'".","; // Y/M/D = Age in Years/Months/Days
+ $spouselinks .= "''".","; // occu = Occupation
+ $spouselinks .= "'".$child->getcensbirthplace()."'"; // birthpl = Birthplace
+ $spouselinks .= ");\">";
+ $spouselinks .= $child->getFullName(); // Full Name
+ $spouselinks .= "</a>";
+ } else {
+ $spouselinks .= WT_I18N::translate('Private');
+ }
+ $spouselinks .= "</li>";
+ }
}
+ $spouselinks .= "</ul>";
+ $spouselinks .= "</div>";
+ }
+ }
- if ($person_parent != "Yes") {
- $parentlinks .= "(" . WT_I18N::translate_c('unknown family', 'unknown') . ")</td></tr></table>";
- } else {
- $parentlinks .= "</td></tr></table>";
- }
+ if ($persons != "Yes") {
+ $spouselinks .= "(" . WT_I18N::translate('none') . ")</td></tr></table>";
+ } else {
+ $spouselinks .= "</td></tr></table>";
+ }
- if ($person_step != "Yes") {
- $step_parentlinks .= "(" . WT_I18N::translate_c('unknown family', 'unknown') . ")</td></tr></table>";
- } else {
- $step_parentlinks .= "</td></tr></table>";
- }
- }
+ if ($person_parent != "Yes") {
+ $parentlinks .= "(" . WT_I18N::translate_c('unknown family', 'unknown') . ")</td></tr></table>";
+ } else {
+ $parentlinks .= "</td></tr></table>";
+ }
+
+ if ($person_step != "Yes") {
+ $step_parentlinks .= "(" . WT_I18N::translate_c('unknown family', 'unknown') . ")</td></tr></table>";
+ } else {
+ $step_parentlinks .= "</td></tr></table>";
}
}
}