";
echo "
";
echo "";
return false;
}
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();
$boxID = $pid.".".$personcount.".".$count;
$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 ($show_famlink && (empty($SEARCH_SPIDER))) {
if ($LINK_ICONS!="disabled") {
//-- draw a box for the family popup
// NOTE: Start div I.$pid.$personcount.$count.links
$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 .= " 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")&&($view!="preview")) $outBoxAdd .= $mouseAction4;
}
//-- links and zoom icons
// NOTE: Start div icons-$personcount.$pid.$count
if ($show_full) $iconsStyleAdd .= " display: block;";
else $iconsStyleAdd .= " display: none;";
//echo "\">";
// NOTE: Zoom
if (($ZOOM_BOXES!="disabled")&&($show_full)) {
$icons .= "";
}
if ($LINK_ICONS!="disabled") {
$click_link="javascript:;";
if (WT_SCRIPT_NAME=='pedigree.php') {
$click_link=encode_url("pedigree.php?rootid={$pid}&show_full={$PEDIGREE_FULL_DETAILS}&PEDIGREE_GENERATIONS={$OLD_PGENS}&talloffset={$talloffset}&ged={$GEDCOM}");
$whichID=$pid;
}
if (WT_SCRIPT_NAME=='hourglass.php') {
$click_link=encode_url("hourglass.php?pid={$pid}&show_full={$PEDIGREE_FULL_DETAILS}&generations={$generations}&box_width={$box_width}&ged={$GEDCOM}");
$whichID=$pid;
}
if (WT_SCRIPT_NAME=='ancestry.php') {
$click_link=encode_url("ancestry.php?rootid={$pid}&show_full={$PEDIGREE_FULL_DETAILS}&chart_style={$chart_style}&PEDIGREE_GENERATIONS={$OLD_PGENS}&box_width={$box_width}&ged={$GEDCOM}");
$whichID=$pid;
}
if (WT_SCRIPT_NAME=='descendancy.php') {
$click_link=encode_url("descendancy.php?&show_full={$PEDIGREE_FULL_DETAILS}&pid={$pid}&agenerations={$generations}&box_width={$box_width}&ged={$GEDCOM}");
$whichID=$pid;
}
if (WT_SCRIPT_NAME=='family.php' && !empty($famid)) {
$click_link=encode_url("family.php?famid={$famid}&show_full=1&ged={$GEDCOM}");
$whichID=$famid;
}
if (WT_SCRIPT_NAME=='individual.php') {
$click_link=encode_url("individual.php?pid={$pid}&ged={$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")&&($view!="preview")) $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) {
if (showFact("OBJE", $pid)) {
$object = $person->findHighlightedMedia();
if (!empty($object)) {
$whichFile = thumb_or_main($object); // Do we send the main image or a thumbnail?
$size = findImageSize($whichFile);
$class = "pedigree_image_portrait";
if ($size[0]>$size[1]) $class = "pedigree_image_landscape";
if ($TEXT_DIRECTION == "rtl") $class .= "_rtl";
// NOTE: IMG ID
$imgsize = findImageSize($object["file"]);
$imgwidth = $imgsize[0]+50;
$imgheight = $imgsize[1]+150;
if (WT_USE_LIGHTBOX) {
$thumbnail .= "";
} else if (!empty($object['mid']) && $USE_MEDIA_VIEWER) {
$thumbnail .= "";
} else {
$thumbnail .= "";
}
$thumbnail .= "
getSex();
$thumbnail = "
";
}
} else if ($USE_SILHOUETTE && isset($WT_IMAGES["default_image_U"]["other"])) {
$class = "pedigree_image_portrait";
if ($TEXT_DIRECTION == "rtl") $class .= "_rtl";
$sex = $person->getSex();
$thumbnail = "
";
}
}
//-- find additional name
$addname=$person->getAddName();
//$name = PrintReady(htmlspecialchars(strip_tags($name), ENT_QUOTES, 'UTF-8'));
$name = PrintReady($name);
if ($TEXT_DIRECTION=="ltr") $title = i18n::translate('Individual Information').": ".$pid;
else $title = $pid." :".i18n::translate('Individual Information');
// 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 ($SHOW_ID_NUMBERS) {
if ($TEXT_DIRECTION=="ltr") $showid .= "" . getLRM() . "($pid)" . getLRM() . " ";
else $showid .= "" . getRLM() . "($pid)" . getRLM() . " ";
}
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->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->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);
}
}
}
global $THEME_DIR;
require $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 PGV. 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
* @param string $head
* @param boolean $use_alternate_styles
*/
function print_header($title, $head="", $use_alternate_styles=true) {
global $bwidth;
global $HOME_SITE_URL, $HOME_SITE_TEXT, $SERVER_URL;
global $BROWSERTYPE, $SEARCH_SPIDER;
global $view, $cart;
global $WT_IMAGE_DIR, $GEDCOM, $GEDCOM_TITLE, $CONTACT_EMAIL, $COMMON_NAMES_THRESHOLD, $INDEX_DIRECTORY;
global $QUERY_STRING, $action, $query, $theme_name;
global $FAVICON, $stylesheet, $print_stylesheet, $rtl_stylesheet, $headerfile, $toplinks, $THEME_DIR, $print_headerfile;
global $WT_IMAGES, $TEXT_DIRECTION, $ONLOADFUNCTION, $REQUIRE_AUTHENTICATION, $SHOW_SOURCES, $ENABLE_RSS, $RSS_FORMAT;
global $META_AUTHOR, $META_PUBLISHER, $META_COPYRIGHT, $META_DESCRIPTION, $META_PAGE_TOPIC, $META_AUDIENCE, $META_PAGE_TYPE, $META_ROBOTS, $META_REVISIT, $META_KEYWORDS, $META_TITLE;
// TODO: Shouldn't this be in session.php?
// If not on allowed list, dump the spider onto the redirect page.
// This kills recognized spiders in their tracks.
// To stop unrecognized spiders, see META_ROBOTS below.
if ($SEARCH_SPIDER) {
if (
!(WT_SCRIPT_NAME=='individual.php' ||
WT_SCRIPT_NAME=='indilist.php' ||
WT_SCRIPT_NAME=='login.php' ||
WT_SCRIPT_NAME=='family.php' ||
WT_SCRIPT_NAME=='famlist.php' ||
WT_SCRIPT_NAME=='help_text.php' ||
WT_SCRIPT_NAME=='source.php' ||
WT_SCRIPT_NAME=='search_engine.php' ||
WT_SCRIPT_NAME=='index.php')
) {
header("Location: search_engine.php");
exit;
}
}
header("Content-Type: text/html; charset=UTF-8");
if (empty($META_TITLE)) $metaTitle = ' - '.WT_WEBTREES;
else $metaTitle = " - ".$META_TITLE.' - '.WT_WEBTREES;
$title = PrintReady(stripLRMRLM(strip_tags($title.$metaTitle), TRUE));
if ($view=='simple') {
// The simple view needs to work without a database - for use during installation
$GEDCOM_TITLE=WT_WEBTREES;
} else {
$GEDCOM_TITLE = get_gedcom_setting(WT_GED_ID, 'title');
}
if ($ENABLE_RSS){
$applicationType = "application/rss+xml";
if ($RSS_FORMAT == "ATOM" || $RSS_FORMAT == "ATOM0.3"){
$applicationType = "application/atom+xml";
}
}
$javascript = '';
$query_string = $QUERY_STRING;
if ($view!='preview' && $view!='simple') {
$old_META_AUTHOR = $META_AUTHOR;
$old_META_PUBLISHER = $META_PUBLISHER;
$old_META_COPYRIGHT = $META_COPYRIGHT;
$old_META_DESCRIPTION = $META_DESCRIPTION;
$old_META_PAGE_TOPIC = $META_PAGE_TOPIC;
if (empty($META_AUTHOR) || empty($META_PUBLISHER) || empty($META_COPYRIGHT)) {
$user_id=get_user_id($CONTACT_EMAIL);
if ($user_id) {
$cuserName=getUserFullName($user_id);
if (empty($META_AUTHOR )) $META_AUTHOR = $cuserName;
if (empty($META_PUBLISHER)) $META_PUBLISHER = $cuserName;
if (empty($META_COPYRIGHT)) $META_COPYRIGHT = $cuserName;
}
}
if (empty($META_DESCRIPTION)) {
$META_DESCRIPTION = $GEDCOM_TITLE;
}
if (empty($META_PAGE_TOPIC)) {
$META_PAGE_TOPIC = $GEDCOM_TITLE;
}
/* $javascript .=''; */
}
$javascript.=WT_JS_START.'
/* setup some javascript variables */
var query = "'.$query_string.'";
var textDirection = "'.$TEXT_DIRECTION.'";
var browserType = "'.$BROWSERTYPE.'";
var themeName = "'.strtolower($theme_name).'";
var SCRIPT_NAME = "'.WT_SCRIPT_NAME.'";
/* keep the session id when opening new windows */
var sessionid = "'.session_id().'";
var sessionname = "'.session_name().'";
var accesstime = "'.time().'";
var plusminus = new Array();
plusminus[0] = new Image();
plusminus[0].src = "'.$WT_IMAGE_DIR."/".$WT_IMAGES["plus"]["other"].'";
plusminus[0].title = "'.i18n::translate('Show Details').'";
plusminus[1] = new Image();
plusminus[1].src = "'.$WT_IMAGE_DIR."/".$WT_IMAGES["minus"]["other"].'";
plusminus[1].title = "'.i18n::translate('Hide Details').'";
var zoominout = new Array();
zoominout[0] = new Image();
zoominout[0].src = "'.$WT_IMAGE_DIR."/".$WT_IMAGES["zoomin"]["other"].'";
zoominout[1] = new Image();
zoominout[1].src = "'.$WT_IMAGE_DIR."/".$WT_IMAGES["zoomout"]["other"].'";
var arrows = new Array();
arrows[0] = new Image();
arrows[0].src = "'.$WT_IMAGE_DIR."/".$WT_IMAGES["larrow2"]["other"].'";
arrows[1] = new Image();
arrows[1].src = "'.$WT_IMAGE_DIR."/".$WT_IMAGES["rarrow2"]["other"].'";
arrows[2] = new Image();
arrows[2].src = "'.$WT_IMAGE_DIR."/".$WT_IMAGES["uarrow2"]["other"].'";
arrows[3] = new Image();
arrows[3].src = "'.$WT_IMAGE_DIR."/".$WT_IMAGES["darrow2"]["other"].'";
';
$javascript .= 'function delete_record(pid, linenum, mediaid) {
if (!mediaid) mediaid="";
if (confirm(\''.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(\''.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(\''.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=\''.urlencode(WT_SCRIPT_NAME."?".$QUERY_STRING).'\';
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.'';
$bodyOnLoad = '';
if ($view=="preview") $bodyOnLoad .= " onbeforeprint=\"hidePrint();\" onafterprint=\"showBack();\"";
$bodyOnLoad .= " onload=\"";
if (!empty($ONLOADFUNCTION)) $bodyOnLoad .= $ONLOADFUNCTION;
if ($TEXT_DIRECTION=="rtl") {
$bodyOnLoad .= " maxscroll = document.documentElement.scrollLeft;";
}
$bodyOnLoad .= "\"";
if ($view!='preview' && $view!='simple') {
require $headerfile;
$META_AUTHOR = $old_META_AUTHOR;
$META_PUBLISHER = $old_META_PUBLISHER;
$META_COPYRIGHT = $old_META_COPYRIGHT;
$META_DESCRIPTION = $old_META_DESCRIPTION;
$META_PAGE_TOPIC = $old_META_PAGE_TOPIC;
} else {
require $headerfile;
}
}
/**
* 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
* @param string $head
* @param boolean $use_alternate_styles
*/
function print_simple_header($title) {
global $view;
$view = 'simple';
print_header($title);
}
// -- print the html to close the page
function print_footer() {
global $view;
global $SHOW_STATS, $QUERY_STRING, $footerfile, $print_footerfile, $ALLOW_CHANGE_GEDCOM, $printlink;
global $WT_IMAGE_DIR, $theme_name, $WT_IMAGES, $TEXT_DIRECTION, $footer_count;
$view = safe_get('view');
if (!isset($footer_count)) $footer_count = 1;
else $footer_count++;
echo "";
if ($view!="preview") {
require $footerfile;
} else {
require $print_footerfile;
echo "";
}
if (function_exists("load_behaviour")) {
load_behaviour(); // @see function_print_lists.php
}
if (WT_DEBUG_SQL) {
echo WT_DB::getQueryLog();
}
echo clustrmaps();
echo google_analytics();
echo '