Goto Page:  "); if($pg_start>1)echo("First  "); for ($count=$pg_start;$count<=$total;$count++) { // loop thru if ($count < (10+$pg_start)){ $iMod = 1; } elseif ($count < (50+$pg_start)){ $iMod = 10; } else { $iMod=50; } if ($count % $iMod==0){ if($count!=$page){ print "$count \n"; } else { print "$count \n"; } $pg_last=$count; } } if($pg_last<$total)echo(" Last"); echo(""); } if($cid>0){ $page_title=$cnty['CT_Name']." County, ".$_VAR['STATE_NAME']; } else { $page_title="All ".$_VAR['STATE_NAME']; $indextype=true; } $heading_title=$_VAR['PROJECT_LONG_NAME'].' - '.$page_title; DrawHeader($heading_title,'',"Search..."); startFrame('100%'); ?>
Custom Search - Allows you to search specific fields within the gravestone database using the criteria you input.
Find records within   where the     

0)$querysql.=" AND CID=".floor($cid); $querysql.=" ORDER BY last,first"; $sql=$querysql." LIMIT $searchOffset,{$_VAR['SEARCH_MAX_MATCHES']}"; $result = mysql_query($sql) or die("Query failed: $sql"); $row=mysql_fetch_row(mysql_query("Select FOUND_ROWS()")) or die($DB->ErrorMsg()); $totalMatches=$row[0]; $totalPages=ceil($totalMatches/$_VAR['SEARCH_MAX_MATCHES']); $queryURL="cfield=$cfield&ctype=$ctype&ctxt=".urlencode($ctxt); } //*** DISPLAY SEARCH TIPS IF NO RECORDS FOUND **** if($querysql!='' && $totalMatches==0){ if($cid>0 && empty($cnty['CT_QtyTotal'])){ echo "". "". "Be the first to submit a photo for ".$cnty['CT_Name']. "!

"; } else if($cid>0){ echo "
". "Sorry no entries matching your search were found in ".$cnty['CT_Name']. ".  You may want to check your spelling, try searching additional Parishes, locations in other countries, ". "or user a different type of search.


"; } else { echo "
". "Sorry no entries matching your search were found.  ". "You may want to check your spelling, or use a different type of search.


"; } } if($totalMatches>0){ if($totalMatches<=$_VAR['SEARCH_MAX_MATCHES']){ print "
Total Matches: {$totalMatches}
"; } else { $firstGroupRecord=$searchOffset+1; $lastGroupRecord=$searchOffset+$_VAR['SEARCH_MAX_MATCHES']; if($lastGroupRecord>$totalMatches)$lastGroupRecord=$totalMatches; print "
{$firstGroupRecord} - {$lastGroupRecord} of {$totalMatches} matches
"; } print ""; print ""; print ""; print ""; print ""; print ""; print ""; $toggle=1; while($row = mysql_fetch_assoc($result)){ $toggle=1-$toggle; if($toggle==0){ $back="bline"; } else { $back="bline shaded"; } $name=htmlout(strtoupper($row["last"]).", ".$row["first"]); print ""; print ""; print ""; print ""; } print "
NameCemeteryCountyUpdated
{$name}"; print "".htmlout($row["cemName"])." Cemetery".htmlout($row["CT_Name"])."".htmlout($row["dt_updated"])."

"; if($totalPages>1) outputPageLinks($_GET['pg'],$totalPages,$_VAR['RELATIVE_URL']."/search.php?{$queryURL}&pg="); } else { // DISPLAY NAV LINKS include "_navlinks.html"; } ?>