diff options
| -rw-r--r-- | admin_pgv_to_wt.php | 2 | ||||
| -rw-r--r-- | admin_trees_config.php | 27 | ||||
| -rw-r--r-- | help_text.php | 10 | ||||
| -rw-r--r-- | includes/db_schema/db_schema_14_15.php | 2 | ||||
| -rw-r--r-- | includes/functions/functions.php | 2 | ||||
| -rw-r--r-- | includes/functions/functions_print.php | 152 | ||||
| -rw-r--r-- | includes/set_gedcom_defaults.php | 2 | ||||
| -rw-r--r-- | modules_v3/GEDFact_assistant/_CENS/census_3_search_add.php | 1342 | ||||
| -rw-r--r-- | modules_v3/GEDFact_assistant/_MEDIA/media_1_ctrl.php | 642 | ||||
| -rw-r--r-- | modules_v3/family_nav/module.php | 226 |
10 files changed, 1154 insertions, 1253 deletions
diff --git a/admin_pgv_to_wt.php b/admin_pgv_to_wt.php index c598f9eeab..a1b1e5ac63 100644 --- a/admin_pgv_to_wt.php +++ b/admin_pgv_to_wt.php @@ -624,7 +624,6 @@ foreach (get_all_gedcoms() as $ged_id=>$gedcom) { case 'russian': @set_gedcom_setting($ged_id, 'LANGUAGE', 'ru'); break; default: @set_gedcom_setting($ged_id, 'LANGUAGE', 'en_US'); break; } - @set_gedcom_setting($ged_id, 'LINK_ICONS', $LINK_ICONS); @set_gedcom_setting($ged_id, 'MAX_ALIVE_AGE', $MAX_ALIVE_AGE); @set_gedcom_setting($ged_id, 'MAX_DESCENDANCY_GENERATIONS', $MAX_DESCENDANCY_GENERATIONS); @set_gedcom_setting($ged_id, 'MAX_PEDIGREE_GENERATIONS', $MAX_PEDIGREE_GENERATIONS); @@ -720,7 +719,6 @@ foreach (get_all_gedcoms() as $ged_id=>$gedcom) { @set_gedcom_setting($ged_id, 'WELCOME_TEXT_AUTH_MODE_'.WT_LOCALE, $WELCOME_TEXT_AUTH_MODE_4); @set_gedcom_setting($ged_id, 'WELCOME_TEXT_CUST_HEAD', $WELCOME_TEXT_CUST_HEAD); @set_gedcom_setting($ged_id, 'WORD_WRAPPED_NOTES', $WORD_WRAPPED_NOTES); - @set_gedcom_setting($ged_id, 'ZOOM_BOXES', $ZOOM_BOXES); // TODO import whatever privacy settings as are compatible with the new system diff --git a/admin_trees_config.php b/admin_trees_config.php index d2260737d7..e2ebf7dfd5 100644 --- a/admin_trees_config.php +++ b/admin_trees_config.php @@ -195,7 +195,6 @@ case 'update': set_gedcom_setting(WT_GED_ID, 'KEEP_ALIVE_YEARS_BIRTH', safe_POST('KEEP_ALIVE_YEARS_BIRTH', WT_REGEX_INTEGER, 0)); set_gedcom_setting(WT_GED_ID, 'KEEP_ALIVE_YEARS_DEATH', safe_POST('KEEP_ALIVE_YEARS_DEATH', WT_REGEX_INTEGER, 0)); set_gedcom_setting(WT_GED_ID, 'LANGUAGE', safe_POST('GEDCOMLANG')); - set_gedcom_setting(WT_GED_ID, 'LINK_ICONS', safe_POST('NEW_LINK_ICONS')); set_gedcom_setting(WT_GED_ID, 'MAX_ALIVE_AGE', safe_POST('MAX_ALIVE_AGE', WT_REGEX_INTEGER, 100)); set_gedcom_setting(WT_GED_ID, 'MAX_DESCENDANCY_GENERATIONS', safe_POST('NEW_MAX_DESCENDANCY_GENERATIONS')); set_gedcom_setting(WT_GED_ID, 'MAX_PEDIGREE_GENERATIONS', safe_POST('NEW_MAX_PEDIGREE_GENERATIONS')); @@ -269,7 +268,6 @@ case 'update': set_gedcom_setting(WT_GED_ID, 'WELCOME_TEXT_AUTH_MODE_'.WT_LOCALE, safe_POST('NEW_WELCOME_TEXT_AUTH_MODE_4', WT_REGEX_UNSAFE)); set_gedcom_setting(WT_GED_ID, 'WELCOME_TEXT_CUST_HEAD', safe_POST_bool('NEW_WELCOME_TEXT_CUST_HEAD')); set_gedcom_setting(WT_GED_ID, 'WORD_WRAPPED_NOTES', safe_POST_bool('NEW_WORD_WRAPPED_NOTES')); - set_gedcom_setting(WT_GED_ID, 'ZOOM_BOXES', safe_POST('NEW_ZOOM_BOXES')); if (safe_POST('gedcom_title', WT_REGEX_UNSAFE)) { set_gedcom_setting(WT_GED_ID, 'title', safe_POST('gedcom_title', WT_REGEX_UNSAFE)); } @@ -1130,31 +1128,6 @@ echo WT_JS_START;?> </td> </tr> <tr> - <td> - <?php echo WT_I18N::translate('Zoom boxes on charts'), help_link('ZOOM_BOXES'); ?> - </td> - <td> - <select name="NEW_ZOOM_BOXES"> - <option value="disabled" <?php if ($ZOOM_BOXES=='disabled') echo "selected=\"selected\""; ?>><?php echo WT_I18N::translate('Disabled'); ?></option> - <option value="mouseover" <?php if ($ZOOM_BOXES=='mouseover') echo "selected=\"selected\""; ?>><?php echo WT_I18N::translate('On Mouse Over'); ?></option> - <option value="mousedown" <?php if ($ZOOM_BOXES=='mousedown') echo "selected=\"selected\""; ?>><?php echo WT_I18N::translate('On Mouse Down'); ?></option> - <option value="click" <?php if ($ZOOM_BOXES=='click') echo "selected=\"selected\""; ?>><?php echo WT_I18N::translate('On Mouse Click'); ?></option> - </select> - </td> - </tr> - <tr> - <td> - <?php echo WT_I18N::translate('PopUp links on charts'), help_link('LINK_ICONS'); ?> - </td> - <td> - <select name="NEW_LINK_ICONS"> - <option value="disabled" <?php if ($LINK_ICONS=='disabled') echo "selected=\"selected\""; ?>><?php echo WT_I18N::translate('Disabled'); ?></option> - <option value="mouseover" <?php if ($LINK_ICONS=='mouseover') echo "selected=\"selected\""; ?>><?php echo WT_I18N::translate('On Mouse Over'); ?></option> - <option value="click" <?php if ($LINK_ICONS=='click') echo "selected=\"selected\""; ?>><?php echo WT_I18N::translate('On Mouse Click'); ?></option> - </select> - </td> - </tr> - <tr> <th colspan="2"> <?php echo WT_I18N::translate('Individual pages'); ?> </td> diff --git a/help_text.php b/help_text.php index 647221303e..a3fc2a5849 100644 --- a/help_text.php +++ b/help_text.php @@ -1501,11 +1501,6 @@ case 'LANGUAGE': $text=WT_I18N::translate('If a visitor to the site has not specified a preferred language in their browser configuration, or they have specified an unsupported language, then this language will be used. Typically, this setting applies to search engines.'); break; -case 'LINK_ICONS': - $title=WT_I18N::translate('PopUp links on charts'); - $text=WT_I18N::translate('Allows the user to select links to other charts and close relatives of the person.<br /><br />Set to <b>Disabled</b> to disable this feature. Set to <b>On Mouse Over</b> to popup the links when the user mouses over the icon in the box. Set to <b>On Mouse Click</b> to popup the links when the user clicks on the icon in the box.'); - break; - case 'LOGIN_URL': $title=WT_I18N::translate('Login URL'); $text=WT_I18N::translate('You only need to enter a Login URL if you want to redirect to a different site or location when your users login. This is very useful if you need to switch from http to https when your users login. Include the full URL to <i>login.php</i>. For example, https://www.yourserver.com/webtrees/login.php .'); @@ -2046,11 +2041,6 @@ case 'WORD_WRAPPED_NOTES': $text=WT_I18N::translate('Some genealogy programs wrap notes at word boundaries while others wrap notes anywhere. This can cause <b>webtrees</b> to run words together. Setting this to <b>Yes</b> will add a space between words where they are wrapped in the original GEDCOM during the import process. If you have already imported the file you will need to re-import it.'); break; -case 'ZOOM_BOXES': - $title=WT_I18N::translate('Zoom boxes on charts'); - $text=WT_I18N::translate('Allows a user to zoom boxes on charts to get more information.<br /><br />Set to <b>Disabled</b> to disable this feature. Set to <b>On Mouse Over</b> to zoom boxes when the user mouses over the icon in the box. Set to <b>On Mouse Click</b> to zoom boxes when the user clicks on the icon in the box.'); - break; - ////////////////////////////////////////////////////////////////////////////// // This section contains all the other help items. ////////////////////////////////////////////////////////////////////////////// diff --git a/includes/db_schema/db_schema_14_15.php b/includes/db_schema/db_schema_14_15.php index 233e27151e..234bde78a7 100644 --- a/includes/db_schema/db_schema_14_15.php +++ b/includes/db_schema/db_schema_14_15.php @@ -35,7 +35,7 @@ if (!defined('WT_WEBTREES')) { } // Remove the i_isdead column -self::exec("DELETE FROM `##gedcom_setting` WHERE setting_name='GEDCOM_DEFAULT_TAB'"); +self::exec("DELETE FROM `##gedcom_setting` WHERE setting_name='GEDCOM_DEFAULT_TAB', 'LINK_ICONS', 'ZOOM_BOXES'"); self::exec("DELETE FROM `##user_setting` WHERE setting_name='default'"); // There is no way to add a RESN tag to NOTE objects diff --git a/includes/functions/functions.php b/includes/functions/functions.php index 1486fce3df..0e5661b532 100644 --- a/includes/functions/functions.php +++ b/includes/functions/functions.php @@ -230,7 +230,6 @@ function load_gedcom_settings($ged_id=WT_GED_ID) { global $KEEP_ALIVE_YEARS_BIRTH; $KEEP_ALIVE_YEARS_BIRTH =get_gedcom_setting($ged_id, 'KEEP_ALIVE_YEARS_BIRTH'); global $KEEP_ALIVE_YEARS_DEATH; $KEEP_ALIVE_YEARS_DEATH =get_gedcom_setting($ged_id, 'KEEP_ALIVE_YEARS_DEATH'); global $LANGUAGE; $LANGUAGE =get_gedcom_setting($ged_id, 'LANGUAGE'); - global $LINK_ICONS; $LINK_ICONS =get_gedcom_setting($ged_id, 'LINK_ICONS'); global $MAX_ALIVE_AGE; $MAX_ALIVE_AGE =get_gedcom_setting($ged_id, 'MAX_ALIVE_AGE'); global $MAX_DESCENDANCY_GENERATIONS; $MAX_DESCENDANCY_GENERATIONS =get_gedcom_setting($ged_id, 'MAX_DESCENDANCY_GENERATIONS'); global $MAX_PEDIGREE_GENERATIONS; $MAX_PEDIGREE_GENERATIONS =get_gedcom_setting($ged_id, 'MAX_PEDIGREE_GENERATIONS'); @@ -289,7 +288,6 @@ function load_gedcom_settings($ged_id=WT_GED_ID) { global $WELCOME_TEXT_AUTH_MODE; $WELCOME_TEXT_AUTH_MODE =get_gedcom_setting($ged_id, 'WELCOME_TEXT_AUTH_MODE'); global $WELCOME_TEXT_CUST_HEAD; $WELCOME_TEXT_CUST_HEAD =get_gedcom_setting($ged_id, 'WELCOME_TEXT_CUST_HEAD'); global $WORD_WRAPPED_NOTES; $WORD_WRAPPED_NOTES =get_gedcom_setting($ged_id, 'WORD_WRAPPED_NOTES'); - global $ZOOM_BOXES; $ZOOM_BOXES =get_gedcom_setting($ged_id, 'ZOOM_BOXES'); global $person_privacy; $person_privacy=array(); global $person_facts; $person_facts =array(); diff --git a/includes/functions/functions_print.php b/includes/functions/functions_print.php index bbe35cb636..9a225291ee 100644 --- a/includes/functions/functions_print.php +++ b/includes/functions/functions_print.php @@ -41,7 +41,7 @@ require_once WT_ROOT.'includes/functions/functions_charts.php'; * @param int $count on some charts it is important to keep a count of how many boxes were printed */ function print_pedigree_person($person, $style=1, $count=0, $personcount="1") { - global $HIDE_LIVE_PEOPLE, $SHOW_LIVING_NAMES, $ZOOM_BOXES, $LINK_ICONS, $GEDCOM; + global $HIDE_LIVE_PEOPLE, $SHOW_LIVING_NAMES, $GEDCOM; global $SHOW_HIGHLIGHT_IMAGES, $bwidth, $bheight, $PEDIGREE_FULL_DETAILS, $SHOW_PEDIGREE_PLACES; global $TEXT_DIRECTION, $DEFAULT_PEDIGREE_GENERATIONS, $OLD_PGENS, $talloffset, $PEDIGREE_LAYOUT; global $WT_IMAGES, $ABBREVIATE_CHART_LABELS; @@ -84,127 +84,83 @@ function print_pedigree_person($person, $style=1, $count=0, $personcount="1") { $disp=$person->canDisplayDetails(); $uniqueID = floor(microtime() * 1000000); $boxID = $pid.".".$personcount.".".$count.".".$uniqueID; - $mouseAction1 = "onmouseover=\"clear_family_box_timeout('".$boxID."');\" onmouseout=\"family_box_timeout('".$boxID."');\""; - $mouseAction2 = " onmouseover=\"expandbox('".$boxID."', $style); return false;\" onmouseout=\"restorebox('".$boxID."', $style); return false;\""; - $mouseAction3 = " onmousedown=\"expandbox('".$boxID."', $style); return false;\" onmouseup=\"restorebox('".$boxID."', $style); return false;\""; $mouseAction4 = " onclick=\"expandbox('".$boxID."', $style); return false;\""; if ($person->canDisplayName()) { if (empty($SEARCH_SPIDER)) { - if ($LINK_ICONS!="disabled") { - //-- draw a box for the family popup - // NOTE: Start div I.$pid.$personcount.$count.links - $personlinks .= "<table class=\"person_box$isF\"><tr><td class=\"details1\">"; - // NOTE: Zoom - $personlinks .= "<a href=\"pedigree.php?rootid={$pid}&show_full={$PEDIGREE_FULL_DETAILS}&PEDIGREE_GENERATIONS={$OLD_PGENS}&talloffset={$talloffset}&ged=".rawurlencode($GEDCOM)."\" $mouseAction1><b>".WT_I18N::translate('Pedigree')."</b></a>"; + //-- draw a box for the family popup + // NOTE: Start div I.$pid.$personcount.$count.links + $personlinks .= "<table class=\"person_box$isF\"><tr><td class=\"details1\">"; + // NOTE: Zoom + $personlinks .= "<a href=\"pedigree.php?rootid={$pid}&show_full={$PEDIGREE_FULL_DETAILS}&PEDIGREE_GENERATIONS={$OLD_PGENS}&talloffset={$talloffset}&ged=".rawurlencode($GEDCOM)."\"><b>".WT_I18N::translate('Pedigree')."</b></a>"; - if (array_key_exists('googlemap', WT_Module::getActiveModules())) { - $personlinks .= '<br /><a href="module.php?mod=googlemap&mod_action=pedigree_map&rootid='.$pid.'&ged='.WT_GEDURL.'" '.$mouseAction1.'><b>'.WT_I18N::translate('Pedigree map').'</b></a>'; - } - if (WT_USER_GEDCOM_ID && WT_USER_GEDCOM_ID!=$pid) { - $personlinks .= '<br /><a href="relationship.php?show_full='.$PEDIGREE_FULL_DETAILS.'&pid1='.WT_USER_GEDCOM_ID.'&pid2='.$pid.'&show_full='.$PEDIGREE_FULL_DETAILS.'&pretty=2&followspouse=1&ged='.WT_GEDURL.'" '.$mouseAction1.'><b>'.WT_I18N::translate('Relationship to me').'</b></a>'; - } - $personlinks .= "<br /><a href=\"descendancy.php?pid={$pid}&show_full={$PEDIGREE_FULL_DETAILS}&generations={$generations}&box_width={$box_width}&ged=".rawurlencode($GEDCOM)."\" $mouseAction1><b>".WT_I18N::translate('Descendants')."</b></a><br />"; - $personlinks .= "<a href=\"ancestry.php?rootid={$pid}&show_full={$PEDIGREE_FULL_DETAILS}&chart_style={$chart_style}&PEDIGREE_GENERATIONS={$OLD_PGENS}&box_width={$box_width}&ged=".rawurlencode($GEDCOM)."\" ".$mouseAction1."><b>".WT_I18N::translate('Ancestors')."</b></a><br />"; - $personlinks .= "<a href=\"compact.php?rootid={$pid}&ged=".rawurlencode($GEDCOM)."\" ".$mouseAction1."><b>".WT_I18N::translate('Compact tree')."</b></a><br />"; - if (function_exists("imagettftext")) { - $personlinks .= "<a href=\"fanchart.php?rootid={$pid}&PEDIGREE_GENERATIONS={$OLD_PGENS}&ged=".rawurlencode($GEDCOM)."\" ".$mouseAction1."><b>".WT_I18N::translate('Fan chart')."</b></a><br />"; - } - $personlinks .= "<a href=\"hourglass.php?pid={$pid}&show_full={$PEDIGREE_FULL_DETAILS}&chart_style={$chart_style}&PEDIGREE_GENERATIONS={$OLD_PGENS}&box_width={$box_width}&ged=".rawurlencode($GEDCOM)."&show_spouse={$show_spouse}\" ".$mouseAction1."><b>".WT_I18N::translate('Hourglass chart')."</b></a><br />"; - if (array_key_exists('tree', WT_Module::getActiveModules())) { - $personlinks .= '<a href="module.php?mod=tree&mod_action=treeview&ged='.WT_GEDURL.'&rootid='.$pid.'" '.$mouseAction1.'><b>'.WT_I18N::translate('Interactive tree').'</b></a><br />'; - } + if (array_key_exists('googlemap', WT_Module::getActiveModules())) { + $personlinks .= '<br /><a href="module.php?mod=googlemap&mod_action=pedigree_map&rootid='.$pid.'&ged='.WT_GEDURL.'"><b>'.WT_I18N::translate('Pedigree map').'</b></a>'; + } + if (WT_USER_GEDCOM_ID && WT_USER_GEDCOM_ID!=$pid) { + $personlinks .= '<br /><a href="relationship.php?show_full='.$PEDIGREE_FULL_DETAILS.'&pid1='.WT_USER_GEDCOM_ID.'&pid2='.$pid.'&show_full='.$PEDIGREE_FULL_DETAILS.'&pretty=2&followspouse=1&ged='.WT_GEDURL.'"><b>'.WT_I18N::translate('Relationship to me').'</b></a>'; + } + $personlinks .= "<br /><a href=\"descendancy.php?pid={$pid}&show_full={$PEDIGREE_FULL_DETAILS}&generations={$generations}&box_width={$box_width}&ged=".rawurlencode($GEDCOM)."\"><b>".WT_I18N::translate('Descendants')."</b></a><br />"; + $personlinks .= "<a href=\"ancestry.php?rootid={$pid}&show_full={$PEDIGREE_FULL_DETAILS}&chart_style={$chart_style}&PEDIGREE_GENERATIONS={$OLD_PGENS}&box_width={$box_width}&ged=".rawurlencode($GEDCOM)."\"><b>".WT_I18N::translate('Ancestors')."</b></a><br />"; + $personlinks .= "<a href=\"compact.php?rootid={$pid}&ged=".rawurlencode($GEDCOM)."\"><b>".WT_I18N::translate('Compact tree')."</b></a><br />"; + if (function_exists("imagettftext")) { + $personlinks .= "<a href=\"fanchart.php?rootid={$pid}&PEDIGREE_GENERATIONS={$OLD_PGENS}&ged=".rawurlencode($GEDCOM)."\"><b>".WT_I18N::translate('Fan chart')."</b></a><br />"; + } + $personlinks .= "<a href=\"hourglass.php?pid={$pid}&show_full={$PEDIGREE_FULL_DETAILS}&chart_style={$chart_style}&PEDIGREE_GENERATIONS={$OLD_PGENS}&box_width={$box_width}&ged=".rawurlencode($GEDCOM)."&show_spouse={$show_spouse}\"><b>".WT_I18N::translate('Hourglass chart')."</b></a><br />"; + if (array_key_exists('tree', WT_Module::getActiveModules())) { + $personlinks .= '<a href="module.php?mod=tree&mod_action=treeview&ged='.WT_GEDURL.'&rootid='.$pid.'"><b>'.WT_I18N::translate('Interactive tree').'</b></a><br />'; + } - foreach ($person->getSpouseFamilies() as $family) { - $spouse = $family->getSpouse($person); + foreach ($person->getSpouseFamilies() as $family) { + $spouse = $family->getSpouse($person); - $children = $family->getChildren(); - $num = count($children); - if ((!empty($spouse))||($num>0)) { - $personlinks .= "<a href=\"".$family->getHtmlUrl()."&show_full=1\" ".$mouseAction1."><b>".WT_I18N::translate('Family with spouse')."</b></a><br />"; - if (!empty($spouse)) { - $personlinks .= "<a href=\"".$spouse->getHtmlUrl()."\" $mouseAction1>"; - $personlinks .= $spouse->getFullName(); - $personlinks .= "</a><br />"; - } - } - foreach ($children as $child) { - $personlinks .= " <a href=\"".$child->getHtmlUrl()."\" $mouseAction1>"; - $personlinks .= $child->getFullName(); - $personlinks .= "<br /></a>"; + $children = $family->getChildren(); + $num = count($children); + if ((!empty($spouse))||($num>0)) { + $personlinks .= "<a href=\"".$family->getHtmlUrl()."&show_full=1\"><b>".WT_I18N::translate('Family with spouse')."</b></a><br />"; + if (!empty($spouse)) { + $personlinks .= "<a href=\"".$spouse->getHtmlUrl()."\">"; + $personlinks .= $spouse->getFullName(); + $personlinks .= "</a><br />"; } } - $personlinks .= "</td></tr></table>"; + foreach ($children as $child) { + $personlinks .= " <a href=\"".$child->getHtmlUrl()."\">"; + $personlinks .= $child->getFullName(); + $personlinks .= "<br /></a>"; + } } + $personlinks .= "</td></tr></table>"; // NOTE: Start div out-$pid.$personcount.$count if ($style==1) $outBoxAdd .= " class=\"person_box$isF\" style=\"width: ".$bwidth."px; height: ".$bheight."px; overflow: hidden; z-index:-1;\""; else $outBoxAdd .= " class=\"person_box$isF\" style=\"padding: 2px;\""; // NOTE: Zoom - if (($ZOOM_BOXES!="disabled")&&(!$show_full)) { - if ($ZOOM_BOXES=="mouseover") $outBoxAdd .= $mouseAction2; - if ($ZOOM_BOXES=="mousedown") $outBoxAdd .= $mouseAction3; - if (($ZOOM_BOXES=="click")) $outBoxAdd .= $mouseAction4; - } - // NOTE: Zoom - if (($ZOOM_BOXES!="disabled")&&($show_full)) { + if (!$show_full) { + $outBoxAdd .= $mouseAction4; + } else { $icons .= "<a href=\"javascript:;\""; - if ($ZOOM_BOXES=="mouseover") $icons .= $mouseAction2; - if ($ZOOM_BOXES=="mousedown") $icons .= $mouseAction3; - if ($ZOOM_BOXES=="click") $icons .= $mouseAction4; + $icons .= $mouseAction4; $icons .= "><img id=\"iconz-$boxID\" src=\"".$WT_IMAGES["zoomin"]."\" border=\"0\" alt=\"".WT_I18N::translate('Zoom in/out on this box.')."\" title=\"".WT_I18N::translate('Zoom in/out on this box.')."\" /></a>"; } - if ($LINK_ICONS!="disabled") { - $click_link="javascript:;"; - if (WT_SCRIPT_NAME=='pedigree.php') { - $click_link="pedigree.php?rootid={$pid}&show_full={$PEDIGREE_FULL_DETAILS}&PEDIGREE_GENERATIONS={$OLD_PGENS}&talloffset={$talloffset}&ged=".rawurlencode($GEDCOM); - $whichID=$pid; - } - - if (WT_SCRIPT_NAME=='hourglass.php') { - $click_link="hourglass.php?pid={$pid}&show_full={$PEDIGREE_FULL_DETAILS}&generations={$generations}&box_width={$box_width}&ged=".rawurlencode($GEDCOM); - $whichID=$pid; - } - if (WT_SCRIPT_NAME=='ancestry.php') { - $click_link="ancestry.php?rootid={$pid}&show_full={$PEDIGREE_FULL_DETAILS}&chart_style={$chart_style}&PEDIGREE_GENERATIONS={$OLD_PGENS}&box_width={$box_width}&ged=".rawurlencode($GEDCOM); - $whichID=$pid; - } - - if (WT_SCRIPT_NAME=='descendancy.php') { - $click_link="descendancy.php?show_full={$PEDIGREE_FULL_DETAILS}&pid={$pid}&generations={$generations}&box_width={$box_width}&ged=".rawurlencode($GEDCOM); - $whichID=$pid; - } - - if (WT_SCRIPT_NAME=='family.php' && !empty($famid)) { - $click_link="family.php?famid={$famid}&show_full=1&ged=".rawurlencode($GEDCOM); - $whichID=$famid; - } - - if (WT_SCRIPT_NAME=='individual.php') { - $click_link="individual.php?pid={$pid}&ged=".rawurlencode($GEDCOM); - $whichID=$pid; - } - - $icons .= '<a class="itr" href="#"'. - '><img src="'.$WT_IMAGES['pedigree'].'" alt="" title="" /><span class="popup">'.$personlinks.'</span></a>'; - } - } - else { + $icons .= '<a class="itr" href="#"'. + '><img src="'.$WT_IMAGES['pedigree'].'" alt="" title="" /><span class="popup">'.$personlinks.'</span></a>'; + } else { if ($style==1) { $outBoxAdd .= "class=\"person_box$isF\" style=\"width: ".$bwidth."px; height: ".$bheight."px; overflow: hidden;\""; } else { $outBoxAdd .= "class=\"person_box$isF\" style=\"overflow: hidden;\""; } // NOTE: Zoom - if (($ZOOM_BOXES!="disabled")&&(empty($SEARCH_SPIDER))) { - if ($ZOOM_BOXES=="mouseover") $outBoxAdd .= $mouseAction2; - if ($ZOOM_BOXES=="mousedown") $outBoxAdd .= $mouseAction3; - if (($ZOOM_BOXES=="click")) $outBoxAdd .= $mouseAction4; + if (!$SEARCH_SPIDER) { + $outBoxAdd .= $mouseAction4; } } - } - else { - if ($style==1) $outBoxAdd .= "class=\"person_box$isF\" style=\"width: ".$bwidth."px; height: ".$bheight."px; overflow: hidden;\""; - else $outBoxAdd .= "class=\"person_box$isF\" style=\" overflow: hidden;\""; + } else { + if ($style==1) { + $outBoxAdd .= "class=\"person_box$isF\" style=\"width: ".$bwidth."px; height: ".$bheight."px; overflow: hidden;\""; + } else { + $outBoxAdd .= "class=\"person_box$isF\" style=\" overflow: hidden;\""; + } } //-- find the name $name = $person->getFullName(); @@ -268,7 +224,7 @@ function print_pedigree_person($person, $style=1, $count=0, $personcount="1") { // Show DEAT or equivalent event foreach (explode('|', WT_EVENTS_DEAT) as $deattag) { $event = $person->getFactByType($deattag); - if (!is_null($event) && ($event->getDate()->isOK() || $event->getPlace()) && $event->canShow()) { + if (!is_null($event) && ($event->getDate()->isOK() || $event->getPlace() || $event->getDetail()=='Y') && $event->canShow()) { $BirthDeath .= $event->print_simple_fact(true); if (in_array($deattag, $opt_tags)) { unset ($opt_tags[array_search($deattag, $opt_tags)]); diff --git a/includes/set_gedcom_defaults.php b/includes/set_gedcom_defaults.php index beeeaf67ca..194d1ad8b8 100644 --- a/includes/set_gedcom_defaults.php +++ b/includes/set_gedcom_defaults.php @@ -66,7 +66,6 @@ set_gedcom_setting($ged_id, 'INDI_FACTS_UNIQUE', ''); set_gedcom_setting($ged_id, 'KEEP_ALIVE_YEARS_BIRTH', ''); set_gedcom_setting($ged_id, 'KEEP_ALIVE_YEARS_DEATH', ''); set_gedcom_setting($ged_id, 'LANGUAGE', WT_LOCALE); // Defualt to the current admin's language` -set_gedcom_setting($ged_id, 'LINK_ICONS', 'click'); set_gedcom_setting($ged_id, 'MAX_ALIVE_AGE', 120); set_gedcom_setting($ged_id, 'MAX_DESCENDANCY_GENERATIONS', '15'); set_gedcom_setting($ged_id, 'MAX_PEDIGREE_GENERATIONS', '10'); @@ -150,7 +149,6 @@ set_gedcom_setting($ged_id, 'WEBTREES_EMAIL', ''); set_gedcom_setting($ged_id, 'WELCOME_TEXT_AUTH_MODE', '1'); set_gedcom_setting($ged_id, 'WELCOME_TEXT_CUST_HEAD', false); set_gedcom_setting($ged_id, 'WORD_WRAPPED_NOTES', false); -set_gedcom_setting($ged_id, 'ZOOM_BOXES', 'click'); set_gedcom_setting($ged_id, 'imported', 0); set_gedcom_setting($ged_id, 'title', WT_I18N::translate('Genealogy from [%s]', $ged_name)); 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'],'*')." ".$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'],'*')." ".$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'],'*')." ".$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'],'*')." ".$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'],'*')." ".$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'],'*')." ".$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'],'*')." ".$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'],'*')." ".$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'],'*')." ".$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'],'*')." ".$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'],'*')." ".$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'],'*')." ".$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'],'*')." ".$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'],'*')." ".$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'],'*')." ".$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'],'*')." ".$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'],'*')." ".$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'],'*')." ".$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'],'*')." ".$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'],'*')." ".$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'],'*')." ".$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'],'*')." ".$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'],'*')." ".$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'],'*')." ".$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'],'*')." ".$nam[0]['surn']; - $fulln = $husb->getFullName(); - $givn = rtrim($nam[0]['givn'],'*'); - $surn = $nam[0]['surn']; - if (isset($nam[1]) ) { - $fulmn = rtrim($nam[1]['givn'],'*')." ".$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'],'*')." ".$nam[0]['surn']; + $fulln = $husb->getFullName(); + $givn = rtrim($nam[0]['givn'],'*'); + $surn = $nam[0]['surn']; + if (isset($nam[1]) ) { + $fulmn = rtrim($nam[1]['givn'],'*')." ".$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'],'*')." ".$nam[0]['surname']; - $givn = rtrim($nam[0]['givn'],'*'); - $surn = $nam[0]['surname']; - if (isset($nam[1])) { - //$fulmn = rtrim($nam[1]['givn'],'*')." ".$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'],'*')." ".$nam[0]['surname']; + $givn = rtrim($nam[0]['givn'],'*'); + $surn = $nam[0]['surname']; + if (isset($nam[1])) { + //$fulmn = rtrim($nam[1]['givn'],'*')." ".$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'],'*')." ".$nam[0]['surname']; - //$fulln = $husb->getFullName(); - $givn = rtrim($nam[0]['givn'],'*'); - $surn = $nam[0]['surname']; - if (isset($nam[1])) { - $fulmn = rtrim($nam[1]['givn'],'*')." ".$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}&tab={$tabno}&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'],'*')." ".$nam[0]['surname']; + //$fulln = $husb->getFullName(); + $givn = rtrim($nam[0]['givn'],'*'); + $surn = $nam[0]['surname']; + if (isset($nam[1])) { + $fulmn = rtrim($nam[1]['givn'],'*')." ".$nam[1]['surname']; + $marn = $nam[1]['surname']; } + + $parentlinks .= "<a href=\"individual.php?pid={$tmp}&tab={$tabno}&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'],'*')." ".$nam[0]['surname']; - $givn = rtrim($nam[0]['givn'],'*'); - $surn = $nam[0]['surname']; - if (isset($nam[1])) { - $fulmn = rtrim($nam[1]['givn'],'*')." ".$nam[1]['surname']; - $marn = $nam[1]['surname']; - } - $parentlinks .= "<a href=\"individual.php?pid={$tmp}&tab={$tabno}&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'],'*')." ".$nam[0]['surname']; + $givn = rtrim($nam[0]['givn'],'*'); + $surn = $nam[0]['surname']; + if (isset($nam[1])) { + $fulmn = rtrim($nam[1]['givn'],'*')." ".$nam[1]['surname']; + $marn = $nam[1]['surname']; } + $parentlinks .= "<a href=\"individual.php?pid={$tmp}&tab={$tabno}&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'],'*')." ".$nam[0]['surname']; - $givn = rtrim($nam[0]['givn'],'*'); - $surn = $nam[0]['surname']; - if (isset($nam[1])) { - $fulmn = rtrim($nam[1]['givn'],'*')." ".$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'],'*')." ".$nam[0]['surname']; + $givn = rtrim($nam[0]['givn'],'*'); + $surn = $nam[0]['surname']; + if (isset($nam[1])) { + $fulmn = rtrim($nam[1]['givn'],'*')." ".$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'],'*')." ".$nam[0]['surname']; - $givn = rtrim($nam[0]['givn'],'*'); - $surn = $nam[0]['surname']; - if (isset($nam[1])) { - $fulmn = rtrim($nam[1]['givn'],'*')." ".$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'],'*')." ".$nam[0]['surname']; + $givn = rtrim($nam[0]['givn'],'*'); + $surn = $nam[0]['surname']; + if (isset($nam[1])) { + $fulmn = rtrim($nam[1]['givn'],'*')." ".$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>"; } } } diff --git a/modules_v3/family_nav/module.php b/modules_v3/family_nav/module.php index 237ca8087a..be95e41a5a 100644 --- a/modules_v3/family_nav/module.php +++ b/modules_v3/family_nav/module.php @@ -568,7 +568,7 @@ class family_nav_WT_Module extends WT_Module implements WT_Module_Sidebar { } // End public function getTabContent() function print_pedigree_person_nav($pid, $style=1, $count=0, $personcount="1") { - global $HIDE_LIVE_PEOPLE, $SHOW_LIVING_NAMES, $ZOOM_BOXES, $LINK_ICONS, $SCRIPT_NAME, $GEDCOM; + global $HIDE_LIVE_PEOPLE, $SHOW_LIVING_NAMES, $SCRIPT_NAME, $GEDCOM; 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; @@ -600,142 +600,138 @@ class family_nav_WT_Module extends WT_Module implements WT_Module_Sidebar { $step_parentlinks = ""; $disp=$person->canDisplayDetails(); - if ($person->canDisplayName()) { - if (empty($SEARCH_SPIDER)) { - if ($LINK_ICONS!="disabled") { - //-- draw a box for the family flyout - $parentlinks .= "<span class=\"flyout4\"><b>".WT_I18N::translate('Parents')."</b></span><br />"; - $step_parentlinks .= "<span class=\"flyout4\"><b>".WT_I18N::translate('Parents')."</b></span><br />"; - $spouselinks .= "<span class=\"flyout4\"><b>".WT_I18N::translate('Family')."</b></span><br />"; + if ($person->canDisplayName() && !$SEARCH_SPIDER) { + //-- draw a box for the family flyout + $parentlinks .= "<span class=\"flyout4\"><b>".WT_I18N::translate('Parents')."</b></span><br />"; + $step_parentlinks .= "<span class=\"flyout4\"><b>".WT_I18N::translate('Parents')."</b></span><br />"; + $spouselinks .= "<span class=\"flyout4\"><b>".WT_I18N::translate('Family')."</b></span><br />"; - $persons = ""; - $person_parent = ""; - $person_step = ""; + $persons = ""; + $person_parent = ""; + $person_step = ""; - //-- parent families -------------------------------------- - $fams = $person->getChildFamilies(); - foreach ($fams as $famid=>$family) { + //-- parent families -------------------------------------- + $fams = $person->getChildFamilies(); + foreach ($fams as $famid=>$family) { - if (!is_null($family)) { - $husb = $family->getHusband($person); - $wife = $family->getWife($person); - // $spouse = $family->getSpouse($person); - $children = $family->getChildren(); - $num = count($children); + if (!is_null($family)) { + $husb = $family->getHusband($person); + $wife = $family->getWife($person); + // $spouse = $family->getSpouse($person); + $children = $family->getChildren(); + $num = count($children); - // Husband ------------------------------ - if ($husb || $num>0) { - if ($husb) { - $person_parent="Yes"; - $parentlinks .= "<a class=\"flyout3\" href=\"".$husb->getHtmlUrl()."\" onclick=\"return familyNavLoad('".$husb->getHtmlUrl()."');\">"; - $parentlinks .= " ".$husb->getFullName(); - $parentlinks .= "</a>"; - $parentlinks .= "<br />"; - $natdad = "yes"; - } - } + // Husband ------------------------------ + if ($husb || $num>0) { + if ($husb) { + $person_parent="Yes"; + $parentlinks .= "<a class=\"flyout3\" href=\"".$husb->getHtmlUrl()."\" onclick=\"return familyNavLoad('".$husb->getHtmlUrl()."');\">"; + $parentlinks .= " ".$husb->getFullName(); + $parentlinks .= "</a>"; + $parentlinks .= "<br />"; + $natdad = "yes"; + } + } - // Wife ------------------------------ - if ($wife || $num>0) { - if ($wife) { - $person_parent="Yes"; - $parentlinks .= "<a class=\"flyout3\" href=\"".$wife->getHtmlUrl()."\" onclick=\"return familyNavLoad('".$wife->getHtmlUrl()."');\">"; - $parentlinks .= " ".$wife->getFullName(); - $parentlinks .= "</a>"; - $parentlinks .= "<br />"; - $natmom = "yes"; - } - } + // Wife ------------------------------ + if ($wife || $num>0) { + if ($wife) { + $person_parent="Yes"; + $parentlinks .= "<a class=\"flyout3\" href=\"".$wife->getHtmlUrl()."\" onclick=\"return familyNavLoad('".$wife->getHtmlUrl()."');\">"; + $parentlinks .= " ".$wife->getFullName(); + $parentlinks .= "</a>"; + $parentlinks .= "<br />"; + $natmom = "yes"; } } + } + } - //-- step families ----------------------------------------- - $fams = $person->getChildStepFamilies(); - foreach ($fams as $famid=>$family) { - if (!is_null($family)) { - $husb = $family->getHusband($person); - $wife = $family->getWife($person); - // $spouse = $family->getSpouse($person); - $children = $family->getChildren(); - $num = count($children); + //-- step families ----------------------------------------- + $fams = $person->getChildStepFamilies(); + foreach ($fams as $famid=>$family) { + if (!is_null($family)) { + $husb = $family->getHusband($person); + $wife = $family->getWife($person); + // $spouse = $family->getSpouse($person); + $children = $family->getChildren(); + $num = count($children); - if ($natdad == "yes") { - } else { - // Husband ----------------------- - if ($husb || $num>0) { - if ($husb) { - $person_step="Yes"; - $parentlinks .= "<a class=\"flyout3\" href=\"".$husb->getHtmlUrl()."\" onclick=\"return familyNavLoad('".$husb->getHtmlUrl()."');\">"; - $parentlinks .= " ".$husb->getFullName(); - $parentlinks .= "</a>"; - $parentlinks .= "<br />"; - } - } + if ($natdad == "yes") { + } else { + // Husband ----------------------- + if ($husb || $num>0) { + if ($husb) { + $person_step="Yes"; + $parentlinks .= "<a class=\"flyout3\" href=\"".$husb->getHtmlUrl()."\" onclick=\"return familyNavLoad('".$husb->getHtmlUrl()."');\">"; + $parentlinks .= " ".$husb->getFullName(); + $parentlinks .= "</a>"; + $parentlinks .= "<br />"; } + } + } - if ($natmom != "yes") { - // Wife ---------------------------- - if ($wife || $num>0) { - if ($wife) { - $person_step="Yes"; - $parentlinks .= "<a class=\"flyout3\" href=\"".$wife->getHtmlUrl()."\" onclick=\"return familyNavLoad('".$wife->getHtmlUrl()."');\">"; - $parentlinks .= " ".$wife->getFullName(); - $parentlinks .= "</a>"; - $parentlinks .= "<br />"; - } - } + if ($natmom != "yes") { + // Wife ---------------------------- + if ($wife || $num>0) { + if ($wife) { + $person_step="Yes"; + $parentlinks .= "<a class=\"flyout3\" href=\"".$wife->getHtmlUrl()."\" onclick=\"return familyNavLoad('".$wife->getHtmlUrl()."');\">"; + $parentlinks .= " ".$wife->getFullName(); + $parentlinks .= "</a>"; + $parentlinks .= "<br />"; } } } + } + } - // Spouse Families -------------------------------------- @var $family Family - foreach ($person->getSpouseFamilies() as $family) { - $spouse = $family->getSpouse($person); - $children = $family->getChildren(); - $num = count($children); + // Spouse Families -------------------------------------- @var $family Family + foreach ($person->getSpouseFamilies() as $family) { + $spouse = $family->getSpouse($person); + $children = $family->getChildren(); + $num = count($children); - // Spouse ------------------------------ - if ($spouse || $num>0) { - if ($spouse) { - $spouselinks .= "<a class=\"flyout3\" href=\"".$spouse->getHtmlUrl()."\" onclick=\"return familyNavLoad('".$spouse->getHtmlUrl()."');\">"; - $spouselinks .= " ".$spouse->getFullName(); - $spouselinks .= "</a>"; - $spouselinks .= "<br />"; - if ($spouse->getFullName() != "") { - $persons = "Yes"; - } - } + // Spouse ------------------------------ + if ($spouse || $num>0) { + if ($spouse) { + $spouselinks .= "<a class=\"flyout3\" href=\"".$spouse->getHtmlUrl()."\" onclick=\"return familyNavLoad('".$spouse->getHtmlUrl()."');\">"; + $spouselinks .= " ".$spouse->getFullName(); + $spouselinks .= "</a>"; + $spouselinks .= "<br />"; + if ($spouse->getFullName() != "") { + $persons = "Yes"; } + } + } - // Children ------------------------------ @var $child Person - $hasChildren = false; - foreach ($children as $c=>$child) { - if ($child) { - if (!$hasChildren) { - $hasChildren = true; - } - $persons="Yes"; - $spouselinks .= "<ul class=\"clist ".$TEXT_DIRECTION."\">"; - $spouselinks .= "<li class=\"flyout3\">"; - $spouselinks .= "<a href=\"".$child->getHtmlUrl()."\" onclick=\"return familyNavLoad('".$child->getHtmlUrl()."');\">"; - $spouselinks .= $child->getFullName(); - $spouselinks .= "</a>"; - $spouselinks .= "</li>"; - $spouselinks .= "</ul>"; - } + // Children ------------------------------ @var $child Person + $hasChildren = false; + foreach ($children as $c=>$child) { + if ($child) { + if (!$hasChildren) { + $hasChildren = true; } - } - if ($persons != "Yes") { - $spouselinks .= " (".WT_I18N::translate('none').")"; - } - if ($person_parent != "Yes") { - $parentlinks .= " (".WT_I18N::translate_c('unknown family', 'unknown').")"; - } - if ($person_step != "Yes") { - $step_parentlinks .= " (".WT_I18N::translate_c('unknown family', 'unknown').")"; + $persons="Yes"; + $spouselinks .= "<ul class=\"clist ".$TEXT_DIRECTION."\">"; + $spouselinks .= "<li class=\"flyout3\">"; + $spouselinks .= "<a href=\"".$child->getHtmlUrl()."\" onclick=\"return familyNavLoad('".$child->getHtmlUrl()."');\">"; + $spouselinks .= $child->getFullName(); + $spouselinks .= "</a>"; + $spouselinks .= "</li>"; + $spouselinks .= "</ul>"; } } } + if ($persons != "Yes") { + $spouselinks .= " (".WT_I18N::translate('none').")"; + } + if ($person_parent != "Yes") { + $parentlinks .= " (".WT_I18N::translate_c('unknown family', 'unknown').")"; + } + if ($person_step != "Yes") { + $step_parentlinks .= " (".WT_I18N::translate_c('unknown family', 'unknown').")"; + } } } } |
