rootid =safe_GET_xref('rootid'); $this->show_full =safe_GET('show_full', array('0', '1'), $PEDIGREE_FULL_DETAILS); $this->show_cousins =safe_GET('show_cousins', array('0', '1'), '0'); $this->chart_style =safe_GET_integer('chart_style', 0, 3, 0); $box_width =safe_GET_integer('box_width', 50, 300, 100); $PEDIGREE_GENERATIONS=safe_GET_integer('PEDIGREE_GENERATIONS', 2, $MAX_PEDIGREE_GENERATIONS, $DEFAULT_PEDIGREE_GENERATIONS); // This is passed as a global. A parameter would be better... $show_full=$this->show_full; $OLD_PGENS = $PEDIGREE_GENERATIONS; // Validate form parameters $this->rootid = check_rootid($this->rootid); // -- size of the boxes $Dbwidth*=$box_width/100; $bwidth=$Dbwidth; if (!$this->show_full) { $bwidth = $bwidth / 1.5; } $bheight=$Dbheight; if (!$this->show_full) { $bheight = $bheight / 1.5; } $pbwidth = $bwidth+12; $pbheight = $bheight+14; $this->ancestry = Person::getInstance($this->rootid); $this->name = $this->ancestry->getFullName(); $this->addname = $this->ancestry->getAddName(); if (strlen($this->name)<30) $this->cellwidth="420"; else $this->cellwidth=(strlen($this->name)*14); } /** * print a child ascendancy * * @param string $pid individual Gedcom Id * @param int $sosa child sosa number * @param int $depth the ascendancy depth to show */ function print_child_ascendancy($pid, $sosa, $depth) { global $TEXT_DIRECTION, $OLD_PGENS, $WT_IMAGES, $Dindent, $SHOW_EMPTY_BOXES, $pidarr, $box_width; $person = Person::getInstance($pid); // child echo "
| ";
$new=($pid=="" or !isset($pidarr["$pid"]));
if ($sosa==1) echo " | ";
else {
echo " | "; } print_pedigree_person($pid, 1); echo " | "; echo ""; if ($TEXT_DIRECTION=="ltr") { $label = i18n::translate('Ancestry chart').": ".$pid; } else { $label = $pid." :".i18n::translate('Ancestry chart'); } if ($sosa>1) print_url_arrow($pid, "?rootid={$pid}&PEDIGREE_GENERATIONS={$OLD_PGENS}&show_full={$this->show_full}&box_width={$box_width}&chart_style={$this->chart_style}", $label, 3); echo " | "; echo "$sosa "; echo " | ";
$relation ="";
if (!$new) $relation = " [=".$pidarr["$pid"]." - ".get_sosa_name($pidarr["$pid"])."]"; else $pidarr["$pid"]=$sosa; echo get_sosa_name($sosa).$relation; echo " | ";
echo "