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); if (!$this->isPrintPreview()) { $this->visibility = "hidden"; $this->position = "absolute"; $this->display = "none"; } } /** * 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; global $WT_IMAGE_DIR, $WT_IMAGES, $Dindent; global $SHOW_EMPTY_BOXES, $pidarr, $box_width; $person = Person::getInstance($pid); // child print "\r\n
  • "; print ""; print ""; print ""; print "
    "; $new=($pid=="" or !isset($pidarr["$pid"])); if ($sosa==1) print "\"\"\n"; else { print "\"\""; print "\"\"\n"; } print_pedigree_person($pid, 1, $this->view!="preview"); print ""; if ($TEXT_DIRECTION=="ltr") { $label = i18n::translate('Ancestry Chart').": ".$pid; } else { $label = $pid." :".i18n::translate('Ancestry Chart'); } if ($sosa>1) print_url_arrow($pid, encode_url("?rootid={$pid}&PEDIGREE_GENERATIONS={$OLD_PGENS}&show_full={$this->show_full}&box_width={$box_width}&chart_style={$this->chart_style}"), $label, 3); print "  $sosa  "; print ""; $relation =""; if (!$new) $relation = "
    [=".$pidarr["$pid"]." - ".get_sosa_name($pidarr["$pid"])."]"; else $pidarr["$pid"]=$sosa; print get_sosa_name($sosa).$relation; print "
    "; if (is_null($person)) { print "
  • "; return; } // parents $famids = $person->getChildFamilies(); $parents = false; $famrec = ""; $famid = ""; foreach($famids as $famid=>$family) { if (!is_null($family)) { $famrec = $family->getGedcomRecord(); $parents = find_parents_in_record($famrec); if ($parents) break; } } if (($parents || $SHOW_EMPTY_BOXES) && $new && $depth>0) { // print marriage info print ""; print "\"\"\"".i18n::translate('View "; print "  ".($sosa*2)."  ".i18n::translate('and'); print "  ".($sosa*2+1)."  "; if (!empty($family)) { $marriage = $family->getMarriage(); if ($marriage->canShow()) $marriage->print_simple_fact(); else print i18n::translate('Private'); } print ""; // display parents recursively print "\r\n\r\n"; } print "\r\n"; } } // -- end of class //-- load a user extended class if one exists if (file_exists(WT_ROOT.'includes/controllers/ancestry_ctrl_user.php')) { require_once WT_ROOT.'includes/controllers/ancestry_ctrl_user.php'; } else { class AncestryController extends AncestryControllerRoot { } } ?>