function popup($text, $show_data = true) { global $dbh, $tree_id, $lang, $number, $c, $tree_prefix_quoted; $person = $text; $text = ''; include_once "../include/person_cls.php"; include_once "../include/marriage_cls.php"; //$person_man=$dbh->query("SELECT * FROM ".safe_text($_SESSION['tree_prefix'])."person WHERE pers_gedcomnumber='".safe_text($person)."'"); $person_man = $dbh->query("SELECT * FROM humo_persons\n\t\tWHERE pers_tree_id='" . $tree_id . "' AND pers_gedcomnumber='" . safe_text($person) . "'"); @($person_manDb = $person_man->fetch(PDO::FETCH_OBJ)); //*** Use class to show person *** $man_cls = new person_cls(); $man_cls->construct($person_manDb); $man_privacy = $man_cls->privacy; $name = $man_cls->person_name($person_manDb); if ($person_manDb->pers_sexe == "M") { $text .= '<li><img src="../images/man.gif" class="ui-li-icon">'; } elseif ($person_manDb->pers_sexe == "F") { $text .= '<li><img src="../images/woman.gif" class="ui-li-icon">'; } else { $text .= '<li><img src="../images/unknown.gif" class="ui-li-icon">'; } $number_text = ''; if ($number == 1) { $number_text = $c + 1 . ' '; } $text .= '<p>' . $number_text . '<a href="family.php?id=' . $person_manDb->pers_gedcomnumber . '">' . $name["index_name"] . '</a><br>'; if ($show_data == true) { if ($man_privacy) { $text .= __(' PRIVACY FILTER'); } else { // no privacy set if ($person_manDb->pers_birth_date or $person_manDb->pers_birth_place) { $text .= ucfirst(__('*')) . ' ' . date_place($person_manDb->pers_birth_date, $person_manDb->pers_birth_place) . '<br>'; } elseif ($person_manDb->pers_bapt_date or $person_manDb->pers_bapt_place) { $text .= ucfirst(__('~')) . ' ' . date_place($person_manDb->pers_bapt_date, $person_manDb->pers_bapt_place) . '<br>'; } if ($person_manDb->pers_death_date or $person_manDb->pers_death_place) { $text .= ucfirst(__('†')) . ' ' . date_place($person_manDb->pers_death_date, $person_manDb->pers_death_place) . '<br>'; } elseif ($person_manDb->pers_buried_date or $person_manDb->pers_buried_place) { if ($person_manDb->pers_cremation) { $var .= ucfirst(__('crem.')) . ' '; } else { $var .= ucfirst(__('buried')) . ' '; } $var .= date_place($person_manDb->pers_buried_date, $person_manDb->pers_buried_place) . '<br>'; } else { $text .= '</p></li>'; } } } return $text; }
function witness($gedcomnr, $event, $field = 'person') { global $dbh, $db_functions; $counter = 0; $text = ''; if ($gedcomnr) { $witness_cls = new person_cls(); if ($field == 'person') { $witness_qry = $db_functions->get_events_person($gedcomnr, $event); } else { $witness_qry = $db_functions->get_events_family($gedcomnr, $event); } foreach ($witness_qry as $witnessDb) { $counter++; if ($counter > 1) { $text .= ', '; } if ($witnessDb->event_event) { if (substr($witnessDb->event_event, 0, 1) == '@') { // *** Connected witness *** $witness_nameDb = $db_functions->get_person(substr($witnessDb->event_event, 1, -1)); $name = $witness_cls->person_name($witness_nameDb); $text .= '<a href="' . $_SERVER['PHP_SELF'] . '?id=' . $witness_nameDb->pers_indexnr . '&main_person=' . $witness_nameDb->pers_gedcomnumber . '">' . rtrim($name["standard_name"]) . '</a>'; } else { // *** Witness as text *** $text .= $witnessDb->event_event; } } if ($witnessDb->event_date) { $text .= ' ' . date_place($witnessDb->event_date, ''); } // *** Use date_place function, there is no place here... *** $source = show_sources2($field, "pers_event_source", $witnessDb->event_id); if ($source) { $text .= $source; } } } return $text; }
function person_data($person_kind, $id) { global $dbh, $db_functions, $tree_id, $dataDb, $user, $language, $humo_option, $family_id, $uri_path; global $family_expanded, $change_main_person; global $childnr, $screen_mode, $dirmark1, $dirmark2; global $templ_person; global $sect, $arial12; // *** RTF export *** unset($templ_person); $personDb = $this->personDb; $privacy = $this->privacy; // *** Settings for mobile version, show details in multiple lines *** if ($person_kind == "mobile") { $family_expanded = true; } // *** $personDb is empty by N.N. person *** if ($personDb) { $tree_prefix_quoted = $personDb->pers_tree_prefix; $db_functions->set_tree_prefix($tree_prefix_quoted); $process_text = ''; $temp = ''; //*** PRIVACY PART *** $privacy_filter = ''; if ($privacy) { if ($screen_mode == "mobile") { return __('PRIVACY FILTER'); } elseif ($screen_mode != "PDF") { $privacy_filter = ' ' . __('PRIVACY FILTER'); } else { return; } // makes no sense to ask for login in a pdf report..... } else { // *** Quality (function show_quality can be found in script: family.php) *** // Disabled because normally quality belongs to a source. //if ($personDb->pers_quality=='0' or $personDb->pers_quality){ // $quality_text=show_quality($personDb->pers_quality); // $process_text.= ' <i>'.ucfirst($quality_text).'</i>'; //} // *** Show extra names of BK *** if ($personDb->pers_gedcomnumber) { $eventnr = 0; $name_qry = $db_functions->get_events_person($personDb->pers_gedcomnumber, 'name'); foreach ($name_qry as $nameDb) { $eventnr++; $text = ''; if ($nameDb->event_gedcom == '_AKAN') { $text .= __('Also known as') . ': '; } // *** MyHeritage Family Tree Builder *** if ($nameDb->event_gedcom == '_AKA') { $text .= __('Also known as') . ': '; } if ($nameDb->event_gedcom == 'NICK') { $text .= __('Nickname') . ': '; } if ($nameDb->event_gedcom == '_ALIA') { $text .= __('alias name') . ': '; } // For Pro-Gen if ($nameDb->event_gedcom == '_SHON') { $text .= __('Short name (for reports)') . ': '; } if ($nameDb->event_gedcom == '_ADPN') { $text .= __('Adopted name') . ': '; } if ($nameDb->event_gedcom == '_HEBN') { $text .= __('Hebrew name') . ': '; } if ($nameDb->event_gedcom == '_CENN') { $text .= __('Census name') . ': '; } if ($nameDb->event_gedcom == '_MARN') { $text .= __('Married name') . ': '; } if ($nameDb->event_gedcom == '_GERN') { $text .= __('Nickname') . ': '; } if ($nameDb->event_gedcom == '_FARN') { $text .= __('Farm name') . ': '; } if ($nameDb->event_gedcom == '_BIRN') { $text .= __('Birth name') . ': '; } if ($nameDb->event_gedcom == '_INDN') { $text .= __('Indian name') . ': '; } if ($nameDb->event_gedcom == '_FKAN') { $text .= __('Formal name') . ': '; } if ($nameDb->event_gedcom == '_CURN') { $text .= __('Current name') . ': '; } if ($nameDb->event_gedcom == '_SLDN') { $text .= __('Soldier name') . ': '; } if ($nameDb->event_gedcom == '_FRKA') { $text .= __('Formerly known as') . ': '; } if ($nameDb->event_gedcom == '_RELN') { $text .= __('Religious name') . ': '; } if ($nameDb->event_gedcom == '_OTHN') { $text .= __('Other name') . ': '; } if ($eventnr > 1) { $templ_person["bknames" . $eventnr] = ', '; $process_text .= ', '; $text = lcfirst($text); } else { $templ_person["bknames" . $eventnr] = ''; $text = ucfirst($text); } $templ_person["bknames" . $eventnr] .= $text; if ($templ_person["bknames" . $eventnr] != '') { $temp = "bk_names" . $eventnr; } $process_text .= $text; if ($nameDb->event_date) { $templ_person["bk_date" . $eventnr] = date_place($nameDb->event_date, '') . ' '; if ($templ_person["bk_date" . $eventnr] != '') { $temp = "bk_date" . $eventnr; } $process_text .= $templ_person["bk_date" . $eventnr]; } $templ_person["bk_event" . $eventnr] = $nameDb->event_event; if ($templ_person["bk_event" . $eventnr] != '') { $temp = "bk_event" . $eventnr; } $process_text .= $nameDb->event_event; $source = show_sources2("person", "pers_event_source", $nameDb->event_id); if ($source) { if ($screen_mode == 'PDF') { $templ_person["bk_source" . $eventnr] = $source; $temp = "bk_source" . $eventnr; } else { $process_text .= $source; } } if ($nameDb->event_text) { $templ_person["bk_text" . $eventnr] = ' ' . $nameDb->event_text; $temp = "bk_text" . $eventnr; $process_text .= $templ_person["bk_text" . $eventnr]; } } unset($name_qry); } // *** Own code *** if ($user['group_own_code'] == 'j' and $personDb->pers_own_code) { if ($temp) { $templ_person[$temp] .= ", "; } //$templ_person["own_code"]='('.ucfirst($personDb->pers_own_code).')'; $templ_person["own_code"] = ucfirst($personDb->pers_own_code); $temp = "own_code"; if (!$process_text or $family_expanded == true) { $text = '<b>' . __('Own code') . ':</b> '; } else { $text = ', <b>' . lcfirst(__('Own code')) . ':</b> '; } // if ($process_text) $process_text.=', '; //$process_text.='<span class="pers_own_code">'.$templ_person["own_code"].'</span>'; $process_text .= '<span class="pers_own_code">' . $text . $templ_person["own_code"] . '</span>'; } // **************** // *** BIRTH *** // **************** $text = ''; if ($personDb->pers_birth_date or $personDb->pers_birth_place) { $templ_person["born_dateplacetime"] = date_place($personDb->pers_birth_date, $personDb->pers_birth_place); if ($templ_person["born_dateplacetime"] != '') { $temp = "born_dateplacetime"; } $text = $templ_person["born_dateplacetime"]; } // *** Birth time *** if (isset($personDb->pers_birth_time) and $personDb->pers_birth_time) { $templ_person["born_dateplacetime"] = ' ' . __('at') . ' ' . $personDb->pers_birth_time . ' ' . __('hour'); $temp = "born_dateplacetime"; $text .= $templ_person["born_dateplacetime"]; } if ($user["group_texts_pers"] == 'j') { $work_text = process_text($personDb->pers_birth_text); if ($work_text) { //$templ_person["born_text"]=", ".$work_text; $templ_person["born_text"] = " " . $work_text; $temp = "born_text"; $text .= $templ_person["born_text"]; } } // *** Birth source *** $source = show_sources2("person", "pers_birth_source", $personDb->pers_gedcomnumber); if ($source) { if ($screen_mode == 'PDF') { $templ_person["born_source"] = $source; $temp = "born_source"; } elseif ($screen_mode == 'RTF') { $rtf_text = strip_tags($templ_person["born_source"], "<b><i>"); $sect->writeText($rtf_text, $arial12, new PHPRtfLite_ParFormat()); } else { $text .= $dirmark1 . $source; } } // *** Birth declaration/ registration *** if ($personDb->pers_gedcomnumber) { $temp_text = witness($personDb->pers_gedcomnumber, 'birth_declaration'); if ($temp_text) { //if($temp) { $templ_person[$temp].=" ("; } $templ_person["born_witn"] = ' (' . __('birth declaration') . ': ' . $temp_text . ')'; $temp = "born_witn"; $text .= $templ_person["born_witn"]; } } // *** Check for birth items, if needed use a new line *** if ($text) { if (!$process_text or $family_expanded == true) { $text = '<b>' . ucfirst(__('born')) . '</b> ' . $text; } else { $text = ', <b>' . __('born') . '</b> ' . $text; } if ($process_text and $family_expanded == true) { $text = '<br>' . $text; } $process_text .= $text; } // *************** // *** BAPTISE *** // *************** $text = ''; if ($personDb->pers_bapt_date or $personDb->pers_bapt_place) { $templ_person["bapt_dateplacetime"] = date_place($personDb->pers_bapt_date, $personDb->pers_bapt_place); if ($templ_person["bapt_dateplacetime"] != '') { $temp = "bapt_dateplacetime"; } $text = $templ_person["bapt_dateplacetime"]; } if ($user["group_texts_pers"] == 'j') { $work_text = process_text($personDb->pers_bapt_text); if ($work_text) { //if($temp) { $templ_person[$temp].=", "; } //$templ_person["bapt_text"]=$work_text; $templ_person["bapt_text"] = ' ' . $work_text; $temp = "bapt_text"; //$text.=", ".$work_text; $text .= $templ_person["bapt_text"]; } } if ($user['group_religion'] == 'j' and $personDb->pers_religion) { $templ_person["bapt_reli"] = " (" . __('religion') . ': ' . $personDb->pers_religion . ')'; $temp = "bapt_reli"; $text .= ' <span class="religion">(' . __('religion') . ': ' . $personDb->pers_religion . ')</span>'; } // *** Baptise source *** $source = show_sources2("person", "pers_bapt_source", $personDb->pers_gedcomnumber); if ($source) { if ($screen_mode == 'PDF') { $templ_person["bapt_source"] = $source; $temp = "bapt_source"; } else { $text .= $source; } } // *** Show baptise witnesses *** if ($personDb->pers_gedcomnumber) { $temp_text = witness($personDb->pers_gedcomnumber, 'baptism_witness'); if ($temp_text) { if ($temp) { $templ_person[$temp] .= " ("; } $templ_person["bapt_witn"] = __('baptism witness') . ': ' . $temp_text . ')'; $temp = "bapt_witn"; $text .= ' (' . __('baptism witness') . ': ' . $temp_text . ')'; } } // *** check for baptise items, if needed use a new line *** if ($text) { if (!$process_text or $family_expanded == true) { $text = '<b>' . ucfirst(__('baptised')) . '</b> ' . $text; } else { $text = ', <b>' . __('baptised') . '</b> ' . $text; } if ($process_text and $family_expanded == true) { $text = '<br>' . $text; } $process_text .= $text; } // *** Show age of living person *** if (($personDb->pers_bapt_date or $personDb->pers_birth_date) and !$personDb->pers_death_date and $personDb->pers_alive != 'deceased') { $process_age = new calculate_year_cls(); $age = $process_age->calculate_age($personDb->pers_bapt_date, $personDb->pers_birth_date, ''); $templ_person["age_liv"] = $age; if ($templ_person["age_liv"] != '') { $temp = "age_liv"; } $process_text .= $dirmark1 . $age; // *** komma and space already in $age } // ****************** // *** DEATH *** // ****************** $text = ''; if ($personDb->pers_death_date or $personDb->pers_death_place) { $templ_person["dead_dateplacetime"] = date_place($personDb->pers_death_date, $personDb->pers_death_place); if ($templ_person["dead_dateplacetime"] != '') { $temp = "dead_dateplacetime"; } $text = $templ_person["dead_dateplacetime"]; } // *** Death time *** if (isset($personDb->pers_death_time) and $personDb->pers_death_time) { //$templ_person["dead_dateplacetime"]=' '.$personDb->pers_death_time; $templ_person["dead_dateplacetime"] = ' ' . __('at') . ' ' . $personDb->pers_death_time . ' ' . __('hour'); $temp = "dead_dateplacetime"; $text .= $templ_person["dead_dateplacetime"]; } if ($user["group_texts_pers"] == 'j') { $work_text = process_text($personDb->pers_death_text); if ($work_text) { //$text.=", ".$work_text; //if($temp) { $templ_person[$temp].=", "; } $templ_person["dead_text"] = ' ' . $work_text; $temp = "dead_text"; $text .= $templ_person["dead_text"]; } } // *** Show age, by Yossi Beck *** if (($personDb->pers_bapt_date or $personDb->pers_birth_date) and $personDb->pers_death_date) { $process_age = new calculate_year_cls(); $age = $process_age->calculate_age($personDb->pers_bapt_date, $personDb->pers_birth_date, $personDb->pers_death_date); $templ_person["dead_age"] = $age; if ($templ_person["dead_age"] != '') { $temp = "dead_age"; } $text .= $dirmark1 . $age; // *** comma and space already in $age } $pers_death_cause = ''; if ($personDb->pers_death_cause == 'murdered') { $pers_death_cause = ', ' . __('death cause') . ': ' . __('murdered'); } if ($personDb->pers_death_cause == 'drowned') { $pers_death_cause = ', ' . __('death cause') . ': ' . __('drowned'); } if ($personDb->pers_death_cause == 'perished') { $pers_death_cause = ', ' . __('death cause') . ': ' . __('perished'); } if ($personDb->pers_death_cause == 'killed in action') { $pers_death_cause = ', ' . __('killed in action'); } if ($personDb->pers_death_cause == 'being missed') { $pers_death_cause = ', ' . __('being missed'); } if ($personDb->pers_death_cause == 'committed suicide') { $pers_death_cause = ', ' . __('death cause') . ': ' . __('committed suicide'); } if ($personDb->pers_death_cause == 'executed') { $pers_death_cause = ', ' . __('death cause') . ': ' . __('executed'); } if ($personDb->pers_death_cause == 'died young') { $pers_death_cause = ', ' . __('died young'); } if ($personDb->pers_death_cause == 'died unmarried') { $pers_death_cause = ', ' . __('died unmarried'); } if ($personDb->pers_death_cause == 'registration') { $pers_death_cause = ', ' . __('registration'); } //2 TYPE registration? if ($personDb->pers_death_cause == 'declared death') { $pers_death_cause = ', ' . __('declared death'); } if ($pers_death_cause) { $templ_person["dead_cause"] = $pers_death_cause; $temp = "dead_cause"; $text .= $pers_death_cause; } else { if ($personDb->pers_death_cause) { if ($temp) { $templ_person[$temp] .= ", "; } $templ_person["dead_cause"] = __('death cause') . ': ' . $personDb->pers_death_cause; $temp = "dead_cause"; $text .= ', ' . __('death cause') . ': ' . $personDb->pers_death_cause; } } // *** Death source *** $source = show_sources2("person", "pers_death_source", $personDb->pers_gedcomnumber); if ($source) { if ($screen_mode == 'PDF') { $templ_person["dead_source"] = $source; $temp = "dead_source"; } else { $text .= $source; } } // *** Death declaration *** if ($personDb->pers_gedcomnumber) { $temp_text = witness($personDb->pers_gedcomnumber, 'death_declaration'); if ($temp_text) { if ($temp) { $templ_person[$temp] .= " ("; } $templ_person["dead_witn"] = __('death declaration') . ' ' . $temp_text . ')'; $temp = "dead_witn"; $text .= ' (' . __('death declaration') . ' ' . $temp_text . ')'; } } // *** Check for death items, if needed use a new line *** if ($text) { if (!$process_text or $family_expanded == true) { $text = '<b>' . ucfirst(__('died')) . '</b> ' . $text; } else { $text = ', <b>' . __('died') . '</b> ' . $text; } if ($process_text and $family_expanded == true) { $text = '<br>' . $text; } $process_text .= $text; } // **************** // *** BURIED *** // **************** $text = ''; if ($personDb->pers_buried_date or $personDb->pers_buried_place) { $templ_person["buri_dateplacetime"] = date_place($personDb->pers_buried_date, $personDb->pers_buried_place); if ($templ_person["buri_dateplacetime"] != '') { $temp = "buri_dateplacetime"; } $text = $templ_person["buri_dateplacetime"]; } if ($user["group_texts_pers"] == 'j') { $work_text = process_text($personDb->pers_buried_text); if ($work_text) { //if($temp) { $templ_person[$temp].=", "; } $templ_person["buri_text"] = ' ' . $work_text; $temp = "buri_text"; //$text.=", ".$work_text; $text .= $templ_person["buri_text"]; } } // *** Buried source *** $source = show_sources2("person", "pers_buried_source", $personDb->pers_gedcomnumber); if ($source) { if ($screen_mode == 'PDF') { $templ_person["buri_source"] = $source; $temp = "buri_source"; } else { $text .= $source; } } // *** Buried witness *** if ($personDb->pers_gedcomnumber) { $temp_text = witness($personDb->pers_gedcomnumber, 'burial_witness'); if ($temp_text) { //$templ_person[$temp].=" ("; $templ_person["buri_witn"] = ' (' . __('burial witness') . ' ' . $temp_text . ')'; $temp = "buri_witn"; $text .= $templ_person["buri_witn"]; } } // *** Check for burial items, if needed use a new line *** if ($text) { if ($personDb->pers_cremation) { $buried_cremation = __('cremation'); $templ_person["flag_buri"] = 1; } else { $buried_cremation = __('buried'); $templ_person["flag_buri"] = 0; } if (!$process_text or $family_expanded == true) { $text = '<b>' . ucfirst($buried_cremation) . '</b> ' . $text; } else { $text = ', <b>' . $buried_cremation . '</b> ' . $text; } if ($process_text and $family_expanded == true) { $text = '<br>' . $text; } $process_text .= $text; } // *** HZ-21 ash dispersion (asverstrooiing) *** $name_qry = $db_functions->get_events_person($personDb->pers_gedcomnumber, 'ash dispersion'); foreach ($name_qry as $nameDb) { $process_text .= ', ' . __('ash dispersion') . ' '; if ($nameDb->event_date) { $process_text .= date_place($nameDb->event_date, '') . ' '; } $process_text .= $nameDb->event_event . ' '; //SOURCE and TEXT. //CHECK PDF EXPORT } // ************************** // *** Show professions *** // ************************** if ($personDb->pers_gedcomnumber) { $eventnr = 0; $event_qry = $dbh->query("SELECT * FROM humo_events\n\t\t\t\tWHERE event_tree_id='" . $tree_id . "' AND event_person_id='" . $personDb->pers_gedcomnumber . "' AND event_kind='profession'\n\t\t\t\tORDER BY substring( event_date,-4 ), event_order"); $nr_occupations = $event_qry->rowCount(); while ($eventDb = $event_qry->fetch(PDO::FETCH_OBJ)) { $eventnr++; if ($eventnr == '1') { if ($nr_occupations == '1') { $occupation = __('occupation'); $templ_person["flag_prof"] = 0; } else { $occupation = __('occupations'); $templ_person["flag_prof"] = 1; } if ($family_expanded == true) { $process_text .= '<br><span class="profession"><b>' . ucfirst($occupation) . ':</b> '; } else { if ($process_text) { $process_text .= '. <span class="profession">'; } if ($temp) { $templ_person[$temp] .= ". "; } $process_text .= '<b>' . ucfirst($occupation) . ':</b> '; //$templ_person["prof_exist"]=ucfirst($occupation).': '; //$temp="prof_exist"; } } if ($eventnr > 1) { $process_text .= ', '; if ($temp) { $templ_person[$temp] .= ", "; } } if ($eventDb->event_date or $eventDb->event_place) { $templ_person["prof_date" . $eventnr] = date_place($eventDb->event_date, $eventDb->event_place) . '; '; $temp = "prof_date" . $eventnr; $process_text .= $templ_person["prof_date" . $eventnr]; } $process_text .= $eventDb->event_event; $templ_person["prof_prof" . $eventnr] = $eventDb->event_event; $temp = "prof_prof" . $eventnr; if ($eventDb->event_text) { $work_text = process_text($eventDb->event_text); if ($work_text) { //if($temp) { $templ_person[$temp].=", "; } if ($temp) { $templ_person[$temp] .= " "; } $templ_person["prof_text" . $eventnr] = $work_text; $temp = "prof_text" . $eventnr; //$process_text.=", ".$work_text; $process_text .= " " . $work_text; } } // *** Profession source *** $source = show_sources2("person", "pers_event_source", $eventDb->event_id); if ($source) { if ($screen_mode == 'PDF') { $templ_person["prof_source"] = $source; $temp = "prof_source"; } else { $process_text .= $source; } } } if ($eventnr > 0) { $process_text .= '</span>'; } } // *********************** // *** Show residences *** // *********************** if ($personDb->pers_gedcomnumber and $user['group_living_place'] == 'j') { $text = ''; $eventnr = 0; $event_qry = $db_functions->get_addresses_person($personDb->pers_gedcomnumber); $nr_addresses = count($event_qry); foreach ($event_qry as $eventDb) { $eventnr++; if ($eventnr == '1') { if ($process_text) { if ($family_expanded == true) { $text .= '<br>'; } else { $text .= '. '; } } if ($nr_addresses == '1') { $residence = __('residence'); $templ_person["flag_address"] = 0; } else { $residence = __('residences'); $templ_person["flag_address"] = 1; } if ($temp) { $templ_person[$temp] .= ". "; } //$templ_person["address_exist"]=ucfirst($residence).': '; //$temp="address_exist"; $text .= '<b>' . ucfirst($residence) . ':</b> '; } if ($eventnr > 1) { $text .= ', '; if ($temp) { $templ_person[$temp] .= ", "; } } if ($eventDb->address_date) { $text .= date_place($eventDb->address_date, '') . ' '; // default, without place, place is processed later. $templ_person["address_date" . $eventnr] = date_place($eventDb->address_date, '') . ' '; $temp = "address_date" . $eventnr; } if ($user['group_addresses'] == 'j' and $eventDb->address_address) { $text .= ' ' . $eventDb->address_address . ' '; // PDF Export? } if ($eventDb->address_zip) { $text .= ' ' . $eventDb->address_zip . ' '; // PDF Export? } $text .= $eventDb->address_place; $templ_person["address_address" . $eventnr] = $eventDb->address_place; if ($templ_person["address_address" . $eventnr] != '') { $temp = "address_address" . $eventnr; } if ($eventDb->address_phone) { $text .= ', ' . $eventDb->address_phone; } // *** Address text *** if ($eventDb->address_text) { $work_text = process_text($eventDb->address_text); if ($work_text) { if ($temp) { $templ_person[$temp] .= ", "; } $templ_person["address_text" . $eventnr] = $work_text; $temp = "address_text" . $eventnr; $text .= ", " . $work_text; } } $source = show_sources2("person", "pers_address_source", $eventDb->address_id); if ($source) { if ($screen_mode == 'PDF') { $templ_person["address_source"] = $source; $temp = "address_source"; } else { $text .= $source; } } } if ($text) { $process_text .= '<span class="pers_living_place">' . $text . '</span>'; } } // *** Person source *** $source = show_sources2("person", "person_source", $personDb->pers_gedcomnumber); if ($source) { if ($screen_mode == 'PDF') { $templ_person["pers_source"] = $source; $temp = "pers_source"; } else { $process_text .= $source; } } // *** Extended addresses for HuMo-gen and dutch Haza-data program (Haza-data plus version) *** if ($user['group_addresses'] == 'j') { // *** Search for all connected addresses *** $eventnr = 0; $connect_sql = $db_functions->get_connections_person('person_address', $personDb->pers_gedcomnumber); foreach ($connect_sql as $connectDb) { $eventnr++; if ($temp) { $templ_person[$temp] .= ". "; } $templ_person["HDadres_exist" . $eventnr] = __('Address') . ': '; $temp = "HDadres_exist" . $eventnr; $process_text .= '. <b>' . __('Address') . ':</b> '; $process_text .= '<a href="' . $uri_path . 'address.php?gedcomnumber=' . $connectDb->connect_item_id . '">'; $eventDb2 = $db_functions->get_address($connectDb->connect_item_id); if (isset($eventDb2->address_address) and $eventDb2->address_address) { $templ_person["HDadres_adres" . $eventnr] = " " . trim($eventDb2->address_address); $temp = "HDadres_adres" . $eventnr; $process_text .= $templ_person["HDadres_adres" . $eventnr]; } if (isset($eventDb2->address_address) and $eventDb2->address_place) { $templ_person["HDadres_place" . $eventnr] = " " . trim($eventDb2->address_place); $temp = "HDadres_place" . $eventnr; $process_text .= $templ_person["HDadres_place" . $eventnr]; } $process_text .= "</a>"; } } } //*** END PRIVACY PART *** // *** Use a link for multiple marriages by parent2 *** if ($person_kind == 'parent2') { $marriage_array = explode(";", $personDb->pers_fams); if (isset($marriage_array[1])) { for ($i = 0; $i <= substr_count($personDb->pers_fams, ";"); $i++) { $marriagenr = $i + 1; $parent2_famDb = $db_functions->get_family($marriage_array[$i]); // *** Use a class for marriage *** $parent2_marr_cls = new marriage_cls(); // *** Show standard marriage text *** if ($screen_mode != "PDF") { $parent2_marr_data = $parent2_marr_cls->marriage_data($parent2_famDb, $marriagenr, 'short'); } else { $pdf_marriage = $parent2_marr_cls->marriage_data($parent2_famDb, $marriagenr, 'short'); } if ($change_main_person == true) { $parent2Db = $db_functions->get_person($parent2_famDb->fam_woman); } else { $parent2Db = $db_functions->get_person($parent2_famDb->fam_man); } if ($id == $marriage_array[$i]) { if ($process_text) { $process_text .= ','; } if (isset($parent2_marr_data)) { $process_text .= ' ' . $dirmark1 . $parent2_marr_data . ' '; } // *** $parent2Db is empty if it is a N.N. person *** if ($parent2Db) { $name = $this->person_name($parent2Db); $process_text .= $name["standard_name"]; } else { $process_text .= __('N.N.'); } } else { $process_text .= ', '; // *** url_rewrite *** if ($humo_option["url_rewrite"] == "j") { // *** $uri_path is made header.php *** $process_text .= '<a href="' . $uri_path . 'family/' . $_SESSION['tree_prefix'] . '/' . $marriage_array[$i] . '/' . $personDb->pers_gedcomnumber . '/">'; } else { $process_text .= '<a href="' . CMS_ROOTPATH . 'family.php?database=' . $_SESSION['tree_prefix'] . '&id=' . $marriage_array[$i] . '&main_person=' . $personDb->pers_gedcomnumber . '">'; } if (isset($parent2_marr_data)) { $process_text .= $dirmark1 . $parent2_marr_data . ' '; } // *** $parent2Db is empty by N.N. person *** if ($parent2Db) { $name = $this->person_name($parent2Db); $process_text .= $name["standard_name"]; } else { $process_text .= __('N.N.'); } $process_text .= '</a>'; } if ($screen_mode == "PDF") { if ($parent2Db) { if ($temp) { $templ_person[$temp] .= ", "; } $name = $this->person_name($parent2Db); $templ_person["marr_more" . $marriagenr] = $pdf_marriage["relnr_rel"] . $pdf_marriage["rel_add"] . " " . $name["standard_name"]; $temp = "marr_more" . $marriagenr; } else { if ($temp) { $templ_person[$temp] .= ", "; } $templ_person["marr_more" . $marriagenr] = $pdf_marriage["relnr_rel"] . " " . __('N.N.'); $temp = "marr_more" . $marriagenr; } } } } } //if ($privacy){ if ($screen_mode == "mobile" or $privacy) { // } else { // *** Show media/ pictures *** $result = show_media($personDb, ''); // *** This function can be found in file: show_picture.php! *** $process_text .= $result[0]; if (isset($templ_person)) { $templ_person = array_merge((array) $templ_person, (array) $result[1]); } else { $templ_person = $result[1]; } // *** Internet links (URL) *** $url_qry = $db_functions->get_events_person($personDb->pers_gedcomnumber, 'URL'); if (count($url_qry) > 0) { $process_text .= '<br>'; } foreach ($url_qry as $urlDb) { if ($urlDb->event_text) { $process_text .= $urlDb->event_text . ': '; } $process_text .= '<a href="' . $urlDb->event_event . '" target="_blank">' . $urlDb->event_event . '</a>'; $process_text .= '<br>'; } //******** Text by person ************** if ($user["group_text_pers"] == 'j') { $work_text = process_text($personDb->pers_text, 'person'); // *** BK: Source by person text *** $source = show_sources2("person", "pers_text_source", $personDb->pers_gedcomnumber); if ($source) { //PDF if ($screen_mode == 'PDF') { // } else { $work_text .= $source; } } if ($work_text) { $process_text .= '<br>' . $work_text . "\n"; $templ_person["pers_text"] = "\n" . $work_text; $temp = "pers_text"; } } // *** Show events *** if ($user['group_event'] == 'j') { if ($personDb->pers_gedcomnumber) { $event_qry = $db_functions->get_events_person($personDb->pers_gedcomnumber, 'event'); $num_rows = count($event_qry); if ($num_rows > 0) { $process_text .= '<span class="event">' . "\n"; } $eventnr = 0; foreach ($event_qry as $eventDb) { $eventnr++; $process_text .= "<br>\n"; $templ_person["event_start" . $eventnr] = "\n"; // *** Check if NCHI is 0 or higher *** $event_gedcom = $eventDb->event_gedcom; //$event_text=$eventDb->event_text; if ($event_gedcom == 'NCHI' and trim($eventDb->event_event) == '') { $event_gedcom = 'NCHI0'; //$event_text=''; } $process_text .= '<b>' . language_event($event_gedcom) . '</b>'; $templ_person["event_ged" . $eventnr] = language_event($event_gedcom); $temp = "event_ged" . $eventnr; if ($eventDb->event_event) { $templ_person["event_event" . $eventnr] = ' ' . $eventDb->event_event; $temp = "event_event" . $eventnr; $process_text .= $templ_person["event_event" . $eventnr]; } $templ_person["event_dateplace" . $eventnr] = ' ' . date_place($eventDb->event_date, $eventDb->event_place); $temp = "event_dateplace" . $eventnr; $process_text .= $templ_person["event_dateplace" . $eventnr]; if ($eventDb->event_text) { $work_text = process_text($eventDb->event_text); if ($work_text) { //$process_text.=", ".$work_text; $process_text .= " " . $work_text; //if($temp) { $templ_person[$temp].=", "; } if ($temp) { $templ_person[$temp] .= " "; } $templ_person["event_text" . $eventnr] = $work_text; $temp = "event_text" . $eventnr; } } $source = show_sources2("person", "pers_event_source", $eventDb->event_id); if ($source) { if ($screen_mode == 'PDF') { $templ_person["pers_event_source"] = $source; $temp = "pers_event_source"; } else { $process_text .= $source; } } } if ($num_rows > 0) { $process_text .= "</span>\n"; } unset($event_qry); } } } // End of privacy // *** Return person data *** if ($screen_mode == "mobile") { if ($process_text) { return $process_text; } } elseif ($screen_mode != "PDF") { if ($process_text) { $div = '<div class="margin_person">'; if ($person_kind == 'child') { $div = '<div class="margin_child">'; } return $privacy_filter . $div . $process_text . '</div>'; } else { return $privacy_filter; } } else { // return array with pdf values if (isset($templ_person)) { return $templ_person; } } } // End of check $personDb }
print '<select class="fonts" size="1" name="person2" style="width:' . $len . 'px">'; while ($searchDb2 = $search_result2->fetch(PDO::FETCH_OBJ)) { $name = $pers_cls->person_name($searchDb2); if ($name["show_name"]) { echo '<option'; if (isset($person2)) { if ($searchDb2->pers_gedcomnumber == $person2 and !(isset($_POST["search2"]) and $search_lastname2 == '' and $search_firstname2 == '')) { echo ' SELECTED'; } } $birth = ''; if ($searchDb2->pers_bapt_date) { $birth = ' ' . __('~') . ' ' . date_place($searchDb2->pers_bapt_date, ''); } if ($searchDb2->pers_birth_date) { $birth = ' ' . __('*') . ' ' . date_place($searchDb2->pers_birth_date, ''); } echo ' value="' . $searchDb2->pers_gedcomnumber . '">' . $name["index_name"] . $birth . ' [' . $searchDb2->pers_gedcomnumber . ']</option>'; } } echo '</select>'; } else { print '<select size="1" name="notfound" value="1" style="width:' . $len . 'px"><option>' . __('Person not found') . '</option></select>'; } } } else { print '<select size="1" name="person2" style="width:' . $len . 'px"><option></option></select>'; } echo '</td></tr></table>'; /* echo '</form>'; */ // ===== END SEARCH BOX SYSTEM
function mapbirthplace($place) { global $dbh, $tree_id, $language, $map_max; if (isset($_GET['namestring'])) { $temparray = explode("@", $_GET['namestring']); $namestring = " ("; foreach ($temparray as $value) { //echo $value.'<br>'; //$namestring .= "pers_lastname = '".$value."' OR "; $namestring .= "CONCAT(pers_lastname,'_',LOWER(SUBSTRING_INDEX(pers_prefix,'_',1))) = '" . $value . "' OR "; } $namestring = substr($namestring, 0, -3) . ") AND "; //echo $namestring; } else { $namestring = ''; } $desc_arr = ''; $idstring = ''; if (isset($_SESSION['desc_array'])) { $desc_arr = $_SESSION['desc_array']; $idstring = ' ('; foreach ($desc_arr as $value) { $idstring .= " pers_gedcomnumber = '" . $value . "' OR "; } $idstring = substr($idstring, 0, -3) . ') AND '; } $min = 1; if ($place != "NONFOUND") { if ($_SESSION['type_birth'] == 1) { if (isset($_GET['all'])) { // the 'All birth locations' button echo '<b><u>' . __('All persons born here: ') . '</u></b><br>'; //$maplist=$dbh->query("SELECT * , CONCAT(pers_lastname,pers_firstname) AS wholename FROM ".safe_text($_SESSION['tree_prefix'])."person WHERE ".$idstring.$namestring." (pers_birth_place = '".$place."' OR (pers_birth_place = '' AND pers_bapt_place = '".$place."')) ORDER BY wholename"); $sql = "SELECT * , CONCAT(pers_lastname,pers_firstname) AS wholename\n\t\t\t\t\tFROM humo_persons WHERE pers_tree_id='" . $tree_id . "'\n\t\t\t\t\tAND " . $idstring . $namestring . " (pers_birth_place = '" . $place . "' OR (pers_birth_place = '' AND pers_bapt_place = '" . $place . "')) ORDER BY wholename"; $maplist = $dbh->query($sql); } else { // the slider echo '<b><u>' . __('Persons born here until ') . $map_max . ':</u></b><br>'; $sql = "SELECT * , CONCAT(pers_lastname,pers_firstname) AS wholename FROM humo_persons\n\t\t\t\t\tWHERE pers_tree_id='" . $tree_id . "'\n\t\t\t\t\tAND " . $idstring . $namestring . " (pers_birth_place = '" . $place . "' OR (pers_birth_place = '' AND pers_bapt_place = '" . $place . "'))\n\t\t\t\t\tAND ((SUBSTR(pers_birth_date,-LEAST(4,CHAR_LENGTH(pers_birth_date))) < " . $map_max . "\n\t\t\t\t\tAND SUBSTR(pers_birth_date,-LEAST(4,CHAR_LENGTH(pers_birth_date))) > " . $min . ")\n\t\t\t\t\tOR (pers_birth_date='' AND SUBSTR(pers_bapt_date,-LEAST(4,CHAR_LENGTH(pers_bapt_date))) < " . $map_max . "\n\t\t\t\t\t\tAND SUBSTR(pers_bapt_date,-LEAST(4,CHAR_LENGTH(pers_bapt_date))) > " . $min . "))\n\t\t\t\t\tORDER BY wholename"; $maplist = $dbh->query($sql); } } elseif ($_SESSION['type_death'] == 1) { if (isset($_GET['all'])) { // the 'All birth locations' button echo '<b><u>' . __('All persons that died here: ') . '</u></b><br>'; //$maplist=$dbh->query("SELECT * , CONCAT(pers_lastname,pers_firstname) AS wholename FROM ".safe_text($_SESSION['tree_prefix'])."person WHERE ".$idstring.$namestring." (pers_death_place = '".$place."' OR (pers_death_place = '' AND pers_buried_place = '".$place."')) ORDER BY wholename"); $sql = "SELECT * , CONCAT(pers_lastname,pers_firstname) AS wholename\n\t\t\t\t\tFROM humo_persons\n\t\t\t\t\tWHERE pers_tree_id='" . $tree_id . "'\n\t\t\t\t\tAND " . $idstring . $namestring . "\n\t\t\t\t\t(pers_death_place = '" . $place . "' OR (pers_death_place = '' AND pers_buried_place = '" . $place . "'))\n\t\t\t\t\tORDER BY wholename"; $maplist = $dbh->query($sql); } else { // the slider echo '<b><u>' . __('Persons that died here until ') . $map_max . ':</u></b><br>'; $sql = "SELECT * , CONCAT(pers_lastname,pers_firstname) AS wholename FROM humo_persons\n\t\t\t\t\tWHERE pers_tree_id='" . $tree_id . "' AND " . $idstring . $namestring . "\n\t\t\t\t\t(pers_death_place = '" . $place . "' OR (pers_death_place = '' AND pers_buried_place = '" . $place . "')) AND\n\t\t\t\t\t((SUBSTR(pers_death_date,-LEAST(4,CHAR_LENGTH(pers_death_date))) < " . $map_max . " AND SUBSTR(pers_death_date,-LEAST(4,CHAR_LENGTH(pers_death_date))) > " . $min . ") OR\n\t\t\t\t\t(pers_death_date='' AND SUBSTR(pers_buried_date,-LEAST(4,CHAR_LENGTH(pers_buried_date))) < " . $map_max . " AND SUBSTR(pers_buried_date,-LEAST(4,CHAR_LENGTH(pers_buried_date))) > " . $min . "))\n\t\t\t\t\tORDER BY wholename"; $maplist = $dbh->query($sql); } } //echo 'TEST: '.$sql; $man_cls = new person_cls(); echo '<div style="direction:ltr">'; while (@($maplistDb = $maplist->fetch(PDO::FETCH_OBJ))) { $man_cls->construct($maplistDb); $privacy_man = $man_cls->privacy; $name = $man_cls->person_name($maplistDb); if ($name["show_name"] == true) { echo '<a href=family.php?database=' . safe_text($_SESSION['tree_prefix']) . '&id=' . $maplistDb->pers_indexnr . '&main_person=' . $maplistDb->pers_gedcomnumber . ' target="blank">'; } if ($_SESSION['type_birth'] == 1) { echo $name["index_name"]; $date = $maplistDb->pers_birth_date; $sign = __('born') . ' '; if (!$maplistDb->pers_birth_date and $maplistDb->pers_bapt_date) { $date = $maplistDb->pers_bapt_date; $sign = __('baptised') . ' '; } } if ($_SESSION['type_death'] == 1) { echo $name["index_name"]; $date = $maplistDb->pers_death_date; $sign = __('died') . ' '; if (!$maplistDb->pers_death_date and $maplistDb->pers_buried_date) { $date = $maplistDb->pers_buried_date; $sign = __('buried') . ' '; } } if (!$privacy_man and $date and $name["show_name"] == true) { echo ' (' . $sign . date_place($date, '') . ')'; } if ($name["show_name"] == true) { echo '</a>'; } echo '<br>'; } echo '</div>'; } else { // Logically we can never get here echo 'No persons found'; } }
function printchart() { global $dbh, $tree_id, $db_functions, $genarray, $size, $tree_prefix_quoted, $language, $chosengen, $keepfamily_id, $keepmain_person, $uri_path, $database; global $vbasesize, $hsize, $vsize, $vdist, $hdist, $user, $direction, $dna; global $dirmark1, $dirmark2, $rtlmarker, $alignmarker, $base_person_gednr, $base_person_name, $base_person_sexe, $base_person_famc; // YB: -- check browser type & version. we need this further on to detect IE7 with it's widely reported z-index bug $browser_user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? strtolower($_SERVER['HTTP_USER_AGENT']) : ''; global $hourglass, $divlen, $divhi; if ($hourglass === false) { // find rightmost and bottommost positions to calculate size of the canvas needed for png image $divlen = 0; $divhi = 0; for ($i = 0; $i < count($genarray); $i++) { if ($genarray[$i]["x"] > $divlen) { $divlen = $genarray[$i]["x"]; } if ($genarray[$i]["y"] > $divhi) { $divhi = $genarray[$i]["y"]; } } $divlen += 200; $divhi += 300; // the width and length of following div are set with $divlen en $divhi in java function "showimg" // (at bottom of this file) otherwise double scrollbars won't work. echo '<div id="png">'; //======== HELP POPUP ======================== echo '<div id="helppopup" class="' . $rtlmarker . 'sddm" style="position:absolute;left:10px;top:10px;display:inline;">'; echo '<a href="#"'; echo ' style="display:inline" '; echo 'onmouseover="mopen(event,\'help_menu\',0,0)"'; echo 'onmouseout="mclosetime()">'; echo '<b>' . __('Help') . '</b>'; echo '</a> '; //echo '<div style="z-index:40; padding:4px; direction:'.$rtlmarker.'" id="help_menu" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">'; echo '<div class="sddm_fixed" style="z-index:10; padding:4px; text-align:' . $alignmarker . '; direction:' . $rtlmarker . ';" id="help_menu" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">'; echo __('<b>USE:</b> <p><b>Hover over square:</b> Display popup menu with details and report & chart options<br> <b>Click on square:</b> Move this person to the center of the chart<br> <b>Click on spouse\'s name in popup menu:</b> Go to spouse\'s family page<br><br> <b>LEGEND:</b>'); echo '<p><span style="background-image: linear-gradient(to bottom, #ffffff 0%, #81bef7 100%); border:1px brown solid;"> </span> ' . __('Male') . '</br>'; echo '<span style="background-image: linear-gradient(to bottom, #ffffff 0%, #f5bca9 100%); border:1px brown solid;"> </span> ' . __('Female') . '</br>'; if ($dna == "ydna" or $dna == "ydnamark" or $dna == "mtdna" or $dna == "mtdnamark") { echo '<p style="line-height:3px"><span style="background-image: linear-gradient(to bottom, #ffffff 0%, #81bef7 100%); border:3px solid #999999;"> </span> ' . __('Male Y-DNA or mtDNA carrier (Base person has red border)') . '</p>'; echo '<p style="line-height:10px"><span style="background-image: linear-gradient(to bottom, #ffffff 0%, #f5bca9 100%); border:3px solid #999999;"> </span> ' . __('Female MtDNA carrier (Base person has red border)') . '</p>'; } echo '<p><span style="color:blue">=====</span> ' . __('Additional marriage of same person') . '<br><br>'; echo __('<b>SETTINGS:</b> <p>Horizontal/Vertical button: toggle direction of the chart from top-down to left-right<br> <b>Nr. Generations:</b> choose between 2 - 15 generations<br> (large number of generations will take longer to generate)<br> <b>Box size:</b> Use the slider to choose display size (9 steps): <br> step 1-3: small boxes with popup for details<br> step 4-7: larger boxes with initials of name + popup for details<br> step 8: rectangles with name inside + popup with further details<br> step 9: large rectangles with name, birth and death details + popup with further details'); echo '</div>'; echo '</div>'; //================================= if ($dna == "none") { echo '<div class="standard_header fonts" style="align:center; text-align: center;"><b>' . __('Descendant chart') . __(' of ') . $genarray[0]["nam"] . '</b>'; } elseif ($dna == "ydna" or $dna == "ydnamark") { echo '<div class="standard_header fonts" style="align:center; text-align: center;"><b>' . __('Same Y-DNA as ') . $base_person_name . '</b>'; } elseif ($dna == "mtdna" or $dna == "mtdnamark") { echo '<div class="standard_header fonts" style="align:center; text-align: center;"><b>' . __('Same mtDNA as ') . $base_person_name . '</b>'; } echo '<br><input type="button" id="imgbutton" value="' . __('Get image of chart for printing (allow popup!)') . '" onClick="showimg();">'; echo '</div>'; if ($direction == 0) { $latter = count($genarray) - 1; $the_height = $genarray[$latter]["y"] + 130; } else { $hgt = 0; for ($e = 0; $e < count($genarray); $e++) { if ($genarray[$e]["y"] > $hgt) { $hgt = $genarray[$e]["y"]; } } $the_height = $hgt + 130; } echo '<style type="text/css">'; echo '#doublescroll { position:relative; width:auto; height:' . $the_height . 'px; overflow: auto; overflow-y: hidden;z-index:10; }'; echo '</style>'; //print '<div class="wrapper" style="position:relative; direction:'.$rtlmarker.';">'; //print '<div id="doublescroll" class="wrapper" style="direction:'.$rtlmarker.';"><br style="line-height:50%">'; print '<div id="doublescroll" class="wrapper" style="direction:' . $rtlmarker . ';">'; // generation and size choice box: if ($dna == "none") { $boxwidth = "520"; } else { $boxwidth = "730"; } // DNA charts echo '<div id="menubox" class="search_bar" style="margin-top:5px; direction:ltr; z-index:20; width:' . $boxwidth . 'px; text-align:left;">'; print '<div style="display:inline;">'; if (CMS_SPECIFIC == 'Joomla') { print '<form method="POST" name="desc_form" action="index.php?option=com_humo-gen&task=family&chosensize=' . $size . '&screen_mode=STARSIZE" style="display : inline;">'; } else { print '<form method="POST" name="desc_form" action="' . CMS_ROOTPATH . 'family.php?chosensize=' . $size . '&screen_mode=STARSIZE" style="display : inline;">'; } print '<input type="hidden" name="id" value="' . $keepfamily_id . '">'; print '<input type="hidden" name="chosengen" value="' . $chosengen . '">'; print '<input type="hidden" name="main_person" value="' . $keepmain_person . '">'; print '<input type="hidden" name="database" value="' . $database . '">'; if ($dna != "none") { print '<input type="hidden" name="dnachart" value="' . $dna . '">'; print '<input type="hidden" name="bf" value="' . $base_person_famc . '">'; print '<input type="hidden" name="bs" value="' . $base_person_sexe . '">'; print '<input type="hidden" name="bn" value="' . $base_person_name . '">'; print '<input type="hidden" name="bg" value="' . $base_person_gednr . '">'; } print '<input id="dirval" type="hidden" name="direction" value="">'; // will be filled in next lines if ($direction == "1") { // horizontal print '<input type="button" name="dummy" value="' . __('vertical') . '" onClick=\'document.desc_form.direction.value="0";document.desc_form.submit();\'>'; } else { print '<input type="button" name="dummy" value="' . __('horizontal') . '" onClick=\'document.desc_form.direction.value="1";document.desc_form.submit();\'>'; } print '</form>'; $result = $dbh->query("SELECT pers_sexe FROM humo_persons\n\t\t\tWHERE pers_tree_id='" . $tree_id . "' AND pers_gedcomnumber ='" . $keepmain_person . "'"); $resultDb = $result->fetch(PDO::FETCH_OBJ); if ($dna != "none") { echo " " . __('DNA: '); echo '<select name="dnachart" style="width:150px" onChange="window.location=this.value">'; // echo $selected="selected"; if($dna!="none") $selected=""; // echo '<option value="'.$uri_path.'family.php?id='.$keepfamily_id.'&main_person='. // $keepmain_person.'&direction='.$direction.'&database='.$database.'&dnachart='."none".'&chosensize='. // $size.'&chosengen='.$chosengen.'&screen_mode=STAR" '.$selected.'>'.__('All').'</option>'; if ($base_person_sexe == "M") { // only show Y-DNA option if base person is male //echo $selected=""; if($dna=="ydna") $selected="selected"; echo $selected = "selected"; if ($dna != "ydna") { $selected = ""; } echo '<option value="' . $uri_path . 'family.php?id=' . $keepfamily_id . '&main_person=' . $keepmain_person . '&direction=' . $direction . '&database=' . $database . '&dnachart=' . "ydna" . '&chosensize=' . $size . '&chosengen=' . $chosengen . '&screen_mode=STAR" ' . $selected . '>' . __('Y-DNA Carriers only') . '</option>'; //echo $selected="selected"; if($dna!="ydnamark") $selected=""; echo $selected = ""; if ($dna == "ydnamark") { $selected = "selected"; } echo '<option value="' . $uri_path . 'family.php?id=' . $keepfamily_id . '&main_person=' . $keepmain_person . '&direction=' . $direction . '&database=' . $database . '&dnachart=' . "ydnamark" . '&chosensize=' . $size . '&chosengen=' . $chosengen . '&screen_mode=STAR" ' . $selected . '>' . __('Y-DNA Mark carriers') . '</option>'; } if ($base_person_sexe == "F" or $base_person_sexe == "M" and isset($base_person_famc) and $base_person_famc != "") { // if base person is male, only show mtDNA if there are ancestors since he can't have mtDNA descendants... echo $selected = ""; if ($dna == "mtdna") { $selected = "selected"; } echo '<option value="' . $uri_path . 'family.php?id=' . $keepfamily_id . '&main_person=' . $keepmain_person . '&direction=' . $direction . '&database=' . $database . '&dnachart=' . "mtdna" . '&chosensize=' . $size . '&chosengen=' . $chosengen . '&screen_mode=STAR" ' . $selected . '>' . __('mtDNA Carriers only') . '</option>'; if ($base_person_sexe == "F") { echo $selected = "selected"; if ($dna != "mtdnamark") { $selected = ""; } } else { echo $selected = ""; if ($dna == "mtdnamark") { $selected = "selected"; } } echo '<option value="' . $uri_path . 'family.php?id=' . $keepfamily_id . '&main_person=' . $keepmain_person . '&direction=' . $direction . '&database=' . $database . '&dnachart=' . "mtdnamark" . '&chosensize=' . $size . '&chosengen=' . $chosengen . '&screen_mode=STAR" ' . $selected . '>' . __('mtDNA Mark carriers') . '</option>'; } echo '</select>'; } print '</div>'; print ' '; print ' ' . __('Nr. generations') . ': '; print '<select name="chosengen" onChange="window.location=this.value">'; for ($i = 2; $i <= 15; $i++) { if (CMS_SPECIFIC == 'Joomla') { print '<option value="index.php?option=com_humo-gen&task=family&id=' . $keepfamily_id . '&main_person=' . $keepmain_person . '&direction=' . $direction . '&database=' . $database . '&dnachart=' . $dna . '&chosensize=' . $size . '&chosengen=' . $i . '&screen_mode=STAR" '; } else { print '<option value="' . $uri_path . 'family.php?id=' . $keepfamily_id . '&main_person=' . $keepmain_person . '&direction=' . $direction . '&database=' . $database . '&dnachart=' . $dna . '&chosensize=' . $size . '&chosengen=' . $i . '&screen_mode=STAR" '; } if ($i == $chosengen) { print "selected=\"selected\" "; } print ">" . $i . "</option>"; } //NEW - option "All" for all generations print '<option value="' . $uri_path . 'family.php?id=' . $keepfamily_id . '&main_person=' . $keepmain_person . '&direction=' . $direction . '&database=' . $database . '&dnachart=' . $dna . '&chosensize=' . $size . '&chosengen=All&screen_mode=STAR" '; if ($chosengen == "All") { print "selected=\"selected\" "; } print ">" . "All" . "</option>"; print '</select>'; print ' '; $dna_params = ""; if ($dna != "none") { $dna_params = ' bn: "' . $base_person_name . '", bs: "' . $base_person_sexe . '", bf: "' . $base_person_famc . '", bg: "' . $base_person_gednr . '",'; } //NEW min:0 (for extra first step - now 10 steps: 0-9), then twice value +1 so on display first step is shown as 1, not 0 echo ' <script> $(function() { $( "#slider" ).slider({ value: ' . ($size / 5 - 1) . ', min: 0, max: 9, step: 1, database: "' . $database . '", main_person: "' . $keepmain_person . '", id: "' . $keepfamily_id . '", chosengen: "' . $chosengen . '", direction: "' . $direction . '", dna: "' . $dna . '",' . $dna_params . ' slide: function( event, ui ) { $( "#amount" ).val(ui.value+1); } }); $( "#amount" ).val($( "#slider" ).slider( "value" )+1 ); }); </script> '; //echo '<label for="amount">Zoom in/out:</label>'; echo '<label for="amount">' . __('Zoom level:') . '</label> '; echo '<input type="text" id="amount" disabled="disabled" style="width:15px;border:0; color:#0000CC; font-weight:normal;font-size:115%;" />'; echo '<div id="slider" style="float:right;width:135px;margin-top:7px;margin-right:15px;"></div>'; echo '</div>'; } // end if not hourglass for ($w = 0; $w < count($genarray); $w++) { $xvalue = $genarray[$w]["x"]; $yvalue = $genarray[$w]["y"]; var_dump($w, $genarray[$w]["x"]); $sexe_colour = ''; $backgr_col = "#FFFFFF"; if ($genarray[$w]["sex"] == "v") { $sexe_colour = ' ancestor_woman'; $backgr_col = "#FBDEC0"; //"#f8bdf1"; } else { $sexe_colour = ' ancestor_man'; $backgr_col = "#C0F9FC"; //"#bbf0ff"; } // *** Start person class and calculate privacy *** if ($genarray[$w]["gednr"]) { $man = $db_functions->get_person($genarray[$w]["gednr"]); $man_cls = new person_cls(); $man_cls->construct($man); $man_privacy = $man_cls->privacy; } //echo '<div style="position:absolute; background-color:'.$bkcolor.';height:'.$vsize.'px; width:'.$hsize.'px; border:1px brown solid; left:'.$xvalue.'px; top:'.$yvalue.'px">'; $bkgr = ""; if (($dna == "ydnamark" or $dna == "mtdnamark" or $dna == "ydna" or $dna == "mtdna") and $genarray[$w]["dna"] == 1) { $bkgr = "border:3px solid #999999;background-color:" . $backgr_col . ";"; if ($genarray[$w]["gednr"] == $base_person_gednr) { // base person $bkgr = "border:3px solid red;background-color:" . $backgr_col . ";"; } } else { $bkgr = "border:1px solid #8C8C8C;background-color:" . $backgr_col . ";"; } if ($genarray[$w]["gen"] == 0 and $hourglass === true) { $bkgr = "background-color:" . $backgr_col . ";"; } echo '<div class="ancestor_name' . $sexe_colour . '" style="' . $bkgr . 'position:absolute; height:' . $vsize . 'px; width:' . $hsize . 'px; left:' . $xvalue . 'px; top:' . $yvalue . 'px;">'; $replacement_text = ''; if ($size >= 25) { /* if(CMS_SPECIFIC=='Joomla') { $replacement_text.= '<a class="nam" href="index.php?option=com_humo-gen&task=family&id='.$genarray[$w]["fams"].'&main_person='.$genarray[$w]["gednr"].'&chosensize='.$size.'&direction='.$direction.'&screen_mode=STAR"'; } else { $replacement_text.= '<a class="nam" href="'.CMS_ROOTPATH.'family.php?id='.$genarray[$w]["fams"].'&main_person='.$genarray[$w]["gednr"].'&chosensize='.$size.'&direction='.$direction.'&screen_mode=STAR"'; } $replacement_text.= ' style="font-size:9px; text-align:center; display:block; width:100%; height:100%" '; $replacement_text.= 'onmouseover="mopen(event,\'m1'.$w.'\',0,0)"'; $replacement_text.= 'onmouseout="mclosetime()">'; */ if (strpos($browser_user_agent, "msie 7.0") === false) { if ($size == 50) { // *** Show picture *** if (!$man_privacy and $user['group_pictures'] == 'j') { // *** Path can be changed per family tree *** global $dataDb; $tree_pict_path = $dataDb->tree_pict_path; $picture_qry = $db_functions->get_events_person($man->pers_gedcomnumber, 'picture'); // *** Only show 1st picture *** if (isset($picture_qry[0])) { $pictureDb = $picture_qry[0]; $picture = show_picture($tree_pict_path, $pictureDb->event_event, 60, 65); //$replacement_text.='<img src="'.$tree_pict_path.$picture['thumb'].$picture['picture'].'" style="float:left; margin:5px;" alt="'.$pictureDb->event_text.'" height="65px">'; $replacement_text .= '<img src="' . $tree_pict_path . $picture['thumb'] . $picture['picture'] . '" style="float:left; margin:5px;" alt="' . $pictureDb->event_text . '" width="' . $picture['width'] . '"'; //if (isset($picture['height'])) $replacement_text.=' height="'.$picture['height'].'"'; $replacement_text .= '>'; } } //$replacement_text.= '<strong>'.$genarray[$w]["nam"].'</strong>'; //$replacement_text.= '<span class="anc_box_name">'.$genarray[$w]["nam"].'</span>'; $replacement_text .= '<span class="anc_box_name">' . $genarray[$w]["nam"] . '</span>'; if ($man_privacy) { $replacement_text .= '<br>' . __(' PRIVACY FILTER') . '<br>'; //Tekst privacy weergeven } else { //if ($man->pers_birth_date OR $man->pers_birth_place){ if ($man->pers_birth_date) { //$replacement_text.= '<br>'.__('*').$dirmark1.' '.date_place($man->pers_birth_date,$man->pers_birth_place); $replacement_text .= '<br>' . __('*') . $dirmark1 . ' ' . date_place($man->pers_birth_date, ''); } elseif ($man->pers_bapt_date) { //$replacement_text.= '<br>'.__('~').$dirmark1.' '.date_place($man->pers_bapt_date,$man->pers_bapt_place); $replacement_text .= '<br>' . __('~') . $dirmark1 . ' ' . date_place($man->pers_bapt_date, ''); } //if ($man->pers_death_date OR $man->pers_death_place){ if ($man->pers_death_date) { //$replacement_text.= '<br>'.__('†').$dirmark1.' '.date_place($man->pers_death_date,$man->pers_death_place); $replacement_text .= '<br>' . __('†') . $dirmark1 . ' ' . date_place($man->pers_death_date, ''); } elseif ($man->pers_buried_date) { //$replacement_text.= '<br>'.__('[]').$dirmark1.' '.date_place($man->pers_buried_date,$man->pers_buried_place); $replacement_text .= '<br>' . __('[]') . $dirmark1 . ' ' . date_place($man->pers_buried_date, ''); } if ($genarray[$w]["non"] == 0) { // otherwise for an unmarried child it would give the parents' marriage! $ownfam = $db_functions->get_family($genarray[$w]["fams"]); //if ($ownfam->fam_marr_date OR $ownfam->fam_marr_place){ if ($ownfam->fam_marr_date) { //$replacement_text.= '<br>'.__('X').$dirmark1.' '.date_place($ownfam->fam_marr_date,$ownfam->fam_marr_place); $replacement_text .= '<br>' . __('X') . $dirmark1 . ' ' . date_place($ownfam->fam_marr_date, ''); } } } } elseif ($size == 45) { $replacement_text .= $genarray[$w]["nam"]; } elseif ($size == 40) { $replacement_text .= '<span class="wordwrap" style="font-size:75%">' . $genarray[$w]["short"] . '</span>'; } elseif ($size >= 25 and $size < 40) { $replacement_text .= $genarray[$w]["init"]; } } } else { if (isset($genarray[$w]["fams"]) and isset($genarray[$w]["gednr"])) { /* if(CMS_SPECIFIC=='Joomla') { $replacement_text.= '<a href="index.php?option=com_humo-gen&task=family&id='.$genarray[$w]["fams"].'&main_person='.$genarray[$w]["gednr"].'&chosensize='.$size.'&direction='.$direction.'&screen_mode=STAR"'; } else { $replacement_text.= '<a href="'.CMS_ROOTPATH.'family.php?id='.$genarray[$w]["fams"].'&main_person='.$genarray[$w]["gednr"].'&chosensize='.$size.'&direction='.$direction.'&screen_mode=STAR"'; } $replacement_text.= ' style="display:block; width:100%; height:100%" '; $replacement_text.= ' onmouseover="mopen(event,\'m1'.$w.'\',0,0)"'; $replacement_text.= 'onmouseout="mclosetime()">'; */ if (strpos($browser_user_agent, "chrome") !== false or strpos($browser_user_agent, "safari") !== false) { $replacement_text .= " "; } // (Chrome and Safari need some character here - even   - or else popup won't work..! } } //$replacement_text.='</a>'; // *** POP-UP box *** $extra_popup_text = ''; if ($genarray[$w]["2nd"] == 1) { $extra_popup_text .= $genarray[$w]["huw"] . "<br>"; } if ($genarray[$w]["non"] != 1) { // *** Start person class and calculate privacy *** $woman_cls = ''; // prevent use of $woman_cls from previous wife if another wife is NN if (isset($genarray[$w]["spgednr"]) and $genarray[$w]["spgednr"]) { @($woman = $db_functions->get_person($genarray[$w]["spgednr"])); $woman_cls = new person_cls(); $woman_cls->construct($woman); $woman_privacy = $woman_cls->privacy; } // *** Marriage data *** $extra_popup_text .= '<br>' . $genarray[$w]["htx"] . "<br>"; if ($woman_cls) { $name = $woman_cls->person_name($woman); if (isset($genarray[$w]["spfams"]) and isset($genarray[$w]["spgednr"]) and isset($genarray[$w]["sps"])) { if (CMS_SPECIFIC == 'Joomla') { $extra_popup_text .= '<a href="index.php?option=com_humo-gen&task=family&id=' . $genarray[$w]["spfams"] . '&main_person=' . $genarray[$w]["spgednr"] . '">' . '<strong>' . $name["standard_name"] . '</strong></a>'; } else { $extra_popup_text .= '<a href="' . CMS_ROOTPATH . 'family.php?id=' . $genarray[$w]["spfams"] . '&main_person=' . $genarray[$w]["spgednr"] . '">' . '<strong>' . $name["standard_name"] . '</strong></a>'; } } else { $extra_popup_text .= $name["standard_name"]; } if ($woman_privacy) { $extra_popup_text .= __(' PRIVACY FILTER') . '<br>'; //Tekst privacy weergeven } else { if ($woman->pers_birth_date or $woman->pers_birth_place) { $extra_popup_text .= __('born') . $dirmark1 . ' ' . date_place($woman->pers_birth_date, $woman->pers_birth_place) . '<br>'; } if ($woman->pers_death_date or $woman->pers_death_place) { $extra_popup_text .= __('died ') . $dirmark1 . ' ' . date_place($woman->pers_death_date, $woman->pers_death_place) . '<br>'; } } } else { $extra_popup_text .= __('N.N.'); } } echo $man_cls->person_popup_menu($man, true, $replacement_text, $extra_popup_text); echo '</div>'; // div of square if ($direction == 0) { // if vertical // draw dotted line from first marriage to following marriages if (isset($genarray[$w]["2nd"]) and $genarray[$w]["2nd"] == 1) { $startx = $genarray[$w - 1]["x"] + $hsize + 2; $starty = $genarray[$w - 1]["y"] + $vsize / 2; $width = $genarray[$w]["x"] - ($genarray[$w - 1]["x"] + $hsize) - 2; print '<div style="position:absolute;border:1px blue dashed;height:2px;width:' . $width . 'px;left:' . $startx . 'px;top:' . $starty . 'px"></div>'; } // draw line to children if ($genarray[$w]["nrc"] != 0) { $startx = $genarray[$w]["x"] + $hsize / 2; $starty = $genarray[$w]["y"] + $vsize + 2; print '<div class="chart_line" style="position:absolute; height:' . ($vdist / 2 - 2) . 'px; width:1px; left:' . $startx . 'px; top:' . $starty . 'px"></div>'; } // draw line to parent if ($genarray[$w]["gen"] != 0 and $genarray[$w]["2nd"] != 1) { $startx = $genarray[$w]["x"] + $hsize / 2; $starty = $genarray[$w]["y"] - $vdist / 2; print '<div class="chart_line" style="position:absolute; height:' . $vdist / 2 . 'px;width:1px;left:' . $startx . 'px;top:' . $starty . 'px"></div>'; } // draw horizontal line from 1st child in fam to last child in fam if ($genarray[$w]["gen"] != 0) { $parent = $genarray[$w]["par"]; if ($genarray[$w]["chd"] == $genarray[$parent]["nrc"]) { // last child in fam $z = $w; while ($genarray[$z]["2nd"] == 1) { //if last is 2nd (3rd etc) marriage, the line has to stop at first marriage $z--; } $startx = $genarray[$parent]["fst"] + $hsize / 2; $starty = $genarray[$z]["y"] - $vdist / 2; $width = $genarray[$z]["x"] - $genarray[$parent]["fst"]; print '<div class="chart_line" style="position:absolute; height:1px; width:' . $width . 'px; left:' . $startx . 'px; top:' . $starty . 'px"></div>'; } } } else { // if horizontal // draw dotted line from first marriage to following marriages if (isset($genarray[$w]["2nd"]) and $genarray[$w]["2nd"] == 1) { $starty = $genarray[$w - 1]["y"] + $vsize + 2; $startx = $genarray[$w - 1]["x"] + $hsize / 2; $height = $genarray[$w]["y"] - ($genarray[$w - 1]["y"] + $vsize) - 2; print '<div style="position:absolute;border:1px blue dashed;height:' . $height . 'px; width:3px; left:' . $startx . 'px;top:' . $starty . 'px"></div>'; } // draw line to children if ($genarray[$w]["nrc"] != 0) { $starty = $genarray[$w]["y"] + $vsize / 2; $startx = $genarray[$w]["x"] + $hsize + 3; print '<div class="chart_line" style="position:absolute; height:1px; width:' . ($hdist / 2 - 2) . 'px; left:' . $startx . 'px; top:' . $starty . 'px"></div>'; } // draw line to parent if ($genarray[$w]["gen"] != 0 and $genarray[$w]["2nd"] != 1) { $starty = $genarray[$w]["y"] + $vsize / 2; $startx = $genarray[$w]["x"] - $hdist / 2; print '<div class="chart_line" style="position:absolute; width:' . $hdist / 2 . 'px; height:1px; left:' . $startx . 'px; top:' . $starty . 'px"></div>'; } // draw vertical line from 1st child in fam to last child in fam if ($genarray[$w]["gen"] != 0) { $parent = $genarray[$w]["par"]; if ($genarray[$w]["chd"] == $genarray[$parent]["nrc"]) { // last child in fam $z = $w; while ($genarray[$z]["2nd"] == 1) { //if last is 2nd (3rd etc) marriage, the line has to stop at first marriage $z--; } $starty = $genarray[$parent]["fst"] + $vsize / 2; $startx = $genarray[$z]["x"] - $hdist / 2; $height = $genarray[$z]["y"] - $genarray[$parent]["fst"]; print '<div class="chart_line" style="position:absolute; width:1px; height:' . $height . 'px; left:' . $startx . 'px; top:' . $starty . 'px"></div>'; } } } // end if horizontal } echo '</div>'; // id=png print "<br><br></div>"; // id=doublescroll // YB: // before creating the image we want to hide unnecessary items such as the help link, the menu box etc // we also have to set the width and height of the "png" div (this can't be set before because then the double scrollbars won't work // after generating the image, all those items are returned to their previous state.... echo '<script type="text/javascript">'; if ($hourglass === false) { echo "\n\t\tfunction showimg() { \n\t\t\tdocument.getElementById('helppopup').style.visibility = 'hidden';\n\t\t\tdocument.getElementById('menubox').style.visibility = 'hidden';\n\t\t\tdocument.getElementById('imgbutton').style.visibility = 'hidden';\n\t\t\tdocument.getElementById('png').style.width = '" . $divlen . "px';\n\t\t\tdocument.getElementById('png').style.height= '" . $divhi . "px';\n\t\t\thtml2canvas( [ document.getElementById('png') ], { \n\t\t\t\tonrendered: function( canvas ) {\n\t\t\t\t\tdocument.getElementById('helppopup').style.visibility = 'visible';\n\t\t\t\t\tdocument.getElementById('menubox').style.visibility = 'visible';\n\t\t\t\t\tdocument.getElementById('imgbutton').style.visibility = 'visible';\n\t\t\t\t\tvar img = canvas.toDataURL();\n\t\t\t\t\tdocument.getElementById('png').style.width = 'auto';\n\t\t\t\t\tdocument.getElementById('png').style.height= 'auto';\n\t\t\t\t\tvar newWin = window.open();\n\t\tnewWin.document.open();\n\t\tnewWin.document.write('<!DOCTYPE html><head></head><body>" . __('Right click on the image below and save it as a .png file to your computer.<br>You can then print it over multiple pages with dedicated third-party programs, such as the free: ') . "<a href=\"http://posterazor.sourceforge.net/index.php?page=download&lang=english\" target=\"_blank\">\"PosteRazor\"</a><br>" . __('If you have a plotter you can use its software to print the image on one large sheet.') . "<br><br><img src=\"' + img + '\"></body></html>');\n\t\tnewWin.document.close();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t"; } else { echo "\n\t\tfunction showimg() { \n\t\t\tdocument.getElementById('png').style.width = '" . $divlen . "px';\n\t\t\tdocument.getElementById('png').style.height= '" . $divhi . "px';\n\t\t\thtml2canvas( [ document.getElementById('png') ], { \n\t\t\t\tonrendered: function( canvas ) {\n\t\t\t\tvar img = canvas.toDataURL();\n\t\t\t\tdocument.getElementById('png').style.width = 'auto';\n\t\t\t\tdocument.getElementById('png').style.height= 'auto';\n\t\t\t\tvar newWin = window.open();\n\t\tnewWin.document.open();\n\t\tnewWin.document.write('<!DOCTYPE html><head></head><body>" . __('Right click on the image below and save it as a .png file to your computer.<br>You can then print it over multiple pages with dedicated third-party programs, such as the free: ') . "<a href=\"http://posterazor.sourceforge.net/index.php?page=download&lang=english\" target=\"_blank\">\"PosteRazor\"</a><br>" . __('If you have a plotter you can use its software to print the image on one large sheet.') . "<br><br><img src=\"' + img + '\"></body></html>');\n\t\tnewWin.document.close();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t"; } echo "</script>"; ?> <script type='text/javascript'> function DoubleScroll(element) { var scrollbar= document.createElement('div'); scrollbar.appendChild(document.createElement('div')); scrollbar.style.overflow= 'auto'; scrollbar.style.overflowY= 'hidden'; scrollbar.firstChild.style.width= element.scrollWidth+'px'; scrollbar.firstChild.style.paddingTop= '1px'; scrollbar.firstChild.style.height= '20px'; scrollbar.firstChild.appendChild(document.createTextNode('\xA0')); scrollbar.onscroll= function() { element.scrollLeft= scrollbar.scrollLeft; }; element.onscroll= function() { scrollbar.scrollLeft= element.scrollLeft; }; element.parentNode.insertBefore(scrollbar, element); } DoubleScroll(document.getElementById('doublescroll')); </script> <?php // here place div at bottom so there is some space under last boxes $last = count($genarray) - 1; $putit = $genarray[$last]["y"] + 130; print '<div style="position:absolute;left:1px;top:' . $putit . 'px;"> </div>'; }
} $d_date = $desc_searchDb->pers_death_date; $d_sign = __('died') . ' '; if (!$desc_searchDb->pers_death_date and $desc_searchDb->pers_buried_date) { $d_date = $desc_searchDb->pers_buried_date; $d_sign = __('buried') . ' '; } $date = ''; if ($b_date and !$d_date) { $date = ' (' . $b_sign . date_place($b_date, '') . ')'; } if ($b_date and $d_date) { $date .= ' (' . $b_sign . date_place($b_date, '') . ' - ' . $d_sign . date_place($d_date, '') . ')'; } if (!$b_date and $d_date) { $date = '(' . $d_sign . date_place($d_date, '') . ')'; } $name = ''; $pref = ''; $last = '- , '; $first = '-'; if ($desc_searchDb->pers_lastname) { $last = $desc_searchDb->pers_lastname . ', '; } if ($desc_searchDb->pers_firstname) { $first = $desc_searchDb->pers_firstname; } if ($desc_searchDb->pers_prefix) { $pref = strtolower(str_replace('_', '', $desc_searchDb->pers_prefix)); } if ($user['group_kindindex'] == "j") {
function show_person($gedcomnumber, $gedcom_date = false, $show_link = true) { global $dbh, $db_functions, $tree_prefix, $page, $joomlastring; if ($gedcomnumber) { $personDb = $db_functions->get_person($gedcomnumber); if ($show_link == true) { //$text='<a href="index.php?'.$joomlastring.'page='.$page.'&tree='.$tree_prefix. $text = '<a href="index.php?' . $joomlastring . 'page=' . $page . '&menu_tab=person&tree=' . $tree_prefix . '&person=' . $personDb->pers_gedcomnumber . '">' . $personDb->pers_firstname . ' ' . strtolower(str_replace("_", " ", $personDb->pers_prefix)) . $personDb->pers_lastname . '</a>' . "\n"; } else { $text = $personDb->pers_firstname . ' ' . strtolower(str_replace("_", " ", $personDb->pers_prefix)) . $personDb->pers_lastname . "\n"; } } else { $text = __('N.N.'); } if ($gedcom_date == true) { if ($personDb->pers_birth_date) { $text .= ' * ' . date_place($personDb->pers_birth_date, ''); } elseif ($personDb->pers_bapt_date) { $text .= ' ~ ' . date_place($personDb->pers_bapt_date, ''); } elseif ($personDb->pers_death_date) { $text .= ' † ' . date_place($personDb->pers_death_date, ''); } elseif ($personDb->pers_buried_date) { $text .= ' [] ' . date_place($personDb->pers_buried_date, ''); } } return $text; }
function show_person($familyDb) { global $dbh, $db_functions, $tree_id, $selected_place, $language, $user; global $bot_visit, $humo_option, $uri_path, $search_database, $list_expanded; global $selected_language, $privacy, $dirmark1, $dirmark2, $rtlmarker; global $select_marriage_notice, $select_marriage, $select_marriage_notice_religious, $select_marriage_religious; if ($familyDb->fam_man) { $selected_person1 = $familyDb->fam_man; } else { $selected_person1 = $familyDb->fam_woman; } $personDb = $db_functions->get_person($selected_person1); $pers_tree_prefix = $personDb->pers_tree_prefix; //if (CMS_SPECIFIC=='Joomla'){ // $start_url='index.php?option=com_humo-gen&task=family&database='.$pers_tree_prefix. // '&id='.$personDb->pers_indexnr.'&main_person='.$personDb->pers_gedcomnumber; //} //else if ($humo_option["url_rewrite"] == "j") { // *** url_rewrite *** // *** $uri_path made in header.php *** $start_url = $uri_path . 'family/' . $pers_tree_prefix . '/' . $personDb->pers_indexnr . '/' . $personDb->pers_gedcomnumber . '/'; } else { $start_url = CMS_ROOTPATH . 'family.php?database=' . $pers_tree_prefix . '&id=' . $personDb->pers_indexnr . '&main_person=' . $personDb->pers_gedcomnumber; } // *** Person class used for name and person pop-up data *** $person_cls = new person_cls(); $person_cls->construct($personDb); $privacy = $person_cls->privacy; $name = $person_cls->person_name($personDb); // *** Show name *** $index_name = ''; if ($name["show_name"] == false) { $index_name = __('Name filtered'); } else { // *** If there is no lastname, show a - character. *** if ($personDb->pers_lastname == "") { // Don't show a "-" by pers_patronymes if (!isset($_GET['pers_patronym'])) { $index_name = "- "; } } $index_name .= $name["index_name_extended"] . $name["colour_mark"]; } // *** Show extra colums before a person in index places *** if ($selected_place != $familyDb->place_order) { echo '<td colspan="7"><b>' . $dirmark2 . "{$familyDb->place_order}</b></td></tr><tr>"; } $selected_place = $familyDb->place_order; echo '<td valign="top" style="white-space:nowrap;width:90px">'; if ($select_marriage_notice == '1') { if ($selected_place == $familyDb->fam_marr_notice_place) { echo '<span class="place_index place_index_selected">' . __('∞') . '</span>'; } else { echo '<span class="place_index"> </span>'; } } if ($select_marriage_notice_religious == '1') { if ($selected_place == $familyDb->fam_marr_church_notice_place) { echo '<span class="place_index place_index_selected">' . __('o') . '</span>'; } else { echo '<span class="place_index"> </span>'; } } if ($select_marriage == '1') { if ($selected_place == $familyDb->fam_marr_place) { echo '<span class="place_index place_index_selected">' . __('X') . '</span>'; } else { echo '<span class="place_index"> </span>'; } } if ($select_marriage_religious == '1') { if ($selected_place == $familyDb->fam_marr_church_place) { echo '<span class="place_index place_index_selected">' . __('x') . '</span>'; } else { echo '<span class="place_index"> </span>'; } } echo '</td>'; echo '<td valign="top" style="border-right:0px; white-space:nowrap;">'; // *** Show person popup menu *** echo $person_cls->person_popup_menu($personDb); // *** Show picture man or wife *** if ($personDb->pers_sexe == "M") { echo $dirmark1 . ' <img src="' . CMS_ROOTPATH . 'images/man.gif" alt="man" style="vertical-align:top">'; } elseif ($personDb->pers_sexe == "F") { echo $dirmark1 . ' <img src="' . CMS_ROOTPATH . 'images/woman.gif" alt="woman" style="vertical-align:top">'; } else { echo $dirmark1 . ' <img src="' . CMS_ROOTPATH . 'images/unknown.gif" alt="unknown" style="vertical-align:top">'; } echo '</td><td style="border-left:0px;">'; // *** Show name of person *** echo ' <a href="' . $start_url . '">' . rtrim($index_name) . '</a>'; //*** Show spouse/ partner *** if ($list_expanded == true and $personDb->pers_fams) { $marriage_array = explode(";", $personDb->pers_fams); // *** Code to show only last marriage *** $nr_marriages = count($marriage_array); for ($x = 0; $x <= $nr_marriages - 1; $x++) { $fam_partnerDb = $db_functions->get_family($marriage_array[$x]); // *** This check is better then a check like: $personDb->pers_sexe=='F', because of unknown sexe or homosexual relations. *** if ($personDb->pers_gedcomnumber == $fam_partnerDb->fam_man) { $partner_id = $fam_partnerDb->fam_woman; } else { $partner_id = $fam_partnerDb->fam_man; } $relation_short = __('&'); if ($fam_partnerDb->fam_marr_date or $fam_partnerDb->fam_marr_place or $fam_partnerDb->fam_marr_church_date or $fam_partnerDb->fam_marr_church_place) { $relation_short = __('X'); } if ($fam_partnerDb->fam_div_date or $fam_partnerDb->fam_div_place) { $relation_short = __(') ('); } if ($partner_id != '0' and $partner_id != '') { $partnerDb = $db_functions->get_person($partner_id); $partner_cls = new person_cls(); $privacy2 = $person_cls->privacy; $name = $partner_cls->person_name($partnerDb); } else { $name["standard_name"] = __('N.N.'); } if ($nr_marriages > 1) { echo ','; } if (@$partnerDb->pers_gedcomnumber != $familyDb->fam_woman) { // *** Show actual relation/ marriage in special font *** echo ' <span class="index_partner" style="font-size:10px;">'; } else { echo ' '; } if ($nr_marriages > 1) { if ($x == 0) { echo __('1st'); } elseif ($x == 1) { echo ' ' . __('2nd'); } elseif ($x == 2) { echo ' ' . __('3rd'); } elseif ($x > 2) { echo ' ' . ($x + 1) . __('th'); } } echo ' ' . $relation_short . ' ' . rtrim($name["standard_name"]); if (@$partnerDb->pers_gedcomnumber != $familyDb->fam_woman) { echo '</span>'; } } } // *** End spouse/ partner *** echo '</td><td style="white-space:nowrap;">'; $info = ""; if ($familyDb->fam_marr_church_notice_date) { $info = __('o') . ' ' . date_place($familyDb->fam_marr_church_notice_date, ''); } if ($familyDb->fam_marr_notice_date) { $info = __('∞') . ' ' . date_place($familyDb->fam_marr_notice_date, ''); } //echo "<span style='font-size:90%'>".$info.$dirmark1."</span>"; if ($privacy == 1 and $info) { echo ' ' . __('PRIVACY FILTER'); } else { echo $info; } echo '</td><td>'; $info = ""; if ($familyDb->fam_marr_church_notice_place) { $info = __('o') . ' ' . $familyDb->fam_marr_church_notice_place; } if ($familyDb->fam_marr_notice_place) { $info = __('∞') . ' ' . $familyDb->fam_marr_notice_place; } if ($privacy == 1 and $info) { echo ' ' . __('PRIVACY FILTER'); } else { echo $info; } echo '</td><td style="white-space:nowrap;">'; $info = ""; if ($familyDb->fam_marr_church_date) { $info = __('x') . ' ' . date_place($familyDb->fam_marr_church_date, ''); } if ($familyDb->fam_marr_date) { $info = __('X') . ' ' . date_place($familyDb->fam_marr_date, ''); } if ($privacy == 1 and $info) { echo ' ' . __('PRIVACY FILTER'); } else { echo $info; } echo '</td><td>'; $info = ""; if ($familyDb->fam_marr_church_place) { $info = __('x') . ' ' . $familyDb->fam_marr_church_place; } if ($familyDb->fam_marr_place) { $info = __('X') . ' ' . $familyDb->fam_marr_place; } if ($privacy == 1 and $info) { echo ' ' . __('PRIVACY FILTER'); } else { echo $info; } echo '</td></tr>'; }
function marriage_data($marriageDb = '', $number = '0', $presentation = 'standard') { global $dbh, $db_functions, $tree_prefix_quoted, $url_path, $dataDb, $uri_path; global $language, $user, $screen_mode; global $templ_person; if ($marriageDb == '') { $marriageDb = $this->cls_marriage_Db; } // *** Open a person class for witnesses *** $person_cls = new person_cls(); $relation_kind = ''; $relation_check = false; $marriage_check = false; $addition = __(' to: '); $text = ''; if ($marriageDb->fam_kind == 'living together') { $relation_check = true; $relation_kind = __('Living together'); } if ($marriageDb->fam_kind == 'living apart together') { $relation_kind = __('Living apart together'); $relation_check = true; } if ($marriageDb->fam_kind == 'intentionally unmarried mother') { $relation_kind = __('Intentionally unmarried mother'); $relation_check = true; $addition = ''; } if ($marriageDb->fam_kind == 'homosexual') { $relation_check = true; $relation_kind = __('Homosexual'); } if ($marriageDb->fam_kind == 'non-marital') { $relation_check = true; $relation_kind = __('Non marital'); $addition = ''; } if ($marriageDb->fam_kind == 'extramarital') { $relation_check = true; $relation_kind = __('Extramarital'); $addition = ''; } // NOT TESTED if ($marriageDb->fam_kind == "PRO-GEN") { $relation_check = true; $relation_kind = __('Extramarital'); $addition = ''; } // *** Aldfaer relations *** if ($marriageDb->fam_kind == 'partners') { $relation_check = true; $relation_kind = __('Partner') . ' '; } if ($marriageDb->fam_kind == 'registered') { $relation_check = true; $relation_kind = __('Registered') . ' '; } if ($marriageDb->fam_kind == 'unknown') { $relation_check = true; $relation_kind = __('Unknown relation') . ' '; } // *** Living together *** $temp_text = ''; $temp = ''; if ($marriageDb->fam_relation_date or $marriageDb->fam_relation_place) { $templ_relation["marriage_date"] = date_place($marriageDb->fam_relation_date, $marriageDb->fam_relation_place); $temp = "marriage_date"; $temp_text .= $templ_relation["marriage_date"]; } if ($user["group_texts_fam"] == 'j' and process_text($marriageDb->fam_relation_text)) { if ($temp_text) { //$temp_text.= ', '; //if($temp) { $templ_relation[$temp].=", "; } $temp_text .= ' '; if ($temp) { $templ_relation[$temp] .= ' '; } } $templ_relation["marriage_text"] = process_text($marriageDb->fam_relation_text); $temp = "marriage_text"; $temp_text .= $templ_relation["marriage_text"]; } // *** Living together source *** $source = show_sources2("family", "fam_relation_source", $marriageDb->fam_gedcomnumber); if ($source) { if ($screen_mode == 'PDF') { $templ_relation["marriage_source"] = $source; $temp = "marriage_source"; } else { $temp_text .= $source; } } if ($temp_text) { $relation_check = true; $addition = __(' to: '); if ($text != '') { $text .= "<br>\n"; $templ_relation["marriage_exist"] = "\n"; } // *** Text "living together" already shown in "kind" *** // *** Just in case made an extra text "living together" here *** if (!$relation_kind) { $text .= '<b>' . __('Living together') . '</b>'; if (isset($templ_relation["marriage_exist"])) { $templ_relation["marriage_exist"] .= __('Living together') . " "; } else { $templ_relation["marriage_exist"] = __('Living together') . " "; } } $text .= ' ' . $temp_text; } // *** End of living together. NO end place, end text or end source yet. *** $temp_text = ''; $temp = ''; $fam_relation_end_place = ''; if ($marriageDb->fam_relation_end_date or $fam_relation_end_place) { $temp_text .= date_place($marriageDb->fam_relation_end_date, $fam_relation_end_place); $templ_relation["marriage_end"] = ''; if (isset($templ_relation["marriage_exist"])) { $templ_relation["marriage_end"] = '. '; } $templ_relation["marriage_end"] .= __('End living together') . ' ' . date_place($marriageDb->fam_relation_end_date, $fam_relation_end_place); $temp = "marriage_end"; } //if ($user["group_texts_fam"]=='j' AND isset($marriageDb->fam_relation_end_text) AND process_text($marriageDb->fam_relation_end_text)){ // if ($temp_text){ // $temp_text.= ', '; // if($temp) { $templ_relation[$temp].=", "; } // } // $temp_text.= process_text($marriageDb->fam_relation_end_text); // //$templ_relation["marriage_text"]=process_text($marriageDb->fam_relation_end_text); // //$temp="marriage_text"; //} // *** Living together source *** // no source yet... if ($temp_text) { $marriage_check = true; if ($text != '' or $relation_kind) { $text .= "<br>\n"; //$templ_relation["marriage_exist"]="\n"; } $text .= '<b>' . __('End living together') . '</b>'; //if(isset($templ_relation["marriage_exist"])) {$templ_relation["marriage_exist"].=__('End living together')." "; } //else {$templ_relation["marriage_exist"]=__('End living together')." "; } $text .= ' ' . $temp_text; } // *** Married Notice *** $temp_text = ''; $temp = ''; if ($marriageDb->fam_marr_notice_date or $marriageDb->fam_marr_notice_place) { $temp_text .= date_place($marriageDb->fam_marr_notice_date, $marriageDb->fam_marr_notice_place); $templ_relation["prew_date"] = date_place($marriageDb->fam_marr_notice_date, $marriageDb->fam_marr_notice_place); $temp = "prew_date"; } if ($user["group_texts_fam"] == 'j' and process_text($marriageDb->fam_marr_notice_text)) { if ($temp_text) { //$temp_text.= ', '; //if($temp) { $templ_relation[$temp].=", "; } $temp_text .= ' '; if ($temp) { $templ_relation[$temp] .= " "; } } $temp_text .= process_text($marriageDb->fam_marr_notice_text); $templ_relation["prew_text"] = process_text($marriageDb->fam_marr_notice_text); $temp = "prew_text"; } // *** Married notice source *** $source = show_sources2("family", "fam_marr_notice_source", $marriageDb->fam_gedcomnumber); if ($source) { if ($screen_mode == 'PDF') { $templ_relation["prew_source"] = $source; $temp = "pre_source"; } else { $temp_text .= $source; } } if ($temp_text) { $marriage_check = true; $addition = __(' to: '); if ($text != '') { $text .= "<br>\n"; $templ_relation["prew_exist"] = "\n"; } $text .= '<b>' . __('Marriage notice') . '</b> ' . $temp_text; if (isset($templ_relation["prew_exist"])) { $templ_relation["prew_exist"] .= __('Marriage notice') . ' '; } else { $templ_relation["prew_exist"] = __('Marriage notice') . ' '; } } // *** Marriage *** $temp_text = ''; $temp = ''; if ($marriageDb->fam_marr_date or $marriageDb->fam_marr_place) { $templ_relation["wedd_date"] = date_place($marriageDb->fam_marr_date, $marriageDb->fam_marr_place); $temp = "wedd_date"; $temp_text .= $templ_relation["wedd_date"]; } if ($marriageDb->fam_marr_authority) { $templ_relation["wedd_authority"] = " [" . $marriageDb->fam_marr_authority . "]"; $temp = "wedd_authority"; $temp_text .= $templ_relation["wedd_authority"]; } if ($user["group_texts_fam"] == 'j' and process_text($marriageDb->fam_marr_text)) { if ($temp_text) { //$temp_text.= ', '; //if($temp) { $templ_relation[$temp].=", "; } $temp_text .= ' '; if ($temp) { $templ_relation[$temp] .= " "; } } $templ_relation["wedd_text"] = process_text($marriageDb->fam_marr_text); $temp = "wedd_text"; $temp_text .= $templ_relation["wedd_text"]; } // *** Aldfaer/ HuMo-gen: show witnesses *** if ($marriageDb->fam_gedcomnumber) { $temp_text2 = witness($marriageDb->fam_gedcomnumber, 'marriage_witness', 'family'); if ($temp_text2) { $temp_text .= ' (' . __('marriage witness') . ' ' . $temp_text2 . ')'; if ($temp) { $templ_relation[$temp] .= " ("; } $templ_relation["wedd_witn"] = __('marriage witness') . ' ' . $temp_text2 . ')'; $temp = "wedd_witn"; } } // *** Marriage source *** $source = show_sources2("family", "fam_marr_source", $marriageDb->fam_gedcomnumber); if ($source) { if ($screen_mode == 'PDF') { $templ_relation["wedd_source"] = $source; $temp = "wedd_source"; } else { $temp_text .= $source; } } if ($temp_text) { $marriage_check = true; $addition = __(' to: '); if ($text != '') { $text .= "<br>\n"; $templ_relation["wedd_exist"] = "\n"; } $text .= '<b>' . __('Married') . '</b> ' . $temp_text; if (isset($templ_relation["wedd_exist"])) { $templ_relation["wedd_exist"] .= __('Married') . ' '; } else { $templ_relation["wedd_exist"] = __('Married') . ' '; } } else { // *** Marriage without further data (date or place) *** if ($marriageDb->fam_kind == 'civil') { $marriage_check = true; $addition = __(' to: '); $text .= '<b>' . __('Married') . '</b>'; $templ_relation["wedd_exist"] = __('Married'); } } // *** Married church notice *** $temp_text = ''; $temp = ''; if ($marriageDb->fam_marr_church_notice_date or $marriageDb->fam_marr_church_notice_place) { $templ_relation["prec_date"] = date_place($marriageDb->fam_marr_church_notice_date, $marriageDb->fam_marr_church_notice_place); $temp = "prec_date"; $temp_text .= $templ_relation["prec_date"]; } if ($user["group_texts_fam"] == 'j' and process_text($marriageDb->fam_marr_church_notice_text)) { if ($temp_text) { //$temp_text.= ', '; //if($temp) { $templ_relation[$temp].=", "; } $temp_text .= ' '; if ($temp) { $templ_relation[$temp] .= " "; } } $templ_relation["prec_text"] = process_text($marriageDb->fam_marr_church_notice_text); $temp = "prec_text"; $temp_text .= $templ_relation["prec_text"]; } // *** Married church notice source *** $source = show_sources2("family", "fam_marr_church_notice_source", $marriageDb->fam_gedcomnumber); if ($source) { if ($screen_mode == 'PDF') { $templ_relation["prec_source"] = $source; $temp = "prec_source"; } else { $temp_text .= $source; } } if ($temp_text) { $marriage_check = true; $addition = __(' to: '); if ($text != '') { $text .= "<br>\n"; $templ_relation["prec_exist"] = "\n"; } $text .= '<b>' . __('Married notice (religious)') . '</b> ' . $temp_text; if (isset($templ_relation["prec_exist"])) { $templ_relation["prec_exist"] .= __('Married notice (religious)') . ' '; } else { $templ_relation["prec_exist"] = __('Married notice (religious)') . ' '; } } // *** Married church *** $temp_text = ''; $temp = ''; if ($marriageDb->fam_marr_church_date or $marriageDb->fam_marr_church_place) { $templ_relation["chur_date"] = date_place($marriageDb->fam_marr_church_date, $marriageDb->fam_marr_church_place); $temp = "chur_date"; $temp_text .= $templ_relation["chur_date"]; } if ($user["group_texts_fam"] == 'j' and process_text($marriageDb->fam_marr_church_text)) { if ($temp_text) { //$temp_text.= ', '; //if($temp) { $templ_relation[$temp].=", "; } $temp_text .= ' '; if ($temp) { $templ_relation[$temp] .= " "; } } $templ_relation["chur_text"] = process_text($marriageDb->fam_marr_church_text); $temp = "chur_text"; $temp_text .= $templ_relation["chur_text"]; } // *** Aldfaer/ HuMo-gen show witnesses *** if ($marriageDb->fam_gedcomnumber) { $temp_text2 = witness($marriageDb->fam_gedcomnumber, 'marriage_witness_rel', 'family'); if ($temp_text2) { $temp_text .= ' (' . __('marriage witness (religious)') . ' ' . $temp_text2 . ')'; if ($temp) { $templ_relation[$temp] .= " ("; } $templ_relation["chur_witn"] = __('marriage witness (religious)') . ' ' . $temp_text2 . ')'; $temp = "chur_witn"; } } // *** Married church source *** $source = show_sources2("family", "fam_marr_church_source", $marriageDb->fam_gedcomnumber); if ($source) { if ($screen_mode == 'PDF') { $templ_relation["chur_source"] = $source; $temp = "chur_source"; } else { $temp_text .= $source; } } if ($temp_text) { $marriage_check = true; $addition = __(' to: '); if ($text != '') { $text .= "<br>\n"; $templ_relation["chur_exist"] = "\n"; } $text .= '<b>' . __('Married (religious)') . '</b> ' . $temp_text; if (isset($templ_relation["chur_exist"])) { $templ_relation["chur_exist"] .= __('Married (religious)') . ' '; } else { $templ_relation["chur_exist"] = __('Married (religious)') . ' '; } } // *** Religion *** if ($user['group_religion'] == 'j' and $marriageDb->fam_religion) { $templ_relation["reli_reli"] = ' (' . __('religion: ') . $marriageDb->fam_religion . ')'; $text .= ' <span class="religion">(' . __('religion: ') . $marriageDb->fam_religion . ')</span>'; } // *** Divorse *** $temp_text = ''; $temp = ''; if ($marriageDb->fam_div_date or $marriageDb->fam_div_place) { $templ_relation["devr_date"] = date_place($marriageDb->fam_div_date, $marriageDb->fam_div_place); $temp = "devr_date"; $temp_text .= $templ_relation["devr_date"]; } if ($marriageDb->fam_div_authority) { $templ_relation["devr_authority"] = " [" . $marriageDb->fam_div_authority . "]"; $temp = "devr_authority"; $temp_text .= $templ_relation["devr_authority"]; } if ($user["group_texts_fam"] == 'j' and $marriageDb->fam_div_text != 'DIVORCE' and process_text($marriageDb->fam_div_text)) { if ($temp_text) { //$temp_text.= ', '; //if($temp) { $templ_relation[$temp].=", "; } $temp_text .= ' '; if ($temp) { $templ_relation[$temp] .= " "; } } $templ_relation["devr_text"] = process_text($marriageDb->fam_div_text); $temp = "devr_text"; $temp_text .= $templ_relation["devr_text"]; } // *** Divorse source *** $source = show_sources2("family", "fam_div_source", $marriageDb->fam_gedcomnumber); if ($source) { if ($screen_mode == 'PDF') { $templ_relation["devr_source"] = $source; $temp = "devr_source"; } else { $temp_text .= $source; } } //if ($temp_text){ // *** div_text "DIVORCE" is used for divorce without further data! *** if ($temp_text or $marriageDb->fam_div_text == 'DIVORCE') { $marriage_check = true; $addition = ' ' . __('from:') . ' '; if ($text != '') { $text .= "<br>\n"; $templ_relation["devr_exist"] = "\n"; } $text .= '<span class="divorse"><b>' . ucfirst(__('divorced')) . '</b> ' . $temp_text . '</span>'; if (isset($templ_relation["devr_exist"])) { $templ_relation["devr_exist"] .= ucfirst(__('divorced')) . ' '; } else { $templ_relation["devr_exist"] = ucfirst(__('divorced')) . ' '; } } // *** No relation data (marriage without date), show standard text *** if ($relation_check == false and $marriage_check == false) { // *** Show standard marriage text *** $templ_relation["unkn_rel"] = __('Marriage/ Related') . ' '; $text .= '<b>' . __('Marriage/ Related') . '</b> '; } else { // *** Years of marriage *** if (($marriageDb->fam_marr_church_date or $marriageDb->fam_marr_date) and $marriageDb->fam_div_text != 'DIVORCE' and !($temp_text and $marriageDb->fam_div_date == '')) { $end_date = ''; // *** Check death date of husband *** @($person_manDb = $db_functions->get_person($marriageDb->fam_man)); if (isset($person_manDb->pers_death_date) and $person_manDb->pers_death_date) { $end_date = $person_manDb->pers_death_date; } // *** Check death date of wife *** @($person_womanDb = $db_functions->get_person($marriageDb->fam_woman)); if (isset($person_womanDb->pers_death_date) and $person_womanDb->pers_death_date) { // *** Check if men died earlier then woman (AT THIS MOMENT ONLY CHECK YEAR) *** if ($end_date and substr($end_date, -4) > substr($person_womanDb->pers_death_date, -4)) { $end_date = $person_womanDb->pers_death_date; } // *** Man still living or no date available *** if ($end_date == '') { $end_date = $person_womanDb->pers_death_date; } } // *** End of marriage by divorse *** if ($marriageDb->fam_div_date) { $end_date = $marriageDb->fam_div_date; } $marr_years = new calculate_year_cls(); $age = $marr_years->calculate_marriage($marriageDb->fam_marr_church_date, $marriageDb->fam_marr_date, $end_date); $text .= $age; // Space and komma in $age //PDF? } } // *** Show media/ pictures *** //$text.=show_media('',$marriageDb); // *** This function can be found in file: show_picture.php! *** $result = show_media('', $marriageDb); // *** This function can be found in file: show_picture.php! *** $text .= $result[0]; //if (isset($templ_person)) // $templ_person = array_merge((array)$templ_person,(array)$result[1]); //else // $templ_person=$result[1]; // *** Show objecs *** // *** Show events *** if ($user['group_event'] == 'j') { if ($marriageDb->fam_gedcomnumber) { $event_qry = $db_functions->get_events_family($marriageDb->fam_gedcomnumber, 'event'); $num_rows = count($event_qry); if ($num_rows > 0) { $text .= '<span class="event">'; } $i = 0; foreach ($event_qry as $eventDb) { $i++; //echo '<br>'.__('Event (family)'); if ($text != '') { $text .= "<br>\n"; } if ($i > 1) { $templ_relation["event" . $i . "_ged"] = "\n"; } // *** Check if NCHI is 0 or higher *** $event_gedcom = $eventDb->event_gedcom; $event_text = $eventDb->event_text; if ($event_gedcom == 'NCHI' and trim($eventDb->event_text) == '0') { $event_gedcom = 'NCHI0'; $event_text = ''; } $text .= '<b>' . language_event($event_gedcom) . '</b>'; if (isset($templ_relation["event" . $i . "_ged"])) { $templ_relation["event" . $i . "_ged"] .= language_event($event_gedcom); } else { $templ_relation["event" . $i . "_ged"] = language_event($event_gedcom); } // *** Show event kind *** if ($eventDb->event_event) { $templ_relation["event" . $i . "_event"] = ' (' . $eventDb->event_event . ')'; $text .= $templ_relation["event" . $i . "_event"]; } if ($eventDb->event_date or $eventDb->event_place) { $templ_relation["event" . $i . "_date"] = ' ' . date_place($eventDb->event_date, $eventDb->event_place); $text .= $templ_relation["event" . $i . "_date"]; } if ($event_text) { $templ_relation["event" . $i . "_text"] = ' ' . process_text($eventDb->event_text); $text .= $templ_relation["event" . $i . "_text"]; } // *** Sources by a family event *** $source = show_sources2("family", "fam_event_source", $eventDb->event_id); if ($source) { if ($screen_mode == 'PDF') { // $templ_relation["event_source"]=show_sources2("family","fam_event_source",$eventDb->event_id); // $temp="fam_event_source"; } else { $text .= $source; } } } if ($num_rows > 0) { $text .= "</span><br>\n"; // if there are events, the word "with" should be on a new line to make the text clearer $templ_relation["event_lastline"] = "\n"; $addition = ltrim($addition); } } } // ********************************** // *** Concacenate marriage texts *** // ********************************** // Process english 1st, 2nd, 3rd and 4th marriage. $relation_number = ''; //if ($number!=''){ if ($presentation == 'short' or $presentation == 'shorter') { if ($number == '1') { $relation_number = __('1st'); } if ($number == '2') { $relation_number = __('2nd'); } if ($number == '3') { $relation_number = __('3rd'); } if ($number > '3') { $relation_number = $number . __('th'); } if ($marriage_check == true) { if ($number) { $relation_number .= ' ' . __('marriage'); // marriage $relation_kind = ''; $addition = __(' to: '); } else { $relation_number .= __('Married '); // Married $relation_kind = ''; $addition = __(' to: '); } } if ($relation_check == true) { if ($number) { $relation_number .= ' ' . __('related'); // relation $relation_kind = ''; $addition = __(' to: '); } else { $relation_number = ucfirst(__('related')) . ' '; // Relation $relation_kind = ''; $addition = __(' to: '); } } if ($relation_check == false and $marriage_check == false) { if ($number) { // *** Other text in 2nd marriage: 2nd marriage Hubertus [Huub] Mons *** if ($presentation == 'shorter') { $relation_number .= ' ' . __('marriage/ relation'); // relation } else { $relation_number .= ' ' . __('marriage/ related'); // relation } $relation_kind = ''; $addition = __(' to: '); } else { $relation_number .= __('Marriage/ Related'); // Relation $relation_kind = ''; $addition = __(' to: '); } } } if ($presentation == 'short' or $presentation == 'shorter') { $text = '<b>' . $relation_number . $relation_kind . '</b>'; $templ_relation = array(); //reset array - don't need it // *** Show divorse if privacy filter is set *** if ($marriageDb->fam_div_date or $marriageDb->fam_div_place or $marriageDb->fam_div_text) { $text .= ' <span class="divorse">(' . __('divorced') . ')</span>'; } // Show end of relation here? // *** No addition in text: 2nd marriage Hubertus [Huub] Mons *** if ($presentation == 'shorter') { $addition = ''; } } else { $text = '<b>' . $relation_number . $relation_kind . '</b>' . $text; } if ($addition) { $text .= '<b>' . $addition . '</b>'; } $templ_relation["relnr_rel"] = $relation_number . $relation_kind; $templ_relation["rel_add"] = $addition; if ($screen_mode != "PDF") { return $text; } else { return $templ_relation; } }
if (isset($pdf_source[$key])) { $pdf->SetLink($pdf_footnotes[$count - 1], -1); $pdf->SetFont('Arial', 'B', 10); $pdf->Write(6, $count . ". "); if ($user['group_sources'] == 'j') { source_display($pdf_source[$key]); // function source_display from source.php, called with source nr. } elseif ($user['group_sources'] == 't') { $sourceDb = $db_functions->get_source($pdf_source[$key]); if ($sourceDb->source_title) { $pdf->SetFont('Arial', 'B', 10); $pdf->Write(6, __('Title') . ": "); $pdf->SetFont('Arial', '', 10); $txt = ' ' . trim($sourceDb->source_title); if ($sourceDb->source_date or $sourceDb->source_place) { $txt .= " " . date_place($sourceDb->source_date, $sourceDb->source_place); } $pdf->Write(6, $txt . "\n"); } } $pdf->Write(2, "\n"); $pdf->SetDrawColor(200); // grey line $pdf->Cell(0, 2, " ", 'B', 1); $pdf->Write(4, "\n"); } } unset($value); } if ($hourglass === false) { // in hourglass there's more code after family.php is included
function ancestor_chart_person($id, $box_appearance) { global $dbh, $db_functions, $tree_prefix_quoted, $humo_option, $user; global $marr_date_array, $marr_place_array; global $gedcomnumber, $language, $screen_mode, $dirmark1, $dirmark2; $hour_value = ''; // if called from hourglass.php size of chart is given in box_appearance as "hour45" etc. if (strpos($box_appearance, "hour") !== false) { $hour_value = substr($box_appearance, 4); } $text = ''; $popup = ''; if ($gedcomnumber[$id]) { @($personDb = $db_functions->get_person($gedcomnumber[$id])); $person_cls = new person_cls(); $person_cls->construct($personDb); $pers_privacy = $person_cls->privacy; $name = $person_cls->person_name($personDb); if ($screen_mode == "ancestor_sheet" or $language["dir"] == "rtl") { $name2 = $name["name"]; } else { //$name2=$name["short_firstname"]; $name2 = $name["name"]; } $name2 = $dirmark2 . $name2 . $name["colour_mark"] . $dirmark2; // *** Replace pop-up icon by a text box *** $replacement_text = ''; if ($screen_mode == "ancestor_sheet") { // *** Ancestor sheet: name bold, id not *** //$replacement_text.=$id.' <b>'.$name2.'</b>'; $replacement_text .= '<b>' . $name2 . '</b>'; } else { //$replacement_text.='<b>'.$id.'</b>'; // *** Ancestor number: id bold, name not *** $replacement_text .= '<span class="anc_box_name">' . $name2 . '</span>'; } // >>>>> link to show rest of ancestor chart //if ($box_appearance=='small' AND isset($personDb->pers_gedcomnumber) AND $screen_mode!="ancestor_sheet"){ if ($box_appearance == 'small' and isset($personDb->pers_gedcomnumber) and $personDb->pers_famc and $screen_mode != "ancestor_sheet") { //$replacement_text.= ' <a href="'.$_SERVER['PHP_SELF'].'?id='.$personDb->pers_gedcomnumber. // "&screen_mode=ancestor_chart\">>>></a> "; $replacement_text .= ' >>>' . $dirmark1; } if ($pers_privacy) { if ($box_appearance != 'ancestor_sheet_marr') { $replacement_text .= '<br>' . __(' PRIVACY FILTER'); //Tekst privacy weergeven } else { $replacement_text = __(' PRIVACY FILTER'); } } else { if ($box_appearance != 'small') { //if ($personDb->pers_birth_date OR $personDb->pers_birth_place){ if ($personDb->pers_birth_date) { //$replacement_text.='<br>'.__('*').$dirmark1.' '.date_place($personDb->pers_birth_date,$personDb->pers_birth_place); } $replacement_text .= '<br>' . __('*') . $dirmark1 . ' ' . date_place($personDb->pers_birth_date, ''); } elseif ($personDb->pers_bapt_date) { //$replacement_text.='<br>'.__('~').$dirmark1.' '.date_place($personDb->pers_bapt_date,$personDb->pers_bapt_place); } $replacement_text .= '<br>' . __('~') . $dirmark1 . ' ' . date_place($personDb->pers_bapt_date, ''); } //if ($personDb->pers_death_date OR $personDb->pers_death_place){ if ($personDb->pers_death_date) { //$replacement_text.='<br>'.__('†').$dirmark1.' '.date_place($personDb->pers_death_date,$personDb->pers_death_place); } $replacement_text .= '<br>' . __('†') . $dirmark1 . ' ' . date_place($personDb->pers_death_date, ''); } elseif ($personDb->pers_buried_date) { //$replacement_text.='<br>'.__('[]').$dirmark1.' '.date_place($personDb->pers_buried_date,$personDb->pers_buried_place); } $replacement_text .= '<br>' . __('[]') . $dirmark1 . ' ' . date_place($personDb->pers_buried_date, ''); } if ($box_appearance != 'medium') { $marr_date = ''; if (isset($marr_date_array[$id]) and $marr_date_array[$id] != '') { $marr_date = $marr_date_array[$id]; } $marr_place = ''; if (isset($marr_place_array[$id]) and $marr_place_array[$id] != '') { $marr_place = $marr_place_array[$id]; } //if ($marr_date OR $marr_place){ if ($marr_date) { //$replacement_text.='<br>'.__('X').$dirmark1.' '.date_place($marr_date,$marr_place); } $replacement_text .= '<br>' . __('X') . $dirmark1 . ' ' . date_place($marr_date, ''); } } if ($box_appearance == 'ancestor_sheet_marr') { $replacement_text = ''; $marr_date = ''; if (isset($marr_date_array[$id]) and $marr_date_array[$id] != '') { $marr_date = $marr_date_array[$id]; } $marr_place = ''; if (isset($marr_place_array[$id]) and $marr_place_array[$id] != '') { $marr_place = $marr_place_array[$id]; } //if ($marr_date OR $marr_place){ if ($marr_date) { //$replacement_text=__('X').$dirmark1.' '.date_place($marr_date,$marr_place); } $replacement_text = __('X') . $dirmark1 . ' ' . date_place($marr_date, ''); } else { $replacement_text = __('X'); } // if no details in the row we don't want the row to collapse } if ($box_appearance == 'ancestor_header') { $replacement_text = ''; $replacement_text .= strip_tags($name2); $replacement_text .= $dirmark2; } } } if ($hour_value != '') { // called from hourglass if ($hour_value == '45') { $replacement_text = $name['name']; } elseif ($hour_value == '40') { $replacement_text = '<span class="wordwrap" style="font-size:75%">' . $name['short_firstname'] . '</span>'; } elseif ($hour_value > 20 and $hour_value < 40) { $replacement_text = $name['initials']; } elseif ($hour_value < 25) { $replacement_text = " "; } // if full scale (50) then the default of this function will be used: name with details } $extra_popup_text = ''; $marr_date = ''; if (isset($marr_date_array[$id]) and $marr_date_array[$id] != '') { $marr_date = $marr_date_array[$id]; } $marr_place = ''; if (isset($marr_place_array[$id]) and $marr_place_array[$id] != '') { $marr_place = $marr_place_array[$id]; } if ($marr_date or $marr_place) { $extra_popup_text .= '<br>' . __('X') . $dirmark1 . ' ' . date_place($marr_date, $marr_place); } // *** Show picture by person *** if ($box_appearance != 'small' and $box_appearance != 'medium') { // *** Show picture *** if (!$pers_privacy and $user['group_pictures'] == 'j') { // *** Path can be changed per family tree *** global $dataDb; $tree_pict_path = $dataDb->tree_pict_path; $picture_qry = $db_functions->get_events_person($personDb->pers_gedcomnumber, 'picture'); // *** Only show 1st picture *** if (isset($picture_qry[0])) { $pictureDb = $picture_qry[0]; $picture = show_picture($tree_pict_path, $pictureDb->event_event, 80, 70); $text .= '<img src="' . $tree_pict_path . $picture['thumb'] . $picture['picture'] . '" style="float:left; margin:5px;" alt="' . $pictureDb->event_text . '" width="' . $picture['width'] . '">'; } } } if ($box_appearance == 'ancestor_sheet_marr' or $box_appearance == 'ancestor_header') { // cause in that case there is no link $text .= $replacement_text; } else { $text .= $person_cls->person_popup_menu($personDb, true, $replacement_text, $extra_popup_text); } } return $text . "\n"; }
} // *** Only search for dates in oldest year *** if ($oldest_year != $row->search) { break; } if ($oldest_year == substr($row->pers_death_date, -4)) { $pers_death_date = convert_date_number($row->pers_death_date); if ($pers_death_date > $oldest_date) { $person_found = $row; } } } if ($person_found) { // *** Now get full person data (quicker in large family trees) *** $row = $db_functions->get_person($person_found->pers_gedcomnumber); echo "<td align='center'><i>" . date_place($row->pers_death_date, '') . "</i></td>\n"; echo show_person($row); } else { echo "<td></td><td></td>\n"; } echo '<tr><td colspan="5"><br></td></tr>'; // *** Longest living man, and calculate ages *** $man_min = 50; $man_max = 0; $man_min_married = 50; $man_max_married = 0; echo "<tr><td>" . __('Longest living person') . "</td>\n"; $res = @$dbh->query("SELECT pers_gedcomnumber, pers_sexe, pers_birth_date, pers_bapt_date, pers_death_date, pers_fams, pers_indexnr\n\t\t\tFROM humo_persons WHERE pers_tree_id='" . $tree_id . "'\n\t\t\tAND pers_sexe='M' AND (pers_birth_date LIKE '_%' OR pers_bapt_date LIKE '_%') AND pers_death_date LIKE '_%'"); $test_year = "10"; while (@($record = $res->fetch(PDO::FETCH_OBJ))) { $age = new calculate_year_cls();
echo '<th><a href="sources.php?database=' . $_SESSION['tree_prefix'] . '&start=1&item=0&order_sources=date&sort_desc=' . $sort_reverse . '"' . $style . '>' . __('Date') . ' <img src="images/button3' . $img . '.png"></a></th>'; $style = ''; $sort_reverse = $sort_desc; $img = ''; if ($order_sources == "place") { $style = ' style="background-color:#ffffa0"'; $sort_reverse = '1'; if ($sort_desc == '1') { $sort_reverse = '0'; $img = 'up'; } } echo '<th><a href="sources.php?database=' . $_SESSION['tree_prefix'] . '&start=1&item=0&order_sources=place&sort_desc=' . $sort_reverse . '"' . $style . '>' . __('Place') . ' <img src="images/button3' . $img . '.png"></a></th>'; echo '</tr>'; while (@($sourceDb = $source->fetch(PDO::FETCH_OBJ))) { echo '<tr><td><a href="' . CMS_ROOTPATH . 'source.php?database=' . $_SESSION['tree_prefix'] . '&id=' . $sourceDb->source_gedcomnr . '">'; // *** Aldfaer sources don't have a title! *** if ($sourceDb->source_title) { echo $sourceDb->source_title; } else { echo $sourceDb->source_text; } echo '</a></td>'; echo '<td>' . date_place($sourceDb->source_date, '') . '</td>'; echo '<td>' . $sourceDb->source_place . '</td>'; echo '</tr>'; } echo '</table>'; echo '<br><div class=index_list1>' . $line_pages . '</div>'; //echo '</div>'; include_once CMS_ROOTPATH . "footer.php";
function show_sources_footnotes() { global $dbh, $db_functions, $tree_id, $source_footnotes, $language, $tree_prefix_quoted, $user; global $uri_path, $source_footnote_connect_id; $text = ''; if (count($source_footnote_connect_id) > 0) { $text .= '<h3>' . __('Sources') . "</h3>\n"; } for ($j = 0; $j <= count($source_footnote_connect_id) - 1; $j++) { $connect_qry = "SELECT * FROM humo_connections\r\n\t\t\tWHERE connect_id='" . $source_footnote_connect_id[$j] . "'"; $connect_sql = $dbh->query($connect_qry); $connectDb = $connect_sql->fetch(PDO::FETCH_OBJ); // *** Show extended source data *** if ($connectDb->connect_source_id) { $sourceDb = $db_functions->get_source($connectDb->connect_source_id); // *** Always show title of source, show link only after permission check *** $text .= '<a name="source_ref' . ($j + 1) . '"><b>' . ($j + 1) . ')</b></a>'; if ($user['group_sources'] == 'j') { $text .= ' <a href="' . $uri_path . 'source.php?database=' . $_SESSION['tree_prefix'] . '&id=' . $sourceDb->source_gedcomnr . '">' . strtolower(__('Source')) . ': '; if ($sourceDb->source_title) { $text .= " " . trim($sourceDb->source_title); } $text .= '</a>'; } else { if ($sourceDb->source_title) { $text .= ' ' . trim($sourceDb->source_title); } } if ($connectDb->connect_date or $connectDb->connect_place) { //if ($connectDb->source_title){ $text.=', '; } $text .= " " . date_place($connectDb->connect_date, $connectDb->connect_place); } // *** Show extra source text *** if ($connectDb->connect_text) { $text .= ' ' . nl2br($connectDb->connect_text); } } else { // *** No extended source connected *** $text .= '<a name="source_ref' . ($j + 1) . '">' . ($j + 1) . ')</a>'; // *** Source text *** $text .= ' ' . nl2br($connectDb->connect_text); } // *** Show rest of source items *** // *** Source role *** if ($connectDb->connect_role) { $text .= ', ' . __('role') . ': ' . $connectDb->connect_role; } // *** Source page *** if ($connectDb->connect_page) { $text .= ', ' . strtolower(__('Page')) . ': ' . $connectDb->connect_page; } $text .= "<br>\n"; } // *** End of loop source footnotes *** return $text; }
function show_media($personDb, $marriageDb) { global $dbh, $tree_id, $user, $dataDb, $tree_prefix_quoted, $uri_path; global $sect, $screen_mode; // *** RTF Export *** global $picture_presentation; $templ_person = array(); // local version $process_text = ''; $media_nr = 0; // *** Pictures/ media *** if ($user['group_pictures'] == 'j' and $picture_presentation != 'hide') { //$tree_pict_path=CMS_ROOTPATH.$dataDb->tree_pict_path; $tree_pict_path = $dataDb->tree_pict_path; // in joomla relative path is relative to joomla main folder, NOT HuMo-gen main folder. Therefore use the path entered as-is, without ROOTPATH. // *** Standard connected media by person and family *** if ($personDb != '') { $picture_qry = $dbh->query("SELECT * FROM humo_events WHERE event_tree_id='" . $tree_id . "'\n\t\t\t\tAND event_person_id='" . $personDb->pers_gedcomnumber . "' AND LEFT(event_kind,7)='picture'\n\t\t\t\tORDER BY event_kind, event_order"); } else { $picture_qry = $dbh->query("SELECT * FROM humo_events WHERE event_tree_id='" . $tree_id . "'\n\t\t\t\tAND event_family_id='" . $marriageDb->fam_gedcomnumber . "' AND event_kind='picture'\n\t\t\t\tORDER BY event_order"); } while ($pictureDb = $picture_qry->fetch(PDO::FETCH_OBJ)) { $media_nr++; $media_event_id[$media_nr] = $pictureDb->event_id; $media_event_event[$media_nr] = $pictureDb->event_event; $media_event_date[$media_nr] = $pictureDb->event_date; $media_event_text[$media_nr] = $pictureDb->event_text; //$media_event_source[$media_nr]=$pictureDb->event_source; } // *** Search for all external connected objects by a person or a family *** if ($personDb != '') { $connect_qry = "SELECT * FROM humo_connections\n\t\t\t\tWHERE connect_tree_id='" . $tree_id . "'\n\t\t\t\tAND connect_sub_kind='pers_object'\n\t\t\t\tAND connect_connect_id='" . $personDb->pers_gedcomnumber . "'\n\t\t\t\tORDER BY connect_order"; } else { $connect_qry = "SELECT * FROM humo_connections\n\t\t\t\tWHERE connect_tree_id='" . $tree_id . "'\n\t\t\t\tAND connect_sub_kind='fam_object'\n\t\t\t\tAND connect_connect_id='" . $marriageDb->fam_gedcomnumber . "'\n\t\t\t\tORDER BY connect_order"; } $connect_sql = $dbh->query($connect_qry); while ($connectDb = $connect_sql->fetch(PDO::FETCH_OBJ)) { $picture_qry = $dbh->query("SELECT * FROM humo_events WHERE event_tree_id='" . $tree_id . "'\n\t\t\t\tAND event_gedcomnr='" . $connectDb->connect_source_id . "' AND event_kind='object'\n\t\t\t\tORDER BY event_order"); while ($pictureDb = $picture_qry->fetch(PDO::FETCH_OBJ)) { $media_nr++; $media_event_id[$media_nr] = $pictureDb->event_id; $media_event_event[$media_nr] = $pictureDb->event_event; $media_event_date[$media_nr] = $pictureDb->event_date; $media_event_text[$media_nr] = $pictureDb->event_text; //$media_event_source[$media_nr]=$pictureDb->event_source; } } // ****************** // *** Show media *** // ****************** if ($media_nr > 0) { $process_text .= '<br>'; } if (CMS_SPECIFIC == "Joomla") { $picpath = CMS_ROOTPATH; } else { $picpath = $uri_path; } if ($screen_mode == "RTF") { $process_text .= "\n"; } for ($i = 1; $i < $media_nr + 1; $i++) { // *** If possible show a thumb *** // *** Don't use entities in a picture *** //$event_event = html_entity_decode($pictureDb->event_event, ENT_NOQUOTES, 'ISO-8859-15'); $event_event = $media_event_event[$i]; // *** In some cases the picture name must be converted to lower case *** if (file_exists($tree_pict_path . strtolower($event_event))) { $event_event = strtolower($event_event); } // *** Show PDF file *** if (strtolower(substr($tree_pict_path . $event_event, -3, 3)) == "pdf") { $picture = '<a href="' . $tree_pict_path . $event_event . '"><img src="' . $picpath . '/images/pdf.jpeg" alt="PDF"></a>'; } elseif (strtolower(substr($tree_pict_path . $event_event, -3, 3)) == "doc" or substr($tree_pict_path . $event_event, -4, 4) == "docx") { $picture = '<a href="' . $tree_pict_path . $event_event . '"><img src="' . $picpath . '/images/msdoc.gif" alt="DOC"></a>'; } elseif (strtolower(substr($tree_pict_path . $event_event, -3, 3)) == "avi") { $picture = '<a href="' . $tree_pict_path . $event_event . '" target="_blank"><img src="' . $picpath . '/images/video-file.png" alt="AVI"></a>'; } elseif (strtolower(substr($tree_pict_path . $event_event, -3, 3)) == "wmv") { $picture = '<a href="' . $tree_pict_path . $event_event . '" target="_blank"><img src="' . $picpath . '/images/video-file.png" alt="WMV"></a>'; } elseif (strtolower(substr($tree_pict_path . $event_event, -3, 3)) == "mpg") { $picture = '<a href="' . $tree_pict_path . $event_event . '" target="_blank"><img src="' . $picpath . '/images/video-file.png" alt="MPG"></a>'; } elseif (strtolower(substr($tree_pict_path . $event_event, -3, 3)) == "mov") { $picture = '<a href="' . $tree_pict_path . $event_event . '" target="_blank"><img src="' . $picpath . '/images/video-file.png" alt="MOV"></a>'; } elseif (strtolower(substr($tree_pict_path . $event_event, -3, 3)) == "wma") { $picture = '<a href="' . $tree_pict_path . $event_event . '" target="_blank"><img src="' . $picpath . '/images/audio.gif" alt="WMA"></a>'; } elseif (strtolower(substr($tree_pict_path . $event_event, -3, 3)) == "mp3") { $picture = '<a href="' . $tree_pict_path . $event_event . '" target="_blank"><img src="' . $picpath . '/images/audio.gif"" alt="MP3"></a>'; } elseif (strtolower(substr($tree_pict_path . $event_event, -3, 3)) == "wav") { $picture = '<a href="' . $tree_pict_path . $event_event . '" target="_blank"><img src="' . $picpath . '/images/audio.gif"" alt="WAV"></a>'; } elseif (strtolower(substr($tree_pict_path . $event_event, -3, 3)) == "mid") { $picture = '<a href="' . $tree_pict_path . $event_event . '" target="_blank"><img src="' . $picpath . '/images/audio.gif"" alt="MID"></a>'; } elseif (strtolower(substr($tree_pict_path . $event_event, -3, 3)) == "ram") { $picture = '<a href="' . $tree_pict_path . $event_event . '" target="_blank"><img src="' . $picpath . '/images/audio.gif"" alt="RAM"></a>'; } elseif (strtolower(substr($tree_pict_path . $event_event, -2, 2)) == "ra") { $picture = '<a href="' . $tree_pict_path . $event_event . '" target="_blank"><img src="' . $picpath . '/images/audio.gif"" alt="RA"></a>'; } else { // *** Show photo using the lightbox effect *** $picture_array = show_picture($tree_pict_path, $event_event, '', 120); $picture = '<a href="' . $picture_array['path'] . $picture_array['picture'] . '" rel="lightbox" title="' . str_replace("&", "&", $media_event_text[$i]) . '">'; $picture .= '<img src="' . $picture_array['path'] . $picture_array['thumb'] . $picture_array['picture'] . '" height="' . $picture_array['height'] . '" alt="' . $event_event . '"></a>'; //$templ_person["pic_path".$i]=$tree_pict_path."thumb_".$event_event; //for the time being pdf only with thumbs $templ_person["pic_path" . $i] = $picture_array['path'] . "thumb_" . $picture_array['picture']; //for the time being pdf only with thumbs // *** Remove spaces *** $templ_person["pic_path" . $i] = trim($templ_person["pic_path" . $i]); } // *** Show picture date *** $picture_date = ''; if ($media_event_date[$i]) { if ($screen_mode != 'RTF') { $picture_date = ' ' . date_place($media_event_date[$i], '') . ' '; } // default, there is no place $templ_person["pic_text" . $i] = date_place($media_event_date[$i], ''); } // *** Show text by picture of little space *** $picture_text = ''; if (isset($media_event_text[$i]) and $media_event_text[$i]) { if ($screen_mode != 'RTF') { $picture_text = $picture_date . ' ' . str_replace("&", "&", $media_event_text[$i]); } if (isset($templ_person["pic_text" . $i])) { $templ_person["pic_text" . $i] .= ' ' . $media_event_text[$i]; } else { $templ_person["pic_text" . $i] = ' ' . $media_event_text[$i]; } } if ($screen_mode != 'RTF') { $source = show_sources2("person", "pers_event_source", $media_event_id[$i]); if ($source) { $picture_text .= $source; } $process_text .= '<div class="photo">'; $process_text .= $picture; if (isset($picture_text)) { $process_text .= '<div class="phototext">' . $picture_text . '</div>'; } $process_text .= '</div>' . "\n"; } } if ($media_nr > 0) { $process_text .= '<br clear="All">'; $templ_person["got_pics"] = 1; } } //return $process_text; $result[0] = $process_text; $result[1] = $templ_person; // local version with pic data return $result; }
function show_person($personDb) { global $dbh, $db_functions, $index_list, $selected_place, $language, $user; global $bot_visit, $humo_option, $uri_path, $search_database, $list_expanded; global $selected_language, $privacy, $dirmark1, $dirmark2, $rtlmarker; global $select_birth, $select_bapt, $select_place, $select_death, $select_buried; global $selectsort; $pers_tree_prefix = $personDb->pers_tree_prefix; $db_functions->set_tree_prefix($pers_tree_prefix); $db_functions->set_tree_id($personDb->pers_tree_id); if (CMS_SPECIFIC == 'Joomla') { $start_url = 'index.php?option=com_humo-gen&task=family&database=' . $pers_tree_prefix . '&id=' . $personDb->pers_indexnr . '&main_person=' . $personDb->pers_gedcomnumber; } elseif ($humo_option["url_rewrite"] == "j") { // *** url_rewrite *** // *** $uri_path made in header.php *** $start_url = $uri_path . 'family/' . $pers_tree_prefix . '/' . $personDb->pers_indexnr . '/' . $personDb->pers_gedcomnumber . '/'; } else { $start_url = CMS_ROOTPATH . 'family.php?database=' . $pers_tree_prefix . '&id=' . $personDb->pers_indexnr . '&main_person=' . $personDb->pers_gedcomnumber; } // *** Person class used for name and person pop-up data *** $person_cls = new person_cls(); $person_cls->construct($personDb); $name = $person_cls->person_name($personDb); // *** Show name *** $index_name = ''; if ($name["show_name"] == false) { $index_name = __('Name filtered'); } else { // *** If there is no lastname, show a - character. *** if ($personDb->pers_lastname == "") { // Don't show a "-" by pers_patronymes if (!isset($_GET['pers_patronym'])) { $index_name = "- "; } } $index_name .= $name["index_name_extended"] . $name["colour_mark"]; } // *** Show extra colums before a person in index places *** if ($index_list == 'places') { if ($selected_place != $personDb->place_order) { echo '<td colspan="7"><b>' . $dirmark2 . "{$personDb->place_order}</b></td></tr><tr>"; } $selected_place = $personDb->place_order; echo '<td valign="top" style="white-space:nowrap;width:90px">'; if ($select_birth == '1') { if ($selected_place == $personDb->pers_birth_place) { echo '<span class="place_index place_index_selected">' . __('*') . '</span>'; } else { echo '<span class="place_index"> </span>'; } } if ($select_bapt == '1') { if ($selected_place == $personDb->pers_bapt_place) { echo '<span class="place_index place_index_selected">' . __('~') . '</span>'; } else { echo '<span class="place_index"> </span>'; } } if ($select_place == '1') { if ($selected_place == $personDb->pers_place_index) { echo '<span class="place_index place_index_selected">' . __('^') . '</span>'; } else { echo '<span class="place_index"> </span>'; } } if ($select_death == '1') { if ($selected_place == $personDb->pers_death_place) { echo '<span class="place_index place_index_selected">' . __('†') . '</span>'; } else { echo '<span class="place_index"> </span>'; } } if ($select_buried == '1') { if ($selected_place == $personDb->pers_buried_place) { echo '<span class="place_index place_index_selected">' . __('[]') . '</span>'; } else { echo '<span class="place_index"> </span>'; } } echo '</td>'; } echo '<td valign="top" style="border-right:0px; white-space:nowrap;">'; // *** Show person popup menu *** echo $person_cls->person_popup_menu($personDb); // *** Show picture man or wife *** if ($personDb->pers_sexe == "M") { echo $dirmark1 . ' <img src="' . CMS_ROOTPATH . 'images/man.gif" alt="man" style="vertical-align:top">'; } elseif ($personDb->pers_sexe == "F") { echo $dirmark1 . ' <img src="' . CMS_ROOTPATH . 'images/woman.gif" alt="woman" style="vertical-align:top">'; } else { echo $dirmark1 . ' <img src="' . CMS_ROOTPATH . 'images/unknown.gif" alt="unknown" style="vertical-align:top">'; } // *** Add own icon by person, using a file name in own code *** if ($personDb->pers_own_code != '' and is_file("images/" . $personDb->pers_own_code . ".gif")) { echo $dirmark1 . '<img src="' . CMS_ROOTPATH . 'images/' . $personDb->pers_own_code . '.gif" alt="' . $personDb->pers_own_code . '"> '; } echo '</td><td style="border-left:0px;">'; // *** Show name of person *** echo ' <a href="' . $start_url . '">' . $index_name . '</a>'; //*** Show spouse/ partner *** if ($list_expanded == true and $personDb->pers_fams) { $marriage_array = explode(";", $personDb->pers_fams); $nr_marriages = count($marriage_array); for ($x = 0; $x <= $nr_marriages - 1; $x++) { $fam_partnerDb = $db_functions->get_family($marriage_array[$x]); // *** This check is better then a check like: $personDb->pers_sexe=='F', because of unknown sexe or homosexual relations. *** if ($personDb->pers_gedcomnumber == $fam_partnerDb->fam_man) { $partner_id = $fam_partnerDb->fam_woman; } else { $partner_id = $fam_partnerDb->fam_man; } $relation_short = __('&'); if ($fam_partnerDb->fam_marr_date or $fam_partnerDb->fam_marr_place or $fam_partnerDb->fam_marr_church_date or $fam_partnerDb->fam_marr_church_place or $fam_partnerDb->fam_kind == 'civil') { $relation_short = __('X'); } if ($fam_partnerDb->fam_div_date or $fam_partnerDb->fam_div_place) { $relation_short = __(') ('); } if ($partner_id != '0' and $partner_id != '') { $partnerDb = $db_functions->get_person($partner_id); $partner_cls = new person_cls(); $name = $partner_cls->person_name($partnerDb); } else { $name["standard_name"] = __('N.N.'); } if ($nr_marriages > 1 and $x > 0) { echo ','; } echo ' <span class="index_partner" style="font-size:10px;">'; if ($nr_marriages > 1) { if ($x == 0) { echo __('1st'); } elseif ($x == 1) { echo __('2nd'); } elseif ($x == 2) { echo __('3rd'); } elseif ($x > 2) { echo $x + 1 . __('th'); } } echo ' ' . $relation_short . ' ' . rtrim($name["standard_name"]) . '</span>'; } } // *** End spouse/ partner *** echo '</td><td style="white-space:nowrap;">'; $info = ""; if ($personDb->pers_bapt_date) { $info = __('~') . ' ' . date_place($personDb->pers_bapt_date, ''); } if ($personDb->pers_birth_date) { $info = __('*') . ' ' . date_place($personDb->pers_birth_date, ''); } if ($privacy == 1 and $info) { echo ' ' . __('PRIVACY FILTER'); } else { echo $info; } echo '</td><td>'; $info = ""; if ($personDb->pers_bapt_place) { $info = __('~') . ' ' . $personDb->pers_bapt_place; } if ($personDb->pers_birth_place) { $info = __('*') . ' ' . $personDb->pers_birth_place; } if ($privacy == 1 and $info) { echo ' ' . __('PRIVACY FILTER'); } else { echo $info; } echo '</td><td style="white-space:nowrap;">'; $info = ""; if ($personDb->pers_buried_date) { $info = __('[]') . ' ' . date_place($personDb->pers_buried_date, ''); } if ($personDb->pers_death_date) { $info = __('†') . ' ' . date_place($personDb->pers_death_date, ''); } if ($privacy == 1 and $info) { echo ' ' . __('PRIVACY FILTER'); } else { echo $info; } echo '</td><td>'; $info = ""; if ($personDb->pers_buried_place) { $info = __('[]') . ' ' . $personDb->pers_buried_place; } if ($personDb->pers_death_place) { $info = __('†') . ' ' . $personDb->pers_death_place; } if ($privacy == 1 and $info) { echo ' ' . __('PRIVACY FILTER'); } else { echo $info; } // *** Show name of family tree, if search in multiple family trees is used *** if ($search_database == 'all_trees' or $search_database == 'all_but_this') { $treetext = show_tree_text($pers_tree_prefix, $selected_language); echo '</td><td>'; echo '<i><font size="-1">' . $treetext['name'] . '</font></i>'; } echo '</td></tr>'; }
function source_display($sourcenum) { global $dbh, $db_functions, $tree_prefix_quoted, $dataDb, $user, $pdf, $screen_mode, $language; if ($screen_mode != "PDF") { include_once "header.php"; //returns CMS_ROOTPATH constant include_once CMS_ROOTPATH . "menu.php"; include_once CMS_ROOTPATH . "include/date_place.php"; include_once CMS_ROOTPATH . "include/process_text.php"; } // *** Check user authority *** if ($user['group_sources'] != 'j') { echo __('You are not authorised to see this page.'); exit; } if ($screen_mode != "PDF") { include_once CMS_ROOTPATH . "include/language_date.php"; include_once CMS_ROOTPATH . "include/person_cls.php"; echo '<table class="humo standard">'; echo "<tr><td><h2>" . __('Sources') . "</h2>"; } $sourceDb = $db_functions->get_source($sourcenum); // *** If an unknown source ID is choosen, exit function *** if (!isset($sourceDb->source_id)) { exit(__('No valid source number.')); } if ($sourceDb->source_title) { if ($screen_mode == "PDF") { $pdf->SetFont('Arial', 'B', 10); $pdf->Write(6, __('Title') . ": "); $pdf->SetFont('Arial', '', 10); $pdf->Write(6, $sourceDb->source_title . "\n"); } else { echo '<b>' . __('Title') . ":</b> {$sourceDb->source_title}<br>"; } } if ($sourceDb->source_date) { if ($screen_mode == "PDF") { $pdf->SetFont('Arial', 'B', 10); $pdf->Write(6, __('Date') . ": "); $pdf->SetFont('Arial', '', 10); $pdf->Write(6, language_date(strtolower($sourceDb->source_date)) . "\n"); } else { echo '<b>' . __('Date') . ":</b> " . language_date(strtolower($sourceDb->source_date)) . "<br>"; } } if ($sourceDb->source_publ) { $source_publ = $sourceDb->source_publ; $pdflink = 0; if (substr($source_publ, 0, 7) == 'http://') { $link = $source_publ; $source_publ = '<a href="' . $link . '">' . $link . '</a>'; $pdflink = 1; } if (substr($source_publ, 0, 8) == 'https://') { $link = $source_publ; $source_publ = '<a href="' . $link . '">' . $link . '</a>'; $pdflink = 1; } if ($screen_mode == "PDF") { $pdf->SetFont('Arial', 'B', 10); $pdf->Write(6, __('Publication') . ": "); $pdf->SetFont('Arial', '', 10); if ($pdflink == 1) { $pdf->SetFont('Arial', 'U', 10); $pdf->SetTextColor(28, 28, 255); $pdf->Write(6, strip_tags($source_publ) . "\n", strip_tags($source_publ)); $pdf->SetFont('Arial', '', 10); $pdf->SetTextColor(0); } else { $pdf->Write(6, strip_tags($source_publ) . "\n"); } } else { print '<b>' . __('Publication') . ":</b> {$source_publ}<br>"; } } if ($sourceDb->source_place) { if ($screen_mode == "PDF") { $pdf->SetFont('Arial', 'B', 10); $pdf->Write(6, __('Place') . ": "); $pdf->SetFont('Arial', '', 10); $pdf->Write(6, $sourceDb->source_place . "\n"); } else { print '<b>' . __('Place') . ":</b> {$sourceDb->source_place}<br>"; } } if ($sourceDb->source_refn) { if ($screen_mode == "PDF") { $pdf->SetFont('Arial', 'B', 10); $pdf->Write(6, __('Own code') . ": "); $pdf->SetFont('Arial', '', 10); $pdf->Write(6, $sourceDb->source_refn . "\n"); } else { print '<b>' . __('Own code') . ":</b> {$sourceDb->source_refn}<br>"; } } if ($sourceDb->source_auth) { if ($screen_mode == "PDF") { $pdf->SetFont('Arial', 'B', 10); $pdf->Write(6, __('Author') . ": "); $pdf->SetFont('Arial', '', 10); $pdf->Write(6, $sourceDb->source_auth . "\n"); } else { print '<b>' . __('Author') . ":</b> {$sourceDb->source_auth}<br>"; } } if ($sourceDb->source_subj) { if ($screen_mode == "PDF") { $pdf->SetFont('Arial', 'B', 10); $pdf->Write(6, __('Subject') . ": "); $pdf->SetFont('Arial', '', 10); $pdf->Write(6, $sourceDb->source_subj . "\n"); } else { print '<b>' . __('Subject') . ":</b> {$sourceDb->source_subj}<br>"; } } if ($sourceDb->source_item) { if ($screen_mode == "PDF") { $pdf->SetFont('Arial', 'B', 10); $pdf->Write(6, __('Nr.') . ": "); $pdf->SetFont('Arial', '', 10); $pdf->Write(6, $sourceDb->source_item . "\n"); } else { print '<b>' . __('Nr.') . ":</b> {$sourceDb->source_item}<br>"; } } if ($sourceDb->source_kind) { if ($screen_mode == "PDF") { $pdf->SetFont('Arial', 'B', 10); $pdf->Write(6, __('Kind') . ": "); $pdf->SetFont('Arial', '', 10); $pdf->Write(6, $sourceDb->source_kind . "\n"); } else { print '<b>' . __('Kind') . ":</b> {$sourceDb->source_kind}<br>"; } } if ($sourceDb->source_repo_caln) { if ($screen_mode == "PDF") { $pdf->SetFont('Arial', 'B', 10); $pdf->Write(6, __('Archive') . " "); $pdf->SetFont('Arial', '', 10); $pdf->Write(6, $sourceDb->source_repo_caln . "\n"); } else { print '<b>' . __('Archive') . "</b> {$sourceDb->source_repo_caln}<br>"; } } if ($sourceDb->source_repo_page) { if ($screen_mode == "PDF") { $pdf->SetFont('Arial', 'B', 10); $pdf->Write(6, __('Page') . " "); $pdf->SetFont('Arial', '', 10); $pdf->Write(6, $sourceDb->source_repo_page . "\n"); } else { print '<b>' . __('Page') . "</b> {$sourceDb->source_repo_page}<br>"; } } if ($sourceDb->source_text) { if ($screen_mode == "PDF") { $source_text = $sourceDb->source_text; $source_text = str_replace('<br>', '', $source_text); //$pdf->Write(6,html_entity_decode($source_text)."\n"); $pdf->Write(6, $source_text . "\n"); } else { print '</td></tr><tr><td>' . process_text($sourceDb->source_text); } } // *** Source pictures not in use yet... *** // *** Show repository *** $repoDb = $db_functions->get_repository($sourceDb->source_repo_gedcomnr); if ($repoDb) { if ($screen_mode == "PDF") { // NO REPOSITORIES IN PDF YET... } else { echo '</td></tr><tr><td>'; echo '<h3>' . __('Repository') . '</h3>'; echo '<b>' . __('Title') . ':</b> ' . $repoDb->repo_name . '<br>'; if ($user['group_addresses'] == 'j') { echo '<b>' . __('Zip code') . ':</b> ' . $repoDb->repo_zip . '<br>'; echo '<b>' . __('Address') . ':</b> ' . $repoDb->repo_address . '<br>'; } if ($repoDb->repo_date) { echo '<b>' . __('Date') . ':</b> ' . $repoDb->repo_date . '<br>'; } if ($repoDb->repo_place) { echo '<b>' . __('Place') . ':</b> ' . $repoDb->repo_place . '<br>'; } echo nl2br($repoDb->repo_text); } } if ($screen_mode != "PDF") { // we do not want all persons in the database as given online so // in the pdf file so we'll take just the above details // and leave references to persons print '</td></tr>'; print '<tr><td>'; $person_cls = new person_cls(); // *** Find person data if source is connected to a family item *** // *** This seperate function speeds up the sources page *** function person_data($familyDb) { global $dbh, $tree_prefix_quoted, $db_functions; if ($familyDb->fam_man) { $personDb = $db_functions->get_person($familyDb->fam_man); } else { $personDb = $db_functions->get_person($familyDb->fam_woman); } return $personDb; } // *** Sources in connect table *** $connect_qry = "SELECT * FROM humo_connections WHERE connect_tree_id='" . $tree_id . "'\r\n\t\tAND connect_source_id='" . $sourceDb->source_gedcomnr . "'\r\n\t\tORDER BY connect_kind, connect_sub_kind, connect_order"; $connect_sql = $dbh->query($connect_qry); while ($connectDb = $connect_sql->fetch(PDO::FETCH_OBJ)) { // *** Person source *** if ($connectDb->connect_kind == 'person') { if ($connectDb->connect_sub_kind == 'person_source') { echo __('Source for:'); } if ($connectDb->connect_sub_kind == 'pers_name_source') { echo __('Source for name:'); } if ($connectDb->connect_sub_kind == 'pers_birth_source') { echo __('Source for birth:'); } if ($connectDb->connect_sub_kind == 'pers_bapt_source') { echo __('Source for baptism:'); } if ($connectDb->connect_sub_kind == 'pers_death_source') { echo __('Source for death:'); } if ($connectDb->connect_sub_kind == 'pers_buried_source') { echo __('Source for burial:'); } if ($connectDb->connect_sub_kind == 'pers_text_source') { echo __('Source for text:'); } if ($connectDb->connect_sub_kind == 'pers_sexe_source') { echo __('Source for sexe:'); } //else { echo 'TEST'; } if ($connectDb->connect_sub_kind == 'pers_event_source') { // *** Sources by event *** $event_Db = $db_functions->get_event($connectDb->connect_connect_id); // *** Person source *** if ($event_Db->event_person_id) { $personDb = $db_functions->get_person($event_Db->event_person_id); $name = $person_cls->person_name($personDb); print __('Source for:') . ' <a href="' . CMS_ROOTPATH . 'family.php?id=' . $personDb->pers_indexnr . '&main_person=' . $personDb->pers_gedcomnumber . '">'; echo $name["standard_name"] . '</a>'; if ($event_Db->event_event) { echo ' ' . $event_Db->event_event; } } } elseif (substr($connectDb->connect_sub_kind, -14) == 'address_source') { // *** Sources in address table *** $address_sql = "SELECT * FROM humo_addresses WHERE address_id='" . $connectDb->connect_connect_id . "'"; @($address_qry = $dbh->query($address_sql)); $address_Db = $address_qry->fetch(PDO::FETCH_OBJ); if ($address_Db->address_person_id) { $personDb = $db_functions->get_person($address_Db->address_person_id); $name = $person_cls->person_name($personDb); echo __('Source for address:') . ' <a href="' . CMS_ROOTPATH . 'family.php?id=' . $personDb->pers_indexnr . '&main_person=' . $personDb->pers_gedcomnumber . '">'; echo $name["standard_name"] . '</a>'; } } else { //$db_functions->set_tree_prefix($tree_prefix_quoted); //echo 'TEST: '.$tree_id.' '.$connectDb->connect_sub_kind.' '.$connectDb->connect_connect_id.'<br>'; $personDb = $db_functions->get_person($connectDb->connect_connect_id); echo ' <a href="' . CMS_ROOTPATH . 'family.php?id=' . $personDb->pers_indexnr . '&main_person=' . $personDb->pers_gedcomnumber . '">'; $name = $person_cls->person_name($personDb); echo $name["standard_name"] . '</a>'; } } // *** Family source *** if ($connectDb->connect_kind == 'family') { if ($connectDb->connect_sub_kind == 'family_source') { echo __('Source for family:'); } if ($connectDb->connect_sub_kind == 'fam_relation_source') { echo __('Source for cohabitation:'); } if ($connectDb->connect_sub_kind == 'fam_marr_notice_source') { echo __('Source for marriage notice:'); } if ($connectDb->connect_sub_kind == 'fam_marr_source') { echo __('Source for marriage:'); } if ($connectDb->connect_sub_kind == 'fam_marr_church_notice_source') { echo __('Source for marriage notice (church):'); } if ($connectDb->connect_sub_kind == 'fam_marr_church_source') { echo __('Source for marriage (church):'); } if ($connectDb->connect_sub_kind == 'fam_div_source') { echo __('Source for divorce:'); } if ($connectDb->connect_sub_kind == 'fam_text_source') { echo __('Source for family text:'); } //else{ // echo 'TEST2'; //} //if ($connectDb->connect_sub_kind=='event'){ if ($connectDb->connect_sub_kind == 'fam_event_source') { // *** Sources by event *** $event_Db = $db_functions->get_event($connectDb->connect_connect_id); // *** Family source *** if ($event_Db->event_family_id) { print __('Source for family:'); $familyDb = $db_functions->get_family($event_Db->event_family_id); $personDb = person_data($familyDb); echo ' <a href="' . CMS_ROOTPATH . 'family.php?id=' . $event_Db->event_family_id . '">'; $name = $person_cls->person_name($personDb); echo $name["standard_name"] . '</a>'; if ($event_Db->event_event) { echo ' ' . $event_Db->event_event; } } } else { $familyDb = $db_functions->get_family($connectDb->connect_connect_id); $personDb = person_data($familyDb); echo ' <a href="' . CMS_ROOTPATH . 'family.php?id=' . $connectDb->connect_connect_id . '">'; $name = $person_cls->person_name($personDb); echo $name["standard_name"] . '</a>'; } } // *** Source by address *** if ($connectDb->connect_kind == 'address' and $connectDb->connect_sub_kind == 'address_source') { $sql = "SELECT * FROM humo_addresses WHERE address_id='" . $connectDb->connect_connect_id . "'"; $address_sql = $dbh->query($sql); $addressDb = $address_sql->fetch(PDO::FETCH_OBJ); if ($addressDb->address_address) { $text = $addressDb->address_address; } if ($addressDb->address_place) { $text .= ' ' . $addressDb->address_place; } echo __('Source for address:'); echo ' <a href="address.php?gedcomnumber=' . $addressDb->address_gedcomnr . '">' . $text . '</a>'; } // *** Extra source connect information by every source *** if ($connectDb->connect_date or $connectDb->connect_place) { echo " " . date_place($connectDb->connect_date, $connectDb->connect_place); } // *** Source role *** if ($connectDb->connect_role) { echo ', ' . __('role') . ': ' . $connectDb->connect_role; } // *** Source page *** if ($connectDb->connect_page) { echo ', ' . strtolower(__('Page')) . ': ' . $connectDb->connect_page; } echo '<br>'; } print '</td></tr>'; print '</table>'; include_once CMS_ROOTPATH . "footer.php"; } // end if not PDF }