} $listHash = $_REQUEST; $listHash['sub_total'] = $total; $listHash['total_records'] = $n; $gBitSmarty->assign_by_ref("surnames", $surname_list); $gBitSmarty->assign_by_ref('listInfo', $listHash); } else { if ($surname_sublist == "yes" && empty($surname) && $show_all == "no") { if (!isset($alpha)) { $alpha = ""; } $tfamlist = get_famlist_surns($surname, $alpha, $SHOW_MARRIED_NAMES, $gGedcom->mGEDCOMId); $surnames = array(); $fam_hide = array(); foreach ($tfamlist as $gid => $fam) { if (displayDetailsByID($gid, "FAM") || showLivingNameById($gid, "FAM")) { foreach ($fam as $key => $name) { // $lname = strip_prefix($name); // if (empty($lname)) $lname = $name; // $firstLetter=get_first_letter($lname); // if ($alpha==$firstLetter) surname_count(trim($name)); $surnames[$gid]['match'] = count($fam[$key]); } } else { $fam_hide[$gid . "[" . $fam["gedfile"] . "]"] = 1; } $surnames[$gid]['name'] = $gid; } $i = 0; // uasort($surnames, "itemsort"); asort($surnames);
/** * Print all of the notes in this fact record * @param string $factrec the factrecord to print the notes from * @param int $level The level of the factrecord */ function print_fact_notes($factrec, $level) { global $pgv_lang; global $factarray; global $WORD_WRAPPED_NOTES; $nlevel = $level + 1; $ct = preg_match_all("/{$level} NOTE(.*)/", $factrec, $match, PREG_SET_ORDER); for ($j = 0; $j < $ct; $j++) { $spos1 = strpos($factrec, $match[$j][0]); $spos2 = strpos($factrec, "\n{$level}", $spos1 + 1); if (!$spos2) { $spos2 = strlen($factrec); } $nrec = substr($factrec, $spos1, $spos2 - $spos1); if (!isset($match[$j][1])) { $match[$j][1] = ""; } $nt = preg_match("/@(.*)@/", $match[$j][1], $nmatch); $closeSpan = false; if ($nt == 0) { //-- print embedded note records $closeSpan = print_note_record($match[$j][1], $nlevel, $nrec); } else { if (displayDetailsByID($nmatch[1], "NOTE")) { //-- print linked note records $noterec = find_gedcom_record($nmatch[1]); $nt = preg_match("/0 @{$nmatch['1']}@ NOTE (.*)/", $noterec, $n1match); $closeSpan = print_note_record($nt > 0 ? $n1match[1] : "", 1, $noterec); if (preg_match("/1 SOUR/", $noterec) > 0) { print "<br />\n"; print_fact_sources($noterec, 1); } } } if (preg_match("/{$nlevel} SOUR/", $factrec) > 0) { print "<div class=\"indent\">"; print_fact_sources($nrec, $nlevel); print "</div>"; } if ($closeSpan) { print "</span>"; } } }
if ($surname_sublist == "yes" && empty($surname) && $show_all == "no") { if (!isset($alpha)) { $alpha = ""; } $tindilist = array(); // get all of the individuals whose last names start with this letter $tindilist = get_alpha_indis($alpha); $surnames = array(); $indi_hide = array(); $indi_dead = 0; $indi_unborn = 0; $indi_alive = 0; $temp = 0; $surnames = array(); foreach ($tindilist as $gid => $indi) { if (displayDetailsByID($gid) || showLivingNameById($gid)) { $ret = check_alive($indi["gedcom"], $year); if ($ret == 0) { $indi_alive++; foreach ($indi["names"] as $name) { if ($LANGUAGE == "danish" || $LANGUAGE == "norwegian") { if ($alpha == "Ø") { $text = "OE"; } else { if ($alpha == "Æ") { $text = "AE"; } else { if ($alpha == "Å") { $text = "AA"; } }