\r\n";
mail('jim.rolt@googlemail.com', $subject, $error, $headers);
}
$co = !empty($_GET['county']) && is_numeric($_GET['county']) ? intval($_GET['county']) : 1;
$type = !empty($_GET['type']) && is_numeric($_GET['type']) ? intval($_GET['type']) : 1;
$ty = $type == 1 ? 'IN(1,12)' : ' = '.$type; // make sure we include other accomm with hotels
$sql = "SELECT DISTINCT EstDetails.RecordID, EstDetails.Name, EstDetails.town, CountyDetails.CountyName, CountyDetails.CountryID, CountyDetails.bcomregion
FROM EstDetails
INNER JOIN CountyDetails ON
CountyDetails.RecordID = $co
AND (EstDetails.county = CountyDetails.RecordID
OR EstDetails.county2 = CountyDetails.RecordID)
WHERE ( EstType $ty
OR EstType2 $ty
OR EstType3 $ty
OR EstTypeAlt $ty)
AND EstDetails.EstType != 21
GROUP BY town, Name";
$q = mysql_query($sql)or mailjim('q', "$sql\n".mysql_error());
if(mysql_num_rows($q) == 0){
header("HTTP/1.1 404 Not Found");
header("Location: https://information-britain.co.uk/errordoc.php");
exit();
}
$title = mysql_fetch_object($q);
mysql_data_seek($q, 0);
$sql = "SELECT SQL_CACHE RecordID, header, content, link FROM pageads WHERE EstType = $type AND county = $co";
$ads = mysql_query($sql)or mailjim('ads', "$sql\n".mysql_error());
$sql = "SELECT SQL_CACHE RecordID, header, content, link FROM newbanner WHERE EstType = $type AND county = $co";
$nb = mysql_query($sql)or mailjim('nb', mysql_error());
$sql = "SELECT Type FROM EstablishmentType WHERE ID = $type";
$etype = mysql_query($sql)or mailjim('etype', "$sql\n".mysql_error());
$et = mysql_fetch_object($etype);
switch($type){
case 6:
$etype = 'Stay on a Farm';
break;
case 38:
$etype = 'Finance';
break;
case 43:
$etype = 'Churches';
break;
case 44:
$etype = 'Performing Arts';
break;
case 45:
$etype = 'Classes';
break;
case 49:
$etype = 'Charities';
break;
default:
$etype = (!in_array(substr($et->Type, -1, 1), array('g','n'))) ? $et->Type.'s' : $et->Type;
}
switch($_GET['type']){
case 1:
case 12:
$url = 'hotels.htm';
break;
case 2:
$url = 'b&b.htm';
break;
case 4:
$url = 'scatering.htm';
break;
case 5:
$url = 'pub.htm';
break;
case 6:
$url = 'farms.htm';
break;
default:
$url = 'othertypes.cfm?type='.$et->Type;
}
switch($_GET['type']){
case 7:
$desc = "Budget Accommodation across $title->CountyName including Hostels, Travel Lodges and Bargain B&Bs";
break;
case 17:
$desc = "$title->CountyName Camp Sites. Camping Holidays in $title->CountyName";
break;
case 30:
$desc = "Water Holidays in $title->CountyName";
break;
default:
$desc = "$title->CountyName $etype. A comprehensive selection of British $etype in $title->CountyName";
}
echo <<< EOT
CountryID);
echo $llins->output;
/*include'featuredhotels.php';
feature($co);*/
include'adviva.txt';
include'burstmedia.txt';;
?>
type == $type){
$hparray[] = array('id' => $f->place, 'Name' => $f->Name);
}
}
/*if(!function_exists('file_exists')){
function file_exists($path){
return (@fopen($path,"r")==true);
}
}*/
shuffle($hparray);
foreach($hparray as $hpline){
if(file_exists("hotelimages/{$hpline['id']}a.jpg")){
echo"
\n".
"\n{$hpline['Name']}\n";
break;
}
}
/*if(!function_exists('file_exists')){
function file_exists($path){
return (@fopen($path,"r")==true);
}
}*/
if(file_exists("images/countypics/$co.jpg")){
echo<<
County guide | Inns | BnBs
FOO;
}
if ($type == 4) {
}
?>
$etype in $title->CountyName |
$title->CountyName Directory\n";
if (!in_array($type, array(4,47))){
include'newbcombox.php';
newbox($title->CountyName,$title->bcomregion);
}
if(mysql_num_rows($nb) > 0){include'newbanner.php';}
elseif(!in_array($type, array(47, 7))){
if(mysql_num_rows($ads) > 0){
$ad = mysql_fetch_object($ads);
$adcontent = $ad->content > '' ? "
Featured:
$ad->header$ad->content" : '';
echo"
";
if(file_exists("images/pageads/{$ad->RecordID}a.jpg")){
$size = getimagesize("/images/pageads/{$ad->RecordID}a.jpg");
echo"";
}
else{
echo"";
}
echo <<advertise here |
$adcontent |
EOT;
}
elseif($type == 25){
?>
'.mysql_num_rows($q)." $etype in $title->CountyName
holidaycottages.co.uk
";
}
*/
mysql_data_seek($q, 0);
$towncheck = '';
while($row = mysql_fetch_object($q)){
$ctown = ucwords(trim(strtolower(str_replace('-', ' ', $row->town))));
if($towncheck != $ctown){
echo"$ctown
\n";
$towncheck = $ctown;
}
echo"$row->Name
\n";
}
echo'
';
include'dailyfeature.php';
?>