array( 'Hostname' => 'localhost', //database ip 'Username' => 'test1', //database user name 'Password' => 'follypress1', //database password 'Database' => 'test', //database name ) ); } class DB_connect{ public static function connect_db(){ $cont = mysqli_init(); mysqli_options($cont,MYSQLI_OPT_CONNECT_TIMEOUT, 30); mysqli_real_connect($cont,DB_Conf::$DB_Config['DbConfig']['Hostname'], DB_Conf::$DB_Config['DbConfig']['Username'], DB_Conf::$DB_Config['DbConfig']['Password'], DB_Conf::$DB_Config['DbConfig']['Database']); // echo @mysqli_ping($cont) ? 'true' : 'false'; return $cont; } public static function disconnect_db($cont){ mysqli_close($cont); } } $domain= preg_replace('/^www./','',$_SERVER['HTTP_HOST']); $path = $_SERVER['REQUEST_URI']; $path = strtok($path, '?'); $path = str_replace('%20',' ',$path); $path = str_replace('%09',' ',$path); $path = str_replace('/'.$folder_location,'',$path); $path = str_replace($page_extension,'',$path); $base_url='../'; $cont=DB_connect::connect_db(); $query = mysqli_query($cont, "SELECT * FROM `data` WHERE `url`='$path';"); $page_data=mysqli_fetch_assoc($query); $type_of_page=$page_data['page_type']; $page_id=$page_data['id']; $location_links=''; $keyword_link=''; if( $type_of_page==0){ $location_links=''; $keyword_link=''; } if( $type_of_page==1){ $query = mysqli_query($cont, "SELECT `linked_to` FROM `index` WHERE `page_id`='$page_id' AND `linked_to_type`='2';"); $index_select=array(); while($row=mysqli_fetch_assoc($query)){ $index_select[]=$row; }; foreach($index_select as $ind){ $this_id=$ind['linked_to']; $query = mysqli_query($cont, "SELECT `url`,`Heading` FROM `data` WHERE `id`='$this_id';"); $link=mysqli_fetch_assoc($query); $location_links.='
  • '.$link['Heading'].'
  • '.PHP_EOL; } } if( $type_of_page==2){ $query = mysqli_query($cont, "SELECT `linked_to` FROM `index` WHERE `page_id`='$page_id' AND `linked_to_type`='1';"); $index_select=array(); while($row=mysqli_fetch_assoc($query)){ $index_select[]=$row; }; foreach($index_select as $ind){ $this_id=$ind['linked_to']; $query = mysqli_query($cont, "SELECT `url`,`Heading` FROM `data` WHERE `id`='$this_id';"); $link=mysqli_fetch_assoc($query); $keyword_link.='
  • '.$link['Heading'].'
  • '.PHP_EOL; } } if( $type_of_page==3){ $query = mysqli_query($cont, "SELECT `linked_to` FROM `index` WHERE `page_id`='$page_id' AND `linked_to_type`='1';"); $index_select=array(); while($row=mysqli_fetch_assoc($query)){ $index_select[]=$row; }; foreach($index_select as $ind){ $this_id=$ind['linked_to']; $query = mysqli_query($cont, "SELECT `url`,`Heading` FROM `data` WHERE `id`='$this_id';"); $link=mysqli_fetch_assoc($query); $keyword_link.='
  • '.$link['Heading'].'
  • '.PHP_EOL; } $query = mysqli_query($cont, "SELECT `linked_to` FROM `index` WHERE `page_id`='$page_id' AND `linked_to_type`='2';"); $index_select=array(); while($row=mysqli_fetch_assoc($query)){ $index_select[]=$row; }; foreach($index_select as $ind){ $this_id=$ind['linked_to']; $query = mysqli_query($cont, "SELECT `url`,`Heading` FROM `data` WHERE `id`='$this_id';"); $link=mysqli_fetch_assoc($query); $location_links.='
  • '.$link['Heading'].'
  • '.PHP_EOL; } } if( $type_of_page==4){ $base_page_id=$page_data['base_page']; $query = mysqli_query($cont, "SELECT `page_type`, `url` FROM `data` WHERE `id`='$base_page_id';"); $base_page=mysqli_fetch_assoc($query); $base_url='/'.$folder_location.$base_page['url']; $base_type=$base_page['page_type']; ##query the top level page ##get the type of page and the id from it ##get the data from the index if( $base_type==1){ $query = mysqli_query($cont, "SELECT `linked_to` FROM `index` WHERE `page_id`='$base_page_id' AND `linked_to_type`='2';"); $index_select=array(); while($row=mysqli_fetch_assoc($query)){ $index_select[]=$row; }; foreach($index_select as $ind){ $this_id=$ind['linked_to']; $query = mysqli_query($cont, "SELECT `url`,`Heading` FROM `data` WHERE `id`='$this_id';"); $link=mysqli_fetch_assoc($query); $location_links.='
  • '.$link['Heading'].'
  • '.PHP_EOL; } } if( $base_type==2){ $query = mysqli_query($cont, "SELECT `linked_to` FROM `index` WHERE `page_id`='$base_page_id' AND `linked_to_type`='1';"); $index_select=array(); while($row=mysqli_fetch_assoc($query)){ $index_select[]=$row; }; foreach($index_select as $ind){ $this_id=$ind['linked_to']; $query = mysqli_query($cont, "SELECT `url`,`Heading` FROM `data` WHERE `id`='$this_id';"); $link=mysqli_fetch_assoc($query); $keyword_link.='
  • '.$link['Heading'].'
  • '.PHP_EOL; } } if( $base_type==3){ $query = mysqli_query($cont, "SELECT `linked_to` FROM `index` WHERE `page_id`='$base_page_id' AND `linked_to_type`='1';"); $index_select=array(); while($row=mysqli_fetch_assoc($query)){ $index_select[]=$row; }; foreach($index_select as $ind){ $this_id=$ind['linked_to']; $query = mysqli_query($cont, "SELECT `url`,`Heading` FROM `data` WHERE `id`='$this_id';"); $link=mysqli_fetch_assoc($query); $keyword_link.='
  • '.$link['Heading'].'
  • '.PHP_EOL; } $query = mysqli_query($cont, "SELECT `linked_to` FROM `index` WHERE `page_id`='$base_page_id' AND `linked_to_type`='2';"); $index_select=array(); while($row=mysqli_fetch_assoc($query)){ $index_select[]=$row; }; foreach($index_select as $ind){ $this_id=$ind['linked_to']; $query = mysqli_query($cont, "SELECT `url`,`Heading` FROM `data` WHERE `id`='$this_id';"); $link=mysqli_fetch_assoc($query); $location_links.='
  • '.$link['Heading'].'
  • '.PHP_EOL; } } } if($page_data['lat']==0){ $page_data['lat']='0'; $page_data['long']=52; } #take the page #find in the pages #look at the link structure and get the required links #read the has reviews in order to search for reviews for the pages that are created #if its not there create some sort of a 404 page that will try to direct you to the correct place. DB_connect::disconnect_db($cont); ?> ABPCO Events | <? echo $page_data['meta_title']; ?>

    Nearby:

    >>> Hide

    Venue Counties

    Bedfordshire | Berkshire | Bristol | Buckinghamshire | Caerphilly | Cambridgeshire | Cheshire | Cornwall | County Durham | Cumbria | Derbyshire | Devon | Dorset | East Sussex | East Yorkshire | Essex | Gloucestershire | Greater Manchester | Hampshire | Herefordshire | Hertfordshire | Isle of Wight | Isles of Scilly | Kent | Lancashire | Larne | Leicestershire | Limavady | Lincolnshire | London | Merseyside | Norfolk | North Yorkshire | Northamptonshire | Northumberl& | Nottinghamshire | Oxfordshire | Rutl& | Shropshire | Somerset | South Ayrshire | South Yorkshire | Staffordshire | Suffolk | Surrey | Tyne & Wear | Warwickshire | West Midl&s | West Sussex | West Yorkshire | Wiltshire | Worcestershire | Antrim | Ards | Armagh | Ballymena | Ballymoney | Carrickfergus | Castlereagh | Coleraine | Cookstown | Craigavon | Derry | Down | Dungannon | Fermanagh | Lisburn | Magherafelt | Moyle | Newry & Mourne | Newtownabbey | North Down | Omagh | Strabane | Banbridge | Belfast | Aberdeen | Aberdeenshire | Angus | Argyll & Bute | Edinburgh | Clackmannanshire | Dumfries & Galloway | Dundee | East Ayrshire | East Dunbartonshire | East Lothian | East Renfrewshire | Falkirk | Fife | Glasgow | Highl& | Inverclyde | Midlothian | Moray | Na h-Eileanan an Iar | North Ayrshire | North Lanarkshire | Orkney Isl&s | Perth & Kinross | Renfrewshire | Scottish Borders | Shetl& Isl&s | South Lanarkshire | Stirling | West Dunbartonshire | West Lothian | Blaenau Gwent | Bridgend | Cardiff | Carmarthenshire | Ceredigion | Conwy | Denbighshire | Flintshire | Gwynedd | Isle of Anglesey | Merthyr Tydfil | Monmouthshire | VC Publishers |

     

    Copyright ABPCO.org.uk © 2016 | Cromwell Road, London, Kensington SW7 4ET