\r\n"; mail('jim.rolt@googlemail.com', $subject, $error, $headers); } include('dataedit/sql.php'); $id = is_numeric($_GET['id']) ? $_GET['id'] : 1; if(intval($_GET['id']) > 0){$id = intval($_GET['id']);} else{ header("HTTP/1.1 404 Not Found"); header("Location: https://information-britain.co.uk/errordoc.php"); exit(); } $sql = "SELECT Towns.ID, Towns.Name, postcode, telcode, Towns.population, gridref, council, Towns.jobs, Towns.tips, County, clientpic, CountyName, CountyNameCut, CountyDetails.CountryID, CountyDetails.bcomregion, Country.Name AS Country FROM Towns INNER JOIN CountyDetails ON CountyDetails.RecordID = Towns.County INNER JOIN Country ON Country.ID = CountyDetails.CountryID WHERE Towns.ID = $id"; $details = mysql_query($sql)or mailjim('details', "$sql\n".mysql_error()); $towndetails = mysql_fetch_object($details); $famous = mysql_query("SELECT * FROM famous WHERE birthplace = '".mysql_real_escape_string($towndetails->Name)."'")or mailjim('famous', mysql_error()); $sql = "SELECT id FROM didyouknow WHERE town = '$towndetails->Name'"; if(!empty($towndetails->County)){$sql .= " AND county = $towndetails->County";} $didyouknow = mysql_query($sql)or mailjim('didyouknow', mysql_error()); $qtown = mysql_real_escape_string(preg_replace("/[-\s]/", "_",$towndetails->Name)); if($qtown > ''){ $townpix = mysql_query("SELECT townpix.*, EstDetails.Name FROM townpix LEFT JOIN EstDetails ON EstDetails.RecordID = townpix.clientid WHERE townpix.town LIKE '$qtown' AND townpix.county = $towndetails->County")or mailjim("townpix", mysql_error()); } if(!empty($towndetails->clientpic)){ $sql = "SELECT Name FROM EstDetails WHERE RecordID = $towndetails->clientpic LIMIT 1"; $Ename = mysql_query($sql)or mailjim("Ename", "$sql\n".mysql_error()); $pname = mysql_fetch_object($Ename); } echo << $towndetails->Name travel tips, $towndetails->CountyName. EOT; ?>
County, $towndetails->CountyNameCut); /*include'featuredhotels.php'; feature($towndetails->County);*/ include'locallinks.php'; $llins = new locallinks($towndetails->County,$towndetails->CountryID); echo $llins->output; include'adviva.txt'; include'burstmedia.txt';; ?>
Name); $trow = mysql_fetch_object($townpix); /*if(!function_exists('file_exists')){ function file_exists($path){ return (@fopen($path,"r")==true); } }*/ if(file_exists("images/townpics/$townurl$towndetails->County.jpg")){ echo"$towndetails->Name"; if($trow->caption){echo"$trow->caption";} } elseif(mysql_num_rows($townpix) > 0){ echo"$trow->Name
$trow->Name"; } elseif($towndetails->clientpic > 0){ echo"$pname->Name
$pname->Name"; } ?>
Loading...
Name,$towndetails->bcomregion); include'joinin.php'; joinin($towndetails->Name, $towndetails->County); if(mysql_num_rows($famous) > 0 || !empty($towndetails->telcode) || !empty($towndetails->postcode) || !empty($towndetails->population) || !empty($towndetails->gridref) || !empty($towndetails->council) || mysql_num_rows($didyouknow) > 0){ echo'

Information:

'; if(!empty($towndetails->telcode)){echo"Telephone code: $towndetails->telcode
\n";} if(!empty($towndetails->postcode)){echo"Postcode: $towndetails->postcode
\n";} if(!empty($towndetails->population)){echo"Population: $towndetails->population
\n";} if(!empty($towndetails->gridref)){echo"Grid Reference: $towndetails->gridref
\n";} if(!empty($towndetails->council)){ $pos = stripos($towndetails->Name, 'council'); $councilname = ($pos === false) ? $towndetails->Name : substr($towndetails->Name, 0, $pos); echo"Council: $councilname
\n"; } if(!empty($towndetails->jobs)){echo"$towndetails->Name Jobs
\n";} if(mysql_num_rows($didyouknow) > 0){ echo"Rather interesting $towndetails->Name facts
\n"; } $bpcheck = 0; while($fambrit = mysql_fetch_object($famous)){ if($bpcheck == 0){ echo'Birthplace of:
'; $bpcheck = 1; } echo"$fambrit->name | \n"; } echo'

'; } ?>