\r\n"; mail('jim.rolt@googlemail.com', $subject, $error, $headers); } if(isset($_GET['id']) && is_numeric($_GET['id'])){$id = $_GET['id'];}else{$id = 1;} $q = mysql_query("SELECT Lore.*, CountyName, bcomregion FROM Lore LEFT JOIN CountyDetails ON CountyDetails.RecordID = Lore.county WHERE id = $id")or mailjim("q", mysql_error()); $title = mysql_fetch_object($q); $sql = "SELECT content, Entered, reviewer FROM Feedback WHERE link = '".mysql_real_escape_string($_SERVER['REQUEST_URI'])."' AND displayed = 1 ORDER BY Entered DESC"; $fb = mysql_query($sql)or mailjim('Feedback', "$sql\n".mysql_error()); $co = mysql_query("SELECT DISTINCT RecordID, CountyName, Country.Name AS cname, Country.ID AS cid, COUNT(*) AS num FROM CountyDetails INNER JOIN Lore ON (Lore.county = CountyDetails.RecordID OR Lore.county2 = CountyDetails.RecordID OR Lore.county3 = CountyDetails.RecordID) INNER JOIN Country ON Country.ID = CountyDetails.CountryID GROUP BY CountyName ORDER BY cid, CountyName")or mailjim("co", mysql_error()); $pageurl = $_SERVER['REQUEST_URI']; $cpcount = mysql_query("UPDATE pagecounter SET pagecount=pagecount+1 WHERE pageurl = '$pageurl'"); if(mysql_affected_rows()==0){$cpcount = mysql_query("INSERT INTO pagecounter(pageurl, pagecount, firstday) VALUES ('$pageurl', 1, NOW())");} $cq = mysql_query("SELECT pagecount FROM pagecounter WHERE pageurl = '$pageurl' "); $gcq = mysql_fetch_object($cq); $vcount = $gcq->pagecount; echo << British Lore and Legend, $title->title, $title->CountyName EOT; ?>
title'>"; } include'yellowbcombox.php'; yellowbox($title->CountyName,$title->bcomregion); include'connect.php'; connect('', '', $title->title, $vcount, '17th August 2011'); ?> book)){ echo""; } include'travelzoo.txt'; include'yeddabox.txt'; ?>
content); echo"

$title->title, $title->CountyName

"; include'linkunit.txt'; echo<<

$cont

EOT; if(mysql_num_rows($fb) > 0){ $feednum = mysql_num_rows($fb); $response = $feednum > 1 ? 'Responses' : 'Response'; echo"

$feednum $response to $title->title

\n"; while($feed = mysql_fetch_object($fb)){ $edate = date('jS F Y', strtotime($feed->Entered)); echo"

From $feed->reviewer on $edate
$feed->content

\n"; } } include'showlove.txt'; $check = ''; echo'

British Lore and Legend by county: Show All

'; while($cou = mysql_fetch_object($co)){ if($check != $cou->cname){ echo"$cou->cname: "; $check = $cou->cname; } echo"$cou->CountyName($cou->num) | \n"; } ?>