Automatically exported from code.google.com/p/planningalerts
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

pirms 18 gadiem
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. require_once('../include/application.php');
  3. # List of councils that use Public Access
  4. # REF => array(URL, NAME)
  5. $councils = array(
  6. 'argyll' => array("http://www.argyll-bute.gov.uk/PublicAccess/tdc/", "Argyll and Bute Council"),
  7. 'bedford' => array("http://www.publicaccess.bedford.gov.uk/publicaccess/dc/", 'Bedford Borough Council'),
  8. 'bexley' => array("http://publicaccess.bexley.gov.uk/publicaccess/tdc/", "London Borough of Bexley"),
  9. 'bradford' => array("http://www.planning4bradford.com/publicaccess/tdc/", "Bradford Metropolitan District Council"),
  10. 'cambridge' => array("http://www.cambridge.gov.uk/publicaccess/tdc/", "Cambridge City Council"),
  11. 'chester-le-street' => array("http://planning.chester-le-street.gov.uk/publicaccess/tdc/", "Chester-le-Street District Council"),
  12. 'corby' => array("http://publicaccess.corby.gov.uk/publicaccess/tdc/", "Corby Borough Council"),
  13. 'dartford' => array("http://publicaccess.dartford.gov.uk/publicaccess/tdc/", "Dartford Borough Council"),
  14. 'doncaster' => array("http://maps.doncaster.gov.uk/publicaccess/tdc/", "Doncaster Metropolitan Borough Council"),
  15. 'eastcambs' => array("http://pa.eastcambs.gov.uk/publicaccess/tdc/", "East Cambridgeshire District Council"),
  16. 'eastriding' => array("http://www.eastriding.gov.uk/PublicAccess731c/dc/", "East Riding of Yorkshire Council"),
  17. 'gloucester' => array("http://www.glcstrplnng11.co.uk/publicaccess/tdc/", "Gloucester City Council"),
  18. 'horsham' => array("http://publicaccess.horsham.gov.uk/publicaccess/tdc/", "Horsham District Council"),
  19. 'lambeth' => array("http://planning.lambeth.gov.uk/publicaccess/dc/", "London Borough of Lambeth"),
  20. 'leeds' => array("http://planningapplications.leeds.gov.uk/publicaccess/tdc/", "Leeds City Council"),
  21. 'manchester' => array("http://www.publicaccess.manchester.gov.uk/publicaccess/tdc/", "City of Manchester"),
  22. 'midsussex' => array("http://dc.midsussex.gov.uk/PublicAccess/tdc/", "Mid Sussex District Council"),
  23. 'staffordshire' => array("http://62.173.124.237/publicaccess/tdc/", "Staffordshire Moorlands District Council"),
  24. 'newham' => array("http://pacaps.newham.gov.uk/publicaccess/tdc/", "London Borough of Newham"),
  25. 'ne-derbyshire' => array("http://planapps-online.ne-derbyshire.gov.uk/publicaccess/dc/", "North East Derbyshire District Council"),
  26. 'norwich' => array("http://publicaccess.norwich.gov.uk/publicaccess/tdc/", "Norwich City Council"),
  27. 'oxford' => array("http://uniformpublicaccess.oxford.gov.uk/publicaccess/tdc/", "City of Oxford"),
  28. 'reading' => array("http://planning.reading.gov.uk/publicaccess/tdc/", "Reading Borough Council"),
  29. 'richmondshire' => array("http://publicaccess.richmondshire.gov.uk/PublicAccess/tdc/", "Richmondshire District Council"),
  30. 'rochford' => array("http://62.173.68.168/publicaccess/dc/", "Rochford District Council"),
  31. 'salford' => array("http://publicaccess.salford.gov.uk/publicaccess/dc/", "Salford City Council"),
  32. 'sandwell' => array("http://webcaps.sandwell.gov.uk/publicaccess/tdc/", "Sandwell Metropolitan Borough Council"),
  33. 'borders' => array("http://eplanning.scotborders.gov.uk/publicaccess/tdc/", "Scottish Borders Council"),
  34. 'stafford' => array("http://www3.staffordbc.gov.uk/publicaccess/tdc/", "Stafford Borough Council"),
  35. 'swindon' => array("http://194.73.99.13/publicaccess/tdc/", "Swindon Borough Council"),
  36. 'threerivers' => array("http://www2.threerivers.gov.uk/publicaccess/tdc/", "Three Rivers District Council"),
  37. 'torridge' => array("http://www.torridge.gov.uk/publicaccess/tdc/", "Torridge District Council"),
  38. 'tunbridgewells' => array("http://secure.tunbridgewells.gov.uk/publicaccess/tdc/", "Tunbridge Wells Borough Council"),
  39. 'whitehorse' => array("http://planning.whitehorsedc.gov.uk/publicaccess/tdc/", "Vale Of White Horse District Council"),
  40. 'wakefield' => array("http://planning.wakefield.gov.uk/publicaccess/tdc/", "Wakefield Metropolitan District Council"),
  41. 'westwiltshire' => array("http://planning.westwiltshire.gov.uk/PublicAccess/tdc/", "West Wiltshire District Council"),
  42. 'worthing' => array("http://planning.worthing.gov.uk/publicaccess/tdc/", "Worthing Borough Council"),
  43. 'wycombe' => array("http://planningpa.wycombe.gov.uk/publicaccess/tdc/", "Wycombe District Council"),
  44. );
  45. $current_date = getdate();
  46. $day = isset($_GET['day']) ? $_GET['day'] : $current_date['mday'] - 5;
  47. $month = isset($_GET['month']) ? $_GET['month'] : $current_date['mon'];
  48. $year = isset($_GET['year']) ? $_GET['year'] : $current_date['year'];
  49. $date = date('d%2\Fm%2\FY', mktime(12, 0, 0, $month, $day, $year)); # $day might be less than 1
  50. $council = $_GET['council'];
  51. if (!isset($council) || !array_key_exists($council, $councils)) exit;
  52. list($url, $name) = $councils[$council];
  53. $short_name = preg_replace('#( (Borough|City|District|Metropolitan|County))* Council#', '', $name);
  54. $short_name = str_replace(array('London Borough of ', 'City of '), '', $short_name);
  55. $search_url = $url . 'DcApplication/application_searchresults.aspx?searchtype=WEEKLY&selWeeklyListRange='
  56. . $date . '%7C' . $date . '&weektype=VAL';
  57. $info_url_base = $url . 'DcApplication/application_detailview.aspx?caseno=';
  58. $comment_url_base = $url . 'DcApplication/application_comments_entryform.aspx?caseno=';
  59. $applications = scrape_applications_publicaccess($search_url, $info_url_base, $comment_url_base);
  60. display_applications($applications, $name, $short_name);