\r\n"; mail('jim.rolt@googlemail.com', $subject, $error, $headers); } include'dataedit/sql.php'; //include'memcache.php'; if(is_numeric($_GET['id'])){$id = $_GET['id'];}else {$id = 1;} $increment = mysql_query("UPDATE events SET visits = visits+1 WHERE eventid = $id")or die(mysql_error()); $q = mysql_query("SELECT events.*, events.county, CountyName, CountyNameCut, bcomregion, months.month AS rmonth, Towns.Name AS Tname FROM events INNER JOIN months ON months.id = events.month INNER JOIN CountyDetails ON CountyDetails.RecordID = events.county LEFT JOIN Towns ON Towns.Name = events.town AND Towns.County = events.county WHERE eventid = $id LIMIT 1"); $row = mysql_fetch_object($q); //$row = $q[0]; if(mysql_num_rows($q) == 0){ //if(empty($q)){ header("HTTP/1.1 410 Gone"); header("Location: https://information-britain.co.uk"); exit(); } $sql = "SELECT id, review FROM reviews WHERE est = $row->eventid AND type = 4 ORDER BY id DESC LIMIT 1"; $rq = mysql_query($sql)or mailjim('rq', "$sql\n".mysql_error()); /* $sql = "SELECT * FROM tweets INNER JOIN ibtweeters ON ibtweeters.userid = tweets.tweeterid AND ibid = $id WHERE EstType = 0 ORDER BY dateentered DESC"; $tq = mysql_query($sql); */ $oe = mysql_query("SELECT eventid, event, location, town, day FROM events WHERE county = $row->county AND month = '".date("n")."' ORDER BY RAND() LIMIT 15")or mailjim('oe', mysql_error()); if(preg_match('/A|O/', $row->rmonth)){$an = 'an';}else{$an = 'a';} echo << $row->event, an event in $row->rmonth - $row->CountyName. EOT; ?>
county, $row->CountyNameCut); /*include'featuredhotels.php'; feature($row->county);*/ include'adviva.txt'; include'burstmedia.txt';; ?>
event'>"; } elseif(stristr($row->event, 'sainsbury')){echo"$row->event";} include'yellowbcombox.php'; yellowbox($row->town,$row->bcomregion); include'connect.php'; $date = date('jS F Y', mktime(0,0,0,substr($row->entered,5,2), substr($row->entered,8,2), substr($row->entered,0,4))); $viewed = $row->visits+$row->visits07+$row->visits08+$row->visits09+$row->visits10+$row->visits11; connect('', '', "Events in $row->CountyName", $viewed, $date); ?>

Events in $row->CountyName

EOT; include'linkunit.txt'; echo <<
$row->event

An event in $row->rmonth in $row->CountyName EOT; if(!empty($row->location)){echo"
$row->location\n";} if(!empty($row->town)){ if(empty($row->location)){echo"";} $rtown = trim($row->town); if($row->Tname){ echo"
$row->town\n"; } else{ echo"
$row->town\n"; } } if(empty($row->town)){echo"";} //echo"
$row->CountyName
| \nUpdate this listing"; if($row->startdate != '0000-00-00'){ $sday = date('jS F Y', strtotime($row->startdate)); echo"
Event begins: $sday\n"; } if($row->exactdate != '0000-00-00'){ $day = date('jS F Y', strtotime($row->exactdate)); if($row->startdate != '0000-00-00'){ echo"
$row->event ends on $day\n"; } else{ echo"
$row->event on $day\n"; } } elseif(!empty($row->day)){echo"
Event timing: $row->day\n";} if(!empty($row->website)){ $pos = strpos($row->website, 'showPlace.cfm'); if($pos === false){ //echo"
Visit website\n"; echo"
Visit website\n"; } else{ echo"
Visit their page\n"; } } echo'
'; if(!empty($row->email) && empty($row->website)){ echo"send email\n"; } echo "
write a review"; if(mysql_num_rows($rq) == 1){echo" | read reviews";} echo <<more events

for $row->event as your favourite British event.
EOT; if(mysql_num_rows($rq) == 1){ $rev= mysql_fetch_object($rq); $review = explode(' ', $rev->review); $num = count($review) > 15 ? 15: count($review)-1; $rtext = '

Latest review - '; for($i=0; $i<=$num; $i++){$rtext .= $review[$i].' ';} echo"$rtext ...More

"; } if(!empty($row->description)){echo"

$row->description

";} echo'
'; $url = rawurlencode($row->CountyName); $month = strtolower($row->rmonth); $urlname = rawurlencode($row->event); echo <<If you have been to this event in the past please review it for us here

EOT; /* if(mysql_num_rows($tq) > 0){ $twnum = mysql_num_rows($tq); $rows = $twnum > 5 ? 5 : $twnum; echo"

Tweets from $row->event

\n
"; for($i=1;$i<=$rows; $i++){ $tweet = $tq[$i]; $time = date("g:ia, jS M Y", strtotime($tweet->dateentered)); $desc = str_replace('Â', '', $tweet->description); echo <<

$desc

EOT; } if($twnum > 5){echo"

More from $tweet->screen_name

\n";} echo'
'; } */ if(mysql_num_rows($oe) > 0){ echo"

More Events in $row->CountyName in ".date("F")."

\n

"; while($orow = mysql_fetch_object($oe)){ echo"$orow->event"; if(!empty($orow->location)){echo", $orow->location";} if(!empty($orow->town)){echo", $orow->town";} echo'

'; } echo'

'; } include'dailyfeature.php'; ?>