get_row("SELECT pages.ID,pages.Name,pages.filename,pages.url,pages.Title,pages.MetaDescription,pages.H1,pages.PagePhoto,pages.Photo1_URL,pages.Photo1_LinkURL,pages.Photo1_Caption,pages.Gallery_Exists,pages.Gallery_ID,pages.Gallery_URL,pages.Country,pages.County,pages.Town,pages.subregion,pages.Cluster,pages.Tags,pages.Parent_ID,pages.Category_ID,pages.RelatedCategories,pages.AttractionID,pages.Summary,pages.Paragraph1,pages.Paragraph2,pages.Paragraph3,pages.Paragraph4,pages.Paragraph5,pages.ParagraphLast,pages.Related_URL1,pages.Related_URL2,pages.Related_URL3,pages.Related_Title1,pages.Related_Title2,pages.Related_Title3,pages.Events,pages.Status,pages.content_body,pages.leftnav,pages.rightnav,pages.GazetteerType,pages.GazetteerWhere,pages.Template,pages.timestamp,pages.Publication_Date,pages.showauthor,pages.License,categories.ID AS CategoryID,categories.Category_Name AS CategoryName,categories.Category_URL AS Category_URL, counties2.content_dir AS content_dir FROM pages INNER JOIN categories ON pages.Parent_ID = categories.ID INNER JOIN counties2 ON pages.County = counties2.name WHERE pages.ID = '2077' LIMIT 1"); //make sure the current date is past the Publication_Date $current_date = date("Y-m-d"); $Publication_Date = $content->Publication_Date; $GazetteerType = $content->GazetteerType; if ($GazetteerType == 'Town') { $GazetteerTypeDisplay = 'Towns and Villages'; } elseif ($GazetteerType == 'Abbey') { $GazetteerTypeDisplay = 'Abbeys and Monasteries'; } elseif ($GazetteerType == 'Prehistoric') { $GazetteerTypeDisplay = 'Prehistoric Sites'; } elseif ($GazetteerType == 'Castle') { $GazetteerTypeDisplay = 'Castles'; } elseif ($GazetteerType == 'Church') { $GazetteerTypeDisplay = 'Historic Churches'; } elseif ($GazetteerType == 'Historic House') { $GazetteerTypeDisplay = 'Historic Houses'; } elseif ($GazetteerType == 'Historic Property') { $GazetteerTypeDisplay = 'Historic Buildings'; } elseif ($GazetteerType == 'Countryside') { $GazetteerTypeDisplay = 'Countryside'; } elseif ($GazetteerType == 'Roman') { $GazetteerTypeDisplay = 'Roman Sites'; } elseif ($GazetteerType == 'Museum') { $GazetteerTypeDisplay = 'Museums'; } elseif ($GazetteerType == 'Gallery') { $GazetteerTypeDisplay = 'Art Galleries'; } elseif ($GazetteerType == 'Cathedral') { $GazetteerTypeDisplay = 'Cathedrals'; } elseif ($GazetteerType == 'Garden') { $GazetteerTypeDisplay = 'Gardens'; } elseif ($GazetteerType == 'Family') { $GazetteerTypeDisplay = 'Family Attractions'; } if($content <> '' AND $Publication_Date <= $current_date) { $County = $content->County; $Country = $content->Country; $Town = $content->Town; $Title = $content->Title; $Name = $content->Name; $Gallery_Exists = $content->Gallery_Exists; $AttractionID = $content->AttractionID; $H1 = $content->H1; $leftnav = $content->leftnav; $rightnav = $content->rightnav; $where = $content->GazetteerWhere; // Here we need to set some values for the breadcrumb nav $townnav =preg_replace('/[^a-zA-Z0-9\-]+/', '_', $Town); //and here we get the related content terms $dbtags = $content->Tags; $tagpieces = explode("||", $dbtags); $showauthor = 'N'; include("Article-Template.htm"); } else { include ("Article-Missing-Template.htm"); } ?>