$listednr = '';
 // Check this code, can be improved?
 foreach ($listed_array as $key => $value) {
     if ($value == $ancestor_array[$i]) {
         $listednr = $key;
     }
     // if person was already listed, $listednr gets kwartier number for reference in report:
     // instead of person's details it will say: "already listed above under number 4234"
     // and no additional ancestors will be looked for, to prevent duplicated branches
 }
 if ($listednr == '') {
     //if not listed yet, add person to array
     $listed_array[$ancestor_number[$i]] = $ancestor_array[$i];
 }
 if ($ancestor_array[$i] != '0') {
     @($person_manDb = $db_functions->get_person($ancestor_array[$i]));
     $man_cls = new person_cls();
     $man_cls->construct($person_manDb);
     $privacy_man = $man_cls->privacy;
     // for pdf function pdf_ancestor_name() further along
     //$sexe=$person_manDb->pers_sexe;
     if (strtolower($person_manDb->pers_sexe) == 'm' and $ancestor_number[$i] > 1) {
         @($familyDb = $db_functions->get_family($marriage_gedcomnumber[$i]));
         // *** Use privacy filter of woman ***
         @($person_womanDb = $db_functions->get_person($familyDb->fam_woman));
         $woman_cls = new person_cls();
         $woman_cls->construct($person_womanDb);
         $privacy_woman = $woman_cls->privacy;
         // *** Use class for marriage ***
         $marriage_cls = new marriage_cls();
         $marriage_cls->construct($familyDb, $privacy_man, $privacy_woman);
Beispiel #2
0
        $text_presentation = $_SESSION['save_text_presentation'];
    }
}
if ($screen_mode == 'STAR') {
    $descendant_report = true;
    $genarray = array();
    $family_expanded = false;
}
if ($screen_mode == 'PDF') {
    //initialize pdf generation
    $family_expanded = false;
    $pdfdetails = array();
    $pdf_marriage = array();
    $pdf = new PDF();
    // *** Generate title of PDF file ***
    @($persDb = $db_functions->get_person($main_person));
    // *** Use class to process person ***
    $pers_cls = new person_cls();
    $pers_cls->construct($persDb);
    $name = $pers_cls->person_name($persDb);
    if (!$descendant_report == false) {
        $title = pdf_convert(__('Descendant report') . __(' of ') . $name["standard_name"]);
    } else {
        $title = pdf_convert(__('Family group sheet') . __(' of ') . $name["standard_name"]);
    }
    $pdf->SetTitle($title);
    $pdf->SetAuthor('Huub Mons (pdf: Yossi Beck)');
    $pdf->AddPage();
    $pdf->SetFont('Arial', '', 12);
}
// end if pdfmode
}
// **********************************************************
// *** Maximum number of generations in descendant_report ***
// **********************************************************
$nr_generations = $humo_option["descendant_generations"] - 1;
if (isset($_GET["nr_generations"])) {
    $nr_generations = $_GET["nr_generations"];
}
if (isset($_POST["nr_generations"])) {
    $nr_generations = $_POST["nr_generations"];
}
if ($screen_mode == 'PDF') {
    //initialize pdf generation
    $pdfdetails = array();
    $pdf_marriage = array();
    @($persDb = $db_functions->get_person($main_person));
    // *** Use person class ***
    $pers_cls = new person_cls();
    $pers_cls->construct($persDb);
    $name = $pers_cls->person_name($persDb);
    $title = pdf_convert(__('Outline report') . __(' of ') . $name["standard_name"]);
    $pdf = new PDF();
    $pdf->SetTitle($title);
    $pdf->SetAuthor('Huub Mons (pdf: Yossi Beck)');
    if (isset($_POST["screen_mode"]) and $_POST["screen_mode"] == "PDF-L") {
        $pdf->AddPage("L");
    } else {
        $pdf->AddPage("P");
    }
    $pdf->SetFont('Arial', 'B', 15);
    $pdf->Ln(4);