include("config.php"); include("genlib.php"); $textpart = "surnames"; include("getlang.php"); include("$mylanguage/text.php"); db_connect($database_host,$database_name,$database_username,$database_password) or exit; $query = "SELECT gedcom, ucase(gedcom) as uged FROM $trees_table ORDER BY uged"; $treeresult = mysql_query($query) or die ("$admtext[cannotexecutequery]: $query"); $numtrees = mysql_numrows($treeresult); ?>
echo $text[surnamelist]; ?>
echo $text[newsearch]; ?> | echo $text[homepage]; ?>
if( $numtrees > 1 ) { ?> } $linkstr = ""; $linkstr2col1 = ""; $linkstr2col2 = ""; $linkstr3col1 = ""; $linkstr3col2 = ""; $nosurname = urlencode($text[nosurname]); if( $tree ) $wherestr = "WHERE gedcom = \"$tree\""; else $wherestr = ""; $query = "SELECT ucase(left(lastname,1)) as firstchar, ucase( binary(left(lastname,1) ) ) as binfirstchar FROM $people_table $wherestr GROUP BY binfirstchar ORDER by binfirstchar"; $result = mysql_query($query) or die ("$text[cannotexecutequery]: $query"); if( $result ) { $initialchar = 1; while( $surname = mysql_fetch_assoc( $result ) ) { if( $initialchar != 1 ) { $linkstr .= " | "; } if( $surname[firstchar] == "" ) $linkstr .= "$text[nosurname]"; else { $urlfirstchar = urlencode($surname[firstchar]); $linkstr .= "$surname[firstchar]"; } $initialchar++; } mysql_free_result($result); } $query = "SELECT ucase(left(lastname,1)) as firstchar, ucase( binary(left(lastname,1) ) ) as binfirstchar, count( ucase( left( lastname,1) ) ) as lncount FROM $people_table $wherestr GROUP BY binfirstchar ORDER by lncount DESC"; $result = mysql_query($query) or die ("$text[cannotexecutequery]: $query"); if( $result ) { $namectr = 0; while( $surname = mysql_fetch_assoc( $result ) ) { if( $namectr <13 ) { if( $surname[firstchar] == "" ) $linkstr2col1 .= "$text[nosurname] ($surname[lncount])
$text[byoccurrence] ($text[totalnames]):"; ?> |
|
|||
echo $linkstr2col1; ?> | echo $linkstr2col2; ?> | echo $linkstr3col1; ?> | echo $linkstr3col2; ?> |