Search Cemetery Records

\n"; echo " \n"; //echo " "; //echo " "; //echo " "; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; // // revise? // // echo " "; // echo " "; // echo " "; echo "
Search Cemetery Records Form
First Name:
Last Name:

Help

Please note that the data is live but incomplete,
this is a work in progress.

"; echo " \n"; echo "
\n"; echo "

You can enter a search term in one or both text boxes.

"; echo "

If you enter something into each box, the engine searches based on all of the entered characters. For example, entering 'John' in the First Name box, and 'Smith' in the Last Name box will return only John Smiths.

"; echo "

If you are unsure of spelling, the percent sign '%' can be used as a wildcard. For example, entering 'John' in the First Name box, and 'Sm%' in Last Name searches all First Names that match 'John', and Last Names that begin with 'Sm' and might return 'John Smith' and 'John Smythe'

"; echo "

Likewise, entering '%ar%' in First Name, might return 'Mary', 'Mark', and 'Marie'.

"; echo "

There is no case sensitivity. If all fields are left blank, all records are returned.

"; echo "

For further assistance, please contact us.

\n"; echo "
\n"; }else{ if ($strFName != null && $strFName != "" ){ $search_query .= "where firstName like '".$strFName."' "; } if ($strLName != null && $strLName != "" ){ if (strpos($search_query, "where") == 174){ $search_query .= "and lastName like '".$strLName."' "; } else{ $search_query .= "where lastName like '".$strLName."' "; } } $search_query .= " order by lastName, firstName, middleName"; // mysql_connect("localhost", "johnt_johnt", "ZS44GR9Vbs") or die("Could Not Connect"); // mysql_connect("localhost", "pete", "purple") or die("Could Not Connect"); //echo $search_query; //echo strpos($search_query, "where"); // $result = mysql_db_query("johnt_ctfarmsorgcemetery", $search_query) or die("Query Failed"); $mysqli = new mysqli("ctfarms.org", "johnt_johnt", "ZS44GR9Vbs", "johnt_ctfarmsorgcemetery"); $result = $mysqli->query($search_query); echo ""; $num = mysqli_num_rows($result); $path = ""; $headStoneImg = ""; $rowcounter = 0; if ($num==0){ echo "\n"; echo " \n\n"; }else{ echo "\n"; echo " \n"; echo "\n"; while ($row = mysqli_fetch_row($result)){ $bgcolor = ($rowcounter % 2) ? "white" : "gray"; $id = $row[0]; $lname = $row[1]; $fname = $row[2]; $mname = $row[3]; $suffix = $row[4]; $title = $row[5]; $rank = $row[6]; $conflict = $row[7]; $relation = $row[8]; $dob = $row[9]; $dod = $row[10]; $age = $row[11]; $notes = $row[12]; $file = $row[13]; $location = $row[14]; $calculated = $row[15]; $source = $row[16]; $seeAlso = $row[17]; $rowspan=1; $rowcounter = $rowcounter + 1; if ($file == null or $file == ""){ $path = "graphics/test.gif"; $headStoneImg = "\"no"; $link = ""; $linkend = ""; }else{ $path = "images/stones/".$file; $link = ""; $headStoneImg = "\"".$lname.""; $linkend = ""; } if ($suffix == null or $suffix == ""){ $suffix = ""; }else{ $suffix = " ".$suffix; } if ($title == null or $title == ""){ $title = ""; }else{ $title = $title." "; } if ($rank == null or $rank == ""){ $rank = ""; }else{ $rank = $rank.", "; } if ($fname == null or $fname == ""){ $fname = ""; }else{ $fname = $fname." "; } if ($mname == null or $mname == ""){ $mname = ""; }else{ $mname = $mname." "; } if ($conflict != null or $conflict != ""){ $rowspan = $rowspan + 1; } if ($relation != null or $relation != ""){ $rowspan = $rowspan + 1; } if ($dod != null or $dod != ""){ $rowspan = $rowspan + 1; } if ($notes != null or $notes != ""){ $rowspan = $rowspan + 1; } if (($location != null or $location != "") or ($calculated != null or $calculated != "") or ($source != null or $source != "") or ($seeAlso != null or $seeAlso != "")){ $lastRow = true; $rowspan = $rowspan + 1; } echo "\n"; echo "\n\n\n"; if ($conflict != null or $conflict != ""){ echo "\n"; echo "\n\n"; } if ($relation != null or $relation != ""){ echo "\n"; echo "\n\n"; } if ($dod != null or $dod != ""){ echo "\n"; echo "\n\n"; } if ($notes != null or $notes != ""){ echo "\n"; echo "\n\n"; } if ($lastRow){ echo "\n"; echo "\n\n"; }//lastrow if ($num > 20){ if ($rowcounter%10 == 0){ echo "\n"; echo "\n\n"; } } $i++;}//while // echo "\n"; // echo "\n\n"; } /*} else{ echo "\n"; echo "\n\n"; }*/ echo "

There were no matches found

"; echo "

Results

"; echo $title; echo $fname; echo $mname; echo ucwords(strtolower($lname)); echo $suffix; echo ""; echo $link.$headStoneImg.$linkend; //echo ""; echo "
Service: "; echo $rank.$conflict; echo "
Relation: "; echo ucfirst($relation); echo "
"; if ($dob != null or $dob != ""){ echo "Date of birth: ".$dob."   "; } echo "Date of death: ".$dod; if ($age != null or $age != ""){ echo "   Aged: ".$age; } echo "
Notes: "; echo ucfirst($notes); echo "

Cemetery location: "; switch($location){ case 'u': $location = "site undetermined"; break; default: $location = $location; } echo $location; echo "

\n"; if($source != null or $source != ""){ echo "

Source: "; switch($source){ case 'CF': $source = "Connecticut Farms Church"; break; case 'NJHS': $source = "New Jersey Historical Society"; break; case 'DAR': $source = "Daughters of the American Revolution compilation"; break; case 'NJHS & DAR': $source = "New Jersey Historical Society and Daughters of the American Revolution compilation"; break; case 'VA': $source = "Office of the Veteran's Affairs"; break; case 'DAR & VA': $source = "Daughters of the American Revolution compilatio and Office of the Veteran's Affairs"; break; case 'NJHS & CF': $source = "New Jersey Historical Society and Connecticut Farms Church"; break; default: $source = $source; break; } echo $source; echo "

\n"; } switch($calculated){ case 'a': $calcCode = "

Age was calculated and may not be accurate

\n"; break; case 'b': $calcCode = "

Date of birth was calculated and may not be accurate

\n"; break; default: $calcCode = ""; break; } echo $calcCode; if($seeAlso != null or $seeAlso != ""){ echo "

"; $seeAlsoArray = explode(", ", $seeAlso); echo ucfirst(strtolower($seeAlsoArray[0])).", ".strtolower($seeAlsoArray[1]).", ".ucfirst(strtolower($seeAlsoArray[2])); echo "

\n"; } $inner_query = "select * from kn_epitaphs where firstName like '".str_replace(" ","",$fname)."' and lastName like '".trim($lname)."' and middleName like '".str_replace(" ","",$mname)."' and location like '".$location."'"; $inner_result = $mysqli->query($inner_query); //echo $inner_query; $innerNum = mysqli_num_rows($inner_result); while ($row = mysqli_fetch_row($inner_result)){ $count++; $innerDOD = $row[4]; $line1 = $row[5]; $line2 = $row[6]; $line3 = $row[7]; $line4 = $row[8]; $line5 = $row[9]; $line6 = $row[10]; $line7 = $row[11]; $line8 = $row[12]; $line9 = $row[13]; $line10 = $row[14]; $line11 = $row[15]; $line12 = $row[16]; $line13 = $row[17]; $line14 = $row[18]; $line15 = $row[19]; $line16 = $row[20]; // neeed this // if (!window.varName) { // variable doesn't exist //} // //echo "innerDod ".$innerDOD." DOD ".$dod." strpos ".strpos((string)$innerDOD,(string)$dod); //echo "innerDod type ".gettype($innerDOD)." ".$innerDOD." DOD ".gettype($dod)." ".$dod; if($innerDOD != null){ if (stristr($dod,$innerDOD)){ echo "

View Epitaph

"; echo "
\n"; // statement ? execute if true : execute if false //echo "

".$line1."

"; echo "

".$line1; echo ($line2 != "" ? "
".$line2."
": null); echo ($line3 != "" ? $line3."
": null); echo ($line4 != "" ? $line4."
": null); echo ($line5 != "" ? $line5."
": null); echo ($line6 != "" ? $line6."
": null); echo ($line7 != "" ? $line7."
": null); echo ($line8 != "" ? $line8."
": null); echo ($line9 != "" ? $line9."
": null); echo ($line10 != "" ? $line10."
": null); echo ($line11 != "" ? $line11."
": null); echo ($line12 != "" ? $line12."
": null); echo ($line13 != "" ? $line13."
": null); echo ($line14 != "" ? $line14."
": null); echo ($line15 != "" ? $line15."
": null); echo ($line16 != "" ? $line16."
": null); echo "

"; echo "
\n"; } } } echo "
- top of page -      - bottom of page -
"; echo "
 "; // echo "
"; echo "

Your search returned no results!

"; echo "
"; } //echo $count; ?>
© Copyright 2008-2013, Connecticut Farms Presbyterian Church