\r\n"; mail('jim.rolt@googlemail.com', $subject, $error, $headers); } $sql = "SELECT events.eventid, events.event, town, events.county, votes, Towns.ID FROM events INNER JOIN Eventvotes ON Eventvotes.placeID = events.eventid LEFT JOIN Towns ON Towns.Name = events.town AND Towns.County = events.county ORDER BY votes DESC LIMIT 100"; $q = mysql_query($sql)or mailjim("q","$sql
".mysql_error()); $top = mysql_fetch_object($q); mysql_data_seek($q, 0); $sql = "SELECT SUM(votes) AS total FROM Eventvotes"; $tot = mysql_query($sql)or mailjim("tot", "$sql
".mysql_error()); $total = mysql_fetch_object($tot); $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 <<Britain's favourite Event is $top->event EOT; ?>
Britain's Favourite Event, $total->total votes\n"; include'linkunit.txt'; ?>

A glance at the events that take place in this country provides an instant picture of our diversity, our fascinations, and our history. From happenings that are famous globally like Notting Hill Carnival to village fetes where nobody five miles away knows about them; from festivals of music so contemporary it's still being written to celebrations of traditions dating back more than 1000 years. Melas and eisteddfods. Galas and games. Fireworks and fairs. They are all threads in the rich tapestry that is British life. Which event has become your favourite?

\n$count: $est->event ($est->votes vote"; if($est->votes > 1){echo's';} echo") "; if($est->ID){ echo"$est->town"; } else{ echo"$est->town"; } echo"
\n"; $count ++; } echo"Page viewed $vcount times since 2nd June 2010

"; include'dailyfeature.php'; ?>