function print_welcome_block($block = true, $config = "", $side, $index) { global $pgv_lang, $PGV_IMAGE_DIR, $PGV_IMAGES; $id = "user_welcome"; $title = $pgv_lang["welcome"] . " " . getUserFullName(PGV_USER_ID); $content = "<table class=\"blockcontent\" cellspacing=\"0\" cellpadding=\"0\" style=\" width: 100%; direction:ltr;\"><tr>"; $content .= "<td class=\"tab_active_bottom\" colspan=\"3\" ></td></tr><tr>"; if (get_user_setting(PGV_USER_ID, 'editaccount') == 'Y') { $content .= "<td class=\"center details2\" style=\" width: 33%; clear: none; vertical-align: top; margin-top: 2px;\"><a href=\"edituser.php\"><img src=\"" . $PGV_IMAGE_DIR . "/" . $PGV_IMAGES["mygedview"]["small"] . "\" border=\"0\" alt=\"" . $pgv_lang["myuserdata"] . "\" title=\"" . $pgv_lang["myuserdata"] . "\" /><br />" . $pgv_lang["myuserdata"] . "</a></td>"; } if (PGV_USER_GEDCOM_ID) { $content .= "<td class=\"center details2\" style=\" width: 34%; clear: none; vertical-align: top; margin-top: 2px;\"><a href=\"" . encode_url("pedigree.php?rootid=" . PGV_USER_GEDCOM_ID) . "\"><img src=\"" . $PGV_IMAGE_DIR . "/" . $PGV_IMAGES["pedigree"]["small"] . "\" border=\"0\" alt=\"" . $pgv_lang["my_pedigree"] . "\" title=\"" . $pgv_lang["my_pedigree"] . "\" /><br />" . $pgv_lang["my_pedigree"] . "</a></td>"; $content .= "<td class=\"center details2\" style=\" width: 33%; clear: none; vertical-align: top; margin-top: 2px;\"><a href=\"" . encode_url("individual.php?pid=" . PGV_USER_GEDCOM_ID) . "\"><img src=\"" . $PGV_IMAGE_DIR . "/" . $PGV_IMAGES["indis"]["small"] . "\" border=\"0\" alt=\"" . $pgv_lang["my_indi"] . "\" title=\"" . $pgv_lang["my_indi"] . "\" /><br />" . $pgv_lang["my_indi"] . "</a></td>"; } $content .= "</tr><tr><td class=\"center\" colspan=\"3\">"; $content .= print_help_link("mygedview_customize_help", "qm", "", false, true); $content .= "<a href=\"javascript:;\" onclick=\"window.open('" . encode_url("index_edit.php?name=" . PGV_USER_NAME . "&ctype=user") . "', '_blank', 'top=50,left=10,width=600,height=350,scrollbars=1,resizable=1');\">" . $pgv_lang["customize_page"] . "</a>"; $content .= "<br />" . format_timestamp(client_time()); $content .= "</td>"; $content .= "</tr></table>"; global $THEME_DIR; if ($block) { require $THEME_DIR . 'templates/block_small_temp.php'; } else { require $THEME_DIR . 'templates/block_main_temp.php'; } }
/** * Prints a user news/journal * */ function print_user_news($block = true, $config = "", $side, $index) { global $pgv_lang, $PGV_IMAGE_DIR, $PGV_IMAGES, $TEXT_DIRECTION, $ctype; $usernews = getUserNews(PGV_USER_ID); $id = "user_news"; $title = print_help_link("mygedview_myjournal_help", "qm", "", false, true); $title .= $pgv_lang["my_journal"]; $content = ""; if (count($usernews) == 0) { $content .= $pgv_lang["no_journal"] . ' '; } foreach ($usernews as $key => $news) { $day = date("j", $news["date"]); $mon = date("M", $news["date"]); $year = date("Y", $news["date"]); $content .= "<div class=\"person_box\">"; $ct = preg_match("/#(.+)#/", $news["title"], $match); if ($ct > 0) { if (isset($pgv_lang[$match[1]])) { $news["title"] = str_replace($match[0], $pgv_lang[$match[1]], $news["title"]); } } $content .= "<span class=\"news_title\">" . PrintReady($news["title"]) . "</span><br />"; $content .= "<span class=\"news_date\">" . format_timestamp($news["date"]) . "</span><br /><br />"; if (preg_match("/#(.+)#/", $news["text"], $match)) { if (isset($pgv_lang[$match[1]])) { $news["text"] = str_replace($match[0], $pgv_lang[$match[1]], $news["text"]); } } if (preg_match("/#(.+)#/", $news["text"], $match)) { if (isset($pgv_lang[$match[1]])) { $news["text"] = str_replace($match[0], $pgv_lang[$match[1]], $news["text"]); } if (isset(${$match}[1])) { $news["text"] = str_replace($match[0], ${$match}[1], $news["text"]); } } $trans = get_html_translation_table(HTML_SPECIALCHARS); $trans = array_flip($trans); $news["text"] = strtr($news["text"], $trans); $news["text"] = nl2br($news["text"]); $content .= PrintReady($news["text"]) . "<br /><br />"; $content .= "<a href=\"javascript:;\" onclick=\"editnews('{$key}'); return false;\">" . $pgv_lang["edit"] . "</a> | "; $content .= "<a href=\"" . encode_url("index.php?action=deletenews&news_id={$key}&ctype={$ctype}") . "\" onclick=\"return confirm('" . $pgv_lang["confirm_journal_delete"] . "');\">" . $pgv_lang["delete"] . "</a><br />"; $content .= "</div><br />"; } if (PGV_USER_ID) { $content .= "<br /><a href=\"javascript:;\" onclick=\"addnews('" . PGV_USER_ID . "'); return false;\">" . $pgv_lang["add_journal"] . "</a>"; } global $THEME_DIR; if ($block) { require $THEME_DIR . 'templates/block_small_temp.php'; } else { require $THEME_DIR . 'templates/block_main_temp.php'; } }
function print_block_theme_select($style = 0, $config = "", $side, $index) { global $pgv_lang; global $ALLOW_THEME_DROPDOWN, $ALLOW_USER_THEMES, $THEME_DIR, $pgv_lang, $themeformcount; $id = "theme_select"; $title = $pgv_lang["change_theme"]; $title .= print_help_link("change_theme", "qm", "", false, true); $theme_menu = MenuBar::getThemeMenu(); $content = '<div class="center theme_form"><br />' . $theme_menu->getMenuAsDropdown() . '<br /<br /></div>'; global $THEME_DIR; if ($style) { require $THEME_DIR . 'templates/block_small_temp.php'; } else { require $THEME_DIR . 'templates/block_main_temp.php'; } }
/** * Print RSS Block * * Prints a block allowing the user to login to the site directly from the portal */ function print_RSS_block($block = true, $config = "", $side, $index) { global $LANGUAGE, $pgv_lang; $id = "rss_block"; $title = print_help_link("rss_feed_help", "qm", "", false, true); $title .= $pgv_lang["rss_feeds"]; $content = "<div class=\"center\">"; $content .= "<form method=\"post\" action=\"\" name=\"rssform\">"; $content .= "<br />"; $content .= "<select name=\"rssStyle\" class=\"header_select\" onchange=\"javascript:document.getElementById('rss_button').href = '" . encode_url("rss.php?ged=" . PGV_GEDCOM . "&lang={$LANGUAGE}") . "' + (document.rssform.module.value==''? '' : '&module=' + document.rssform.module.value) + (document.rssform.rssStyle.value==''? '' : '&rssStyle=' + document.rssform.rssStyle.value) + (document.rssform.auth.value==''? '' : '&auth=' + document.rssform.auth.value);\">"; $content .= "<option value=\"ATOM\" selected=\"selected\">ATOM 1.0</option>"; $content .= "<option value=\"RSS2.0\">RSS 2.0</option>"; $content .= "<option value=\"RSS1.0\">RSS 1.0</option>"; $content .= "<option value=\"ATOM0.3\">ATOM 0.3</option>"; $content .= "<option value=\"RSS0.91\">RSS 0.91</option>"; $content .= "<option value=\"HTML\">HTML</option>"; $content .= "<option value=\"JS\">JavaScript</option>"; $content .= "</select>"; $content .= "<select name=\"module\" class=\"header_select\" onchange=\"javascript:document.getElementById('rss_button').href = '" . encode_url("rss.php?ged=" . PGV_GEDCOM . "&lang={$LANGUAGE}") . "' + (document.rssform.module.value==''? '' : '&module=' + document.rssform.module.value) + (document.rssform.rssStyle.value==''? '' : '&rssStyle=' + document.rssform.rssStyle.value) + (document.rssform.auth.value==''? '' : '&auth=' + document.rssform.auth.value);\">"; $content .= "<option value=\"\">" . $pgv_lang["all"] . "</option>"; $content .= "<option value=\"today\">" . $pgv_lang["on_this_day"] . " </option>"; $content .= "<option value=\"upcoming\">" . $pgv_lang["upcoming_events"] . "</option>"; $content .= "<option value=\"gedcomStats\">" . $pgv_lang["gedcom_stats"] . "</option>"; $content .= "<option value=\"gedcomNews\">" . $pgv_lang["gedcom_news"] . "</option>"; $content .= "<option value=\"top10Surnames\">" . $pgv_lang["block_top10"] . "</option>"; $content .= "<option value=\"recentChanges\">" . $pgv_lang["recent_changes"] . "</option>"; $content .= "<option value=\"randomMedia\">" . $pgv_lang["random_picture"] . "</option>"; $content .= "</select>"; $content .= " <a id=\"rss_button\" href=\"" . encode_url("rss.php?ged=" . PGV_GEDCOM . "&lang={$LANGUAGE}") . "\"><img class=\"icon\" src=\"images/feed-icon16x16.png\" alt=\"RSS\" title=\"RSS\" /></a>"; $content .= "</form></div>"; $content .= "<div class=\"center\">"; $content .= "</div>"; global $THEME_DIR; if ($block) { require $THEME_DIR . 'templates/block_small_temp.php'; } else { require $THEME_DIR . 'templates/block_main_temp.php'; } }
function print_user_favorites($block = true, $config = "", $side, $index) { global $pgv_lang, $PGV_IMAGE_DIR, $PGV_IMAGES, $GEDCOM, $TEXT_DIRECTION, $INDEX_DIRECTORY, $MEDIA_DIRECTORY, $MULTI_MEDIA, $MEDIA_DIRECTORY_LEVELS, $ctype; global $show_full, $PEDIGREE_FULL_DETAILS, $BROWSERTYPE, $ENABLE_AUTOCOMPLETE; // Override GEDCOM configuration temporarily if (isset($show_full)) { $saveShowFull = $show_full; } $savePedigreeFullDetails = $PEDIGREE_FULL_DETAILS; $show_full = 1; $PEDIGREE_FULL_DETAILS = 1; $userfavs = getUserFavorites(PGV_USER_NAME); if (!is_array($userfavs)) { $userfavs = array(); } $id = "user_favorites"; $title = print_help_link("mygedview_favorites_help", "qm", "", false, true); $title .= $pgv_lang["my_favorites"] . " "; if ($TEXT_DIRECTION == "rtl") { $title .= getRLM(); } $title .= "(" . count($userfavs) . ")"; if ($TEXT_DIRECTION == "rtl") { $title .= getRLM(); } if ($ENABLE_AUTOCOMPLETE) { $content = '<script type="text/javascript" src="js/jquery/jquery.min.js"></script> <script type="text/javascript" src="js/jquery/jquery.autocomplete.js"></script> <script type="text/javascript" src="js/jquery/jquery.ajaxQueue.js"></script> <script type="text/javascript"> jQuery.noConflict(); // @see http://docs.jquery.com/Using_jQuery_with_Other_Libraries/ jQuery(document).ready(function($){ $("input[name^=gid]").autocomplete("autocomplete.php", { extraParams: {field:"IFSRO"}, formatItem: function(row, i) { return row[0] + " (" + row[1] + ")"; }, formatResult: function(row) { return row[1]; }, width: 400, minChars: 2 }); }); </script>'; } else { $content = ''; } if ($block) { $style = 2; // 1 means "regular box", 2 means "wide box" $tableWidth = $BROWSERTYPE == "msie" ? "95%" : "99%"; // IE needs to have room for vertical scroll bar inside the box $cellSpacing = "1px"; } else { $style = 2; $tableWidth = "99%"; $cellSpacing = "3px"; } if (count($userfavs) == 0) { $content .= print_text("no_favorites", 0, 1); } else { $mygedcom = $GEDCOM; $current_gedcom = $GEDCOM; $content .= "<table width=\"{$tableWidth}\" style=\"border:none\" cellspacing=\"{$cellSpacing}\" class=\"center {$TEXT_DIRECTION}\">"; foreach ($userfavs as $key => $favorite) { if (isset($favorite["id"])) { $key = $favorite["id"]; } $removeFavourite = "<a class=\"font9\" href=\"" . encode_url("index.php?ctype={$ctype}&action=deletefav&fv_id={$key}") . "\" onclick=\"return confirm('" . $pgv_lang["confirm_fav_remove"] . "');\">" . $pgv_lang["remove"] . "</a><br />"; $current_gedcom = $GEDCOM; $GEDCOM = $favorite["file"]; $content .= "<tr><td>"; if ($favorite["type"] == "URL") { $content .= "<div id=\"boxurl" . $key . ".0\" class=\"person_box\">"; if ($ctype == "user" || PGV_USER_IS_ADMIN) { $content .= $removeFavourite; } $content .= "<a href=\"" . $favorite["url"] . "\">" . PrintReady($favorite["title"]) . "</a>"; $content .= "<br />" . PrintReady($favorite["note"]); } else { require $INDEX_DIRECTORY . $GEDCOM . '_conf.php'; $indirec = find_gedcom_record($favorite["gid"], PGV_GED_ID); if ($favorite["type"] == "INDI") { $content .= "<div id=\"box" . $favorite["gid"] . ".0\" class=\"person_box"; if (strpos($indirec, "\n1 SEX F") !== false) { $content .= "F"; } elseif (strpos($indirec, "\n1 SEX M") !== false) { $content .= ""; } else { $content .= "NN"; } $content .= "\">"; if ($ctype == "user" || PGV_USER_IS_ADMIN) { $content .= $removeFavourite; } ob_start(); print_pedigree_person($favorite["gid"], $style, 1, $key); $content .= ob_get_clean(); $content .= PrintReady($favorite["note"]); } else { $record = GedcomRecord::getInstance($favorite['gid']); $content .= "<div id=\"box" . $favorite["gid"] . ".0\" class=\"person_box\">"; if ($ctype == "user" || PGV_USER_IS_ADMIN) { $content .= $removeFavourite; } if ($record) { $content .= $record->format_list('span'); } else { $content .= $pgv_lang['invalid_id']; } $content .= "<br />" . PrintReady($favorite["note"]); } } $content .= "</div>"; $content .= "</td></tr>"; $GEDCOM = $mygedcom; require $INDEX_DIRECTORY . $GEDCOM . '_conf.php'; } $content .= "</table>"; } $content .= ' <script language="JavaScript" type="text/javascript"> var pastefield; function paste_id(value) { pastefield.value=value; } </script> <br /> '; $uniqueID = floor(microtime() * 1000000); $content .= print_help_link("index_add_favorites_help", "qm", "", false, true); $content .= "<b><a href=\"javascript: " . $pgv_lang["add_favorite"] . " \" onclick=\"expand_layer('add_user_fav'); return false;\"><img id=\"add_user_fav_img\" src=\"" . $PGV_IMAGE_DIR . "/" . $PGV_IMAGES["plus"]["other"] . "\" border=\"0\" alt=\"\" /> " . $pgv_lang["add_favorite"] . "</a></b>"; $content .= "<br /><div id=\"add_user_fav\" style=\"display: none;\">"; $content .= "<form name=\"addufavform\" method=\"post\" action=\"index.php\">"; $content .= "<input type=\"hidden\" name=\"action\" value=\"addfav\" />"; $content .= "<input type=\"hidden\" name=\"ctype\" value=\"{$ctype}\" />"; $content .= "<input type=\"hidden\" name=\"favtype\" value=\"user\" />"; $content .= "<input type=\"hidden\" name=\"ged\" value=\"{$GEDCOM}\" />"; $content .= "<table width=\"{$tableWidth}\" style=\"border:none\" cellspacing=\"{$cellSpacing}\" class=\"center {$TEXT_DIRECTION}\">"; $content .= "<tr><td>" . $pgv_lang["add_fav_enter_id"] . " <br />"; $content .= "<input class=\"pedigree_form\" type=\"text\" name=\"gid\" id=\"gid{$uniqueID}\" size=\"5\" value=\"\" />"; $content .= print_findindi_link("gid{$uniqueID}", '', true) . "\n"; $content .= print_findfamily_link("gid{$uniqueID}", '', true) . "\n"; $content .= print_findsource_link("gid{$uniqueID}", '', true) . "\n"; $content .= print_findrepository_link("gid{$uniqueID}", '', true) . "\n"; $content .= print_findnote_link("gid{$uniqueID}", '', true) . "\n"; $content .= print_findmedia_link("gid{$uniqueID}", '1', '', true) . "\n"; $content .= "<br />" . $pgv_lang["add_fav_or_enter_url"]; $content .= "<table><tr><td>" . $pgv_lang["url"] . "</td><td><input type=\"text\" name=\"url\" size=\"40\" value=\"\" /></td></tr>"; $content .= "<tr><td>" . $pgv_lang["title"] . "</td><td><input type=\"text\" name=\"favtitle\" size=\"40\" value=\"\" /></td></tr></table>"; if ($block) { $content .= "\n</td></tr><tr><td><br />"; } else { $content .= "\n</td><td>"; } $content .= $pgv_lang["add_fav_enter_note"]; $content .= "<br /><textarea name=\"favnote\" rows=\"6\" cols=\"50\"></textarea>"; $content .= "</td></tr></table>"; $content .= "<br /><input type=\"submit\" value=\"" . $pgv_lang["add"] . "\" style=\"font-size: 8pt; \" />"; $content .= "</form></div>"; global $THEME_DIR; if ($block) { require $THEME_DIR . 'templates/block_small_temp.php'; } else { require $THEME_DIR . 'templates/block_main_temp.php'; } // Restore GEDCOM configuration unset($show_full); if (isset($saveShowFull)) { $show_full = $saveShowFull; } $PEDIGREE_FULL_DETAILS = $savePedigreeFullDetails; }
function print_relatives_tab() { global $pgv_lang, $factarray, $SHOW_ID_NUMBERS, $PGV_IMAGE_DIR, $PGV_IMAGES, $SHOW_AGE_DIFF; global $pgv_changes, $GEDCOM, $ABBREVIATE_CHART_LABELS; global $show_full, $personcount; if (isset($show_full)) { $saved_show_full = $show_full; } // We always want to see full details here $show_full = 1; $saved_ABBREVIATE_CHART_LABELS = $ABBREVIATE_CHART_LABELS; $ABBREVIATE_CHART_LABELS = false; // Override GEDCOM configuration // Show or Hide Navigator ----------- if (isset($_COOKIE['famnav'])) { $Fam_Navigator = $_COOKIE['famnav']; } else { $Fam_Navigator = "YES"; } if ($Fam_Navigator == "HIDE") { print "<table border=\"0\" cellpadding=\"0\" width=\"100%\"><tr><td valign=\"top\" width=\"100%\" >"; } //if (isset($_COOKIE['elderdate'])) $SHOW_AGE_DIFF = ($_COOKIE['elderdate']); if (!$this->isPrintPreview()) { ?> <table class="facts_table"><tr><td style="width:20%; padding:4px"></td><td class="descriptionbox rela"> <input id="checkbox_elder" type="checkbox" onclick="toggleByClassName('DIV', 'elderdate');" <?php if ($SHOW_AGE_DIFF) { echo "checked=\"checked\""; } ?> /> <label for="checkbox_elder"><?php print_help_link("age_differences_help", "qm"); print $pgv_lang['age_differences']; ?> </label> </td></tr></table> <?php } $personcount = 0; $families = $this->indi->getChildFamilies(); if (count($families) == 0) { print "<span class=\"subheaders\">" . $pgv_lang["relatives"] . "</span>"; if (PGV_USER_CAN_EDIT && $this->indi->canDisplayDetails()) { ?> <table class="facts_table"> <tr> <td class="facts_value"><?php print_help_link("edit_add_parent_help", "qm"); ?> <a href="javascript:;" onclick="return addnewparent('<?php print $this->pid; ?> ', 'HUSB');"><?php print $pgv_lang["add_father"]; ?> </a></td> </tr> <tr> <td class="facts_value"><?php print_help_link("edit_add_parent_help", "qm"); ?> <a href="javascript:;" onclick="return addnewparent('<?php print $this->pid; ?> ', 'WIFE');"><?php print $pgv_lang["add_mother"]; ?> </a></td> </tr> </table> <?php } } //-- parent families foreach ($families as $famid => $family) { $people = $this->buildFamilyList($family, "parents"); $this->printFamilyHeader($famid, $this->indi->getChildFamilyLabel($family)); ?> <table class="facts_table"> <?php $this->printParentsRows($family, $people, "parents"); $this->printChildrenRows($family, $people, "parents"); ?> </table> <?php } //-- step families foreach ($this->indi->getStepFamilies() as $famid => $family) { $people = $this->buildFamilyList($family, "step"); $this->printFamilyHeader($famid, $this->indi->getStepFamilyLabel($family)); ?> <table class="facts_table"> <?php $this->printParentsRows($family, $people, "step"); $this->printChildrenRows($family, $people, "step"); ?> </table> <?php } //-- spouses and children $families = $this->indi->getSpouseFamilies(); foreach ($families as $famid => $family) { $people = $this->buildFamilyList($family, "spouse"); $this->printFamilyHeader($famid, $this->indi->getSpouseFamilyLabel($family)); ?> <table class="facts_table"> <?php $this->printParentsRows($family, $people, "spouse"); $this->printChildrenRows($family, $people, "spouse"); ?> </table> <?php } // ==================== Start Relatives Tab Navigator ======================================== if ($Fam_Navigator == "HIDE") { ?> </td> <td valign="top"> <table class="optionbox" width="220px" cellpadding="0"><tr><td align="center"> <b><?php print $pgv_lang["view_fam_nav_relatives"]; ?> </b><br /><br /> <?php include_once 'includes/family_nav.php'; ?> <br /> </td></tr></table> </td></tr></table> <?php } // ==================== End Tree Tab Navigator ========================================= if ($personcount == 0) { print "<table><tr><td id=\"no_tab5\" colspan=\"2\" class=\"facts_value\">" . $pgv_lang["no_tab5"] . "</td></tr></table>\n"; } ?> <script type="text/javascript"> <!-- <?php if (!$SHOW_AGE_DIFF) { echo "toggleByClassName('DIV', 'elderdate');"; } ?> //--> </script> <br /> <?php if (!$this->isPrintPreview() && PGV_USER_CAN_EDIT && $this->indi->canDisplayDetails()) { ?> <table class="facts_table"> <?php if (count($families) > 1) { ?> <tr> <td class="facts_value"> <?php print_help_link("reorder_families_help", "qm"); ?> <a href="javascript:;" onclick="return reorder_families('<?php print $this->pid; ?> ');"><?php print $pgv_lang["reorder_families"]; ?> </a> </td> </tr> <?php } ?> <tr> <td class="facts_value"> <?php print_help_link("link_child_help", "qm"); ?> <a href="javascript:;" onclick="return add_famc('<?php print $this->pid; ?> ');"><?php print $pgv_lang["link_as_child"]; ?> </a> </td> </tr> <?php if ($this->indi->getSex() != "F") { ?> <tr> <td class="facts_value"> <?php print_help_link("add_wife_help", "qm"); ?> <a href="javascript:;" onclick="return addspouse('<?php print $this->pid; ?> ','WIFE');"><?php print $pgv_lang["add_new_wife"]; ?> </a> </td> </tr> <tr> <td class="facts_value"> <?php print_help_link("link_new_wife_help", "qm"); ?> <a href="javascript:;" onclick="return linkspouse('<?php print $this->pid; ?> ','WIFE');"><?php print $pgv_lang["link_new_wife"]; ?> </a> </td> </tr> <tr> <td class="facts_value"> <?php print_help_link("link_new_husb_help", "qm"); ?> <a href="javascript:;" onclick="return add_fams('<?php print $this->pid; ?> ','HUSB');"><?php print $pgv_lang["link_as_husband"]; ?> </a> </td> </tr> <?php } if ($this->indi->getSex() != "M") { ?> <tr> <td class="facts_value"> <?php print_help_link("add_husband_help", "qm"); ?> <a href="javascript:;" onclick="return addspouse('<?php print $this->pid; ?> ','HUSB');"><?php print $pgv_lang["add_new_husb"]; ?> </a> </td> </tr> <tr> <td class="facts_value"> <?php print_help_link("link_husband_help", "qm"); ?> <a href="javascript:;" onclick="return linkspouse('<?php print $this->pid; ?> ','HUSB');"><?php print $pgv_lang["link_new_husb"]; ?> </a> </td> </tr> <tr> <td class="facts_value"> <?php print_help_link("link_wife_help", "qm"); ?> <a href="javascript:;" onclick="return add_fams('<?php print $this->pid; ?> ','WIFE');"><?php print $pgv_lang["link_as_wife"]; ?> </a> </td> </tr> <?php } if (PGV_USER_CAN_ACCEPT) { // NOTE this function is restricted to ACCEPTORS because another bug prevents pending changes being shown on the close relatives tab of the indi page. Once that bug is fixed, this function can be opened up to all! ?> <tr> <td class="facts_value"> <?php print_help_link("add_opf_child_help", "qm"); ?> <a href="javascript:;" onclick="return addopfchild('<?php print $this->pid; ?> ','U');"><?php print $pgv_lang["add_opf_child"]; ?> </a> </td> </tr> <?php } ?> <?php if (PGV_USER_GEDCOM_ADMIN) { ?> <tr> <td class="facts_value"> <?php print_help_link("link_remote_help", "qm"); ?> <a href="javascript:;" onclick="return open_link_remote('<?php print $this->pid; ?> ');"><?php print $pgv_lang["link_remote"]; ?> </a> </td> </tr> <?php } ?> </table> <?php } ?> <br /> <?php $ABBREVIATE_CHART_LABELS = $saved_ABBREVIATE_CHART_LABELS; // Restore GEDCOM configuration unset($show_full); if (isset($saved_show_full)) { $show_full = $saved_show_full; } }
function top10_pageviews_config($config) { global $pgv_lang, $ctype, $PGV_BLOCKS; if (empty($config)) { $config = $PGV_BLOCKS["top10_pageviews"]["config"]; } if (!isset($config["cache"])) { $config["cache"] = $PGV_BLOCKS["top10_pageviews"]["config"]["cache"]; } // Number of items to show print "<tr><td class=\"descriptionbox wrap width33\">"; // print_help_link("num_to_show_help", "qm"); print $pgv_lang["num_to_show"]; print "</td><td class=\"optionbox\">"; print "<input type=\"text\" name=\"num\" size=\"2\" value=\"" . $config["num"] . "\" />"; print "</td></tr>"; // Count position print "<tr><td class=\"descriptionbox wrap width33\">"; // print_help_link("before_or_after_help", "qm"); print $pgv_lang["before_or_after"]; print "</td><td class=\"optionbox\">"; print "<select name=\"count_placement\">"; print "<option value=\"left\""; if ($config["count_placement"] == "left") { print " selected=\"selected\""; } print ">" . $pgv_lang["before"] . "</option>"; print "<option value=\"right\""; if ($config["count_placement"] == "right") { print " selected=\"selected\""; } print ">" . $pgv_lang["after"] . "</option>"; print "</select>"; print "</td></tr>"; // Cache file life if ($ctype == "gedcom") { print "<tr><td class=\"descriptionbox wrap width33\">"; print_help_link("cache_life_help", "qm"); print $pgv_lang["cache_life"]; print "</td><td class=\"optionbox\">"; print "<input type=\"text\" name=\"cache\" size=\"2\" value=\"" . $config["cache"] . "\" />"; print "</td></tr>"; } }
function print_gedcom_stats_config($config) { global $pgv_lang, $ctype, $PGV_BLOCKS, $TEXT_DIRECTION; if (empty($config)) { $config = $PGV_BLOCKS['print_gedcom_stats']['config']; } if (!isset($config['stat_indi'])) { $config = $PGV_BLOCKS['print_gedcom_stats']['config']; } if (!isset($config['stat_first_death'])) { $config['stat_first_death'] = $PGV_BLOCKS['print_gedcom_stats']['config']['stat_first_death']; } if (!isset($config['stat_last_death'])) { $config['stat_last_death'] = $PGV_BLOCKS['print_gedcom_stats']['config']['stat_last_death']; } if (!isset($config['stat_media'])) { $config['stat_media'] = $PGV_BLOCKS['print_gedcom_stats']['config']['stat_media']; } if (!isset($config['stat_link'])) { $config['stat_link'] = $PGV_BLOCKS['print_gedcom_stats']['config']['stat_link']; } if (!isset($config['cache'])) { $config['cache'] = $PGV_BLOCKS['print_gedcom_stats']['config']['cache']; } ?> <tr><td class="descriptionbox wrap width33"> <?php echo $pgv_lang['gedcom_stats_show_surnames']; ?> </td> <td class="optionbox"><select name="show_common_surnames"> <option value="yes" <?php if ($config['show_common_surnames'] == 'yes') { echo ' selected="selected"'; } ?> ><?php echo $pgv_lang['yes']; ?> </option> <option value="no" <?php if ($config['show_common_surnames'] == 'no') { echo ' selected="selected"'; } ?> ><?php echo $pgv_lang['no']; ?> </option> </select></td> </tr> <tr> <td class="descriptionbox wrap width33"><?php echo $pgv_lang['stats_to_show']; ?> </td> <td class="optionbox"> <table> <tr> <td><input type="checkbox" value="yes" name="stat_indi" <?php if ($config['stat_indi'] == 'yes') { echo ' checked="checked"'; } ?> /> <?php echo $pgv_lang['stat_individuals']; ?> </td> <td><input type="checkbox" value="yes" name="stat_first_birth" <?php if ($config['stat_first_birth'] == 'yes') { echo ' checked="checked"'; } ?> /> <?php echo $pgv_lang['stat_earliest_birth']; ?> </td> </tr> <tr> <td><input type="checkbox" value="yes" name="stat_surname" <?php if ($config['stat_surname'] == 'yes') { echo ' checked="checked"'; } ?> /> <?php echo $pgv_lang['stat_surnames']; ?> </td> <td><input type="checkbox" value="yes" name="stat_last_birth" <?php if ($config['stat_last_birth'] == 'yes') { echo ' checked="checked"'; } ?> /> <?php echo $pgv_lang['stat_latest_birth']; ?> </td> </tr> <tr> <td><input type="checkbox" value="yes" name="stat_fam" <?php if ($config['stat_fam'] == 'yes') { echo ' checked="checked"'; } ?> /> <?php echo $pgv_lang['stat_families']; ?> </td> <td><input type="checkbox" value="yes" name="stat_first_death" <?php if ($config['stat_first_death'] == 'yes') { echo ' checked="checked"'; } ?> /> <?php echo $pgv_lang['stat_earliest_death']; ?> </td> </tr> <tr> <td><input type="checkbox" value="yes" name="stat_sour" <?php if ($config['stat_sour'] == 'yes') { echo ' checked="checked"'; } ?> /> <?php echo $pgv_lang['stat_sources']; ?> </td> <td><input type="checkbox" value="yes" name="stat_last_death" <?php if ($config['stat_last_death'] == 'yes') { echo ' checked="checked"'; } ?> /> <?php echo $pgv_lang['stat_latest_death']; ?> </td> </tr> <tr> <td><input type="checkbox" value="yes" name="stat_media" <?php if ($config['stat_media'] == 'yes') { echo ' checked="checked"'; } ?> /> <?php echo $pgv_lang['stat_media']; ?> </td> <td><input type="checkbox" value="yes" name="stat_long_life" <?php if ($config['stat_long_life'] == 'yes') { echo ' checked="checked"'; } ?> /> <?php echo $pgv_lang['stat_longest_life']; ?> </td> </tr> <tr> <td><input type="checkbox" value="yes" name="stat_other" <?php if ($config['stat_other'] == 'yes') { echo ' checked="checked"'; } ?> /> <?php echo $pgv_lang['stat_other']; ?> </td> <td><input type="checkbox" value="yes" name="stat_avg_life" <?php if ($config['stat_avg_life'] == 'yes') { echo ' checked="checked"'; } ?> /> <?php echo $pgv_lang['stat_avg_age_at_death']; ?> </td> </tr> <tr> <td><input type="checkbox" value="yes" name="stat_events" <?php if ($config['stat_events'] == 'yes') { echo ' checked="checked"'; } ?> /> <?php echo $pgv_lang['stat_events']; ?> </td> <td><input type="checkbox" value="yes" name="stat_most_chil" <?php if ($config['stat_most_chil'] == 'yes') { echo ' checked="checked"'; } ?> /> <?php echo $pgv_lang['stat_most_children']; ?> </td> </tr> <tr> <td><input type="checkbox" value="yes" name="stat_users" <?php if ($config['stat_users'] == 'yes') { echo ' checked="checked"'; } ?> /> <?php echo $pgv_lang['stat_users']; ?> </td> <td><input type="checkbox" value="yes" name="stat_avg_chil" <?php if ($config['stat_avg_chil'] == 'yes') { echo ' checked="checked"'; } ?> /> <?php echo $pgv_lang['stat_average_children']; ?> </td> </tr> </table> </td> </tr> <tr> <td class="descriptionbox wrap width33"> <?php echo $pgv_lang['print_stat_link']; ?> </td> <td class="optionbox"> <select name="stat_link"> <option value="yes" <?php if ($config['stat_link'] == 'yes') { echo ' selected="selected"'; } ?> ><?php echo $pgv_lang['yes']; ?> </option> <option value="no" <?php if ($config['stat_link'] == 'no') { echo ' selected="selected"'; } ?> ><?php echo $pgv_lang['no']; ?> </option> </select> </td> </tr> <?php // Cache file life if ($ctype == 'gedcom') { echo '<tr><td class="descriptionbox wrap width33">'; print_help_link('cache_life_help', 'qm'); echo $pgv_lang['cache_life']; echo '</td><td class="optionbox">'; echo '<input type="text" name="cache" size="2" value="', $config['cache'], '" />'; echo '</td></tr>'; } }
/** * Print Login Block * * Prints a block allowing the user to login to the site directly from the portal */ function print_login_block($block = true, $config = "", $side, $index) { global $pgv_lang, $QUERY_STRING, $USE_REGISTRATION_MODULE, $LOGIN_URL; global $TEXT_DIRECTION; if (PGV_USER_ID) { $id = "logout_block"; $title = $pgv_lang["logout"]; $i = 0; // Initialize tab index $content = '<div class="center"><form method="post" action="index.php?logout=1" name="logoutform" onsubmit="return true;">'; $content .= '<br /><a href="edituser.php" class="name2">' . $pgv_lang["logged_in_as"] . ' (' . PGV_USER_NAME . ')</a><br /><br />'; $i++; $content .= "<input type=\"submit\" tabindex=\"{$i}\" value=\"" . $pgv_lang["logout"] . "\" />"; $content .= "<br /><br /></form></div>"; } else { $id = "login_block"; $title = ""; $i = 0; // Initialize tab index if ($USE_REGISTRATION_MODULE) { $title .= print_help_link("index_login_register_help", "qm", "", false, true); } else { $title .= print_help_link("index_login_help", "qm", "", false, true); } $title .= $pgv_lang["login"]; $content = "<div class=\"center\"><form method=\"post\" action=\"{$LOGIN_URL}\" name=\"loginform\" onsubmit=\"t = new Date(); document.loginform.usertime.value=t.getFullYear()+'-'+(t.getMonth()+1)+'-'+t.getDate()+' '+t.getHours()+':'+t.getMinutes()+':'+t.getSeconds(); return true;\">"; $content .= "<input type=\"hidden\" name=\"url\" value=\"index.php\" />"; $content .= "<input type=\"hidden\" name=\"ged\" value=\""; $content .= PGV_GEDCOM; $content .= "\" />"; $content .= "<input type=\"hidden\" name=\"pid\" value=\""; if (isset($pid)) { $content .= $pid; } $content .= "\" />"; $content .= "<input type=\"hidden\" name=\"usertime\" value=\"\" />"; $content .= "<input type=\"hidden\" name=\"action\" value=\"login\" />"; $content .= "<table class=\"center tabs_table\">"; // Row 1: Userid $i++; $content .= "<tr><td "; $content .= write_align_with_textdir_check("right", true); $content .= " class=\"{$TEXT_DIRECTION} wrap width50\">"; $content .= print_help_link("username_help", "qm", "username", false, true); $content .= $pgv_lang["username"] . "</td>"; $content .= "<td "; $content .= write_align_with_textdir_check("left", true); $content .= " class=\"{$TEXT_DIRECTION}\"><input type=\"text\" tabindex=\"{$i}\" name=\"username\" size=\"20\" class=\"formField\" />"; $content .= "</td></tr>"; // Row 2: Password $i++; $content .= "<tr><td "; $content .= write_align_with_textdir_check("right", true); $content .= " class=\"{$TEXT_DIRECTION} wrap width50\">"; $content .= print_help_link("password_help", "qm", "password", false, true); $content .= $pgv_lang["password"] . "</td>"; $content .= "<td "; $content .= write_align_with_textdir_check("left", true); $content .= " class=\"{$TEXT_DIRECTION}\"><input type=\"password\" tabindex=\"{$i}\" name=\"password\" size=\"20\" class=\"formField\" />"; $content .= "</td></tr>"; // Row 3: "Login" link $i++; $content .= "<tr><td colspan=\"2\" class=\"center\">"; $content .= "<input type=\"submit\" tabindex=\"{$i}\" value=\"" . $pgv_lang["login"] . "\" /> "; $content .= "</td></tr>"; if ($USE_REGISTRATION_MODULE) { // Row 4: "Request Account" link $i++; $content .= "<tr><td "; $content .= write_align_with_textdir_check("right", true); $content .= " class=\"{$TEXT_DIRECTION} wrap width50\"><br />"; $content .= print_help_link("new_user_help", "qm", "", false, true); $content .= $pgv_lang["no_account_yet"] . "</td>"; $content .= "<td "; $content .= write_align_with_textdir_check("left", true); $content .= " class=\"{$TEXT_DIRECTION}\"><br />"; $content .= "<a href=\"login_register.php?action=register\" tabindex=\"{$i}\">"; $content .= $pgv_lang["requestaccount"]; $content .= "</a>"; $content .= "</td></tr>"; // Row 5: "Lost Password" link $i++; $content .= "<tr><td "; $content .= write_align_with_textdir_check("right", true); $content .= " class=\"{$TEXT_DIRECTION} wrap width50\">"; $content .= print_help_link("new_password_help", "qm", "", false, true); $content .= $pgv_lang["lost_password"] . "</td>"; $content .= "<td "; $content .= write_align_with_textdir_check("left", true); $content .= " class=\"{$TEXT_DIRECTION}\">"; $content .= "<a href=\"login_register.php?action=pwlost\" tabindex=\"{$i}\">"; $content .= $pgv_lang["requestpassword"]; $content .= "</a>"; $content .= "</td></tr>"; } $content .= "</table>"; $content .= "</form></div>"; } global $THEME_DIR; if ($block) { require $THEME_DIR . 'templates/block_small_temp.php'; } else { require $THEME_DIR . 'templates/block_main_temp.php'; } }
function print_charts_block_config($config) { global $pgv_lang, $ctype, $PGV_BLOCKS, $TEXT_DIRECTION, $PEDIGREE_ROOT_ID, $ENABLE_AUTOCOMPLETE; if (empty($config)) { $config = $PGV_BLOCKS["print_charts_block"]["config"]; } if (empty($config["rootId"])) { $config["rootId"] = $PEDIGREE_ROOT_ID; } if (empty($config['details'])) { $config['details'] = 'no'; } if ($ENABLE_AUTOCOMPLETE) { require PGV_ROOT . 'js/autocomplete.js.htm'; } ?> <tr><td class="descriptionbox wrap width33"><?php print $pgv_lang["chart_type"]; ?> </td> <td class="optionbox"> <select name="type"> <option value="pedigree"<?php if ($config["type"] == "pedigree") { print " selected=\"selected\""; } ?> ><?php print $pgv_lang["index_header"]; ?> </option> <option value="descendants"<?php if ($config["type"] == "descendants") { print " selected=\"selected\""; } ?> ><?php print $pgv_lang["descend_chart"]; ?> </option> <option value="hourglass"<?php if ($config["type"] == "hourglass") { print " selected=\"selected\""; } ?> ><?php print $pgv_lang["hourglass_chart"]; ?> </option> <?php if (file_exists(PGV_ROOT . 'includes/classes/class_treenav.php')) { ?> <option value="treenav"<?php if ($config["type"] == "treenav") { print " selected=\"selected\""; } ?> ><?php print $pgv_lang["interactive_tree"]; ?> </option> <?php } ?> </select> </td></tr> <tr> <td class="descriptionbox wrap width33"><?php print $pgv_lang["show_details"]; ?> </td> <td class="optionbox"> <select name="details"> <option value="no" <?php if ($config["details"] == "no") { print " selected=\"selected\""; } ?> ><?php print $pgv_lang['no']; ?> </option> <option value="yes" <?php if ($config["details"] == "yes") { print " selected=\"selected\""; } ?> ><?php print $pgv_lang['yes']; ?> </option> </select> </td> </tr> <tr> <td class="descriptionbox wrap width33"><?php print $pgv_lang["root_person"]; ?> </td> <td class="optionbox"> <input type="text" name="pid" id="pid" value="<?php print $config['pid']; ?> " size="5" /> <?php print_findindi_link('pid', ''); $root = Person::getInstance($config['pid']); if ($root) { echo ' <span class="list_item">', $root->getFullName(), $root->format_first_major_fact(PGV_EVENTS_BIRT, 1), '</span>'; } ?> </td> </tr> <?php // Cache file life if ($ctype == "gedcom") { print "<tr><td class=\"descriptionbox wrap width33\">"; print_help_link("cache_life_help", "qm"); print $pgv_lang["cache_life"]; print "</td><td class=\"optionbox\">"; print "<input type=\"text\" name=\"cache\" size=\"2\" value=\"" . $config["cache"] . "\" />"; print "</td></tr>"; } }
?> <a href="editconfig.php"><?php print $pgv_lang["configuration"]; ?> </a></td> <td class="optionbox width50"><?php print_help_link("help_faq.php", "qm"); ?> <a href="faq.php"><?php print $pgv_lang["faq_list"]; ?> </a></td> </tr> <tr> <td class="optionbox width50"><?php print_help_link("help_managesites", "qm"); ?> <a href="manageservers.php"><?php print $pgv_lang["link_manage_servers"]; ?> </a></td> </td> <td class="optionbox width50"><?php print $d_logfile_str; ?> </td> </tr> <?php } ?> </table>
print "<td class=\"optionbox\">"; print "<select name=\"PEDIGREE_GENERATIONS\">"; // Can only show 9 generations (256 ancestors) as graphics library has integer degree resolution for ($i = 2; $i <= min(9, $MAX_PEDIGREE_GENERATIONS); $i++) { print "<option value=\"" . $i . "\""; if ($i == $PEDIGREE_GENERATIONS) { print "selected=\"selected\" "; } print ">" . $i . "</option>"; } print "</select>"; print "</td>"; print "</tr><tr>"; // NOTE: fan width print "<td class=\"descriptionbox\">"; print_help_link("fan_width_help", "qm"); print $pgv_lang["fan_width"] . "</td>"; print "<td class=\"optionbox\">"; print "<input type=\"text\" size=\"3\" name=\"fan_width\" value=\"{$fan_width}\" /> <b>%</b> "; print "</td>"; print "</tr></table>"; print "</form><br />"; } else { print "<script language='JavaScript' type='text/javascript'>"; print "if (IE) document.write('<span class=\"warning\">" . str_replace("'", "\\'", $pgv_lang["fanchart_IE"]) . "</span>');"; print "</script>"; } print "</td></tr></table>"; $treeid = ancestry_array($rootid); print_fan_chart($treeid, 640 * $fan_width / 100, $fan_style * 90); print_footer();
<tr> <td class="descriptionbox width20" id="tdId"><?php print_help_link('link_person_id_help', 'qm'); ?> Local Person ID</td> <td class="optionbox"><input type="text" id="pid" name="pid" size="14"/></td> <td class="optionbox" rowspan="2"><br/> <input type="submit" value="<?php echo $pgv_lang['label_add_remote_link']; ?> " id="btnSubmit" name="btnSubmit" value="add"/> </td> </tr> <tr> <td class="descriptionbox width20"><?php print_help_link('link_remote_rel_help', 'qm'); ?> <?php echo $pgv_lang["label_rel_to_current"]; ?> </td> <td class="optionbox"> <select id="cbRelationship" name="cbRelationship"> <option value="self" selected><?php echo $pgv_lang["current_person"]; ?> </option> <option value="mother"><?php echo $pgv_lang["mother"]; ?> </option>
/** * print the facts table for a family * * @param string $famid family gedcom ID * @param int $sosa optional child sosa number */ function print_family_facts(&$family, $sosa = 0) { global $pgv_lang, $pbwidth, $pbheight, $view; global $nonfacts, $factarray; global $TEXT_DIRECTION, $GEDCOM, $SHOW_ID_NUMBERS; global $show_changes, $pgv_changes; global $linkToID; $famid = $family->getXref(); // -- if both parents are displayable then print the marriage facts if ($family->canDisplayDetails()) { $linkToID = $famid; // -- Tell addmedia.php what to link to // -- array of GEDCOM elements that will be found but should not be displayed $nonfacts = array("FAMS", "FAMC", "MAY", "BLOB", "HUSB", "WIFE", "CHIL", ""); // -- find all the fact information $indifacts = $family->getFacts(); if (count($indifacts) > 0) { sort_facts($indifacts); print "\n\t<span class=\"subheaders\">" . $pgv_lang["family_group_info"]; if ($SHOW_ID_NUMBERS and $famid != "") { print " ({$famid})"; } print "</span><br />\n\t<table class=\"facts_table\">"; /* @var $value Event */ foreach ($indifacts as $key => $value) { if ($value->getTag() != "SOUR" && $value->getTag() != "OBJE" && $value->getTag() != "NOTE") { print_fact($value); } } // do not print otheritems for sosa if ($sosa == 0) { foreach ($indifacts as $key => $value) { $fact = $value->getTag(); // -- handle special source fact case if ($fact == "SOUR") { print_main_sources($value->getGedComRecord(), 1, $famid, $value->getLineNumber()); } else { if ($fact == "NOTE") { print_main_notes($value->getGedComRecord(), 1, $famid, $value->getLineNumber()); } } } // NOTE: Print the media print_main_media($famid); } } else { if ($sosa == 0) { print "\n\t<span class=\"subheaders\">" . $pgv_lang["family_group_info"]; if ($SHOW_ID_NUMBERS and $famid != "") { print " ({$famid})"; } print "</span><br />\n\t"; } print "<table class=\"facts_table\">"; if ($sosa == 0) { print "<tr><td class=\"messagebox\" colspan=\"2\">"; print $pgv_lang["no_family_facts"]; print "</td></tr>\n"; } } // -- new fact link if ($view != "preview" && $sosa == 0 && PGV_USER_CAN_EDIT) { print_add_new_fact($famid, $indifacts, "FAM"); // -- new note print "<tr><td class=\"descriptionbox\">"; print_help_link("add_note_help", "qm", "add_note_lbl"); print $pgv_lang["add_note_lbl"] . "</td>"; print "<td class=\"optionbox\">"; print "<a href=\"javascript:;\" onclick=\"return add_new_record('{$famid}','NOTE');\">" . $pgv_lang["add_note"] . "</a>"; print "<br />\n"; print "</td></tr>\n"; // -- new shared note print "<tr><td class=\"descriptionbox\">"; print_help_link("add_shared_note_help", "qm", "add_shared_note_lbl"); print $pgv_lang["add_shared_note_lbl"] . "</td>"; print "<td class=\"optionbox\">"; print "<a href=\"javascript:;\" onclick=\"return add_new_record('{$famid}','SHARED_NOTE');\">" . $pgv_lang["add_shared_note"] . "</a>"; print "<br />\n"; print "</td></tr>\n"; // -- new media print "<tr><td class=\"descriptionbox\">"; print_help_link("add_media_help", "qm", "add_media_lbl"); print $pgv_lang["add_media_lbl"] . "</td>"; print "<td class=\"optionbox\">"; print "<a href=\"javascript: " . $pgv_lang["add_media_lbl"] . "\" onclick=\"window.open('addmedia.php?action=showmediaform&linktoid={$famid}', '_blank', 'top=50,left=50,width=600,height=500,resizable=1,scrollbars=1'); return false;\">" . $pgv_lang["add_media"] . "</a>"; print "<br />\n"; print "<a href=\"javascript:;\" onclick=\"window.open('inverselink.php?linktoid={$famid}&linkto=family', '_blank', 'top=50,left=50,width=400,height=300,resizable=1,scrollbars=1'); return false;\">" . $pgv_lang["link_to_existing_media"] . "</a>"; print "</td></tr>\n"; // -- new source citation print "<tr><td class=\"descriptionbox\">"; print_help_link("add_source_help", "qm", "add_source_lbl"); print $pgv_lang["add_source_lbl"] . "</td>"; print "<td class=\"optionbox\">"; print "<a href=\"javascript:;\" onclick=\"return add_new_record('{$famid}','SOUR');\">" . $pgv_lang["add_source"] . "</a>"; print "<br />\n"; print "</td></tr>\n"; // -- end new objects } print "\n\t</table>\n"; } }
?> </td> <td class="optionbox"><input type="text" size="3" name="box_width" value="<?php print $box_width; ?> " /> <b>%</b> </td> <!-- // NOTE: Empty field --> <td class="descriptionbox"> </td><td class="optionbox"> </td></tr> <!-- // NOTE: Descent steps --> <tr><td class="descriptionbox"> <?php print_help_link("fambook_descent_help", "qm"); print $pgv_lang["descent_steps"]; ?> </td> <td class="optionbox"><input type="text" size="3" name="descent" value="<?php print $descent; ?> " /> </td> <!-- // NOTE: Empty field --> <td class="descriptionbox"> </td><td class="optionbox"> </td></tr> <!-- // NOTE: End table and form --> </table></form>
} if (!isset($v_editorfile)) { $v_editorfile = "languages/editor." . $v_lang_shortcut . ".php"; } if (!isset($v_countryfile)) { $v_countryfile = "languages/countries." . $v_lang_shortcut . ".php"; } if (!isset($v_faqlistfile)) { $v_faqlistfile = "languages/faqlist." . $v_lang_shortcut . ".php"; } if (!isset($v_extrafile)) { $v_extrafile = "languages/extra." . $v_lang_shortcut . ".php"; } if ($action != "new_lang") { echo '<tr><td class="facts_label" >'; print_help_link("lang_filenames_help", "qm"); echo $pgv_lang["lang_filenames"]; echo '</td>'; write_td_with_textdir_check(); // Look for missing required language files foreach (array($v_adminfile, $v_config_filename, $v_countryfile, $v_editorfile, $v_factsfile, $v_helpfile, $v_lang_filename) as $key => $fileName) { echo $fileName; if (!file_exists($fileName)) { echo ' <b class="error">', $pgv_lang["file_does_not_exist"], '</b>'; } echo '<br />'; } // Look for missing optional language files foreach (array($v_faqlistfile, $v_extrafile) as $key => $fileName) { echo $fileName; if (!file_exists($fileName)) {
?> </td> <td class="optionbox"> <input type="checkbox" value="1" name="show_spouse" <?php if ($controller->show_spouse) { print " checked=\"checked\""; } ?> /> </td></tr> <!-- // NOTE: Box width --> <tr><td class="descriptionbox"> <?php print_help_link("box_width_help", "qm"); print $pgv_lang["box_width"]; ?> </td> <td class="optionbox"><input type="text" size="3" name="box_width" value="<?php print $controller->box_width; ?> " /> <b>%</b> </td> <!-- // NOTE: Empty field --> <td class="descriptionbox"> </td><td class="optionbox"> </td></tr> <!-- // NOTE: End table and form --> </table></form>
<?php $tabkey++; ?> </tr> <?php print_quick_resn("C" . $i . "DRESN"); ?> </table> </div> <?php $i++; } if (PGV_USER_IS_ADMIN) { echo "<table class=\"facts_table width80\">\n"; echo "<tr><td class=\"descriptionbox ", $TEXT_DIRECTION, " wrap\">"; print_help_link("no_update_CHAN_help", "qm"); echo $pgv_lang["admin_override"], "</td><td class=\"optionbox wrap\">\n"; if ($NO_UPDATE_CHAN) { echo "<input type=\"checkbox\" checked=\"checked\" name=\"preserve_last_changed\" />\n"; } else { echo "<input type=\"checkbox\" name=\"preserve_last_changed\" />\n"; } echo $pgv_lang["no_update_CHAN"], "<br />\n"; echo "</td></tr>\n"; echo "</table>"; } ?> <input type="submit" value="<?php echo $pgv_lang["save"]; ?> " />
echo '<option value="', $i, '"'; if ($i == $OLD_PGENS) { echo ' selected="selected"'; } echo '>', $i, '</option>'; } ?> </select> </td> <!-- // NOTE: show full --> <td class="descriptionbox"> <?php print_help_link("show_full_help", "qm", "show_details"); echo $pgv_lang["show_details"]; ?> </td> <td class="optionbox"> <input type="checkbox" value=" <?php if ($controller->show_full) { echo '1" checked="checked" onclick="document.people.show_full.value=\'0\';'; } else { echo '0" onclick="document.people.show_full.value=\'1\';'; } ?> " /> </td></tr>
if (!$ENABLE_RSS) { print "selected=\"selected\""; } ?> ><?php print $pgv_lang["no"]; ?> </option> </select> </td> </tr> <tr> <td class="descriptionbox wrap width20"><?php print_help_link("RSS_FORMAT_help", "qm", "RSS_FORMAT"); print $pgv_lang["RSS_FORMAT"]; ?> </td> <td class="optionbox"><select name="NEW_RSS_FORMAT" dir="ltr" tabindex="<?php $i++; print $i; ?> " onfocus="getHelp('RSS_FORMAT_help');"> <option value="ATOM" <?php if ($RSS_FORMAT == "ATOM") { print "selected=\"selected\""; } ?> >ATOM 1.0</option> <!--option value="ATOM0.3" <?php
print "<tr>\n"; print "<td class=\"descriptionbox\">"; print_help_link("SHOW_ID_NUMBERS_help", "qm"); print $pgv_lang["SHOW_ID_NUMBERS"]; print "</td>\n"; print "<td class=\"optionbox\">\n"; print "<input name=\"showids\" type=\"checkbox\" value=\"1\""; if ($showids) { print " checked=\"checked\""; } print " /></td>\n</tr>\n"; } if ($SHOW_HIGHLIGHT_IMAGES) { print "<tr>\n"; print "<td class=\"descriptionbox\">"; print_help_link("SHOW_HIGHLIGHT_IMAGES_help", "qm"); print $pgv_lang["SHOW_HIGHLIGHT_IMAGES"]; print "</td>\n"; print "<td class=\"optionbox\">\n"; print "<input name=\"showthumbs\" type=\"checkbox\" value=\"1\""; if ($showthumbs) { print " checked=\"checked\""; } print " /></td>\n</tr>\n"; } print "</table>"; print "</form>\n"; } print "</td></tr></table>"; // process the tree $treeid = ancestry_array($rootid, 5);
var elements = document.getElementsByName('to_delete[]'); for(i=0; i<elements.length; i++) { node = elements[i]; if (!node.attributes.warn) node.checked = true; } document.delete_form.submit(); } // --> </script> <button type="submit"><?php print $pgv_lang["delete"]; ?> </button> <button type="button" onclick="ul_clear(); return false;"><?php print $pgv_lang["cancel"]; ?> </button><br /><br /> <button type="button" onclick="removeAll(); return false;"><?php print $pgv_lang["remove_all_files"]; ?> </button> <?php print_help_link("help_dir_editor.php", "qm", '', false, false); ?> </td> </tr> </table> </form> <?php print_footer();
/** * Print a new fact box on details pages * @param string $id the id of the person,family,source etc the fact will be added to * @param array $usedfacts an array of facts already used in this record * @param string $type the type of record INDI, FAM, SOUR etc */ function print_add_new_fact($id, $usedfacts, $type) { global $factarray, $pgv_lang; global $INDI_FACTS_ADD, $FAM_FACTS_ADD, $SOUR_FACTS_ADD, $REPO_FACTS_ADD; global $INDI_FACTS_UNIQUE, $FAM_FACTS_UNIQUE, $SOUR_FACTS_UNIQUE, $REPO_FACTS_UNIQUE; global $INDI_FACTS_QUICK, $FAM_FACTS_QUICK, $SOUR_FACTS_QUICK, $REPO_FACTS_QUICK; switch ($type) { case "INDI": $addfacts = preg_split("/[, ;:]+/", $INDI_FACTS_ADD, -1, PREG_SPLIT_NO_EMPTY); $uniquefacts = preg_split("/[, ;:]+/", $INDI_FACTS_UNIQUE, -1, PREG_SPLIT_NO_EMPTY); $quickfacts = preg_split("/[, ;:]+/", $INDI_FACTS_QUICK, -1, PREG_SPLIT_NO_EMPTY); break; case "FAM": $addfacts = preg_split("/[, ;:]+/", $FAM_FACTS_ADD, -1, PREG_SPLIT_NO_EMPTY); $uniquefacts = preg_split("/[, ;:]+/", $FAM_FACTS_UNIQUE, -1, PREG_SPLIT_NO_EMPTY); $quickfacts = preg_split("/[, ;:]+/", $FAM_FACTS_QUICK, -1, PREG_SPLIT_NO_EMPTY); break; case "SOUR": $addfacts = preg_split("/[, ;:]+/", $SOUR_FACTS_ADD, -1, PREG_SPLIT_NO_EMPTY); $uniquefacts = preg_split("/[, ;:]+/", $SOUR_FACTS_UNIQUE, -1, PREG_SPLIT_NO_EMPTY); $quickfacts = preg_split("/[, ;:]+/", $SOUR_FACTS_QUICK, -1, PREG_SPLIT_NO_EMPTY); break; case "REPO": $addfacts = preg_split("/[, ;:]+/", $REPO_FACTS_ADD, -1, PREG_SPLIT_NO_EMPTY); $uniquefacts = preg_split("/[, ;:]+/", $REPO_FACTS_UNIQUE, -1, PREG_SPLIT_NO_EMPTY); $quickfacts = preg_split("/[, ;:]+/", $REPO_FACTS_QUICK, -1, PREG_SPLIT_NO_EMPTY); break; default: return; } $addfacts = array_merge(CheckFactUnique($uniquefacts, $usedfacts, $type), $addfacts); $quickfacts = array_intersect($quickfacts, $addfacts); usort($addfacts, "factsort"); print "<tr><td class=\"descriptionbox\">"; print_help_link("add_new_facts_help", "qm"); print $pgv_lang["add_fact"] . "</td>"; print "<td class=\"optionbox\">"; print "<form method=\"get\" name=\"newfactform\" action=\"\" onsubmit=\"return false;\">\n"; print "<select id=\"newfact\" name=\"newfact\">\n"; foreach ($addfacts as $indexval => $fact) { print PrintReady("<option value=\"{$fact}\">" . $factarray[$fact] . " [" . $fact . "]</option>\n"); } if ($type == "INDI" || $type == "FAM") { print "<option value=\"EVEN\">" . $pgv_lang["custom_event"] . " [EVEN]</option>\n"; } if (!empty($_SESSION["clipboard"])) { foreach ($_SESSION["clipboard"] as $key => $fact) { if ($fact["type"] == $type || $fact["type"] == 'all') { print "<option value=\"clipboard_{$key}\">" . $pgv_lang["add_from_clipboard"] . " " . $factarray[$fact["fact"]] . "</option>\n"; } } } print "</select>"; print "<input type=\"button\" value=\"" . $pgv_lang["add"] . "\" onclick=\"add_record('{$id}', 'newfact');\" />\n"; foreach ($quickfacts as $k => $v) { echo " <small><a href='javascript://{$v}' onclick=\"add_new_record('{$id}', '{$v}');return false;\">" . $factarray["{$v}"] . "</a></small> "; } print "</form>\n"; print "</td></tr>\n"; }
function print_yahrzeit_config($config) { global $pgv_lang, $PGV_BLOCKS, $DAYS_TO_SHOW_LIMIT; if (empty($config)) { $config = $PGV_BLOCKS["print_yahrzeit"]["config"]; } if (empty($config['infoStyle'])) { $config['infoStyle'] = 'style2'; } if (empty($config['allowDownload'])) { $config['allowDownload'] = 'yes'; } if (empty($config['days'])) { $config['days'] = $DAYS_TO_SHOW_LIMIT; } if ($config['days'] < 1) { $config['days'] = 1; } if ($config['days'] > $DAYS_TO_SHOW_LIMIT) { $config['days'] = $DAYS_TO_SHOW_LIMIT; } print '<tr><td class="descriptionbox wrap width33">'; print_help_link('days_to_show_help', 'qm'); print $pgv_lang['days_to_show']; print '</td><td class="optionbox">'; print '<input type="text" name="days" size="2" value="' . $config['days'] . '" />'; print '</td></tr>'; print '<tr><td class="descriptionbox wrap width33">'; print_help_link('style_help', 'qm'); print $pgv_lang['style']; print '</td><td class="optionbox">'; print '<select name="infoStyle">'; foreach (array('style1', 'style2') as $style) { print "<option value=\"{$style}\""; if ($config['infoStyle'] == $style) { print " selected=\"selected\""; } print ">{$pgv_lang[$style]}</option>"; } print '</select></td></tr>'; print '<tr><td class="descriptionbox wrap width33">'; print_help_link("cal_dowload_help", "qm"); print $pgv_lang["cal_download"]; print '</td><td class="optionbox">'; print '<select name="allowDownload">'; foreach (array('yes', 'no') as $value) { print "<option value=\"{$value}\""; if ($config['allowDownload'] == $value) { print " selected=\"selected\""; } print ">{$pgv_lang[$value]}</option>"; } print '</select>'; // Cache file life is not configurable by user: anything other than 1 day doesn't make sense print '<input type="hidden" name="cache" value="1" />'; print '</td></tr>'; }
function print_todays_events_config($config) { global $pgv_lang, $PGV_BLOCKS; if (empty($config)) { $config = $PGV_BLOCKS["print_todays_events"]["config"]; } if (!isset($config["filter"])) { $config["filter"] = "all"; } if (!isset($config["onlyBDM"])) { $config["onlyBDM"] = "no"; } if (!isset($config["infoStyle"])) { $config["infoStyle"] = "style2"; } if (!isset($config["sortStyle"])) { $config["sortStyle"] = "alpha"; } if (!isset($config["allowDownload"])) { $config["allowDownload"] = "yes"; } ?> <tr><td class="descriptionbox wrap width33"> <?php print $pgv_lang["living_or_all"]; ?> </td><td class="optionbox"> <select name="filter"> <option value="all"<?php if ($config["filter"] == "all") { print " selected=\"selected\""; } ?> ><?php print $pgv_lang["no"]; ?> </option> <option value="living"<?php if ($config["filter"] == "living") { print " selected=\"selected\""; } ?> ><?php print $pgv_lang["yes"]; ?> </option> </select> </td></tr> <tr><td class="descriptionbox wrap width33"> <?php print_help_link("basic_or_all_help", "qm"); print $pgv_lang["basic_or_all"]; ?> </td><td class="optionbox"> <select name="onlyBDM"> <option value="no"<?php if ($config["onlyBDM"] == "no") { print " selected=\"selected\""; } ?> ><?php print $pgv_lang["no"]; ?> </option> <option value="yes"<?php if ($config["onlyBDM"] == "yes") { print " selected=\"selected\""; } ?> ><?php print $pgv_lang["yes"]; ?> </option> </select> </td></tr> <tr><td class="descriptionbox wrap width33"> <?php print_help_link("style_help", "qm"); print $pgv_lang["style"] . "</td>"; ?> <td class="optionbox"> <select name="infoStyle"> <option value="style1"<?php if ($config["infoStyle"] == "style1") { print " selected=\"selected\""; } ?> ><?php print $pgv_lang["style1"]; ?> </option> <option value="style2"<?php if ($config["infoStyle"] == "style2") { print " selected=\"selected\""; } ?> ><?php print $pgv_lang["style2"]; ?> </option> </select> </td></tr> <tr><td class="descriptionbox wrap width33"> <?php print_help_link("sort_style_help", "qm"); print $pgv_lang["sort_style"] . "</td>"; ?> <td class="optionbox"> <select name="sortStyle"> <option value="alpha"<?php if ($config["sortStyle"] == "alpha") { print " selected=\"selected\""; } ?> ><?php print $pgv_lang["by_alpha"]; ?> </option> <option value="anniv"<?php if ($config["sortStyle"] == "anniv") { print " selected=\"selected\""; } ?> ><?php print $pgv_lang["by_anniv"]; ?> </option> </select> </td></tr> <tr><td class="descriptionbox wrap width33"> <?php print_help_link("cal_dowload_help", "qm"); print $pgv_lang["cal_download"] . "</td>"; ?> <td class="optionbox"> <select name="allowDownload"> <option value="yes"<?php if ($config["allowDownload"] == "yes") { print " selected=\"selected\""; } ?> ><?php print $pgv_lang["yes"]; ?> </option> <option value="no"<?php if ($config["allowDownload"] == "no") { print " selected=\"selected\""; } ?> ><?php print $pgv_lang["no"]; ?> </option> </select> <input type="hidden" name="cache" value="1" /> </td></tr> <?php }
" /> <input type="hidden" name="ged" id="ged" value="<?php echo $ged; ?> " /> <input type="submit" value="<?php echo $pgv_lang['view']; ?> " /> <input type="submit" value="<?php echo $pgv_lang['random_surn']; ?> " onclick="document.surnlist.surn.value='*';" /> <p class="details1"> <?php print_help_link("soundex_search_help", "qm", "soundex_search"); echo $pgv_lang["soundex_search"]; ?> <br /> <input type="checkbox" name="soundex_std" id="soundex_std" value="1" <?php if ($soundex_std) { echo " checked=\"checked\""; } ?> /> <label for="soundex_std"><?php echo $pgv_lang["search_russell"]; ?> </label> <input type="checkbox" name="soundex_dm" id="soundex_dm" value="1" <?php if ($soundex_dm) {
} print "</select>\n\n"; print_help_link("add_new_language_help", "qm"); print "</td>"; print "<td class=\"facts_value center\"><input type=\"submit\" value=\"" . $pgv_lang["add_new_lang_button"] . "\" onclick=\"return helpPopup03('" . "action=new_lang" . "&" . session_name() . "=" . session_id() . "'); \" /></td></tr>"; $USERLANG = $LANGUAGE; break; case "editold": default: print "<form name=\"lang_config_form\" method=\"get\" action=\"" . PGV_SCRIPT_NAME . "\">"; print "<input type=\"hidden\" name=\"" . session_name() . "\" value=\"" . session_id() . "\" />"; print "<input type=\"hidden\" name=\"action\" value=\"config_lang\" />"; print "<table class=\"facts_table center {$TEXT_DIRECTION}\" style=\"width:70%; \">"; print "<tr><td class=\"facts_label03\" colspan=\"7\">"; print $pgv_lang["config_lang_utility"]; print_help_link("config_lang_utility_help", "qm"); print "</td></tr>"; print "<tr>"; // Column headings, left set print "<td class=\"facts_label03\">"; print $pgv_lang["lang_language"]; print "</td>"; print "<td class=\"facts_label03\">"; print $pgv_lang["active"]; print "</td>"; print "<td class=\"facts_label03\">"; print $pgv_lang["edit_settings"]; print "</td>"; // Separator print "<td class=\"facts_label03\">" . " " . "</td>"; // Column headings, right set
function print_quick_resn($name) { global $SHOW_QUICK_RESN, $align, $factarray, $pgv_lang, $tabkey; if ($SHOW_QUICK_RESN) { echo "<tr><td class=\"descriptionbox\">"; print_help_link("RESN_help", "qm"); echo $factarray["RESN"]; echo "</td>\n"; echo "<td class=\"optionbox\" colspan=\"3\">\n"; echo "<select name=\"{$name}\" tabindex=\"" . $tabkey . "\" ><option value=\"\"></option><option value=\"confidential\""; $tabkey++; echo ">" . $pgv_lang["confidential"] . "</option><option value=\"locked\""; echo ">" . $pgv_lang["locked"] . "</option><option value=\"privacy\""; echo ">" . $pgv_lang["privacy"] . "</option>"; echo "</select>\n"; echo "</td>\n"; echo "</tr>\n"; } }
print $pgv_lang["add_father"]; ?> " onclick="return addnewparentfamily('', 'HUSB', '<?php print $controller->famid; ?> ');"><?php print $pgv_lang["add_father"]; ?> </a><br /> <?php } $wife = $controller->getWife(); if (empty($wife)) { ?> <?php print_help_link("edit_add_parent_help", "qm"); ?> <a href="javascript <?php print $pgv_lang["add_mother"]; ?> " onclick="return addnewparentfamily('', 'WIFE', '<?php print $controller->famid; ?> ');"><?php print $pgv_lang["add_mother"]; ?> </a><br /> <?php } } ?>
echo '</td><td rowspan="2" class="topbottombar">'; echo '<input type="submit" value="', $pgv_lang["view"], '" />'; echo '</td></tr>'; echo '<tr><td class="descriptionbox">'; print_help_link('desc_generations_help', 'qm'); echo $pgv_lang['generations'], ' </td>'; echo '<td class="optionbox vmiddle"><select name="generations">'; for ($i = 2; $i <= $MAX_DESCENDANCY_GENERATIONS; $i++) { echo '<option value="', $i, '"'; if ($i == $controller->generations) { echo ' selected="selected"'; } echo '>', $i, '</option>'; } echo '</select></td><td class="descriptionbox">'; print_help_link('show_full_help', 'qm'); echo $pgv_lang['show_details']; echo '</td><td class="optionbox vmiddle"><input type="checkbox" value="'; if ($controller->show_full) { echo '1" checked="checked" onclick="document.people.show_full.value=\'0\';"'; } else { echo '0" onclick="document.people.show_full.value=\'1\';"'; } echo '/></td></tr></table></form>'; } echo '</td></tr></table>'; if (is_null($controller->descPerson)) { echo '<span class="error">', $pgv_lang['record_not_found'], '</span>'; } $controller->generations -= 1; // [ 1757792 ] Charts : wrong generations count