#!/usr/bin/perl # ########################################################################### # # Display Marriage Database # Written by: Pam Carey Durstock (c) 1999 # ########################################################################### # use Text::Soundex; print "Content-type: text/html\n\n"; $tmp=$ENV{'QUERY_STRING'}; if ($tmp=~/^more/) {&more;} else {&LoadVars;} $surname=$FORM{'surname'}; $soundex=$FORM{'soundex'}; # # Display the page # print "Mercer Co. Area Marriages\n

\n"; print "\n"; #print "\n"; open (MENU, "../menu.txt"); while (

) {print;} close (MENU); print "
\n"; print "

Mercer Co. Area Marriages

\n"; print "This page was originally started with data from my own "; print "database.
It now contains over 2,100 marriages - thanks to your "; print "contributions!

\n"; print "I hope you'll continue to help this page grow by contributing "; print "a marriage or two of your own.
\n"; print "It's easy! Click HERE to use the automated entry "; print "form.\n"; print "


\n"; print "

\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "Enter Surname To Display: \n"; print "
\n"; print "**Hint** You can enter whole or partial surnames. "; print "This will hopefully catch most spelling variations.
\n"; print "
\n"; print "Ex: vine will yield Devine, "; print "Divine, Irvine
\n"; print " van will yield Vanarsdall, Vanarsdale, Vanosdol, Vannice, "; print "Van Nuys, \n"; print "Vandivier, Vandeveer, etc.
\n"; print "
CAUTION!\n"; print "A minimum of 3 letters is required. Be creative!

\n"; #print " Do Soundex Search

\n"; print "

\n"; # # Select which records to print # if ($surname) { $length=length ($surname); &error if ($length < 3); print "


If you don't find what you're looking for below, "; print "it's probably because you haven't submitted it yet (g).
Please consider "; print "becoming a contributor to this page.
\n"; print "
\n"; print "\n"; print "\n"; open(db,'/u1/home0001/usa/ky/kymercer/public_html/datfiles/marriages-long.dat') || die "Error opening database"; while () { chop; # Groom Surname, Groom First Name, Groom Age, Bridge Surname, Bride FirstName, # Bride Age, Day, Month, Year, Bond Day, Bond Month, Bond Year, # Bondsmen, Witnesses, Officiator, County, Source Type, Other, Submitter, Email ($glast,$gfirst,$blast,$bfirst,$day,$month,$year,$email,$submitter,$gage,$bage,$bday,$bmonth,$byear,$bondsman,$wit,$officiator,$county,$source,$other)=split(/&/,$_); # $gsdx=soundex ($glast); # $bsdx=soundex ($glast); # if ($soundex eq "yes") { # if (($gsdx eq $code) || ($bsdx eq $code)) { # push(@list,"$glast&$gfirst&$blast&$bfirst&$day&$month&$year&$email&$submitter&$gage&$bage&$bday&$bmonth&$byear&$bondsman&$wit&$officiator&$county&$source&$other"); # } # } # else { if ($glast=~/$surname(.*)/i) { push(@list,"$glast&$gfirst&$blast&$bfirst&$day&$month&$year&$email&$submitter&$gage&$bage&$bday&$bmonth&$byear&$bondsman&$wit&$officiator&$county&$source&$other"); } elsif ($blast=~/$surname(.*)/i) { push(@list,"$glast&$gfirst&$blast&$bfirst&$day&$month&$year&$email&$submitter&$gage&$bage&$bday&$bmonth&$byear&$bondsman&$wit&$officiator&$county&$source&$other"); } # } } foreach $entry (sort @list) { ($glast,$gfirst,$blast,$bfirst,$day,$month,$year,$email,$submitter,$gage,$bage,$bday,$bmonth,$byear,$bondsman,$wit,$officiator,$county,$source,$other)=split(/&/,$entry); print ""; print ""; $entry =~ s/&/;/g; $entry =~ s/ /_/g; if ($byear) {print "\n";} elsif ($gage) {print "\n";} elsif ($bage) {print "\n";} elsif ($bondsman) {print "\n";} elsif ($wit) {print "\n";} elsif ($officiator) {print "\n";} elsif ($source) {print "\n";} elsif ($other) {print "\n";} else {print "\n";} } } print "
\n"; $code=soundex ($surname); # if ($soundex="yes") {print "Soundex Search for $surname ($code)\n";} # else { print "Surname: $surname\n"; # } print "
GroomBrideDateSubmitter"; print "Add'l Info
$glast, $gfirst$bfirst $blast$day $month $year$submitterMore
More
More
More
More
More
More
More
 
"; print "
\n"; print "Back To Mercer County, Ky Genealogy"; print "

\n"; print "


\n"; print " Pam Carey Ison / kymercer01\@bellsouth.net\n"; print "
\n"; print "\n"; print "\n"; # # Subroutine to load passed data into FORM array # sub LoadVars { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name,$value)=split(/=/,$pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg; $FORM{$name} = $value; } } # # Subroutine to display additional information on each marriage # sub more { if ($tmp =~ /^more\;(.*)/) { $rest=$1; $rest =~ s/_/ /g; } ($glast,$gfirst,$blast,$bfirst,$day,$month,$year,$email,$submitter,$gage,$bage,$bday,$bmonth,$byear,$bondsman,$wit,$officiator,$county,$source,$other)=split(/;/,$rest); $day="??" unless ($day); $month="???" unless ($month); $year="????" unless ($year); $bday="??" unless ($bday); $bmonth="???" unless ($bmonth); $byear="????" unless ($byear); print "
Additional Information\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "
$gfirst $glast m. $bfirst $blast on $day $month $year
Groom's age: $gageBride's age: $bage
Bond Date: $bday $bmonth $byearBondsman: $bondsman
Witness: $witOfficiator: $officiator
County: $countySource: $source
Other: $otherSubmitted by: $submitter

\n"; print "Use your 'Back' button to return to the list of marriages, "; print "or click HERE to search for more.

\n"; print "


\n"; print "Back To Mercer County, Ky Genealogy"; print "

\n"; print "


\n"; print " Pam Carey Durstock / kymercer\@fuse.net\n"; print "
\n"; print "\n"; print "\n"; exit; } sub error { print "

Wrong Format

\n"; print "You must enter at least 3 letters of the surname. Please try again.

\n"; print "

\n\n"; exit; }