예제 #1
0
                            $pdf->SetX($birthcol);
                            $pdf->Write(5, $child->birth->date);
                        }
                        if ($child->death->date) {
                            $pdf->SetX($deathcol);
                            $pdf->Write(5, $child->death->date);
                        }
                    }
                }
            }
        }
    }
}
# Begin PDF Output
$pdf = new PDF('P', 'mm', 'Letter');
$pdf->Open();
$pdf->SetTopMargin(13);
$pdf->SetLeftMargin(13);
$pdf->SetRightMargin(10);
$pdf->SetAutoPageBreak(True, 13);
$pdf->AddPage();
$pdf->SetCreator($_SERVER['PHP_SELF']);
$pdf->SetAuthor('Keith Morrison, keithm@infused.org');
$pdf->SetTitle(sprintf(gtc("Descendant Report for %s"), $o->full_name()));
$pdf->SetSubject(gtc("Genealogy"));
for ($i = 0; $i < count($g_descendants); $i++) {
    display_indiv($g_descendants[$i]);
}
# End Main Program
$pdf->Output();
exit;
예제 #2
0
$individuals = array();
# get first person information
$o = new Person($g_indiv, 0, 1);
array_push($g_descendants, array($o, 1));
$smarty->assign_by_ref('indiv', $o);
# assign other smarty variables
$smarty->assign_by_ref('page_title', sprintf(gtc("Descendant Report for %s"), $o->full_name()));
$smarty->assign_by_ref('surname_title', sprintf(gtc("%s Surname"), $o->sname));
$content_title = $o->prefix . ' ' . $o->full_name();
if ($o->suffix) {
    $content_title .= ', ' . $o->suffix;
}
$smarty->assign_by_ref('content_title', $content_title);
# iterate through the descendants array
while (count($g_descendants) > 0) {
    display_indiv(array_shift($g_descendants));
}
$smarty->assign('individuals', $individuals);
function display_indiv($p_array)
{
    global $g_content, $g_descendants, $g_generation, $g_max_gens, $g_count, $individuals;
    $string = '';
    $p_node = $p_array[0];
    $p_generation = $p_array[1];
    $father = $p_node->father_indkey ? new Person($p_node->father_indkey, 3) : null;
    $mother = $p_node->mother_indkey ? new Person($p_node->mother_indkey, 3) : null;
    if ($p_generation > $g_generation) {
        $g_generation = $p_generation;
    }
    # children
    foreach ($p_node->marriages as $marriage) {
예제 #3
0
    }
}
# Begin PDF Output
$pdf = new PDF('P', 'mm', 'Letter');
$pdf->Open();
$pdf->SetTopMargin(13);
$pdf->SetLeftMargin(13);
$pdf->SetRightMargin(10);
$pdf->SetAutoPageBreak(True, 13);
$pdf->AddPage();
$pdf->SetCreator($_SERVER['PHP_SELF']);
$pdf->SetAuthor('Keith Morrison, keithm@infused.org');
$pdf->SetTitle(sprintf(gtc("Family Group Sheet for %s"), $o->full_name()));
$pdf->SetSubject(gtc("Genealogy"));
# Display main individual
display_indiv($o);
foreach ($o->marriages as $marriage) {
    $mnum++;
    display_marriage($marriage, $mnum);
}
if ($sources) {
    display_sources();
}
# End Main Program
$pdf->Output();
exit;
/**
 * Display Individual Function
 * @access public
 * @param string $p_node
 */