\r\n"; mail('jim.rolt@googlemail.com', $subject, $error, $headers); } include('dataedit/sql.php'); $sql = "SELECT SQL_CACHE id, name, fdate AS year, detail FROM famousdates ORDER BY fdate ASC"; if(isset($_GET['search'])){ if(!empty($_GET['name']) && $_GET['name'] != 'Name...'){ $name = mysql_real_escape_string($_GET['name']); $sql = "SELECT SQL_CACHE id, name, detail, fdate AS year FROM famousdates WHERE name LIKE '%$name%' ORDER BY year"; $text = "Results for your famous dates search on '$name'"; $itext = "We've searched for $name.. here are the matches that have shaped Britain and its peoples and affected its history."; } elseif(!empty($_GET['year']) && $_GET['year'] != 'Year...' && is_numeric($_GET['year'])){ $fyear = intval($_GET['year']); $sql = "SELECT SQL_CACHE id, name, detail FROM famousdates WHERE LEFT(fdate, 4) = '$fyear' ORDER BY name "; if(substr($fyear, 0, 1) == 0){$fyear = substr($fyear, 1);} $text = "Famous and historic events from $fyear"; $itext = "Here are events from $fyear that have shaped Britain and its peoples and affected its history."; $fp = mysql_query("SELECT SQL_CACHE id, name FROM famous WHERE LEFT(birthdate, 4) = $fyear ORDER BY name")or mailjim('fp', mysql_error()); } } elseif(isset($_GET['county']) && is_numeric($_GET['county'])){ $county = intval($_GET['county']); $sql = "SELECT SQL_CACHE id, name, fdate AS year, detail, CountyName FROM famousdates LEFT JOIN CountyDetails ON CountyDetails.RecordID = famousdates.county WHERE county = $county ORDER BY fdate ASC "; } //echo $sql; $q = mysql_query($sql)or mailjim('q', "$sql\n".mysql_error()); if(isset($_GET['county'])){ $cname = mysql_fetch_object($q); mysql_data_seek($q, 0); $text = "Famous historic dates from $cname->CountyName"; $itext = "Here are events from $cname->CountyName that have shaped Britain and its peoples and affected its history."; } else{ $picarray = array(); while($row = mysql_fetch_object($q)){ $picarray[] = array($row->id, $row->name); } mysql_data_seek($q, 0); shuffle($picarray); } $co = mysql_query("SELECT SQL_CACHE DISTINCT RecordID, CountyName, Country.Name AS cname, Country.ID AS cid FROM CountyDetails INNER JOIN famousdates ON famousdates.county = CountyDetails.RecordID INNER JOIN Country ON Country.ID = CountyDetails.CountryID ORDER BY cid, CountyName")or mailjim("co", mysql_error()); $dates = mysql_query("SELECT SQL_CACHE DISTINCT SUBSTRING(fdate, 1, 4) AS year FROM famousdates ORDER BY fdate")or mailjim("dates", mysql_error()); if(mysql_num_rows($q) == 0){ $text = 'Sorry, we dont have any results for your search. Please try again'; } $da = date('m').'-'.date('d'); $famday = mysql_query("SELECT SQL_CACHE id, name, SUBSTRING(fdate, 1, 4) AS year, detail FROM famousdates WHERE SUBSTRING(fdate, 6) = '$da' ORDER BY year")or mailjim("famday", mysql_error()); $titletext = isset($text) ? $text : 'An A-Z of Important Dates in British History'; $desctext = isset($itext) ? $itext : 'A timeline of Important events from British History from the Romans to the present day. Thousands of Famous dates listed'; echo << $titletext EOT; ?>

Related links:

British History | Famous Britons | Lore & Legend | Rather Interesting

Historic Dates by County:

cname){ echo"$cou->cname: "; $check = $cou->cname; } echo"$cou->CountyName"; if($count < mysql_num_rows($co)){echo" | \n";} } ?>

Important Dates in British History - a timeline

$title->name
{$picarray[$pcount][1]}
EOT; break; $pcount++; } } while(0); } ?>

Over 1000 historic dates crucial to Britain. A detailed timeline of the events that have shaped British History we have aimed to have been as inclusive as possible and this section is being continually added to. If you feel we have left something out please don't hesitate to let us know

We even have a BC date for you (Caesar lands on British Shores) although the exact date is of course unverified...

$itext If you feel we have left something out please don't hesitate to let us know.
More dates from British history

"; } ?>

Search by name:   or

0){ $count = 1; echo'

On this day:
'; while($fact = mysql_fetch_object($famday)){ echo"$fact->name - "; if(!empty($fact->detail)){echo"$fact->year";} else{echo"$fact->year";} if($count < mysql_num_rows($famday)){echo', ';} $count ++; } } ?>

$text
\n";} if(mysql_num_rows($co) > 0){ $check = ''; ?>

year)){ if(strlen($row->year) == 10){ $months = array('01'=>"January",'02'=>"February",'03'=>"March",'04'=>"April",'05'=>"May",'06'=>"June",'07'=>"July",'08'=>"August",'09'=>"September",'10'=>"October",'11'=>"November",'12'=>"December"); $month = $months[substr($row->year, 5, 2)]; $day = substr($row->year, 8, 2); $day = (substr($day, 0, 1) == 0) ? substr($day, 1) : $day; //echo $day; switch($day){ case(substr($day, -1, 1) == 1 && substr($day, 0, 1) != 1 ): case 1: $suffix = 'st'; break; case(substr($day, -1, 1) == 2 && substr($day, 0, 1) != 1): $suffix = 'nd'; break; case(substr($day, -1, 1) == 3): $suffix = 'rd'; break; default: $suffix = 'th'; } $yy = substr($row->year, 0, 4); if(substr($yy, 0, 1) == 0){$yy = substr($yy, 1);} $fdate = "$day$suffix of $month $yy :"; } else{$fdate = $yy = $row->year;} echo"$fdate "; } if(!empty($row->detail)){echo"$row->name\n";} else{echo"$row->name\n";} if($no < mysql_num_rows($q)){echo'
';} $no++; } if(isset($fp) && mysql_num_rows($fp) > 0){ echo"

Famous Britons born in $fyear
\n"; while($frow = mysql_fetch_object($fp)){ echo"$frow->name
\n"; } } } echo'

'; include'books.txt'; include'dailyfeature.php'; ?>