function date_place($process_date, $process_place)
{
    global $language, $user, $screen_mode, $dirmark1, $humo_option;
    $self = $_SERVER['QUERY_STRING'];
    $hebdate = '';
    if ($humo_option['date_display'] == "is") {
        if (stripos($self, "star") === FALSE and stripos($self, "ancestor_chart") === FALSE and stripos($self, "ancestor_sheet") === FALSE) {
            $hebdate = hebdate($process_date);
        }
    }
    if ($process_place == " ") {
        $process_place = "";
    }
    // *** If there is no place ***
    if ($user['group_place_date'] == 'j') {
        $text = "";
        if ($user['group_places'] == 'j' and $process_place) {
            //$text=__('PLACE_AT ').$process_place." ";
            if (__('PLACE_AT ') != 'PLACE_AT ') {
                $text = __('PLACE_AT ');
            }
            $text .= $process_place . " ";
        }
        //$text.=$dirmark1.language_date($process_date);
        $text .= $dirmark1 . language_date($process_date) . $hebdate;
    } else {
        $text = $dirmark1 . language_date($process_date) . $hebdate;
        if ($user['group_places'] == 'j' and $process_place) {
            //$text.=" ".__('PLACE_AT ').$process_place;
            $text .= ' ';
            if (__('PLACE_AT ') != 'PLACE_AT ') {
                $text .= __('PLACE_AT ');
            }
            $text .= $process_place;
        }
    }
    return $text;
}
} catch (PDOException $e) {
    echo $e->getMessage() . "<br/>";
}
while ($record = $qry->fetch(PDO::FETCH_OBJ)) {
    $calendar_day = $record->birth_day;
    $birth_day = $record->birth_day . ' ' . $month;
    $person_cls = new person_cls();
    $name = $person_cls->person_name($record);
    $person_cls->construct($record);
    $person_name = '<a href="' . CMS_ROOTPATH . 'family.php?id=' . $record->pers_indexnr . '&amp;main_person=' . $record->pers_gedcomnumber . '">' . $name["standard_name"] . '</a>';
    $death_date = $record->pers_death_date;
    $age = $year - $record->birth_year;
    // pers_death_date known: print
    // pers_death_date not known, age > 110, pers_death_date is not known, otherwise empty (probably alive)
    if ($death_date != '') {
        $died = language_date($death_date);
    } else {
        if ($age > $max_age) {
            $died = '? ';
        } else {
            $died = '  ';
        }
    }
    // Highlight present day
    if ($birth_day == $today) {
        echo '<tr bgcolor="#BFBFBF">' . "\n";
    } else {
        echo "<tr>\n";
    }
    if ($calendar_day == $last_cal_day) {
        echo "<td><br></td>";
Beispiel #3
0
                 $grchborndate[$i][$m][$p][$g] = julgreg($grchldDb->pers_birth_date);
                 $temp = substr($grchborndate[$i][$m][$p][$g], -4);
                 if ($temp > 0 and $temp < 2200) {
                     $grchbornyear[$i][$m][$p][$g] = $temp;
                     $grchborntext[$i][$m][$p][$g] = ucfirst(__('birth')) . ' ' . $grchild . " " . $grchildname[$i][$m][$p][$g] . " " . $dirmark1 . str_replace(" ", "&nbsp;", language_date($grchborndate[$i][$m][$p][$g]));
                     $age = $process_age->calculate_age($personDb->pers_bapt_date, $personDb->pers_birth_date, $grchldDb->pers_birth_date, true);
                     if ($age) {
                         $grchborntext[$i][$m][$p][$g] = '[' . $age . '] ' . $grchborntext[$i][$m][$p][$g];
                     }
                 }
                 $grchdeathdate[$i][$m][$p][$g] = julgreg($grchldDb->pers_death_date);
                 $temp = '';
                 $temp = substr($grchdeathdate[$i][$m][$p][$g], -4);
                 if ($temp > 0 and $temp < 2200) {
                     $grchdeathyear[$i][$m][$p][$g] = $temp;
                     $grchdeathtext[$i][$m][$p][$g] = ucfirst(__('death')) . ' ' . $grchild . " " . $grchildname[$i][$m][$p][$g] . "  " . $dirmark1 . str_replace(" ", "&nbsp;", language_date($grchdeathdate[$i][$m][$p][$g]));
                     $age = $process_age->calculate_age($personDb->pers_bapt_date, $personDb->pers_birth_date, $grchldDb->pers_death_date, true);
                     if ($age) {
                         $grchdeathtext[$i][$m][$p][$g] = '[' . $age . '] ' . $grchdeathtext[$i][$m][$p][$g];
                     }
                 }
             } else {
                 // *** Privacy filter activated ***
                 $privacy_filtered = true;
             }
         }
         // end for grchildren
     }
     // end if grchildren
 }
 // end for chmarriages
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 ' &nbsp; (' . 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 ' &nbsp; (' . 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 ' &nbsp; (' . @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 ' &nbsp; (' . @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 ' &nbsp; (' . 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
}
Beispiel #5
0
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 . '&amp;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 . '&amp;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 . '&amp;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
}