/** * print the parents table for a family * * @param string $famid family gedcom ID * @param int $sosa optional child sosa number * @param string $label optional indi label (descendancy booklet) * @param string $parid optional parent ID (descendancy booklet) * @param string $gparid optional gd-parent ID (descendancy booklet) */ function print_family_parents($famid, $sosa = 0, $label = "", $parid = "", $gparid = "", $personcount = "1") { global $pgv_lang, $view, $show_full, $show_famlink; global $TEXT_DIRECTION, $SHOW_EMPTY_BOXES, $SHOW_ID_NUMBERS, $LANGUAGE; global $pbwidth, $pbheight; global $PGV_IMAGE_DIR, $PGV_IMAGES; global $show_changes, $pgv_changes, $GEDCOM; $family = Family::getInstance($famid); if (is_null($family)) { return; } $husb = $family->getHusband(); if (is_null($husb)) { $husb = new Person(''); } $wife = $family->getWife(); if (is_null($wife)) { $wife = new Person(''); } if (!is_null($husb)) { $tempID = $husb->getXref(); if (!empty($tempID)) { print "<a name=\"{$tempID}\"></a>\r\n"; } } if (!is_null($wife)) { $tempID = $wife->getXref(); if (!empty($tempID)) { print "<a name=\"{$tempID}\"></a>\r\n"; } } print_family_header($famid); // -- get the new record and parents if in editing show changes mode if (PGV_USER_CAN_EDIT && isset($pgv_changes[$famid . "_" . $GEDCOM])) { $newrec = find_updated_record($famid); $newparents = find_parents_in_record($newrec); } /** * husband side */ print "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tr><td rowspan=\"2\">"; print "<span class=\"subheaders\">" . get_sosa_name($sosa * 2) . "</span>"; print "\n\t<table style=\"width: " . $pbwidth . "px; height: " . $pbheight . "px;\" border=\"0\"><tr>"; if ($parid) { if ($husb->getXref() == $parid) { print_sosa_number($label); } else { print_sosa_number($label, "", "blank"); } } else { if ($sosa > 0) { print_sosa_number($sosa * 2); } } if (isset($newparents) && $husb->getXref() != $newparents["HUSB"]) { print "\n\t<td valign=\"top\" class=\"facts_valueblue\">"; print_pedigree_person($newparents['HUSB'], 1, $show_famlink, 2, $personcount); } else { print "\n\t<td valign=\"top\">"; print_pedigree_person($husb->getXref(), 1, $show_famlink, 2, $personcount); } print "</td></tr></table>"; print "</td>\n"; // husband's parents $hfams = $husb->getChildFamilies(); $hparents = false; $upfamid = ""; if (count($hfams) > 0 or $sosa != 0 and $SHOW_EMPTY_BOXES) { print "<td rowspan=\"2\"><img src=\"" . $PGV_IMAGE_DIR . "/" . $PGV_IMAGES["hline"]["other"] . "\" alt=\"\" /></td><td rowspan=\"2\"><img src=\"" . $PGV_IMAGE_DIR . "/" . $PGV_IMAGES["vline"]["other"] . "\" width=\"3\" height=\"" . $pbheight . "\" alt=\"\" /></td>"; print "<td><img src=\"" . $PGV_IMAGE_DIR . "/" . $PGV_IMAGES["hline"]["other"] . "\" alt=\"\" /></td><td>"; $hparents = false; foreach ($hfams as $hfamid => $hfamily) { if (!is_null($hfamily)) { $hparents = find_parents_in_record($hfamily->getGedcomRecord()); $upfamid = $hfamid; break; } } if ($hparents or $sosa != 0 and $SHOW_EMPTY_BOXES) { // husband's father print "\n\t<table style=\"width: " . $pbwidth . "px; height: " . $pbheight . "px;\" border=\"0\"><tr>"; if ($sosa > 0) { print_sosa_number($sosa * 4, $hparents['HUSB'], "down"); } if (!empty($gparid) and $hparents['HUSB'] == $gparid) { print_sosa_number(trim(substr($label, 0, -3), ".") . "."); } print "\n\t<td valign=\"top\">"; print_pedigree_person($hparents['HUSB'], 1, $show_famlink, 4, $personcount); print "</td></tr></table>"; } print "</td>"; } if (!empty($upfamid) and $sosa != -1 and $view != "preview") { print "<td valign=\"middle\" rowspan=\"2\">"; print_url_arrow($upfamid, $sosa == 0 ? "?famid={$upfamid}&show_full={$show_full}" : "#{$upfamid}", "{$upfamid}", 1); print "</td>\n"; } if ($hparents or $sosa != 0 and $SHOW_EMPTY_BOXES) { // husband's mother print "</tr><tr><td><img src=\"" . $PGV_IMAGE_DIR . "/" . $PGV_IMAGES["hline"]["other"] . "\" alt=\"\" /></td><td>"; print "\n\t<table style=\"width: " . $pbwidth . "px; height: " . $pbheight . "px;\" border=\"0\"><tr>"; if ($sosa > 0) { print_sosa_number($sosa * 4 + 1, $hparents['WIFE'], "down"); } if (!empty($gparid) and $hparents['WIFE'] == $gparid) { print_sosa_number(trim(substr($label, 0, -3), ".") . "."); } print "\n\t<td valign=\"top\">"; print_pedigree_person($hparents['WIFE'], 1, $show_famlink, 5, $personcount); print "</td></tr></table>"; print "</td>\n"; } print "</tr></table>\n\n"; if ($sosa != 0) { print "<a href=\"family.php?famid={$famid}\" class=\"details1\">"; if ($SHOW_ID_NUMBERS) { print getLRM() . "({$famid})" . getLRM() . " "; } else { print str_repeat(" ", 10); } $marriage = $family->getMarriage(); if ($marriage->canShow()) { $marriage->print_simple_fact(); } else { print $pgv_lang["private"]; } print "</a>"; } else { print "<br />\n"; } /** * wife side */ print "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tr><td rowspan=\"2\">"; print "<span class=\"subheaders\">" . get_sosa_name($sosa * 2 + 1) . "</span>"; print "\n\t<table style=\"width: " . $pbwidth . "px; height: " . $pbheight . "px;\"><tr>"; if ($parid) { if ($wife->getXref() == $parid) { print_sosa_number($label); } else { print_sosa_number($label, "", "blank"); } } else { if ($sosa > 0) { print_sosa_number($sosa * 2 + 1); } } if (isset($newparents) && $wife->getXref() != $newparents["WIFE"]) { print "\n\t<td valign=\"top\" class=\"facts_valueblue\">"; print_pedigree_person($newparents['WIFE'], 1, $show_famlink, 3, $personcount); } else { print "\n\t<td valign=\"top\">"; print_pedigree_person($wife->getXref(), 1, $show_famlink, 3, $personcount); } print "</td></tr></table>"; print "</td>\n"; // wife's parents $hfams = $wife->getChildFamilies(); $hparents = false; $upfamid = ""; if (count($hfams) > 0 or $sosa != 0 and $SHOW_EMPTY_BOXES) { print "<td rowspan=\"2\"><img src=\"" . $PGV_IMAGE_DIR . "/" . $PGV_IMAGES["hline"]["other"] . "\" alt=\"\" /></td><td rowspan=\"2\"><img src=\"" . $PGV_IMAGE_DIR . "/" . $PGV_IMAGES["vline"]["other"] . "\" width=\"3\" height=\"" . $pbheight . "\" alt=\"\" /></td>"; print "<td><img src=\"" . $PGV_IMAGE_DIR . "/" . $PGV_IMAGES["hline"]["other"] . "\" alt=\"\" /></td><td>"; $j = 0; foreach ($hfams as $hfamid => $hfamily) { if (!is_null($hfamily)) { $hparents = find_parents_in_record($hfamily->getGedcomRecord()); $upfamid = $hfamid; break; } } if ($hparents or $sosa != 0 and $SHOW_EMPTY_BOXES) { // wife's father print "\n\t<table style=\"width: " . $pbwidth . "px; height: " . $pbheight . "px;\"><tr>"; if ($sosa > 0) { print_sosa_number($sosa * 4 + 2, $hparents['HUSB'], "down"); } if (!empty($gparid) and $hparents['HUSB'] == $gparid) { print_sosa_number(trim(substr($label, 0, -3), ".") . "."); } print "\n\t<td valign=\"top\">"; print_pedigree_person($hparents['HUSB'], 1, $show_famlink, 6, $personcount); print "</td></tr></table>"; } print "</td>\n"; } if (!empty($upfamid) and $sosa != -1 and $view != "preview") { print "<td valign=\"middle\" rowspan=\"2\">"; print_url_arrow($upfamid, $sosa == 0 ? "?famid={$upfamid}&show_full={$show_full}" : "#{$upfamid}", "{$upfamid}", 1); print "</td>\n"; } if ($hparents or $sosa != 0 and $SHOW_EMPTY_BOXES) { // wife's mother print "</tr><tr><td><img src=\"" . $PGV_IMAGE_DIR . "/" . $PGV_IMAGES["hline"]["other"] . "\" alt=\"\" /></td><td>"; print "\n\t<table style=\"width: " . $pbwidth . "px; height: " . $pbheight . "px;\"><tr>"; if ($sosa > 0) { print_sosa_number($sosa * 4 + 3, $hparents['WIFE'], "down"); } if (!empty($gparid) and $hparents['WIFE'] == $gparid) { print_sosa_number(trim(substr($label, 0, -3), ".") . "."); } print "\n\t<td valign=\"top\">"; print_pedigree_person($hparents['WIFE'], 1, $show_famlink, 7, $personcount); print "</td></tr></table>\n"; print "</td>\n"; } print "</tr></table>\n\n"; }
?> "+fromfile, "_blank", "top=50, left=50, width=600, height=400, scrollbars=1, scrollable=1, resizable=1"); } function showchanges() { window.location = 'family.php?famid=<?php echo $controller->famid; ?> &show_changes=yes'; } //--> </script> <table align="center" width="95%"> <tr> <td> <?php print_family_header($controller->famid); ?> </td> <td> <?php if (empty($SEARCH_SPIDER) && !$controller->isPrintPreview()) { if (!$PGV_MENUS_AS_LISTS) { ?> <table class="sublinks_table" cellspacing="4" cellpadding="0"> <tr> <td class="list_label <?php echo $TEXT_DIRECTION; ?> " colspan="4"><?php echo $pgv_lang['fams_charts']; ?>