"; echo "
"; echo ""; return false; } $pid=$person->getXref(); if ($count==0) $count = rand(); $lbwidth = $bwidth*.75; if ($lbwidth < 150) $lbwidth = 150; $tmp=array('M'=>'', 'F'=>'F', 'U'=>'NN'); $isF=$tmp[$person->getSex()]; $personlinks = ""; $icons = ""; $classfacts = ""; $genderImage = ""; $BirthDeath = ""; $outBoxAdd = ""; $thumbnail = ""; $showid = ""; $iconsStyleAdd = "float: right; "; if ($TEXT_DIRECTION=="rtl") $iconsStyleAdd="float: left; "; $disp=$person->canDisplayDetails(); $uniqueID = floor(microtime() * 1000000); $boxID = $pid.".".$personcount.".".$count.".".$uniqueID; $mouseAction1 = "onmouseover=\"clear_family_box_timeout('".$boxID."');\" onmouseout=\"family_box_timeout('".$boxID."');\""; $mouseAction2 = " onmouseover=\"expandbox('".$boxID."', $style); return false;\" onmouseout=\"restorebox('".$boxID."', $style); return false;\""; $mouseAction3 = " onmousedown=\"expandbox('".$boxID."', $style); return false;\" onmouseup=\"restorebox('".$boxID."', $style); return false;\""; $mouseAction4 = " onclick=\"expandbox('".$boxID."', $style); return false;\""; if ($person->canDisplayName()) { if (empty($SEARCH_SPIDER)) { if ($LINK_ICONS!="disabled") { //-- draw a box for the family popup // NOTE: Start div I.$pid.$personcount.$count.links $personlinks .= "
"; // NOTE: Zoom $personlinks .= "".WT_I18N::translate('Pedigree').""; if (array_key_exists('googlemap', WT_Module::getActiveModules())) { $personlinks .= "
".WT_I18N::translate('Pedigree map').""; } $username = WT_USER_NAME; if (!empty($username)) { $myid=WT_USER_GEDCOM_ID; if ($myid && $myid!=$pid) { $personlinks .= "
".WT_I18N::translate('Relationship to me').""; } } $personlinks .= "
".WT_I18N::translate('Descendants')."
"; $personlinks .= "".WT_I18N::translate('Ancestors')."
"; $personlinks .= "".WT_I18N::translate('Compact tree')."
"; if (function_exists("imagettftext")) { $personlinks .= "".WT_I18N::translate('Fan chart')."
"; } $personlinks .= "".WT_I18N::translate('Hourglass chart')."
"; if (array_key_exists('tree', WT_Module::getActiveModules())) { $personlinks .= ''.WT_I18N::translate('Interactive tree').'
'; } foreach ($person->getSpouseFamilies() as $family) { $spouse = $family->getSpouse($person); $children = $family->getChildren(); $num = count($children); if ((!empty($spouse))||($num>0)) { $personlinks .= "getHtmlUrl()."&show_full=1\" ".$mouseAction1.">".WT_I18N::translate('Family with spouse')."
"; if (!empty($spouse)) { $personlinks .= "getHtmlUrl()."\" $mouseAction1>"; if ($spouse->canDisplayName()) $personlinks .= PrintReady($spouse->getFullName()); else $personlinks .= WT_I18N::translate('Private'); $personlinks .= "
"; } } foreach ($children as $child) { $personlinks .= "  getHtmlUrl()."\" $mouseAction1>"; if ($child->canDisplayName()) $personlinks .= PrintReady($child->getFullName()); else $personlinks .= WT_I18N::translate('Private'); $personlinks .= "
"; } } $personlinks .= "
"; } // NOTE: Start div out-$pid.$personcount.$count if ($style==1) $outBoxAdd .= " class=\"person_box$isF\" style=\"width: ".$bwidth."px; height: ".$bheight."px; padding: 2px; overflow: hidden; z-index:-1;\""; else $outBoxAdd .= " class=\"person_box$isF\" style=\"padding: 2px;\""; // NOTE: Zoom if (($ZOOM_BOXES!="disabled")&&(!$show_full)) { if ($ZOOM_BOXES=="mouseover") $outBoxAdd .= $mouseAction2; if ($ZOOM_BOXES=="mousedown") $outBoxAdd .= $mouseAction3; if (($ZOOM_BOXES=="click")) $outBoxAdd .= $mouseAction4; } // NOTE: Zoom if (($ZOOM_BOXES!="disabled")&&($show_full)) { $icons .= ""; } if ($LINK_ICONS!="disabled") { $click_link="javascript:;"; if (WT_SCRIPT_NAME=='pedigree.php') { $click_link="pedigree.php?rootid={$pid}&show_full={$PEDIGREE_FULL_DETAILS}&PEDIGREE_GENERATIONS={$OLD_PGENS}&talloffset={$talloffset}&ged=".rawurlencode($GEDCOM); $whichID=$pid; } if (WT_SCRIPT_NAME=='hourglass.php') { $click_link="hourglass.php?pid={$pid}&show_full={$PEDIGREE_FULL_DETAILS}&generations={$generations}&box_width={$box_width}&ged=".rawurlencode($GEDCOM); $whichID=$pid; } if (WT_SCRIPT_NAME=='ancestry.php') { $click_link="ancestry.php?rootid={$pid}&show_full={$PEDIGREE_FULL_DETAILS}&chart_style={$chart_style}&PEDIGREE_GENERATIONS={$OLD_PGENS}&box_width={$box_width}&ged=".rawurlencode($GEDCOM); $whichID=$pid; } if (WT_SCRIPT_NAME=='descendancy.php') { $click_link="descendancy.php?show_full={$PEDIGREE_FULL_DETAILS}&pid={$pid}&generations={$generations}&box_width={$box_width}&ged=".rawurlencode($GEDCOM); $whichID=$pid; } if (WT_SCRIPT_NAME=='family.php' && !empty($famid)) { $click_link="family.php?famid={$famid}&show_full=1&ged=".rawurlencode($GEDCOM); $whichID=$famid; } if (WT_SCRIPT_NAME=='individual.php') { $click_link="individual.php?pid={$pid}&ged=".rawurlencode($GEDCOM); $whichID=$pid; } $icons .= ""; } } else { if ($style==1) { $outBoxAdd .= "class=\"person_box$isF\" style=\"width: ".$bwidth."px; height: ".$bheight."px; padding: 2px; overflow: hidden;\""; } else { $outBoxAdd .= "class=\"person_box$isF\" style=\"padding: 2px; overflow: hidden;\""; } // NOTE: Zoom if (($ZOOM_BOXES!="disabled")&&(empty($SEARCH_SPIDER))) { if ($ZOOM_BOXES=="mouseover") $outBoxAdd .= $mouseAction2; if ($ZOOM_BOXES=="mousedown") $outBoxAdd .= $mouseAction3; if (($ZOOM_BOXES=="click")) $outBoxAdd .= $mouseAction4; } } } else { if ($style==1) $outBoxAdd .= "class=\"person_box$isF\" style=\"width: ".$bwidth."px; height: ".$bheight."px; padding: 2px; overflow: hidden;\""; else $outBoxAdd .= "class=\"person_box$isF\" style=\"padding: 2px; overflow: hidden;\""; } //-- find the name $name = $person->getFullName(); if ($MULTI_MEDIA && $SHOW_HIGHLIGHT_IMAGES) { $object=$person->findHighlightedMedia(); $img_title=PrintReady(htmlspecialchars($name)); $img_id='box-'.$boxID.'.-thumb'; if (!empty($object)) { $mediaobject=WT_Media::getInstance($object['mid']); $thumbnail=$mediaobject->displayMedia(array('display_type'=>'pedigree_person','img_id'=>$img_id,'img_title'=>$img_title,'show_full'=>$show_full)); } else { $thumbnail=display_silhouette(array('sex'=>$person->getSex(),'display_type'=>'pedigree_person','img_id'=>$img_id,'img_title'=>$img_title,'show_full'=>$show_full)); // may return '' } } //-- find additional name $addname=$person->getAddName(); $name = PrintReady($name); // add optional CSS style for each fact $indirec = $person->getGedcomRecord(); $cssfacts = array("BIRT", "CHR", "DEAT", "BURI", "CREM", "ADOP", "BAPM", "BARM", "BASM", "BLES", "CHRA", "CONF", "FCOM", "ORDN", "NATU", "EMIG", "IMMI", "CENS", "PROB", "WILL", "GRAD", "RETI", "CAST", "DSCR", "EDUC", "IDNO", "NATI", "NCHI", "NMR", "OCCU", "PROP", "RELI", "RESI", "SSN", "TITL", "BAPL", "CONL", "ENDL", "SLGC", "_MILI"); foreach ($cssfacts as $indexval => $fact) { if (strpos($indirec, "1 $fact")!==false) $classfacts .= " $fact"; } if ($PEDIGREE_SHOW_GENDER) $genderImage = " ".$person->getSexImage('small', "box-$boxID-gender"); if (strlen($addname) > 0) { $tempStyle = $style; if (hasRTLText($addname) && $style=='1') $tempStyle = '2'; $addname = "
".PrintReady($addname).""; } if ($SHOW_LDS_AT_GLANCE) { $addname = ' '.get_lds_glance($indirec).'' . $addname; } if ($show_full) { $opt_tags=preg_split('/\W/', $CHART_BOX_TAGS, 0, PREG_SPLIT_NO_EMPTY); // Show BIRT or equivalent event foreach (explode('|', WT_EVENTS_BIRT) as $birttag) { if (!in_array($birttag, $opt_tags)) { $event = $person->getFactByType($birttag); if (!is_null($event) && ($event->getDate()->isOK() || $event->getPlace()) && $event->canShow()) { $BirthDeath .= $event->print_simple_fact(true); break; } } } // Show optional events (before death) foreach ($opt_tags as $key=>$tag) { if (!preg_match('/^('.WT_EVENTS_DEAT.')$/', $tag)) { $event = $person->getFactByType($tag); if (!is_null($event) && $event->canShow()) { $BirthDeath .= $event->print_simple_fact(true); unset ($opt_tags[$key]); } } } // Show DEAT or equivalent event foreach (explode('|', WT_EVENTS_DEAT) as $deattag) { $event = $person->getFactByType($deattag); if (!is_null($event) && ($event->getDate()->isOK() || $event->getPlace()) && $event->canShow()) { $BirthDeath .= $event->print_simple_fact(true); if (in_array($deattag, $opt_tags)) { unset ($opt_tags[array_search($deattag, $opt_tags)]); } break; } } // Show remaining optional events (after death) foreach ($opt_tags as $tag) { $event = $person->getFactByType($tag); if (!is_null($event) && $event->canShow()) { $BirthDeath .= $event->print_simple_fact(true); } } } require WT_THEME_DIR.'templates/personbox_template.php'; } /** * print out standard HTML header * * This function will print out the HTML, HEAD, and BODY tags and will load in the CSS javascript and * other auxiliary files needed to run webtrees. It will also include the theme specific header file. * This function should be called by every page, except popups, before anything is output. * * Popup pages, because of their different format, should invoke function print_simple_header() instead. * * @param string $title the title to put in the header tags */ function print_header($title, $view='full') { global $bwidth, $BROWSERTYPE, $SEARCH_SPIDER, $cart; global $GEDCOM, $GEDCOM_TITLE, $action, $query; global $stylesheet, $print_stylesheet, $rtl_stylesheet, $headerfile, $print_headerfile; global $WT_IMAGES, $TEXT_DIRECTION, $REQUIRE_AUTHENTICATION; global $controller; $GEDCOM_TITLE = get_gedcom_setting(WT_GED_ID, 'title'); $META_DESCRIPTION=''; $META_ROBOTS='noindex,nofollow'; $META_GENERATOR=''; $LINK_CANONICAL=''; $index_this_page=false; $access_denied=false; if (isset($controller) && (in_array(WT_SCRIPT_NAME, array('family.php', 'individual.php', 'note.php', 'repo.php', 'source.php' )))) { switch (get_class($controller)) { case 'WT_Controller_Family': // family.php if ($controller->family) { $LINK_CANONICAL=$controller->family->getHtmlUrl(); if ($controller->family->canDisplayDetails()) $index_this_page=true; else $access_denied=true; } break; case 'WT_Controller_Individual': // individual.php if ($controller->indi) { $LINK_CANONICAL=$controller->indi->getHtmlUrl(); if ($controller->indi->canDisplayDetails()) $index_this_page=true; else $access_denied=true; } break; case 'WT_Controller_Note': // note.php if ($controller->note) { $LINK_CANONICAL=$controller->note->getHtmlUrl(); if ($controller->note->canDisplayDetails()) $index_this_page=true; else $access_denied=true; } break; case 'WT_Controller_Repository': // repo.php if ($controller->repository) { $LINK_CANONICAL=$controller->repository->getHtmlUrl(); if ($controller->repository->canDisplayDetails()) $index_this_page=true; else $access_denied=true; } break; case 'WT_Controller_Source': // source.php if ($controller->source) { $LINK_CANONICAL=$controller->source->getHtmlUrl(); if ($controller->source->canDisplayDetails()) $index_this_page=true; else $access_denied=true; } break; default: break; } } if (WT_SCRIPT_NAME=='index.php') { $LINK_CANONICAL='index.php?ctype=gedcom&ged='.WT_GEDURL; $index_this_page=true; } // listing pages if (in_array(WT_SCRIPT_NAME, array('famlist.php', 'indilist.php', 'notelist.php', 'repolist.php', 'sourcelist.php'))) { $index_this_page=true; } if ($index_this_page) { $META_ROBOTS='index,follow'; } if ($view=='full') { $META_DESCRIPTION=get_gedcom_setting(WT_GED_ID, 'META_DESCRIPTION'); if (empty($META_DESCRIPTION)) { $META_DESCRIPTION=$GEDCOM_TITLE; } $META_GENERATOR=WT_WEBTREES.' - '.WT_WEBTREES_URL; } header('Content-Type: text/html; charset=UTF-8'); if ($access_denied) { header($_SERVER["SERVER_PROTOCOL"].' 403 Forbidden'); } // The title often includes the names of records, which may have markup // that cannot be used in the page title. $title=strip_tags($title); $META_TITLE=get_gedcom_setting(WT_GED_ID, 'META_TITLE'); if ($META_TITLE) { $title.=' - '.$META_TITLE; } $javascript= ''. ''. ''. ''. ''. WT_JS_START.' // Give JavaScript access to some PHP constants var WT_THEME_DIR = "'.WT_THEME_DIR.'"; var WT_MODULES_DIR = "'.WT_MODULES_DIR.'"; var textDirection = "'.$TEXT_DIRECTION.'"; var browserType = "'.$BROWSERTYPE.'"; var WT_SCRIPT_NAME = "'.WT_SCRIPT_NAME.'"; var WT_LOCALE = "'.WT_LOCALE.'"; /* keep the session id when opening new windows */ var sessionid = "'.Zend_Session::getId().'"; var sessionname = "'.WT_SESSION_NAME.'"; var accesstime = '.WT_DB::prepare("SELECT UNIX_TIMESTAMP(NOW())")->fetchOne().'; var plusminus = new Array(); plusminus[0] = new Image(); plusminus[0].src = "'.$WT_IMAGES["plus"].'"; plusminus[0].title = "'.WT_I18N::translate('Show Details').'"; plusminus[1] = new Image(); plusminus[1].src = "'.$WT_IMAGES["minus"].'"; plusminus[1].title = "'.WT_I18N::translate('Hide Details').'"; var zoominout = new Array(); zoominout[0] = new Image(); zoominout[0].src = "'.$WT_IMAGES["zoomin"].'"; zoominout[1] = new Image(); zoominout[1].src = "'.$WT_IMAGES["zoomout"].'"; var arrows = new Array(); arrows[0] = new Image(); arrows[0].src = "'.$WT_IMAGES["larrow2"].'"; arrows[1] = new Image(); arrows[1].src = "'.$WT_IMAGES["rarrow2"].'"; arrows[2] = new Image(); arrows[2].src = "'.$WT_IMAGES["uarrow2"].'"; arrows[3] = new Image(); arrows[3].src = "'.$WT_IMAGES["darrow2"].'"; '; $javascript .= 'function delete_record(pid, linenum, mediaid) { if (!mediaid) mediaid=""; if (confirm(\''.WT_I18N::translate('Are you sure you want to delete this fact?').'\')) { window.open(\'edit_interface.php?action=delete&pid=\'+pid+\'&linenum=\'+linenum+\'&mediaid=\'+mediaid+"&"+sessionname+"="+sessionid, \'_blank\', \'top=50, left=50, width=600, height=500, resizable=1, scrollbars=1\'); } return false; } function deleteperson(pid) { if (confirm(\''.WT_I18N::translate('Are you sure you want to delete this person?').'\')) { window.open(\'edit_interface.php?action=deleteperson&pid=\'+pid+"&"+sessionname+"="+sessionid, \'_blank\', \'top=50, left=50, width=600, height=500, resizable=1, scrollbars=1\'); } return false; } function deleterepository(pid) { if (confirm(\''.WT_I18N::translate('Are you sure you want to delete this Repository?').'\')) { window.open(\'edit_interface.php?action=deleterepo&pid=\'+pid+"&"+sessionname+"="+sessionid, \'_blank\', \'top=50, left=50, width=600, height=500, resizable=1, scrollbars=1\'); } return false; } '; $javascript .= ' function message(username, method, url, subject) { if ((!url)||(url=="")) url=\''.addslashes(get_query_url()).'\'; if ((!subject)||(subject=="")) subject=""; window.open(\'message.php?to=\'+username+\'&method=\'+method+\'&url=\'+url+\'&subject=\'+subject+"&"+sessionname+"="+sessionid, \'_blank\', \'top=50, left=50, width=600, height=500, resizable=1, scrollbars=1\'); return false; } var whichhelp = \'help_'.WT_SCRIPT_NAME.'&action='.$action.'\'; //--> '.WT_JS_END.''; require WT_ROOT.$headerfile; // Allow the browser to format the header/menus while we generate the page flush(); } /** * print simple HTML header * * This function will print out the HTML, HEAD, and BODY tags and will load in the CSS javascript and * other auxiliary files needed to run PGV. It does not include any theme specific header files. * This function should be called by every page before anything is output on popup pages. * * @param string $title the title to put in the header tags */ function print_simple_header($title) { print_header($title, 'simple'); } // -- print the html to close the page function print_footer($view='full') { global $footerfile, $printlink, $WT_IMAGES, $TEXT_DIRECTION, $footer_count; // If the main script hasn't closed its session, do it now. // If we rely on PHP to close the session, it may not do it // until after it has closed the DB connection - which it needs! Zend_Session::writeClose(); if ($view=='full') { if (!isset($footer_count)) $footer_count = 1; else $footer_count++; echo ""; require WT_ROOT.$footerfile; if (function_exists("load_behaviour")) { load_behaviour(); // @see function_print_lists.php } } else { if (WT_DEBUG || get_gedcom_setting(WT_GED_ID, 'SHOW_STATS')) { echo execution_stats(); } } if (WT_DEBUG_SQL) { echo WT_DB::getQueryLog(); } echo WT_JS::render(); echo ''; } // print HTML header meta links // previously identical code in each theme's header.php file // now added as a function here. function header_links($META_DESCRIPTION, $META_ROBOTS, $META_GENERATOR, $LINK_CANONICAL) { $header_links= // Strict validation requires a default type for inline