| 1 |
/* |
| 2 |
* @progname pedigree_html.ll |
| 3 |
* @version 1.3 |
| 4 |
* @author Scott McGee ([email protected]) |
| 5 |
* @category |
| 6 |
* @output HTML |
| 7 |
* @description |
| 8 |
* |
| 9 |
* Select and produce an ancestor report for the person selected. |
| 10 |
* |
| 11 |
* @(#)pedigree_html.ll 1.3 10/4/95 |
| 12 |
* |
| 13 |
* By Scott McGee ([email protected]) |
| 14 |
* Based on pedigreel by Tom Wetmore, [email protected] |
| 15 |
* And Cliff Manis |
| 16 |
*/ |
| 17 |
|
| 18 |
include("cgi_html.li") |
| 19 |
|
| 20 |
|
| 21 |
proc main () { |
| 22 |
call set_cgi_html_globals() |
| 23 |
|
| 24 |
set (nl,nl()) |
| 25 |
getindi(indi) |
| 26 |
|
| 27 |
call do_chart_head(indi, "Pedigree") |
| 28 |
"<PRE>\n" |
| 29 |
call pedigree(0, indi) |
| 30 |
"</PRE>\n" |
| 31 |
call do_tail(indi) |
| 32 |
} |
| 33 |
|
| 34 |
proc pedigree (level, indi) { |
| 35 |
set(has_parent, or(father(indi), mother(indi))) |
| 36 |
if(and(lt(level, 4), has_parent)) { |
| 37 |
set(par, father(indi)) |
| 38 |
call pedigree(add(1,level), par) |
| 39 |
} |
| 40 |
if(indi) { |
| 41 |
col(mul(4,level)) |
| 42 |
href(indi, "Pedigree") |
| 43 |
if (evt, birth(indi)) { |
| 44 |
", b. " |
| 45 |
if(gt(level, 3)) { |
| 46 |
short(evt) |
| 47 |
} |
| 48 |
else { |
| 49 |
long(evt) |
| 50 |
} |
| 51 |
} |
| 52 |
nl() |
| 53 |
} |
| 54 |
else { |
| 55 |
col(mul(4,level)) |
| 56 |
"(Spouse not known)" |
| 57 |
nl() |
| 58 |
} |
| 59 |
if(and(lt(level, 4), has_parent)) { |
| 60 |
set(par, mother(indi)) |
| 61 |
call pedigree(add(1,level), par) |
| 62 |
} |
| 63 |
} |