Example #1
0
                            break;
                    }
                    if ($count) {
                        if ($show == 'indi' && $givn_initial == $falpha && $show_all_firstnames == 'no') {
                            $list[] = '<a class="warning" href="' . $url . '&amp;falpha=' . rawurlencode($givn_initial) . '" title="' . WT_I18N::number($count) . '">' . $html . '</a>';
                        } else {
                            $list[] = '<a href="' . $url . '&amp;falpha=' . rawurlencode($givn_initial) . '" title="' . WT_I18N::number($count) . '">' . $html . '</a>';
                        }
                    } else {
                        $list[] = $html;
                    }
                }
                // Search spiders don't get the "show all" option as the other links give them everything.
                if (!$SEARCH_SPIDER) {
                    if ($show_all_firstnames == 'yes') {
                        $list[] = '<span class="warning">' . WT_I18N::translate('All') . '</span>';
                    } else {
                        $list[] = '<a href="' . $url . '&amp;show_all_firstnames=yes">' . WT_I18N::translate('All') . '</a>';
                    }
                }
                if ($show_all == 'no') {
                    echo '<h2 class="center">', WT_I18N::translate('Individuals with surname %s', $legend), '</h2>';
                }
                echo '<p class="center alpha_index">', join(' | ', $list), '</p>';
            }
        }
        if ($show == 'indi') {
            echo format_fam_table(WT_Query_Name::families($surname, $alpha, $falpha, $show_marnm, WT_GED_ID));
        }
    }
}
Example #2
0
 public function getSurnameFams($alpha, $surname)
 {
     $families = WT_Query_Name::families($surname, $alpha, '', true, WT_GED_ID);
     $out = '<ul>';
     foreach ($families as $family) {
         if ($family->canShowName()) {
             $out .= '<li><a href="' . $family->getHtmlUrl() . '">' . $family->getFullName() . ' ';
             if ($family->canShow()) {
                 $marriage_year = $family->getMarriageYear();
                 if ($marriage_year) {
                     $out .= ' (' . $marriage_year . ')';
                 }
             }
             $out .= '</a></li>';
         }
     }
     $out .= '</ul>';
     return $out;
 }