From c1629cd8ad026076d4e9d45bc5a1846f36fc3715 Mon Sep 17 00:00:00 2001 From: fisharebest Date: Mon, 29 Aug 2011 22:09:31 +0000 Subject: #833909 - in manage media links, module dir name not being loaded --- .../_MEDIA/media_0_inverselink.php | 496 ++++++- .../GEDFact_assistant/_MEDIA/media_1_ctrl.php | 1414 +++++++++++++++++++- .../GEDFact_assistant/_MEDIA/media_3_find.php | 798 ----------- .../_MEDIA/media_3_search_add.php | 1388 ------------------- .../GEDFact_assistant/_MEDIA/media_5_input.js | 335 ----- .../GEDFact_assistant/_MEDIA/media_5_input.php | 70 - .../_MEDIA/media_7_parse_addLinksTbl.php | 101 -- .../GEDFact_assistant/_MEDIA/media_query_1a.php | 96 -- .../GEDFact_assistant/_MEDIA/media_query_2a.php | 80 -- .../GEDFact_assistant/_MEDIA/media_query_3a.php | 73 - 10 files changed, 1874 insertions(+), 2977 deletions(-) delete mode 100644 modules_v3/GEDFact_assistant/_MEDIA/media_3_find.php delete mode 100644 modules_v3/GEDFact_assistant/_MEDIA/media_3_search_add.php delete mode 100644 modules_v3/GEDFact_assistant/_MEDIA/media_5_input.js delete mode 100644 modules_v3/GEDFact_assistant/_MEDIA/media_5_input.php delete mode 100644 modules_v3/GEDFact_assistant/_MEDIA/media_7_parse_addLinksTbl.php delete mode 100644 modules_v3/GEDFact_assistant/_MEDIA/media_query_1a.php delete mode 100644 modules_v3/GEDFact_assistant/_MEDIA/media_query_2a.php delete mode 100644 modules_v3/GEDFact_assistant/_MEDIA/media_query_3a.php (limited to 'modules_v3/GEDFact_assistant/_MEDIA') diff --git a/modules_v3/GEDFact_assistant/_MEDIA/media_0_inverselink.php b/modules_v3/GEDFact_assistant/_MEDIA/media_0_inverselink.php index 27bc46e32c..e608c6c8bd 100644 --- a/modules_v3/GEDFact_assistant/_MEDIA/media_0_inverselink.php +++ b/modules_v3/GEDFact_assistant/_MEDIA/media_0_inverselink.php @@ -98,8 +98,7 @@ if ($action == "choose" && $paramok) { alert(id_empty); } else { var iid = document.getElementById('gid').value; - //var winblank = window.open('module.php?mod=GEDFact_assistant&mod_action=_MEDIA/media_query_3a&iid='+iid, 'winblank', 'top=100, left=200, width=400, height=20, toolbar=0, directories=0, location=0, status=0, menubar=0, resizable=1, scrollbars=1'); - var winblank = window.open(WT_MODULES_DIR+'GEDFact_assistant/_MEDIA/media_query_3a.php?iid='+iid, 'winblank', 'top=100, left=200, width=400, height=20, toolbar=0, directories=0, location=0, status=0, menubar=0, resizable=1, scrollbars=1'); + var winblank = window.open('module.php?mod=GEDFact_assistant&mod_action=media_query_3a&iid='+iid, 'winblank', 'top=100, left=200, width=400, height=20, toolbar=0, directories=0, location=0, status=0, menubar=0, resizable=1, scrollbars=1'); } } @@ -150,7 +149,55 @@ if ($action == "choose" && $paramok) { echo ''; echo '', WT_I18N::translate('Links'), ''; echo ''; - require WT_ROOT.WT_MODULES_DIR.'GEDFact_assistant/_MEDIA/media_query_1a.php'; + $links = get_media_relations($mediaid); + echo "
"; + echo ""; + echo ""; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ""; + + $i=1; + foreach (array_keys($links) as $link) { + $record=WT_GedcomRecord::getInstance($link); + echo ""; + echo ""; + echo ""; + + if ($record->getType()=='INDI') { + ?> + + getType()=='FAM') { + if ($record->getHusband()) { + $head=$record->getHusband()->getXref(); + } elseif ($record->getWife()) { + $head=$record->getWife()->getXref(); + } else { + $head=''; + } + ?> + + '; + } + echo ''; + } + + echo "
#ID:', WT_I18N::translate('Name'), '', WT_I18N::translate('Keep'), '', WT_I18N::translate('Remove'), '', WT_I18N::translate('Navigator'), '
"; + echo $i++; + echo ""; + echo $link; + echo ""; + echo $record->getFullName(); + echo "<?php echo WT_I18N::translate('Open Family Navigator'); ?><?php echo WT_I18N::translate('Open Family Navigator'); ?>
"; + echo "
"; + echo "
"; echo ''; } @@ -187,7 +234,376 @@ if ($action == "choose" && $paramok) { echo '

'; echo ''; - require WT_ROOT.WT_MODULES_DIR.'GEDFact_assistant/_MEDIA/media_query_2a.php'; +?> + + + + + +
+ + + + + + + + + + + + + + + + +
#ID:
+
+'; // Admin Option CHAN log update override ======================= if (WT_USER_IS_ADMIN) { @@ -209,7 +625,77 @@ if ($action == "choose" && $paramok) { echo ''; echo '
'; echo '
'; - require WT_ROOT.WT_MODULES_DIR.'GEDFact_assistant/_MEDIA/media_7_parse_addLinksTbl.php'; +?> + +'; echo ''; echo '

', WT_I18N::translate('Close Window'), '
'; diff --git a/modules_v3/GEDFact_assistant/_MEDIA/media_1_ctrl.php b/modules_v3/GEDFact_assistant/_MEDIA/media_1_ctrl.php index b3caa583cd..e3dcaa93bc 100644 --- a/modules_v3/GEDFact_assistant/_MEDIA/media_1_ctrl.php +++ b/modules_v3/GEDFact_assistant/_MEDIA/media_1_ctrl.php @@ -1,39 +1,36 @@ '; echo ''; //-- Search and Add Family Members Area ========================================= - require WT_MODULES_DIR.'GEDFact_assistant/_MEDIA/media_3_search_add.php'; + ?> + + + + + + + + + + + + + + + + +
+ + '; + echo '' ; + echo '  ', WT_I18N::translate('Search'), ''; + echo ''; + ?> +
+
+
+ + + + + + + + + + indi->getChildFamilies(); + foreach ($families as $family) { + $label = $this->indi->getChildFamilyLabel($family); + $people = $this->buildFamilyList($family, "parents"); + $marrdate = $family->getMarriageDate(); + + // Husband ------------------- + if (isset($people["husb"])) { + $married = WT_Date::Compare($censdate, $marrdate); + $nam = $people["husb"]->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']; + } + $menu = new WT_Menu(" " . $people["husb"]->getLabel()); + // $menu->addClass("", "", "submenu"); + $slabel = print_pedigree_person_nav2($people["husb"]->getXref(), 2, 0, $personcount++, $currpid, $censyear); + $slabel .= $parentlinks; + $submenu = new WT_Menu($slabel); + $menu->addSubMenu($submenu); + + + echo ''; + // Define width of Left (Label) column ------- + ?> + + + + + 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']; + } else { + $fulmn = $fulln; + $marn = $surn; + } + + $menu = new WT_Menu(" " . $people["wife"]->getLabel()); + //$menu->addClass("", "", "submenu"); + $slabel = print_pedigree_person_nav2($people["wife"]->getXref(), 2, 0, $personcount++, $currpid, $censyear); + $slabel .= $parentlinks; + $submenu = new WT_Menu($slabel); + $menu->addSubMenu($submenu); + ?> + + + + + + getMarriageDate(); + foreach ($people["children"] as $key=>$child) { + // Get child's marriage status + $married=""; + foreach ($child->getSpouseFamilies() as $childfamily) { + $tmp=$childfamily->getMarriageDate(); + $married = WT_Date::Compare($censdate, $tmp); + } + $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']; + } + + $menu = new WT_Menu(" " . $child->getLabel()); + //$menu->addClass("", "", "submenu"); + $slabel = print_pedigree_person_nav2($child->getXref(), 2, 0, $personcount++, $currpid, $censyear); + $slabel .= $spouselinks; + $submenu = new WT_Menu($slabel); + $menu->addSubMenu($submenu); + + if ($child->getXref()==$pid) { + //Only print Head of Family in Immediate Family Block + } else { + ?> + + + + + + getBirthDate(false); + } + } + + //-- Build step families ---------------------------------------------------------------- + foreach ($this->indi->getChildStepFamilies() as $family) { + $label = $this->indi->getStepFamilyLabel($family); + $people = $this->buildFamilyList($family, "step-parents"); + if ($people) { + echo ""; + } + $marrdate = $family->getMarriageDate(); + + // Husband ----------------------------- + $elderdate = ""; + if (isset($people["husb"]) ) { + $married = WT_Date::Compare($censdate, $marrdate); + $nam = $people["husb"]->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']; + } + $menu = new WT_Menu(); + if ($people["husb"]->getLabel() == ".") { + $menu->addLabel(" " . WT_I18N::translate('Step-Father')); + } else { + $menu->addLabel(" " . $people["husb"]->getLabel()); + } + //$menu->addClass("", "", "submenu"); + $slabel = print_pedigree_person_nav2($people["husb"]->getXref(), 2, 0, $personcount++, $currpid, $censyear); + $slabel .= $parentlinks; + $submenu = new WT_Menu($slabel); + $menu->addSubMenu($submenu); + if (PrintReady($people["husb"]->getDeathYear()) == 0) { $DeathYr = ""; } else { $DeathYr = PrintReady($people["husb"]->getDeathYear()); } + if (PrintReady($people["husb"]->getBirthYear()) == 0) { $BirthYr = ""; } else { $BirthYr = PrintReady($people["husb"]->getBirthYear()); } + ?> + + + + + + getBirthDate(false); + } + + // Wife ------------------- + if (isset($people["wife"]) ) { + $married = WT_Date::Compare($censdate, $marrdate); + $nam = $people["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']; + } + $menu = new WT_Menu(); + if ($people["husb"]->getLabel() == ".") { + $menu->addLabel(" " . WT_I18N::translate('Step-Mother')); + } else { + $menu->addLabel(" " . $people["wife"]->getLabel()); + } + //$menu->addClass("", "", "submenu"); + $slabel = print_pedigree_person_nav2($people["wife"]->getXref(), 2, 0, $personcount++, $currpid, $censyear); + $slabel .= $parentlinks; + $submenu = new WT_Menu($slabel); + $menu->addSubMenu($submenu); + if (PrintReady($people["wife"]->getDeathYear()) == 0) { $DeathYr = ""; } else { $DeathYr = PrintReady($people["wife"]->getDeathYear()); } + if (PrintReady($people["wife"]->getBirthYear()) == 0) { $BirthYr = ""; } else { $BirthYr = PrintReady($people["wife"]->getBirthYear()); } + ?> + + + + + + getMarriageDate(); + foreach ($people["children"] as $key=>$child) { + $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']; + } + $menu = new WT_Menu(" " . $child->getLabel()); + //$menu->addClass("", "", "submenu"); + $slabel = print_pedigree_person_nav2($child->getXref(), 2, 0, $personcount++, $currpid, $censyear); + $slabel .= $spouselinks; + $submenu = new WT_Menu($slabel); + $menu->addSubMenu($submenu); if (PrintReady($child->getDeathYear()) == 0) { $DeathYr = ""; } else { $DeathYr = PrintReady($child->getDeathYear()); } + if (PrintReady($child->getBirthYear()) == 0) { $BirthYr = ""; } else { $BirthYr = PrintReady($child->getBirthYear()); } + ?> + + + + + + getBirthDate(false); + } + } + } + + echo ""; + + //-- Build Spouse Family --------------------------------------------------- + $families = $this->indi->getSpouseFamilies(); + //$personcount = 0; + foreach ($families as $family) { + $people = $this->buildFamilyList($family, "spouse"); + if ($this->indi->equals($people["husb"])) { + $spousetag = 'WIFE'; + } else { + $spousetag = 'HUSB'; + } + $marrdate = $family->getMarriageDate(); + + // Husband ------------------- + if (isset($people["husb"])) { + $married = WT_Date::Compare($censdate, $marrdate); + $nam = $people["husb"]->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']; + } + $menu = new WT_Menu(" " . $people["husb"]->getLabel()); + //$menu->addClass("", "", "submenu"); + $slabel = print_pedigree_person_nav2($people["husb"]->getXref(), 2, 0, $personcount++, $currpid, $censyear); + $slabel .= $parentlinks; + $submenu = new WT_Menu($slabel); + $menu->addSubMenu($submenu); + if (PrintReady($people["husb"]->getDeathYear()) == 0) { $DeathYr = ""; } else { $DeathYr = PrintReady($people["husb"]->getDeathYear()); } + if (PrintReady($people["husb"]->getBirthYear()) == 0) { $BirthYr = ""; } else { $BirthYr = PrintReady($people["husb"]->getBirthYear()); } + ?> + + + + + + 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']; + } else { + $fulmn = $fulln; + $marn = $surn; + } + $menu = new WT_Menu(" " . $people["wife"]->getLabel()); + //$menu->addClass("", "", "submenu"); + $slabel = print_pedigree_person_nav2($people["wife"]->getXref(), 2, 0, $personcount++, $currpid, $censyear); + $slabel .= $parentlinks; + $submenu = new WT_Menu($slabel); + $menu->addSubMenu($submenu); + if (PrintReady($people["wife"]->getDeathYear()) == 0) { $DeathYr = ""; } else { $DeathYr = PrintReady($people["wife"]->getDeathYear()); } + if (PrintReady($people["wife"]->getBirthYear()) == 0) { $BirthYr = ""; } else { $BirthYr = PrintReady($people["wife"]->getBirthYear()); } + ?> + + + + + $child) { + // Get child's marriage status + $married=""; + foreach ($child->getSpouseFamilies() as $childfamily) { + $tmp=$childfamily->getMarriageDate(); + $married = WT_Date::Compare($censdate, $tmp); + } + $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']; + } else { + $fulmn = $fulln; + $marn = $surn; + } + $menu = new WT_Menu(" " . $child->getLabel()); + //$menu->addClass("", "", "submenu"); + $slabel = print_pedigree_person_nav2($child->getXref(), 2, 0, $personcount++, $child->getLabel(), $censyear); + $slabel .= $spouselinks; + $submenu = new WT_Menu($slabel); + $menu->addSubmenu($submenu); + ?> + + + + + + "; + } + ?> + +
+ "; + $headImg2 = "\"".WT_I18N::translate('Click"; + global $tempStringHead; + echo WT_I18N::translate('Click %s to choose person as Head of family.', $headImg); + ?> +

+ +
+
+
+ + getMenu(); ?> + + + + getXref()."&gedcom=".WT_GEDURL."\">"; + echo $headImg2; + echo ""; + ?> + + + + canDisplayDetails())) { + ?> + getFullName()); // Name + ?> + + + +
+ + getMenu(); ?> + + + + getXref()."&gedcom=".WT_GEDURL."\">"; + echo $headImg2; + echo ""; + ?> + + + + canDisplayDetails())) { + ?> + + =0 && isset($nam[1])) { + // echo PrintReady($fulmn); // Full Married Name + //} else { + echo PrintReady($people["wife"]->getFullName()); // Full Name + //} + ?> + + + +
+ + getXref()==$pid) { + echo $child->getLabel(); + } else { + echo $menu->getMenu(); + } + ?> + + + + getXref()."&gedcom=".WT_GEDURL."\">"; + echo $headImg2; + echo ""; + ?> + + + + canDisplayDetails())) { + ?> + =0 && isset($nam[1])) { + // echo PrintReady($fulmn); // Full Married Name + // } else { + echo PrintReady($child->getFullName()); // Full Name + // } + ?> + + + +

+ + getMenu(); ?> + + + + getXref()."&gedcom=".WT_GEDURL."\">"; + echo $headImg2; + echo ""; + ?> + + + + canDisplayDetails())) { + ?> + getLabel()); // label = Relationship + } + ?>", "getSex()); // gend = Gender + ?>", "=0) { + echo "M"; // cond = Condition (Married) + } else { + echo "S"; // cond = Condition (Single) + } + ?>", "getbirthyear()); // yob = Year of Birth + ?>", "getbirthyear()); // age = Census Date minus YOB + ?>", "", "", "getcensbirthplace()); // birthpl = Census Place of Birth + ?>");'> + getFullName()); // Name + ?> + + + +
+ + getMenu(); ?> + + + + getXref()."&gedcom=".WT_GEDURL."\">"; + echo $headImg2; + echo ""; + ?> + + + + canDisplayDetails())) { + ?> + getLabel()); // label = Relationship + } + ?>", "getSex()); // gend = Gender + ?>", "=0 && isset($nam[1])) { + echo "M"; // cond = Condition (Married) + } else { + echo "S"; // cond = Condition (Single) + } + ?>", "getbirthyear()); // yob = Year of Birth + ?>", "getbirthyear()); // age = Census Date minus YOB + ?>", "", "", "getcensbirthplace()); // birthpl = Census Place of Birth + ?>");'> + =0 && isset($nam[1])) { + // echo PrintReady($fulmn); // Full Married Name + //} else { + echo PrintReady($people["wife"]->getFullName()); // Full Name + //} + ?> + + + +
+ + getMenu(); ?> + + + + getXref()."&gedcom=".WT_GEDURL."\">"; + echo $headImg2; + echo ""; + ?> + + + + canDisplayDetails())) { + ?> + + getFullName()); // Name + ?> + + + +

+ + getXref()==$pid) { + echo " " .($people["husb"]->getLabel())." ".WT_I18N::translate('Head of Household:'); + } else { + echo $menu->getMenu(); + } + ?> + + + + getXref()."&gedcom=".WT_GEDURL."\">"; + echo $headImg2; + echo ""; + ?> + + + + canDisplayDetails())) { + ?> + + getFullName()); // Name + ?> + + + +
+ + getXref()==$pid) { + echo " " .($people["wife"]->getLabel())." ".WT_I18N::translate('Head of Household:'); + } else { + echo $menu->getMenu(); + } + ?> + + + + getXref()."&gedcom=".WT_GEDURL."\">"; + echo $headImg2; + echo ""; + ?> + + + + canDisplayDetails())) { + ?> + + =0 && isset($nam[1])) { + // echo PrintReady($fulmn); // Full Married Name + //} else { + echo PrintReady($people["wife"]->getFullName()); // Full Name + //} + ?> + + + +
+ + getMenu(); ?> + + + + getXref()."&gedcom=".WT_GEDURL."\">"; + echo $headImg2; + echo ""; + ?> + + + + canDisplayDetails())) { + ?> + + =0 && isset($nam[1])) { + // echo PrintReady($fulmn); // Full Married Name + // } else { + echo PrintReady($child->getFullName()); // Full Name + // } + ?> + + + +

+
+ '; echo ''; echo ''; } // End IF test for Base pid + +/** + * print the information for an individual chart box + * + * find and print a given individuals information for a pedigree chart + * @param string $pid the Gedcom Xref ID of the to print + * @param int $style the style to print the box in, 1 for smaller boxes, 2 for larger boxes + * @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 $MULTI_MEDIA, $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; + global $chart_style, $box_width, $generations, $show_spouse, $show_full; + global $CHART_BOX_TAGS, $SHOW_LDS_AT_GLANCE, $PEDIGREE_SHOW_GENDER; + global $SEARCH_SPIDER; + + global $spouselinks, $parentlinks, $step_parentlinks, $persons, $person_step, $person_parent, $tabno, $spousetag; + global $natdad, $natmom, $censyear, $censdate; + + if ($style != 2) $style=1; + if (empty($show_full)) $show_full = 0; + if (empty($PEDIGREE_FULL_DETAILS)) $PEDIGREE_FULL_DETAILS = 0; + + if (!isset($OLD_PGENS)) $OLD_PGENS = $DEFAULT_PEDIGREE_GENERATIONS; + if (!isset($talloffset)) $talloffset = $PEDIGREE_LAYOUT; + + $person=WT_Person::getInstance($pid); + if ($pid==false || empty($person)) { + $spouselinks = false; + $parentlinks = false; + $step_parentlinks = false; + } + + $tmp=array('M'=>'','F'=>'F', 'U'=>'NN'); + $isF=$tmp[$person->getSex()]; + $spouselinks = ""; + $parentlinks = ""; + $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 .= "
"; + $spouselinks .= "" . WT_I18N::translate('Family') . " (" .$person->getFullName(). ")
"; + $parentlinks .= "
"; + $parentlinks .= "" . WT_I18N::translate('Parents') . " (" .$person->getFullName(). ")
"; + $step_parentlinks .= "
"; + $step_parentlinks .= "" . WT_I18N::translate('Parents') . " (" .$person->getFullName(). ")
"; + } else { + $spouselinks .= "
"; + $spouselinks .= "" . WT_I18N::translate('Family') . " (" .$person->getFullName(). ")
"; + $parentlinks .= "
"; + $parentlinks .= "" . WT_I18N::translate('Parents') . " (" .$person->getFullName(). ")
"; + $step_parentlinks .= "
"; + $step_parentlinks .= "" . WT_I18N::translate('Parents') . " (" .$person->getFullName(). ")
"; + } + $persons = ""; + $person_parent = ""; + $person_step = ""; + + //-- parent families -------------------------------------- + foreach ($person->getChildFamilies() 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(); + + // 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 .= "getXref())."', "; // pid = PID + $parentlinks .= "'".PrintReady($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 .= "'".PrintReady($husb->getSex())."', "; // sex = Gender + $parentlinks .= "''".", "; // cond = Condition (Married etc) + $parentlinks .= "'".PrintReady($husb->getbirthyear())."', "; // yob = Year of Birth + if ($husb->getbirthyear()>=1) { + $parentlinks .= "'".PrintReady($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 .= "'".PrintReady($husb->getcensbirthplace())."'"; // birthpl = Birthplace + $parentlinks .= ");\">"; + $parentlinks .= PrintReady($husb->getFullName()); + $parentlinks .= ""; + + } 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 .= "getXref())."',"; // pid = PID + // $parentlinks .= "'".PrintReady($fulln)."',"; // nam = Name + + //if ($married>=0 && isset($nam[1])) { + // $parentlinks .= "'".PrintReady($fulmn)."',"; // nam = Full Married Name + //} else { + $parentlinks .= "'".PrintReady($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 .= "'".PrintReady($wife->getSex())."',"; // sex = Gender + $parentlinks .= "''".","; // cond = Condition (Married etc) + $parentlinks .= "'".PrintReady($wife->getbirthyear())."',"; // yob = Year of Birth + if ($wife->getbirthyear()>=1) { + $parentlinks .= "'".PrintReady($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 .= "'".PrintReady($wife->getcensbirthplace())."'"; // birthpl = Birthplace + //$parentlinks .= ");\">
"; + $parentlinks .= ");\">"; + //if ($married>=0 && isset($nam[1])) { + // $parentlinks .= $fulmn; // Full Married Name + //} else { + $parentlinks .= PrintReady($wife->getFullName()); // Full Name + //} + // $parentlinks .= "
"; + $parentlinks .= ""; + } else { + $parentlinks .= WT_I18N::translate('Private'); + } + $parentlinks .= "
"; + $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']; + } + + $parentlinks .= ""; + $parentlinks .= PrintReady($husb->getFullName()); + $parentlinks .= ""; + } else { + $parentlinks .= WT_I18N::translate('Private'); + } + $parentlinks .= "
"; + } + } + } + + 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 .= ""; + $parentlinks .= PrintReady($wife->getFullName()); + $parentlinks .= ""; + } else { + $parentlinks .= WT_I18N::translate('Private'); + } + $parentlinks .= "
"; + } + } + } + } + } + + // 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 .= "getXref())."',"; // pid = PID + //$spouselinks .= "'".PrintReady($fulln)."',"; // nam = Name + //if ($married>=0 && isset($nam[1])) { + // $spouselinks .= "'".PrintReady($fulmn)."',"; // Full Married Name + //} else { + $spouselinks .= "'".PrintReady($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 .= "'".PrintReady($spouse->getSex())."',"; // sex = Gender + $spouselinks .= "''".","; // cond = Condition (Married etc) + $spouselinks .= "'".PrintReady($spouse->getbirthyear())."',"; // yob = Year of Birth + if ($spouse->getbirthyear()>=1) { + $spouselinks .= "'".PrintReady($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 .= "'".PrintReady($spouse->getcensbirthplace())."'"; // birthpl = Birthplace + $spouselinks .= ");\">"; + // $spouselinks .= PrintReady($fulln); + //if ($married>=0 && isset($nam[1])) { + // $spouselinks .= "'".PrintReady($fulmn)."',"; // Full Married Name + //} else { + $spouselinks .= PrintReady($spouse->getFullName()); // Full Name + //} + $spouselinks .= ""; + } else { + $spouselinks .= WT_I18N::translate('Private'); + } + $spouselinks .= ""; + if ($spouse->getFullName() != "") { + $persons = "Yes"; + } + } + } + + // Children ------------------------------ @var $child Person + $spouselinks .= "
"; + $spouselinks .= ""; + $spouselinks .= "
"; + } + } + + if ($persons != "Yes") { + $spouselinks .= "(" . WT_I18N::translate('none') . ")
"; + } else { + $spouselinks .= "
"; + } + + if ($person_parent != "Yes") { + $parentlinks .= "(" . WT_I18N::translate_c('unknown family', 'unknown') . ")
"; + } else { + $parentlinks .= "
"; + } + + if ($person_step != "Yes") { + $step_parentlinks .= "(" . WT_I18N::translate_c('unknown family', 'unknown') . ")
"; + } else { + $step_parentlinks .= "
"; + } + } + } + } +} diff --git a/modules_v3/GEDFact_assistant/_MEDIA/media_3_find.php b/modules_v3/GEDFact_assistant/_MEDIA/media_3_find.php deleted file mode 100644 index d82d66c8f6..0000000000 --- a/modules_v3/GEDFact_assistant/_MEDIA/media_3_find.php +++ /dev/null @@ -1,798 +0,0 @@ - $MEDIA_DIRECTORY_LEVELS)) { - $directory = $MEDIA_DIRECTORY; - $level = 0; -} elseif (preg_match("'^$MEDIA_DIRECTORY'", $directory)==0) { - $directory = $MEDIA_DIRECTORY; - $level = 0; -} -// End variables for find media - -// Variables for Find Special Character -if (empty($language_filter)) { - if (!empty($_SESSION["language_filter"])) { - $language_filter=$_SESSION["language_filter"]; - } else { - $language_filter=WT_LOCALE; - } -} -require WT_ROOT.'includes/specialchars.php'; -// End variables for Find Special Character - -switch ($type) { -case "indi": - print_simple_header(WT_I18N::translate('Find individual ID')); - break; -case "fam": - print_simple_header(WT_I18N::translate('Find Family List')); - break; -case "media": - print_simple_header(WT_I18N::translate('Find media')); - $action="filter"; - break; -case "place": - print_simple_header(WT_I18N::translate('Find Place')); - $action="filter"; - break; -case "repo": - print_simple_header(WT_I18N::translate('Repositories')); - $action="filter"; - break; -case "note": - print_simple_header(WT_I18N::translate('Find Shared Note')); - $action="filter"; - break; -case "source": - print_simple_header(WT_I18N::translate('Find Source')); - $action="filter"; - break; -case "specialchar": - print_simple_header(WT_I18N::translate('Find Special Characters')); - $action="filter"; - break; -} - -echo WT_JS_START; -?> - - function pasterow(id, name, gend, yob, age, bpl) { - window.opener.opener.insertRowToTable(id, name, '', gend, '', yob, age, 'Y', '', bpl); - - } - - function pasteid(id, name, thumb) { - if (thumb) { - window.opener.(id, name, thumb); - - } else { - // GEDFact_assistant ======================== - if (window.opener.document.getElementById('addlinkQueue')) { - window.opener.insertRowToTable(id, name); - // Check if Indi, Fam or source =================== - /* - if (id.match("I")=="I") { - var win01 = window.opener.window.open('edit_interface.php?action=addmedia_links¬eid=newnote&pid='+id, 'win01', 'top=50, left=600, width=420, height=650, resizable=1, scrollbars=1'); - if (window.focus) {win01.focus();} - } else if (id.match("F")=="F") { - // TODO --- alert('Opening Navigator with family id entered will come later'); - } - */ - } - window.opener.(id); - if (window.opener.pastename) window.opener.pastename(name); - - } - } - var language_filter; - function paste_char(selected_char, language_filter, magnify) { - window.opener.paste_char(selected_char, language_filter, magnify); - return false; - } - function setMagnify() { - document.filterspecialchar.magnify.value = ''; - document.filterspecialchar.submit(); - } - function checknames(frm) { - if (document.forms[0].subclick) button = document.forms[0].subclick.value; - else button = ""; - if (frm.filter.value.length<2&button!="all") { - alert(""); - frm.filter.focus(); - return false; - } - if (button=="all") { - frm.filter.value = ""; - } - return true; - } -"; -echo ""; -echo ""; // close column for find text header - -// start column for find options -echo ""; -echo "
"; // start column for find text header - -switch ($type) { -case "indi": - echo WT_I18N::translate('Find individual ID'); - break; -case "fam": - echo WT_I18N::translate('Find Family List'); - break; -case "media": - echo WT_I18N::translate('Find media'); - break; -case "place": - echo WT_I18N::translate('Find Place'); - break; -case "repo": - echo WT_I18N::translate('Repositories'); - break; -case "note": - echo WT_I18N::translate('Find Shared Note'); - break; -case "source": - echo WT_I18N::translate('Find Source'); - break; -case "specialchar": - echo WT_I18N::translate('Find Special Characters'); - break; -} - -echo "
"; - -// Show indi and hide the rest -if ($type == "indi") { - echo "
"; - echo "
"; - echo ""; - echo ""; - echo ""; - echo ""; -/* - echo ""; - echo ""; - echo "
"; - echo WT_I18N::translate('Name contains:'), " "; - echo "
"; - echo "
"; - echo "
"; -*/ - echo "
"; -} - -// Show fam and hide the rest -if ($type == "fam") { - echo "
"; - echo "
"; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "
"; - echo WT_I18N::translate('Name contains:'), " "; - echo "
"; - echo "
"; - echo "
"; - echo "
"; -} - -// Show media and hide the rest -if ($type == "media" && $MULTI_MEDIA) { - echo "
"; - echo "
"; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; // This is for passing the name of which submit button was clicked - echo ""; - echo ""; - echo ""; - echo "
"; - echo WT_I18N::translate('Media contains:'), " "; - echo help_link('simple_filter'); - echo "
"; - echo "", WT_I18N::translate('Show thumbnails'); - echo "
"; - echo " "; - echo ""; - echo "
"; - echo "
"; -} - -// Show place and hide the rest -if ($type == "place") { - echo "
"; - echo "
"; - echo ""; - echo ""; - echo ""; - echo ""; // This is for passing the name of which submit button was clicked - echo ""; - echo ""; - echo "
"; - echo WT_I18N::translate('Place contains:'), " "; - echo "
"; - echo " "; - echo ""; - echo "
"; - echo "
"; -} - -// Show repo and hide the rest -if ($type == "repo") { - echo "
"; - echo "
"; - echo ""; - echo ""; - echo ""; - echo ""; // This is for passing the name of which submit button was clicked - echo ""; - echo ""; - echo "
"; - echo WT_I18N::translate('Repository contains:'), " "; - echo "
"; - echo " "; - echo ""; - echo "
"; - echo "
"; -} - -// Show Shared Notes and hide the rest -if ($type == "note") { - echo "
"; - echo "
"; - echo ""; - echo ""; - echo ""; - echo ""; // This is for passing the name of which submit button was clicked - echo ""; - echo ""; - echo "
"; - echo WT_I18N::translate('Shared Note contains:'), " "; - echo "
"; - echo " "; - echo ""; - echo "
"; - echo "
"; -} - -// Show source and hide the rest -if ($type == "source") { - echo "
"; - echo "
"; - echo ""; - echo ""; - echo ""; - echo ""; // This is for passing the name of which submit button was clicked - echo ""; - echo ""; - echo "
"; - echo WT_I18N::translate('Source contains:'), " "; - echo "
"; - echo " "; - echo ""; - echo "
"; - echo "
"; -} - -// Show specialchar and hide the rest -if ($type == "specialchar") { - echo "
"; - echo "
"; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "
"; - echo "
", WT_I18N::translate('Magnify'), ""; - echo "
"; - echo "
"; -} -// end column for find options -echo "
"; // Close table with find options - -echo "
"; -echo "", WT_I18N::translate('Close Window'), "
"; -echo "
"; - -if ($action=="filter") { - $filter = trim($filter); - $filter_array=explode(' ', preg_replace('/ {2,}/', ' ', $filter)); - - // Output Individual - if ($type == "indi") { - echo ""; - $myindilist=search_indis_names($filter_array, array(WT_GED_ID), 'AND'); - if ($myindilist) { - echo "'; - } else { - echo ""; - } - echo "
', WT_I18N::translate('Total individuals: %s', count($myindilist)), '
"; - echo WT_I18N::translate('No results found.'); - echo "
"; - } - - // Output Family - if ($type == "fam") { - echo ""; - // Get the famrecs with hits on names from the family table - // Get the famrecs with hits in the gedcom record from the family table - $myfamlist = wt_array_merge( - search_fams_names($filter_array, array(WT_GED_ID), 'AND'), - search_fams($filter_array, array(WT_GED_ID), 'AND', true) - ); - if ($myfamlist) { - $curged = $GEDCOM; - echo "'; - } else { - echo ""; - } - echo "
    "; - usort($myfamlist, array('WT_GedcomRecord', 'Compare')); - foreach ($myfamlist as $family) { - echo $family->format_list('li', true); - } - echo '
', WT_I18N::translate('Total families: %s', count($myfamlist)), '
"; - echo WT_I18N::translate('No results found.'); - echo "
"; - } - - // Output Media - if ($type == "media") { - global $dirs; - - $medialist = get_medialist(true, $directory); - - echo ""; - // Show link to previous folder - if ($level>0) { - $levels = explode("/", $directory); - $pdir = ""; - for ($i=0; $i   <-- ".$pdir."   
"; - } - - // Start of media directory table - echo "
"; - - // Tell the user where he is - echo ""; - echo ""; - echo ""; - - // display the directory list - if (count($dirs) || $level) { - sort($dirs); - if ($level) { - echo ""; - } - echo ""; - foreach ($dirs as $indexval => $dir) { - echo ""; - } - } - echo ""; - - /** - * This action generates a thumbnail for the file - * - * @name $create->thumbnail - */ - if ($create=="thumbnail") { - $filename = $_REQUEST["file"]; - generate_thumbnail($directory.$filename, $thumbdir.$filename); - } - - echo "
"; - - // display the images TODO x across if lots of files?? - if (count($medialist) > 0) { - foreach ($medialist as $indexval => $media) { - - // Check if the media belongs to the current folder - preg_match_all("/\//", $media["FILE"], $hits); - $ct = count($hits[0]); - - if (($ct <= $level+1 && $external_links != "http" && !isFileExternal($media["FILE"])) || (isFileExternal($media["FILE"]) && $external_links == "http")) { - // simple filter to reduce the number of items to view - $isvalid = filterMedia($media, $filter, 'http'); - if ($isvalid && $chooseType!="all") { - if ($chooseType=="0file" && !empty($media["XREF"])) $isvalid = false; // skip linked media files - if ($chooseType=="media" && empty($media["XREF"])) $isvalid = false; // skip unlinked media files - } - if ($isvalid) { - if ($media["EXISTS"] && media_filesize($media["FILE"]) != 0) { - $imgsize = findImageSize($media["FILE"]); - $imgwidth = $imgsize[0]+40; - $imgheight = $imgsize[1]+150; - } - else { - $imgwidth = 0; - $imgheight = 0; - } - - echo ""; - - //-- thumbnail field - if ($showthumb) { - echo ""; - } - } - } - } - else { - echo ""; - } - echo "
"; - echo WT_I18N::translate('Current directory'); - echo "
"; - echo substr($directory, 0, -1); - echo "
"; - echo $uplink, "
"; - echo "", WT_I18N::translate('External objects'), ""; - echo "
"; - echo "", $dir, ""; - echo "
"; - if (isset($media["THUMB"])) echo "\"\""; - else echo " "; - } - - //-- name and size field - echo ""; - if ($media["TITL"] != "") { - echo "", PrintReady($media["TITL"]), "  "; - if ($TEXT_DIRECTION=="rtl") echo getRLM(); - echo "(", $media["XREF"], ")"; - if ($TEXT_DIRECTION=="rtl") echo getRLM(); - echo "
"; - } - if (!$embed) { - echo "", $media["FILE"], " -- "; - } - else echo "", $media["FILE"], " -- "; - echo "", WT_I18N::translate('View'), "
"; - if (!$media["EXISTS"] && !isFileExternal($media["FILE"])) echo $media["FILE"], "
", WT_I18N::translate('The filename entered does not exist.'), "
"; - else if (!isFileExternal($media["FILE"]) && !empty($imgsize[0])) { - echo WT_Gedcom_Tag::getLabelValue('__IMAGE_SIZE__', $imgsize[0].' × '.$imgsize[1]); - } - if ($media["LINKED"]) { - echo WT_I18N::translate('This media object is linked to the following:'), "
"; - foreach ($media["LINKS"] as $indi => $type_record) { - if ($type_record!='INDI' && $type_record!='FAM' && $type_record!='SOUR' && $type_record!='OBJE') continue; - $record=WT_GedcomRecord::getInstance($indi); - echo '
'; - switch($type_record) { - case 'INDI': - echo WT_I18N::translate('View Person'), ' - '; - break; - case 'FAM': - echo WT_I18N::translate('View Family'), ' - '; - break; - case 'SOUR': - echo WT_I18N::translate('View Source'), ' - '; - break; - case 'OBJE': - echo WT_I18N::translate('View Object'), ' - '; - break; - } - echo PrintReady($record->getFullName()), ''; - } - } else { - echo WT_I18N::translate('This media object is not linked to any GEDCOM record.'); - } - echo "
"; - echo WT_I18N::translate('No results found.'); - echo "
"; - } - - // Output Places - if ($type == "place") { - echo ""; - $placelist = array(); - if ($all || $filter) { - $placelist=find_place_list($filter); - $ctplace = count($placelist); - if ($ctplace>0) { - $revplacelist = array(); - foreach ($placelist as $indexval => $place) { - $levels = explode(',', $place); // -- split the place into comma seperated values - $levels = array_reverse($levels); // -- reverse the array so that we get the top level first - $placetext = ""; - $j=0; - foreach ($levels as $indexval => $level) { - if ($j>0) $placetext .= ", "; - $placetext .= trim($level); - $j++; - } - $revplacelist[] = $placetext; - } - uasort($revplacelist, "utf8_strcasecmp"); - echo ""; - echo ""; - } - else { - echo ""; - } - } - echo "
", WT_I18N::translate('Places found'), " ", $ctplace; - echo "
    "; - echo WT_I18N::translate('No results found.'); - echo "
"; - } - - // Output Repositories - if ($type == "repo") { - echo ""; - $repo_list = get_repo_list(WT_GED_ID); - if ($repo_list) { - echo ""; - echo ""; - } - else { - echo ""; - } - echo "
", WT_I18N::translate('Repositories found'), " ", count($repo_list); - echo "
"; - echo WT_I18N::translate('No results found.'); - echo "
"; - } - - // Output Shared Notes - if ($type=="note") { - echo ''; - if ($filter) { - $mynotelist = search_notes($filter_array, array(WT_GED_ID), 'AND', true); - } else { - $mynotelist = get_note_list(WT_GED_ID); - } - if ($mynotelist) { - usort($mynotelist, array('WT_GedcomRecord', 'Compare')); - echo ''; - } - else { - echo ''; - } - echo '
', WT_I18N::translate('Shared Notes found'), ' ', count($mynotelist), '
', WT_I18N::translate('No results found.'), '
'; - } - - // Output Sources - if ($type=="source") { - echo ''; - if ($filter) { - $mysourcelist = search_sources($filter_array, array(WT_GED_ID), 'AND', true); - } else { - $mysourcelist = get_source_list(WT_GED_ID); - } - if ($mysourcelist) { - usort($mysourcelist, array('WT_GedcomRecord', 'Compare')); - echo ''; - } - else { - echo ''; - } - echo '
', WT_I18N::translate('Total sources: %s', count($mysourcelist)), '
', WT_I18N::translate('No results found.'), '
'; - } - - // Output Special Characters - if ($type == "specialchar") { - echo "

"; - // lower case special characters - if ($magnify) { - echo ''; - } - foreach ($lcspecialchars as $key=>$value) { - $value = str_replace("'", "\'", $value); - echo ""; - echo $key; - echo " "; - } - if ($magnify) { - echo ''; - } - echo '

'; - //upper case special characters - if ($magnify) { - echo ''; - } - foreach ($ucspecialchars as $key=>$value) { - $value = str_replace("'", "\'", $value); - echo ""; - echo $key; - echo " "; - } - if ($magnify) { - echo ''; - } - echo '

'; - // other special characters (not letters) - if ($magnify) { - echo ''; - } - foreach ($otherspecialchars as $key=>$value) { - $value = str_replace("'", "\'", $value); - echo ""; - echo $key; - echo " "; - } - if ($magnify) { - echo ''; - } - echo '

'; - } -} -echo ""; // Close div that centers table - -// Set focus to the input field -echo WT_JS_START, 'document.filter', $type, '.filter.focus();', WT_JS_END; - -print_simple_footer(); diff --git a/modules_v3/GEDFact_assistant/_MEDIA/media_3_search_add.php b/modules_v3/GEDFact_assistant/_MEDIA/media_3_search_add.php deleted file mode 100644 index de15f769b0..0000000000 --- a/modules_v3/GEDFact_assistant/_MEDIA/media_3_search_add.php +++ /dev/null @@ -1,1388 +0,0 @@ - - - - - - - - - - - - - - - - - -
- - '; - echo '' ; - echo '  ', WT_I18N::translate('Search'), ''; - echo ''; - ?> -
-
-
- - - - - - - - - - indi->getChildFamilies(); - foreach ($families as $family) { - $label = $this->indi->getChildFamilyLabel($family); - $people = $this->buildFamilyList($family, "parents"); - $marrdate = $family->getMarriageDate(); - - // Husband ------------------- - if (isset($people["husb"])) { - $married = WT_Date::Compare($censdate, $marrdate); - $nam = $people["husb"]->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']; - } - $menu = new WT_Menu(" " . $people["husb"]->getLabel()); - // $menu->addClass("", "", "submenu"); - $slabel = print_pedigree_person_nav2($people["husb"]->getXref(), 2, 0, $personcount++, $currpid, $censyear); - $slabel .= $parentlinks; - $submenu = new WT_Menu($slabel); - $menu->addSubMenu($submenu); - - - echo ''; - // Define width of Left (Label) column ------- - ?> - - - - - 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']; - } else { - $fulmn = $fulln; - $marn = $surn; - } - - $menu = new WT_Menu(" " . $people["wife"]->getLabel()); - //$menu->addClass("", "", "submenu"); - $slabel = print_pedigree_person_nav2($people["wife"]->getXref(), 2, 0, $personcount++, $currpid, $censyear); - $slabel .= $parentlinks; - $submenu = new WT_Menu($slabel); - $menu->addSubMenu($submenu); - ?> - - - - - - getMarriageDate(); - foreach ($people["children"] as $key=>$child) { - // Get child's marriage status - $married=""; - foreach ($child->getSpouseFamilies() as $childfamily) { - $tmp=$childfamily->getMarriageDate(); - $married = WT_Date::Compare($censdate, $tmp); - } - $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']; - } - - $menu = new WT_Menu(" " . $child->getLabel()); - //$menu->addClass("", "", "submenu"); - $slabel = print_pedigree_person_nav2($child->getXref(), 2, 0, $personcount++, $currpid, $censyear); - $slabel .= $spouselinks; - $submenu = new WT_Menu($slabel); - $menu->addSubMenu($submenu); - - if ($child->getXref()==$pid) { - //Only print Head of Family in Immediate Family Block - } else { - ?> - - - - - - getBirthDate(false); - } - } - - //-- Build step families ---------------------------------------------------------------- - foreach ($this->indi->getChildStepFamilies() as $family) { - $label = $this->indi->getStepFamilyLabel($family); - $people = $this->buildFamilyList($family, "step-parents"); - if ($people) { - echo ""; - } - $marrdate = $family->getMarriageDate(); - - // Husband ----------------------------- - $elderdate = ""; - if (isset($people["husb"]) ) { - $married = WT_Date::Compare($censdate, $marrdate); - $nam = $people["husb"]->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']; - } - $menu = new WT_Menu(); - if ($people["husb"]->getLabel() == ".") { - $menu->addLabel(" " . WT_I18N::translate('Step-Father')); - } else { - $menu->addLabel(" " . $people["husb"]->getLabel()); - } - //$menu->addClass("", "", "submenu"); - $slabel = print_pedigree_person_nav2($people["husb"]->getXref(), 2, 0, $personcount++, $currpid, $censyear); - $slabel .= $parentlinks; - $submenu = new WT_Menu($slabel); - $menu->addSubMenu($submenu); - if (PrintReady($people["husb"]->getDeathYear()) == 0) { $DeathYr = ""; } else { $DeathYr = PrintReady($people["husb"]->getDeathYear()); } - if (PrintReady($people["husb"]->getBirthYear()) == 0) { $BirthYr = ""; } else { $BirthYr = PrintReady($people["husb"]->getBirthYear()); } - ?> - - - - - - getBirthDate(false); - } - - // Wife ------------------- - if (isset($people["wife"]) ) { - $married = WT_Date::Compare($censdate, $marrdate); - $nam = $people["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']; - } - $menu = new WT_Menu(); - if ($people["husb"]->getLabel() == ".") { - $menu->addLabel(" " . WT_I18N::translate('Step-Mother')); - } else { - $menu->addLabel(" " . $people["wife"]->getLabel()); - } - //$menu->addClass("", "", "submenu"); - $slabel = print_pedigree_person_nav2($people["wife"]->getXref(), 2, 0, $personcount++, $currpid, $censyear); - $slabel .= $parentlinks; - $submenu = new WT_Menu($slabel); - $menu->addSubMenu($submenu); - if (PrintReady($people["wife"]->getDeathYear()) == 0) { $DeathYr = ""; } else { $DeathYr = PrintReady($people["wife"]->getDeathYear()); } - if (PrintReady($people["wife"]->getBirthYear()) == 0) { $BirthYr = ""; } else { $BirthYr = PrintReady($people["wife"]->getBirthYear()); } - ?> - - - - - - getMarriageDate(); - foreach ($people["children"] as $key=>$child) { - $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']; - } - $menu = new WT_Menu(" " . $child->getLabel()); - //$menu->addClass("", "", "submenu"); - $slabel = print_pedigree_person_nav2($child->getXref(), 2, 0, $personcount++, $currpid, $censyear); - $slabel .= $spouselinks; - $submenu = new WT_Menu($slabel); - $menu->addSubMenu($submenu); if (PrintReady($child->getDeathYear()) == 0) { $DeathYr = ""; } else { $DeathYr = PrintReady($child->getDeathYear()); } - if (PrintReady($child->getBirthYear()) == 0) { $BirthYr = ""; } else { $BirthYr = PrintReady($child->getBirthYear()); } - ?> - - - - - - getBirthDate(false); - } - } - } - - echo ""; - - //-- Build Spouse Family --------------------------------------------------- - $families = $this->indi->getSpouseFamilies(); - //$personcount = 0; - foreach ($families as $family) { - $people = $this->buildFamilyList($family, "spouse"); - if ($this->indi->equals($people["husb"])) { - $spousetag = 'WIFE'; - } else { - $spousetag = 'HUSB'; - } - $marrdate = $family->getMarriageDate(); - - // Husband ------------------- - if (isset($people["husb"])) { - $married = WT_Date::Compare($censdate, $marrdate); - $nam = $people["husb"]->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']; - } - $menu = new WT_Menu(" " . $people["husb"]->getLabel()); - //$menu->addClass("", "", "submenu"); - $slabel = print_pedigree_person_nav2($people["husb"]->getXref(), 2, 0, $personcount++, $currpid, $censyear); - $slabel .= $parentlinks; - $submenu = new WT_Menu($slabel); - $menu->addSubMenu($submenu); - if (PrintReady($people["husb"]->getDeathYear()) == 0) { $DeathYr = ""; } else { $DeathYr = PrintReady($people["husb"]->getDeathYear()); } - if (PrintReady($people["husb"]->getBirthYear()) == 0) { $BirthYr = ""; } else { $BirthYr = PrintReady($people["husb"]->getBirthYear()); } - ?> - - - - - - 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']; - } else { - $fulmn = $fulln; - $marn = $surn; - } - $menu = new WT_Menu(" " . $people["wife"]->getLabel()); - //$menu->addClass("", "", "submenu"); - $slabel = print_pedigree_person_nav2($people["wife"]->getXref(), 2, 0, $personcount++, $currpid, $censyear); - $slabel .= $parentlinks; - $submenu = new WT_Menu($slabel); - $menu->addSubMenu($submenu); - if (PrintReady($people["wife"]->getDeathYear()) == 0) { $DeathYr = ""; } else { $DeathYr = PrintReady($people["wife"]->getDeathYear()); } - if (PrintReady($people["wife"]->getBirthYear()) == 0) { $BirthYr = ""; } else { $BirthYr = PrintReady($people["wife"]->getBirthYear()); } - ?> - - - - - $child) { - // Get child's marriage status - $married=""; - foreach ($child->getSpouseFamilies() as $childfamily) { - $tmp=$childfamily->getMarriageDate(); - $married = WT_Date::Compare($censdate, $tmp); - } - $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']; - } else { - $fulmn = $fulln; - $marn = $surn; - } - $menu = new WT_Menu(" " . $child->getLabel()); - //$menu->addClass("", "", "submenu"); - $slabel = print_pedigree_person_nav2($child->getXref(), 2, 0, $personcount++, $child->getLabel(), $censyear); - $slabel .= $spouselinks; - $submenu = new WT_Menu($slabel); - $menu->addSubmenu($submenu); - ?> - - - - - - "; - } - ?> - -
- "; - $headImg2 = "\"".WT_I18N::translate('Click"; - global $tempStringHead; - echo WT_I18N::translate('Click %s to choose person as Head of family.', $headImg); - ?> -

- -
-
-
- - getMenu(); ?> - - - - getXref()."&gedcom=".WT_GEDURL."\">"; - echo $headImg2; - echo ""; - ?> - - - - canDisplayDetails())) { - ?> - getFullName()); // Name - ?> - - - -
- - getMenu(); ?> - - - - getXref()."&gedcom=".WT_GEDURL."\">"; - echo $headImg2; - echo ""; - ?> - - - - canDisplayDetails())) { - ?> - - =0 && isset($nam[1])) { - // echo PrintReady($fulmn); // Full Married Name - //} else { - echo PrintReady($people["wife"]->getFullName()); // Full Name - //} - ?> - - - -
- - getXref()==$pid) { - echo $child->getLabel(); - } else { - echo $menu->getMenu(); - } - ?> - - - - getXref()."&gedcom=".WT_GEDURL."\">"; - echo $headImg2; - echo ""; - ?> - - - - canDisplayDetails())) { - ?> - =0 && isset($nam[1])) { - // echo PrintReady($fulmn); // Full Married Name - // } else { - echo PrintReady($child->getFullName()); // Full Name - // } - ?> - - - -

- - getMenu(); ?> - - - - getXref()."&gedcom=".WT_GEDURL."\">"; - echo $headImg2; - echo ""; - ?> - - - - canDisplayDetails())) { - ?> - getLabel()); // label = Relationship - } - ?>", "getSex()); // gend = Gender - ?>", "=0) { - echo "M"; // cond = Condition (Married) - } else { - echo "S"; // cond = Condition (Single) - } - ?>", "getbirthyear()); // yob = Year of Birth - ?>", "getbirthyear()); // age = Census Date minus YOB - ?>", "", "", "getcensbirthplace()); // birthpl = Census Place of Birth - ?>");'> - getFullName()); // Name - ?> - - - -
- - getMenu(); ?> - - - - getXref()."&gedcom=".WT_GEDURL."\">"; - echo $headImg2; - echo ""; - ?> - - - - canDisplayDetails())) { - ?> - getLabel()); // label = Relationship - } - ?>", "getSex()); // gend = Gender - ?>", "=0 && isset($nam[1])) { - echo "M"; // cond = Condition (Married) - } else { - echo "S"; // cond = Condition (Single) - } - ?>", "getbirthyear()); // yob = Year of Birth - ?>", "getbirthyear()); // age = Census Date minus YOB - ?>", "", "", "getcensbirthplace()); // birthpl = Census Place of Birth - ?>");'> - =0 && isset($nam[1])) { - // echo PrintReady($fulmn); // Full Married Name - //} else { - echo PrintReady($people["wife"]->getFullName()); // Full Name - //} - ?> - - - -
- - getMenu(); ?> - - - - getXref()."&gedcom=".WT_GEDURL."\">"; - echo $headImg2; - echo ""; - ?> - - - - canDisplayDetails())) { - ?> - - getFullName()); // Name - ?> - - - -

- - getXref()==$pid) { - echo " " .($people["husb"]->getLabel())." ".WT_I18N::translate('Head of Household:'); - } else { - echo $menu->getMenu(); - } - ?> - - - - getXref()."&gedcom=".WT_GEDURL."\">"; - echo $headImg2; - echo ""; - ?> - - - - canDisplayDetails())) { - ?> - - getFullName()); // Name - ?> - - - -
- - getXref()==$pid) { - echo " " .($people["wife"]->getLabel())." ".WT_I18N::translate('Head of Household:'); - } else { - echo $menu->getMenu(); - } - ?> - - - - getXref()."&gedcom=".WT_GEDURL."\">"; - echo $headImg2; - echo ""; - ?> - - - - canDisplayDetails())) { - ?> - - =0 && isset($nam[1])) { - // echo PrintReady($fulmn); // Full Married Name - //} else { - echo PrintReady($people["wife"]->getFullName()); // Full Name - //} - ?> - - - -
- - getMenu(); ?> - - - - getXref()."&gedcom=".WT_GEDURL."\">"; - echo $headImg2; - echo ""; - ?> - - - - canDisplayDetails())) { - ?> - - =0 && isset($nam[1])) { - // echo PrintReady($fulmn); // Full Married Name - // } else { - echo PrintReady($child->getFullName()); // Full Name - // } - ?> - - - -

-
-'','F'=>'F', 'U'=>'NN'); - $isF=$tmp[$person->getSex()]; - $spouselinks = ""; - $parentlinks = ""; - $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 .= "
"; - $spouselinks .= "" . WT_I18N::translate('Family') . " (" .$person->getFullName(). ")
"; - $parentlinks .= "
"; - $parentlinks .= "" . WT_I18N::translate('Parents') . " (" .$person->getFullName(). ")
"; - $step_parentlinks .= "
"; - $step_parentlinks .= "" . WT_I18N::translate('Parents') . " (" .$person->getFullName(). ")
"; - } else { - $spouselinks .= "
"; - $spouselinks .= "" . WT_I18N::translate('Family') . " (" .$person->getFullName(). ")
"; - $parentlinks .= "
"; - $parentlinks .= "" . WT_I18N::translate('Parents') . " (" .$person->getFullName(). ")
"; - $step_parentlinks .= "
"; - $step_parentlinks .= "" . WT_I18N::translate('Parents') . " (" .$person->getFullName(). ")
"; - } - $persons = ""; - $person_parent = ""; - $person_step = ""; - - //-- parent families -------------------------------------- - foreach ($person->getChildFamilies() 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(); - - // 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 .= "getXref())."', "; // pid = PID - $parentlinks .= "'".PrintReady($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 .= "'".PrintReady($husb->getSex())."', "; // sex = Gender - $parentlinks .= "''".", "; // cond = Condition (Married etc) - $parentlinks .= "'".PrintReady($husb->getbirthyear())."', "; // yob = Year of Birth - if ($husb->getbirthyear()>=1) { - $parentlinks .= "'".PrintReady($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 .= "'".PrintReady($husb->getcensbirthplace())."'"; // birthpl = Birthplace - $parentlinks .= ");\">"; - $parentlinks .= PrintReady($husb->getFullName()); - $parentlinks .= ""; - - } 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 .= "getXref())."',"; // pid = PID - // $parentlinks .= "'".PrintReady($fulln)."',"; // nam = Name - - //if ($married>=0 && isset($nam[1])) { - // $parentlinks .= "'".PrintReady($fulmn)."',"; // nam = Full Married Name - //} else { - $parentlinks .= "'".PrintReady($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 .= "'".PrintReady($wife->getSex())."',"; // sex = Gender - $parentlinks .= "''".","; // cond = Condition (Married etc) - $parentlinks .= "'".PrintReady($wife->getbirthyear())."',"; // yob = Year of Birth - if ($wife->getbirthyear()>=1) { - $parentlinks .= "'".PrintReady($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 .= "'".PrintReady($wife->getcensbirthplace())."'"; // birthpl = Birthplace - //$parentlinks .= ");\">
"; - $parentlinks .= ");\">"; - //if ($married>=0 && isset($nam[1])) { - // $parentlinks .= $fulmn; // Full Married Name - //} else { - $parentlinks .= PrintReady($wife->getFullName()); // Full Name - //} - // $parentlinks .= "
"; - $parentlinks .= ""; - } else { - $parentlinks .= WT_I18N::translate('Private'); - } - $parentlinks .= "
"; - $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']; - } - - $parentlinks .= ""; - $parentlinks .= PrintReady($husb->getFullName()); - $parentlinks .= ""; - } else { - $parentlinks .= WT_I18N::translate('Private'); - } - $parentlinks .= "
"; - } - } - } - - 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 .= ""; - $parentlinks .= PrintReady($wife->getFullName()); - $parentlinks .= ""; - } else { - $parentlinks .= WT_I18N::translate('Private'); - } - $parentlinks .= "
"; - } - } - } - } - } - - // 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 .= "getXref())."',"; // pid = PID - //$spouselinks .= "'".PrintReady($fulln)."',"; // nam = Name - //if ($married>=0 && isset($nam[1])) { - // $spouselinks .= "'".PrintReady($fulmn)."',"; // Full Married Name - //} else { - $spouselinks .= "'".PrintReady($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 .= "'".PrintReady($spouse->getSex())."',"; // sex = Gender - $spouselinks .= "''".","; // cond = Condition (Married etc) - $spouselinks .= "'".PrintReady($spouse->getbirthyear())."',"; // yob = Year of Birth - if ($spouse->getbirthyear()>=1) { - $spouselinks .= "'".PrintReady($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 .= "'".PrintReady($spouse->getcensbirthplace())."'"; // birthpl = Birthplace - $spouselinks .= ");\">"; - // $spouselinks .= PrintReady($fulln); - //if ($married>=0 && isset($nam[1])) { - // $spouselinks .= "'".PrintReady($fulmn)."',"; // Full Married Name - //} else { - $spouselinks .= PrintReady($spouse->getFullName()); // Full Name - //} - $spouselinks .= ""; - } else { - $spouselinks .= WT_I18N::translate('Private'); - } - $spouselinks .= ""; - if ($spouse->getFullName() != "") { - $persons = "Yes"; - } - } - } - - // Children ------------------------------ @var $child Person - $spouselinks .= "
"; - $spouselinks .= ""; - $spouselinks .= "
"; - } - } - - if ($persons != "Yes") { - $spouselinks .= "(" . WT_I18N::translate('none') . ")
"; - } else { - $spouselinks .= "
"; - } - - if ($person_parent != "Yes") { - $parentlinks .= "(" . WT_I18N::translate_c('unknown family', 'unknown') . ")
"; - } else { - $parentlinks .= "
"; - } - - if ($person_step != "Yes") { - $step_parentlinks .= "(" . WT_I18N::translate_c('unknown family', 'unknown') . ")
"; - } else { - $step_parentlinks .= "
"; - } - } - } - } -} diff --git a/modules_v3/GEDFact_assistant/_MEDIA/media_5_input.js b/modules_v3/GEDFact_assistant/_MEDIA/media_5_input.js deleted file mode 100644 index d39280b710..0000000000 --- a/modules_v3/GEDFact_assistant/_MEDIA/media_5_input.js +++ /dev/null @@ -1,335 +0,0 @@ -/** - * Media Link Assistant Control module for webtrees - * - * Media Link information about an individual - * - * webtrees: Web based Family History software - * Copyright (C) 2011 webtrees development team. - * - * Derived from PhpGedView - * Copyright (C) 2002 to 2008 PGV Development Team. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * @package webtrees - * @subpackage GEDFact_assistant - * @version $Id$ -*/ - -var INPUT_NAME_PREFIX = 'InputCell_'; // this is being set via script -var RADIO_NAME = "totallyrad"; // this is being set via script -var TABLE_NAME = 'addlinkQueue'; // this should be named in the HTML -var ROW_BASE = 1; // first number (for display) -var hasLoaded = false; - -window.onload=fillInRows; - -function fillInRows() -{ - hasLoaded = true; - //insertRowToTable(); - //addRowToTable(); -} - -// CONFIG: -// myRowObject is an object for storing information about the table rows -//function myRowObject(zero, one, two, three, four, five, six, seven, eight, nine, ten, cb, ra) -function myRowObject(zero, one, two, cb, ra) -{ - this.zero = zero; // text object - this.one = one; // input text object - this.two = two; // input text object - - this.cb = cb; // input checkbox object - this.ra = ra; // input radio object -} - -/* - * insertRowToTable - * Insert and reorder - */ -//function insertRowToTable(pid, nam, label, gend, cond, yob, age, YMD, occu, birthpl) -function insertRowToTable(pid, nam, head) -{ - if (hasLoaded) { - - var tbl = document.getElementById(TABLE_NAME); - var rowToInsertAt = ""; - - // Get links list ==================================== - var links = document.getElementById('existLinkTbl'); - var numrows = links.rows.length; - var strRow = ''; - for (var i=1; i 0) { - var rIndex = checkedObjArray[0].sectionRowIndex; - deleteRows(checkedObjArray); - reorderRows(tbl, rIndex); - } - } -} - -// If there isn't an element with an onclick event in your row, then this function can't be used. -function deleteCurrentRow(obj) -{ - if (hasLoaded) { - var delRow = obj.parentNode.parentNode; - var tbl = delRow.parentNode.parentNode; - var rIndex = delRow.sectionRowIndex; - var rowArray = new Array(delRow); - deleteRows(rowArray); - reorderRows(tbl, rIndex); - } -} - -function reorderRows(tbl, startingIndex) -{ - if (hasLoaded) { - if (tbl.tBodies[0].rows[startingIndex]) { - var count = startingIndex + ROW_BASE; - for (var i=startingIndex; i - - - - - - -'; -?> - - - - - - - - - - - - -
#ID:
diff --git a/modules_v3/GEDFact_assistant/_MEDIA/media_7_parse_addLinksTbl.php b/modules_v3/GEDFact_assistant/_MEDIA/media_7_parse_addLinksTbl.php deleted file mode 100644 index 250384e767..0000000000 --- a/modules_v3/GEDFact_assistant/_MEDIA/media_7_parse_addLinksTbl.php +++ /dev/null @@ -1,101 +0,0 @@ - - - diff --git a/modules_v3/GEDFact_assistant/_MEDIA/media_query_1a.php b/modules_v3/GEDFact_assistant/_MEDIA/media_query_1a.php deleted file mode 100644 index 17420dd3e1..0000000000 --- a/modules_v3/GEDFact_assistant/_MEDIA/media_query_1a.php +++ /dev/null @@ -1,96 +0,0 @@ - - -> - - - -"; - echo ""; - echo ""; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ""; - - $i=1; - foreach (array_keys($links) as $link) { - $record=WT_GedcomRecord::getInstance($link); - echo ""; - echo ""; - echo ""; - - if ($record->getType()=='INDI') { - ?> - - getType()=='FAM') { - if ($record->getHusband()) { - $head=$record->getHusband()->getXref(); - } elseif ($record->getWife()) { - $head=$record->getWife()->getXref(); - } else { - $head=''; - } - ?> - - '; - } - echo ''; - } - - echo "
#ID:', WT_I18N::translate('Name'), '', WT_I18N::translate('Keep'), '', WT_I18N::translate('Remove'), '', WT_I18N::translate('Navigator'), '
"; - echo $i++; - echo ""; - echo $link; - echo ""; - echo $record->getFullName(); - echo "<?php echo WT_I18N::translate('Open Family Navigator'); ?><?php echo WT_I18N::translate('Open Family Navigator'); ?>
"; - echo ""; - echo "
"; -?> - - - diff --git a/modules_v3/GEDFact_assistant/_MEDIA/media_query_2a.php b/modules_v3/GEDFact_assistant/_MEDIA/media_query_2a.php deleted file mode 100644 index 9b31206ea3..0000000000 --- a/modules_v3/GEDFact_assistant/_MEDIA/media_query_2a.php +++ /dev/null @@ -1,80 +0,0 @@ - - -> - - - - - - - - - -
- -
- - - diff --git a/modules_v3/GEDFact_assistant/_MEDIA/media_query_3a.php b/modules_v3/GEDFact_assistant/_MEDIA/media_query_3a.php deleted file mode 100644 index 80c7258048..0000000000 --- a/modules_v3/GEDFact_assistant/_MEDIA/media_query_3a.php +++ /dev/null @@ -1,73 +0,0 @@ -getType()=='FAM') { - if ($record->getHusband()) { - $headjs=$record->getHusband()->getXref(); - } elseif ($record->getWife()) { - $headjs=$record->getWife()->getXref(); - } - } - ?> - - - - - - -- cgit v1.3