$marriage_gedcomnumber2[] = $person_manDb->pers_famc; } } } else { // *** Show N.N. person *** @($person_manDb = $db_functions->get_person($ancestor_array[$i])); $man_cls = new person_cls(); $man_cls->construct($person_manDb); $privacy_man = $man_cls->privacy; if ($screen_mode != 'PDF' and $screen_mode != 'RTF') { echo '<tr><td valign="top" width="80" nowrap><b>' . $ancestor_number[$i] . '</b> (' . floor($ancestor_number[$i] / 2) . ')</td>'; echo '<td>'; //*** Show person_data of man *** echo '<div class="parent1">'; // *** Use "child", to show a link to own family. *** echo $man_cls->name_extended("child"); echo $man_cls->person_data("standard", $ancestor_array[$i]); echo '</div>'; echo '</td></tr>'; } elseif ($screen_mode == "RTF") { $sect->writeText('', $arial12, new PHPRtfLite_ParFormat()); $table = $sect->addTable(); $table->addRow(1); $table->addColumnsList(array(2, 0.5, 14)); $rtf_text = $ancestor_number[$i] . "(" . floor($ancestor_number[$i] / 2) . ")"; $cell = $table->getCell(1, 1); $cell->writeText($rtf_text, $arial10, $parNames); $cell = $table->getCell(1, 2); if ($person_manDb and $person_manDb->pers_sexe == "M") { $cell->addImage('images/man.jpg', null); } elseif ($person_manDb and $person_manDb->pers_sexe == "F") {
foreach ($famc_adoptive_by_person_qry_prep as $famc_adoptiveDb) { echo '<tr><td colspan="4"><div class="children">'; @($childDb = $db_functions->get_person($famc_adoptiveDb->event_person_id)); // *** Use person class *** $child_cls = new person_cls(); $child_cls->construct($childDb); if ($famc_adoptiveDb->event_gedcom == 'steph') { echo '<b>' . __('Stepchild') . ':</b>'; } elseif ($famc_adoptiveDb->event_gedcom == 'legal') { echo '<b>' . __('Legal child') . ':</b>'; } elseif ($famc_adoptiveDb->event_gedcom == 'foster') { echo '<b>' . __('Foster child') . ':</b>'; } else { echo '<b>' . __('Adopted child:') . '</b>'; } echo ' ' . $child_cls->name_extended("child"); echo '</div></td></tr>' . "\n"; } //if($screen_mode=='') { echo "</table><br>\n"; // *** Show Google map *** if ($descendant_report == false and $maps_presentation == 'show') { $show_google_map = false; // *** Only show main javascript once *** if ($family_nr == 2) { if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') { echo '<script src="https://maps.google.com/maps/api/js?v=3&sensor=false" type="text/javascript"></script>'; } else { echo '<script src="http://maps.google.com/maps/api/js?v=3&sensor=false" type="text/javascript"></script>'; } echo '<script type="text/javascript">
function outline($family_id, $main_person, $gn, $nr_generations) { global $dbh, $db_functions, $tree_prefix_quoted, $pdf, $show_date, $dates_behind_names, $nr_generations; global $language, $dirmark1, $dirmark1, $screen_mode; $family_nr = 1; //*** Process multiple families *** if ($nr_generations < $gn) { return; } $gn++; // *** Count marriages of man *** // *** YB: if needed show woman as main_person *** @($familyDb = $db_functions->get_family($family_id, 'man-woman')); $parent1 = ''; $parent2 = ''; $change_main_person = false; // *** Standard main_person is the father *** if ($familyDb->fam_man) { $parent1 = $familyDb->fam_man; } // *** If mother is selected, mother will be main_person *** if ($familyDb->fam_woman == $main_person) { $parent1 = $familyDb->fam_woman; $change_main_person = true; } // *** Check family with parent1: N.N. *** if ($parent1) { // *** Save man's families in array *** @($personDb = $db_functions->get_person($parent1, 'famc-fams')); $marriage_array = explode(";", $personDb->pers_fams); $nr_families = substr_count($personDb->pers_fams, ";"); } else { $marriage_array[0] = $family_id; $nr_families = "0"; } // *** Loop multiple marriages of main_person *** for ($parent1_marr = 0; $parent1_marr <= $nr_families; $parent1_marr++) { @($familyDb = $db_functions->get_family($marriage_array[$parent1_marr])); // *** Privacy filter man and woman *** @($person_manDb = $db_functions->get_person($familyDb->fam_man)); $man_cls = new person_cls(); $man_cls->construct($person_manDb); $privacy_man = $man_cls->privacy; @($person_womanDb = $db_functions->get_person($familyDb->fam_woman)); $woman_cls = new person_cls(); $woman_cls->construct($person_womanDb); $privacy_woman = $woman_cls->privacy; $marriage_cls = new marriage_cls(); $marriage_cls->construct($familyDb, $privacy_man, $privacy_woman); $familylevend = $marriage_cls->privacy; // ************************************************************* // *** Parent1 (normally the father) *** // ************************************************************* if ($familyDb->fam_kind != 'PRO-GEN') { //onecht kind, vrouw zonder man if ($family_nr == 1) { // *** Show data of man *** $dir = ""; if ($language["dir"] == "rtl") { $dir = "rtl"; // in the following code calls the css indentation for rtl pages: "div.rtlsub2" instead of "div.sub2" } $indent = $dir . 'sub' . $gn; // hier wordt de indent bepaald voor de namen div class (sub1, sub2 enz. die in gedcom.css staan) if ($screen_mode != "PDF") { echo '<div class="' . $indent . '">'; echo '<b>' . $gn . ' </b>'; } else { $pdf->SetLeftMargin($gn * 10); $pdf->Write(8, "\n"); $pdf->Write(8, $gn . ' '); } if ($change_main_person == true) { if ($screen_mode != "PDF") { echo $woman_cls->name_extended("outline"); } else { $pdf->SetFont('Arial', 'B', 12); $pdf->Write(8, $woman_cls->name_extended("outline")); $pdf->SetFont('Arial', '', 12); } if ($show_date == "1" and !$privacy_woman) { if ($screen_mode != "PDF") { echo $dirmark1 . ','; if ($dates_behind_names == false) { echo '<br>'; } echo ' (' . language_date($person_womanDb->pers_birth_date) . ' - ' . language_date($person_womanDb->pers_death_date) . ')'; } else { if ($dates_behind_names == false) { $pdf->SetLeftMargin($gn * 10 + 4); $pdf->Write(8, "\n"); } $pdf->Write(8, ' (' . language_date($person_womanDb->pers_birth_date) . ' - ' . language_date($person_womanDb->pers_death_date) . ')'); } } } else { if ($screen_mode != "PDF") { echo $man_cls->name_extended("outline"); } else { $pdf->SetFont('Arial', 'B', 12); $pdf->Write(8, $man_cls->name_extended("outline")); $pdf->SetFont('Arial', '', 12); } if ($show_date == "1" and !$privacy_man) { if ($screen_mode != "PDF") { echo $dirmark1 . ','; if ($dates_behind_names == false) { echo '<br>'; } echo ' (' . language_date($person_manDb->pers_birth_date) . ' - ' . language_date($person_manDb->pers_death_date) . ')'; } else { if ($dates_behind_names == false) { $pdf->SetLeftMargin($gn * 10 + 4); $pdf->Write(8, "\n"); } $pdf->Write(8, ' (' . language_date($person_manDb->pers_birth_date) . ' - ' . language_date($person_manDb->pers_death_date) . ')'); } } } if ($screen_mode != "PDF") { echo '</div>'; } } else { } // empty: no second show of data of main_person in outline report $family_nr++; } // *** end check of PRO-GEN *** // ************************************************************* // *** Parent2 (normally the mother) *** // ************************************************************* if ($screen_mode != "PDF") { echo '<div class="' . $indent . '" style="font-style:italic">'; echo ' x ' . $dirmark1; } else { $pdf->SetLeftMargin($gn * 10); $pdf->Write(8, "\n"); $pdf->Write(8, 'x '); } if ($change_main_person == true) { if ($screen_mode != "PDF") { echo $man_cls->name_extended("outline"); } else { $pdf->SetFont('Arial', 'BI', 12); $pdf->Write(8, $man_cls->name_extended("outline")); $pdf->SetFont('Arial', '', 12); } if ($show_date == "1" and !$privacy_man) { if ($screen_mode != "PDF") { echo $dirmark1 . ','; if ($dates_behind_names == false) { echo '<br>'; } echo ' (' . @language_date($person_manDb->pers_birth_date) . ' - ' . @language_date($person_manDb->pers_death_date) . ')'; } else { if ($dates_behind_names == false) { $pdf->SetLeftMargin($gn * 10 + 4); $pdf->Write(8, "\n"); } $pdf->Write(8, ' (' . @language_date($person_manDb->pers_birth_date) . ' - ' . @language_date($person_manDb->pers_death_date) . ')'); } } } else { if ($screen_mode != "PDF") { echo $woman_cls->name_extended("outline"); } else { $pdf->SetFont('Arial', 'BI', 12); $pdf->Write(8, $woman_cls->name_extended("outline")); $pdf->SetFont('Arial', '', 12); } if ($show_date == "1" and !$privacy_woman) { if ($screen_mode != "PDF") { echo $dirmark1 . ','; if ($dates_behind_names == false) { echo '<br>'; } echo ' (' . @language_date($person_womanDb->pers_birth_date) . ' - ' . @language_date($person_womanDb->pers_death_date) . ')'; } else { if ($dates_behind_names == false) { $pdf->SetLeftMargin($gn * 10 + 4); $pdf->Write(8, "\n"); } $pdf->Write(8, ' (' . @language_date($person_womanDb->pers_birth_date) . ' - ' . @language_date($person_womanDb->pers_death_date) . ')'); } } } if ($screen_mode != "PDF") { echo '</div>'; } // ************************************************************* // *** Children *** // ************************************************************* if ($familyDb->fam_children) { $childnr = 1; $child_array = explode(";", $familyDb->fam_children); for ($i = 0; $i <= substr_count("{$familyDb->fam_children}", ";"); $i++) { @($childDb = $db_functions->get_person($child_array[$i])); $child_privacy = ""; $child_cls = new person_cls(); $child_cls->construct($childDb); $child_privacy = $child_cls->privacy; // *** Build descendant_report *** if ($childDb->pers_fams) { // *** 1e family of child *** $child_family = explode(";", $childDb->pers_fams); $child1stfam = $child_family[0]; outline($child1stfam, $childDb->pers_gedcomnumber, $gn, $nr_generations); // recursive } else { // Child without own family if ($nr_generations >= $gn) { $childgn = $gn + 1; $childindent = $dir . 'sub' . $childgn; if ($screen_mode != "PDF") { echo '<div class="' . $childindent . '">'; echo '<b>' . $childgn . ' ' . '</b>'; echo $child_cls->name_extended("outline"); } else { $pdf->SetLeftMargin($childgn * 10); $pdf->Write(8, "\n"); $pdf->Write(8, $childgn . ' '); $pdf->SetFont('Arial', 'B', 12); $pdf->Write(8, $child_cls->name_extended("outline")); $pdf->SetFont('Arial', '', 12); } if ($show_date == "1" and !$child_privacy) { if ($screen_mode != "PDF") { echo $dirmark1 . ','; if ($dates_behind_names == false) { echo '<br>'; } echo ' (' . language_date($childDb->pers_birth_date) . ' - ' . language_date($childDb->pers_death_date) . ')'; } else { if ($dates_behind_names == false) { $pdf->SetLeftMargin($childgn * 10 + 4); $pdf->Write(8, "\n"); } $pdf->Write(8, ' (' . language_date($childDb->pers_birth_date) . ' - ' . language_date($childDb->pers_death_date) . ')'); } } if ($screen_mode != "PDF") { echo '</div>'; } } } if ($screen_mode != "PDF") { echo "\n"; } else { } $childnr++; } } } // Show multiple marriages }