include "_header.php";
$cemID=0;
if(isset($cemID))$cemID=$_GET['cemID'];
function conv($t){
return htmlspecialchars(stripslashes($t));
}
$_VAR['SEARCH_MAX_MATCHES']=$_VAR['SEARCH_MAX_MATCHES']*2;
$sql="select cemName,CT_Name from countylist,cemeteries where cemCID=CountyID and cemID=$cemID";
$result=mysql_query($sql) or die(mysql_error().'
'.$sql);
$cemInfo=mysql_fetch_assoc($result);
$page_title="{$cemInfo['cemName']} Cemetery - {$cemInfo['CT_Name']} County, {$_VAR['STATE_NAME']}";
DrawHeader($page_title,"{$cemInfo['cemName']} Cemetery - {$cemInfo['CT_Name']} County, {$_VAR['STATE_NAME']}",
"Cemeteries",'index, follow');
startFrame('100%');
?>
Cemetery - County, |
The following are all approved entries within this cemetery.
|
$countsql="SELECT count(*) as CNT FROM gravestone where cemeteryID=$cemID and (approved='Y')";
$querysql="select gravestone.*,cemName,CT_Name from gravestone,cemeteries,countylist where ";
$querysql.="CountyID=CID and cemCID=CID and cemeteryID=cemID and cemID=$cemID and (approved='Y') order by last";
$result = mysql_query($sql) or die("Query failed: $querysql");
$matches=0;
$numrec=0;
if(!isset($pg))$pg=1;
if($countsql!=''){
$result = mysql_query($countsql) or die("Query failed: $countsql");
$numrec=mysql_fetch_row ($result);
$numpage=intval($numrec[0]/$_VAR['SEARCH_MAX_MATCHES']);
if ($numrec[0]%$_VAR['SEARCH_MAX_MATCHES']) {
$numpage++; // add one page if remainder
}
}
if($querysql!='' && $numrec[0]>0){
$offset=($pg-1)*$_VAR['SEARCH_MAX_MATCHES'];
$result = mysql_query($querysql." limit $offset,{$_VAR['SEARCH_MAX_MATCHES']}") or die("Query failed: $querysql");
?>
Total Matches:
Name |
Cemetery |
County |
Updated |
$toggle=1;
while($row = mysql_fetch_assoc($result)){
$toggle=1-$toggle;
$matches++;
if($toggle==0){
$back="bline";
} else {
$back="bline shaded";
}
$name=htmlout(strtoupper($row["last"]).", ".$row["first"]);
?>
|
|