Skip to content

Instantly share code, notes, and snippets.

@pezholio
Created April 28, 2010 10:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pezholio/382001 to your computer and use it in GitHub Desktop.
Save pezholio/382001 to your computer and use it in GitHub Desktop.
Planning Alerts Widget - Provides a widget showing the latest planning applications around a given postcode area. Based on Philip John's Opening Times Widget (http://philipjohn.co.uk/category/plugins/opening-times/)
<?php
/*
Plugin Name: Planning Alerts Widget
Plugin URI: http://www.pezholio.co.uk
Description: Provides a widget showing the latest planning applications around a given postcode area. Based on Philip John's Opening Times Widget (http://philipjohn.co.uk/category/plugins/opening-times/)
Author: Stuart Harrison
Version: 0.11b
Author URI: http://www.pezholio.co.uk
*/
/* This program is free software; you can redistribute it and/or modify
it under the terms of the Affero General Public License as published
by the Affero Inc; either version 2 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the Affero General Public License
along with this program; if npa, see http://www.affero.org/oagpl.html
*/
// Widget
function planningalerts_widget($args){
extract($args); // Prep to display widget code
$pa_options = get_option('pa_widget');
if ($pa_options['call'] == "postcode") {
$xml = simplexml_load_file('http://www.planningalerts.com/api.php?call=postcode&postcode='.$pa_options['postcode'].'&area_size=l');
} else {
$xml = simplexml_load_file('http://www.planningalerts.com/api.php?call=authority&authority='.$pa_options['authority']);
}
echo $before_widget;
echo $before_title.$pa_options['title'].$after_title;
if ($pa_options['pre_text']!=""){echo "<p>{$pa_options['pre_text']}</p>";}
echo "<dl>\n";
$i = 0; //counter for number of applications
foreach ($xml->channel->item as $result){
if ($i>=$pa_options['limit']) { break; } // don't list more than X results
echo '<dt><a href="'.$result->link.'">'.$result->title.'</a></dt>';
echo '<dd>'.$result->description .'</dd>'."\n";
$i++; //increment the counter
}
echo "</dl>\n";
echo '<p><a href="http://www.planningalerts.com">Sign up for alerts</a></p>';
echo $after_widget;
}
// Widget options
function planningalerts_options(){
if ($_POST['pa_submit']){
$pa_options['title'] = htmlspecialchars($_POST['pa_title']);
$pa_options['limit'] = htmlspecialchars($_POST['pa_limit']);
$pa_options['pre_text'] = htmlspecialchars($_POST['pa_pre_text']);
if ($_POST['type'] == "postcode") {
$pa_options['call'] = "postcode";
$pa_options['postcode'] = htmlspecialchars($_POST['pa_location']);
$pa_options['authority'] = "";
} else {
$pa_options['call'] = "authority";
$pa_options['authority'] = htmlspecialchars($_POST['pa_authority']);
}
update_option("pa_widget", $pa_options);
}
$pa_options = get_option('pa_widget');
?>
<p>
<label for="pa_title">Title:<br /></label>
<input type="text" id="pa_title" name="pa_title" value="<?php echo $pa_options['title'];?>" />
</p>
<p>
<label for="pa_limit">Number of applications to show: </label>
<input type="text" id="pa_limit" name="pa_limit" value="<?php echo $pa_options['limit'];?>" />
</p>
<p>
<label for="pa_pre_text">Text to display before the list: </label>
<input type="text" id="pa_pre_text" name="pa_pre_text" value="<?php echo $pa_options['pre_text'];?>" />
</p>
<p>Search by:</p>
<p><label for="postcodebutton">Postcode</label> <input type="radio" name="type" id="postcodebutton" value="postcode" <?php if ($pa_options['call'] == "postcode") echo "checked='checked'"; ?> class="postcode" /></p>
<p><label for="authoritybutton">Local Authority</label> <input type="radio" name="type" id="authoritybutton" value="authority" <?php if ($pa_options['call'] == "authority") echo "checked='checked'"; ?> class="authority" /></p>
<div class="postcodepanel" style="display:<?php if ($pa_options['call'] == "postcode") { echo "block"; } else { echo "none"; } ?>;">
<p>
<label for="pa_location">Enter a postcode to search nearby: </label>
<input type="text" id="pa_location" name="pa_location" value="<?php echo $pa_options['postcode'];?>" />
<input type="hidden" id="pa_submit" name="pa_submit" value="1" />
</p>
</div>
<div class="authoritypanel" style="display:<?php if ($pa_options['call'] == "authority") { echo "block"; } else { echo "none"; } ?>;">
<p>
<label for="pa_authority">Choose a local authority</label>
<select name="pa_authority" id="pa_authority" style="width: 200px;">
<option>None selected</option>
<option value="Aberdeenshire" <?php if ($pa_options['authority'] == "Aberdeenshire") echo "selected='selected'"; ?> >Aberdeenshire Council</option>
<option value="Allerdale" <?php if ($pa_options['authority'] == "Allerdale") echo "selected='selected'"; ?> >Allerdale Borough Council</option>
<option value="Alnwick" <?php if ($pa_options['authority'] == "Alnwick") echo "selected='selected'"; ?> >Alnwick District Council</option>
<option value="Amber Valley" <?php if ($pa_options['authority'] == "Amber Valley") echo "selected='selected'"; ?> >Amber Valley Borough Council</option>
<option value="Angus" <?php if ($pa_options['authority'] == "Angus") echo "selected='selected'"; ?> >Angus Council</option>
<option value="Argyll and Bute" <?php if ($pa_options['authority'] == "Argyll and Bute") echo "selected='selected'"; ?> >Argyll And Bute Council</option>
<option value="Arun" <?php if ($pa_options['authority'] == "Arun") echo "selected='selected'"; ?> >Arun District Council</option>
<option value="Aylesbury Vale" <?php if ($pa_options['authority'] == "Aylesbury Vale") echo "selected='selected'"; ?> >Aylesbury Vale District Council</option>
<option value="Babergh" <?php if ($pa_options['authority'] == "Babergh") echo "selected='selected'"; ?> >Babergh District Council</option>
<option value="Barnsley" <?php if ($pa_options['authority'] == "Barnsley") echo "selected='selected'"; ?> >Barnsley Metropolitan Borough Council</option>
<option value="Barrow" <?php if ($pa_options['authority'] == "Barrow") echo "selected='selected'"; ?> >Barrow Borough Council</option>
<option value="Basildon" <?php if ($pa_options['authority'] == "Basildon") echo "selected='selected'"; ?> >Basildon District Council</option>
<option value="Basingstoke and Deane" <?php if ($pa_options['authority'] == "Basingstoke and Deane") echo "selected='selected'"; ?> >Basingstoke and Deane Borough Council</option>
<option value="Bassetlaw" <?php if ($pa_options['authority'] == "Bassetlaw") echo "selected='selected'"; ?> >Bassetlaw District Council</option>
<option value="Bath" <?php if ($pa_options['authority'] == "Bath") echo "selected='selected'"; ?> >Bath and North East Somerset</option>
<option value="Bedford" <?php if ($pa_options['authority'] == "Bedford") echo "selected='selected'"; ?> >Bedford Borough Council</option>
<option value="Berwick" <?php if ($pa_options['authority'] == "Berwick") echo "selected='selected'"; ?> >Berwick-upon-Tweed Borough Council</option>
<option value="Bexley" <?php if ($pa_options['authority'] == "Bexley") echo "selected='selected'"; ?> >Bexley Council</option>
<option value="Birmingham" <?php if ($pa_options['authority'] == "Birmingham") echo "selected='selected'"; ?> >Birmingham City Council</option>
<option value="Blaby" <?php if ($pa_options['authority'] == "Blaby") echo "selected='selected'"; ?> >Blaby District Council</option>
<option value="Blackburn" <?php if ($pa_options['authority'] == "Blackburn") echo "selected='selected'"; ?> >Blackburn with Darwen Borough Council</option>
<option value="Blackpool" <?php if ($pa_options['authority'] == "Blackpool") echo "selected='selected'"; ?> >Blackpool Borough Council</option>
<option value="Bolsover" <?php if ($pa_options['authority'] == "Bolsover") echo "selected='selected'"; ?> >Bolsover District Council</option>
<option value="Bolton" <?php if ($pa_options['authority'] == "Bolton") echo "selected='selected'"; ?> >Bolton Metropolitan Borough Council</option>
<option value="Boston" <?php if ($pa_options['authority'] == "Boston") echo "selected='selected'"; ?> >Boston Borough Council</option>
<option value="Bracknell Forest" <?php if ($pa_options['authority'] == "Bracknell Forest") echo "selected='selected'"; ?> >Bracknell Forest Borough Council</option>
<option value="Bradford" <?php if ($pa_options['authority'] == "Bradford") echo "selected='selected'"; ?> >Bradford Metropolitan District Council</option>
<option value="Braintree" <?php if ($pa_options['authority'] == "Braintree") echo "selected='selected'"; ?> >Braintree District Council</option>
<option value="Breckland" <?php if ($pa_options['authority'] == "Breckland") echo "selected='selected'"; ?> >Breckland Council</option>
<option value="Brentwood" <?php if ($pa_options['authority'] == "Brentwood") echo "selected='selected'"; ?> >Brentwood Borough Council</option>
<option value="Bridgend" <?php if ($pa_options['authority'] == "Bridgend") echo "selected='selected'"; ?> >Bridgend County Borough Council</option>
<option value="Bridgnorth" <?php if ($pa_options['authority'] == "Bridgnorth") echo "selected='selected'"; ?> >Bridgnorth District Council</option>
<option value="Bristol" <?php if ($pa_options['authority'] == "Bristol") echo "selected='selected'"; ?> >Bristol City Council</option>
<option value="Broadland" <?php if ($pa_options['authority'] == "Broadland") echo "selected='selected'"; ?> >Broadland District Council</option>
<option value="Broads" <?php if ($pa_options['authority'] == "Broads") echo "selected='selected'"; ?> >Broads Authority</option>
<option value="Bromsgrove" <?php if ($pa_options['authority'] == "Bromsgrove") echo "selected='selected'"; ?> >Bromsgrove District Council</option>
<option value="Broxbourne" <?php if ($pa_options['authority'] == "Broxbourne") echo "selected='selected'"; ?> >Broxbourne Borough Council</option>
<option value="Broxtowe" <?php if ($pa_options['authority'] == "Broxtowe") echo "selected='selected'"; ?> >Broxtowe Borough Council</option>
<option value="Buckinghamshire" <?php if ($pa_options['authority'] == "Buckinghamshire") echo "selected='selected'"; ?> >Buckinghamshire County Council</option>
<option value="Burnley" <?php if ($pa_options['authority'] == "Burnley") echo "selected='selected'"; ?> >Burnley Borough Council</option>
<option value="Bury" <?php if ($pa_options['authority'] == "Bury") echo "selected='selected'"; ?> >Bury Metropolitan Borough Council</option>
<option value="Caerphilly" <?php if ($pa_options['authority'] == "Caerphilly") echo "selected='selected'"; ?> >Caerphilly County Borough Council</option>
<option value="Cairngorms" <?php if ($pa_options['authority'] == "Cairngorms") echo "selected='selected'"; ?> >Cairngorms National Park</option>
<option value="Calderdale" <?php if ($pa_options['authority'] == "Calderdale") echo "selected='selected'"; ?> >Calderdale Council</option>
<option value="Cambridge" <?php if ($pa_options['authority'] == "Cambridge") echo "selected='selected'"; ?> >Cambridge City Council</option>
<option value="Cambridgeshire" <?php if ($pa_options['authority'] == "Cambridgeshire") echo "selected='selected'"; ?> >Cambridgeshire County Council</option>
<option value="Cannock Chase" <?php if ($pa_options['authority'] == "Cannock Chase") echo "selected='selected'"; ?> >Cannock Chase District Council</option>
<option value="Canterbury" <?php if ($pa_options['authority'] == "Canterbury") echo "selected='selected'"; ?> >Canterbury City Council</option>
<option value="Caradon" <?php if ($pa_options['authority'] == "Caradon") echo "selected='selected'"; ?> >Caradon District Council</option>
<option value="Carlisle" <?php if ($pa_options['authority'] == "Carlisle") echo "selected='selected'"; ?> >Carlisle City Council</option>
<option value="Carmarthenshire" <?php if ($pa_options['authority'] == "Carmarthenshire") echo "selected='selected'"; ?> >Carmarthenshire County Council</option>
<option value="Castle Point" <?php if ($pa_options['authority'] == "Castle Point") echo "selected='selected'"; ?> >Castle Point Borough Council</option>
<option value="Charnwood" <?php if ($pa_options['authority'] == "Charnwood") echo "selected='selected'"; ?> >Charnwood Borough Council</option>
<option value="Chelmsford" <?php if ($pa_options['authority'] == "Chelmsford") echo "selected='selected'"; ?> >Chelmsford Borough Council</option>
<option value="Cheltenham" <?php if ($pa_options['authority'] == "Cheltenham") echo "selected='selected'"; ?> >Cheltenham Borough Council</option>
<option value="Cherwell" <?php if ($pa_options['authority'] == "Cherwell") echo "selected='selected'"; ?> >Cherwell District Council</option>
<option value="Cheshire East" <?php if ($pa_options['authority'] == "Cheshire East") echo "selected='selected'"; ?> >Cheshire East Council</option>
<option value="Chester-le-Street" <?php if ($pa_options['authority'] == "Chester-le-Street") echo "selected='selected'"; ?> >Chester-le-Street District Council</option>
<option value="Chichester" <?php if ($pa_options['authority'] == "Chichester") echo "selected='selected'"; ?> >Chichester District Council</option>
<option value="Chiltern" <?php if ($pa_options['authority'] == "Chiltern") echo "selected='selected'"; ?> >Chiltern District Council</option>
<option value="Chorley" <?php if ($pa_options['authority'] == "Chorley") echo "selected='selected'"; ?> >Chorley Borough Council</option>
<option value="Christchurch" <?php if ($pa_options['authority'] == "Christchurch") echo "selected='selected'"; ?> >Christchurch Borough Council</option>
<option value="City of London" <?php if ($pa_options['authority'] == "City of London") echo "selected='selected'"; ?> >City of London</option>
<option value="York" <?php if ($pa_options['authority'] == "York") echo "selected='selected'"; ?> >City of York Council</option>
<option value="Colchester" <?php if ($pa_options['authority'] == "Colchester") echo "selected='selected'"; ?> >Colchester Borough Council</option>
<option value="Comhairle Nan Eilean Siar" <?php if ($pa_options['authority'] == "Comhairle Nan Eilean Siar") echo "selected='selected'"; ?> >Comhairle Nan Eilean Siar</option>
<option value="Conwy" <?php if ($pa_options['authority'] == "Conwy") echo "selected='selected'"; ?> >Conwy County Borough Council</option>
<option value="Corby" <?php if ($pa_options['authority'] == "Corby") echo "selected='selected'"; ?> >Corby Borough Council</option>
<option value="Cornwall" <?php if ($pa_options['authority'] == "Cornwall") echo "selected='selected'"; ?> >Cornwall County Council</option>
<option value="Coventry" <?php if ($pa_options['authority'] == "Coventry") echo "selected='selected'"; ?> >Coventry City Council</option>
<option value="Craven" <?php if ($pa_options['authority'] == "Craven") echo "selected='selected'"; ?> >Craven District Council</option>
<option value="Crawley" <?php if ($pa_options['authority'] == "Crawley") echo "selected='selected'"; ?> >Crawley Borough Council</option>
<option value="Crewe and Nantwich" <?php if ($pa_options['authority'] == "Crewe and Nantwich") echo "selected='selected'"; ?> >Crewe and Nantwich Borough Council</option>
<option value="Cumbria" <?php if ($pa_options['authority'] == "Cumbria") echo "selected='selected'"; ?> >Cumbria County Council</option>
<option value="Gwynedd" <?php if ($pa_options['authority'] == "Gwynedd") echo "selected='selected'"; ?> >Cyngor Gwynedd Council</option>
<option value="Dacorum" <?php if ($pa_options['authority'] == "Dacorum") echo "selected='selected'"; ?> >Dacorum Borough Council</option>
<option value="Dartford" <?php if ($pa_options['authority'] == "Dartford") echo "selected='selected'"; ?> >Dartford Borough Council</option>
<option value="Daventry" <?php if ($pa_options['authority'] == "Daventry") echo "selected='selected'"; ?> >Daventry District Council</option>
<option value="Denbighshire" <?php if ($pa_options['authority'] == "Denbighshire") echo "selected='selected'"; ?> >Denbighshire County Council</option>
<option value="Derby" <?php if ($pa_options['authority'] == "Derby") echo "selected='selected'"; ?> >Derby City Council</option>
<option value="Doncaster" <?php if ($pa_options['authority'] == "Doncaster") echo "selected='selected'"; ?> >Doncaster Metropolitan Borough Council</option>
<option value="Dorset" <?php if ($pa_options['authority'] == "Dorset") echo "selected='selected'"; ?> >Dorset County Council</option>
<option value="Dudley" <?php if ($pa_options['authority'] == "Dudley") echo "selected='selected'"; ?> >Dudley Metropolitan Borough Council</option>
<option value="Dundee" <?php if ($pa_options['authority'] == "Dundee") echo "selected='selected'"; ?> >Dundee City Council</option>
<option value="Durham" <?php if ($pa_options['authority'] == "Durham") echo "selected='selected'"; ?> >Durham City Council</option>
<option value="Ealing" <?php if ($pa_options['authority'] == "Ealing") echo "selected='selected'"; ?> >Ealing Council</option>
<option value="Easington" <?php if ($pa_options['authority'] == "Easington") echo "selected='selected'"; ?> >Easington District Council</option>
<option value="East Cambridgeshire" <?php if ($pa_options['authority'] == "East Cambridgeshire") echo "selected='selected'"; ?> >East Cambridgeshire District Council</option>
<option value="East Devon" <?php if ($pa_options['authority'] == "East Devon") echo "selected='selected'"; ?> >East Devon District Council</option>
<option value="East Dorset" <?php if ($pa_options['authority'] == "East Dorset") echo "selected='selected'"; ?> >East Dorset District Council</option>
<option value="East Hampshire" <?php if ($pa_options['authority'] == "East Hampshire") echo "selected='selected'"; ?> >East Hampshire District Council</option>
<option value="East Herts" <?php if ($pa_options['authority'] == "East Herts") echo "selected='selected'"; ?> >East Hertfordshire District Council</option>
<option value="East Lindsey" <?php if ($pa_options['authority'] == "East Lindsey") echo "selected='selected'"; ?> >East Lindsey District Council</option>
<option value="East Lothian" <?php if ($pa_options['authority'] == "East Lothian") echo "selected='selected'"; ?> >East Lothian Council</option>
<option value="East Northants" <?php if ($pa_options['authority'] == "East Northants") echo "selected='selected'"; ?> >East Northamptonshire Council</option>
<option value="East Riding" <?php if ($pa_options['authority'] == "East Riding") echo "selected='selected'"; ?> >East Riding of Yorkshire Council</option>
<option value="East Staffs" <?php if ($pa_options['authority'] == "East Staffs") echo "selected='selected'"; ?> >East Staffordshire District Council</option>
<option value="Eastbourne" <?php if ($pa_options['authority'] == "Eastbourne") echo "selected='selected'"; ?> >Eastbourne Borough Council</option>
<option value="Eastleigh" <?php if ($pa_options['authority'] == "Eastleigh") echo "selected='selected'"; ?> >Eastleigh Borough Council</option>
<option value="Eden" <?php if ($pa_options['authority'] == "Eden") echo "selected='selected'"; ?> >Eden District Council</option>
<option value="Ellesmere Port" <?php if ($pa_options['authority'] == "Ellesmere Port") echo "selected='selected'"; ?> >Ellesmere Port and Neston Borough Council</option>
<option value="Elmbridge" <?php if ($pa_options['authority'] == "Elmbridge") echo "selected='selected'"; ?> >Elmbridge Borough Council</option>
<option value="Epping Forest" <?php if ($pa_options['authority'] == "Epping Forest") echo "selected='selected'"; ?> >Epping Forest District Council</option>
<option value="Epsom and Ewell" <?php if ($pa_options['authority'] == "Epsom and Ewell") echo "selected='selected'"; ?> >Epsom and Ewell Borough Council</option>
<option value="Exeter" <?php if ($pa_options['authority'] == "Exeter") echo "selected='selected'"; ?> >Exeter City Council</option>
<option value="Exmoor" <?php if ($pa_options['authority'] == "Exmoor") echo "selected='selected'"; ?> >Exmoor National Park</option>
<option value="Fareham" <?php if ($pa_options['authority'] == "Fareham") echo "selected='selected'"; ?> >Fareham Borough Council</option>
<option value="Fenland" <?php if ($pa_options['authority'] == "Fenland") echo "selected='selected'"; ?> >Fenland District Council</option>
<option value="Fife" <?php if ($pa_options['authority'] == "Fife") echo "selected='selected'"; ?> >Fife Council</option>
<option value="Flintshire" <?php if ($pa_options['authority'] == "Flintshire") echo "selected='selected'"; ?> >Flintshire County Council</option>
<option value="Forest Heath" <?php if ($pa_options['authority'] == "Forest Heath") echo "selected='selected'"; ?> >Forest Heath District Council</option>
<option value="Forest of Dean" <?php if ($pa_options['authority'] == "Forest of Dean") echo "selected='selected'"; ?> >Forest of Dean District Council</option>
<option value="Fylde" <?php if ($pa_options['authority'] == "Fylde") echo "selected='selected'"; ?> >Fylde Borough Council</option>
<option value="Gateshead" <?php if ($pa_options['authority'] == "Gateshead") echo "selected='selected'"; ?> >Gateshead Metropolitan Borough Council</option>
<option value="Gedling" <?php if ($pa_options['authority'] == "Gedling") echo "selected='selected'"; ?> >Gedling Borough Council</option>
<option value="Glasgow" <?php if ($pa_options['authority'] == "Glasgow") echo "selected='selected'"; ?> >Glasgow City Council</option>
<option value="Gloucester" <?php if ($pa_options['authority'] == "Gloucester") echo "selected='selected'"; ?> >Gloucester City Council</option>
<option value="Gloucestershire" <?php if ($pa_options['authority'] == "Gloucestershire") echo "selected='selected'"; ?> >Gloucestershire County Council</option>
<option value="Gosport" <?php if ($pa_options['authority'] == "Gosport") echo "selected='selected'"; ?> >Gosport Borough Council</option>
<option value="Gravesham" <?php if ($pa_options['authority'] == "Gravesham") echo "selected='selected'"; ?> >Gravesham Borough Council</option>
<option value="Great Yarmouth" <?php if ($pa_options['authority'] == "Great Yarmouth") echo "selected='selected'"; ?> >Great Yarmouth Borough Council</option>
<option value="Guildford" <?php if ($pa_options['authority'] == "Guildford") echo "selected='selected'"; ?> >Guildford Borough Council</option>
<option value="Halton" <?php if ($pa_options['authority'] == "Halton") echo "selected='selected'"; ?> >Halton Borough Council</option>
<option value="Hambleton" <?php if ($pa_options['authority'] == "Hambleton") echo "selected='selected'"; ?> >Hambleton District Council</option>
<option value="Hampshire" <?php if ($pa_options['authority'] == "Hampshire") echo "selected='selected'"; ?> >Hampshire County Council</option>
<option value="Harborough" <?php if ($pa_options['authority'] == "Harborough") echo "selected='selected'"; ?> >Harborough District Council</option>
<option value="Haringey" <?php if ($pa_options['authority'] == "Haringey") echo "selected='selected'"; ?> >Haringey Council</option>
<option value="Harlow" <?php if ($pa_options['authority'] == "Harlow") echo "selected='selected'"; ?> >Harlow Council</option>
<option value="Harrogate" <?php if ($pa_options['authority'] == "Harrogate") echo "selected='selected'"; ?> >Harrogate Borough Council</option>
<option value="Hart" <?php if ($pa_options['authority'] == "Hart") echo "selected='selected'"; ?> >Hart District Council</option>
<option value="Hartlepool" <?php if ($pa_options['authority'] == "Hartlepool") echo "selected='selected'"; ?> >Hartlepool Borough Council</option>
<option value="Hastings" <?php if ($pa_options['authority'] == "Hastings") echo "selected='selected'"; ?> >Hastings Borough Council</option>
<option value="Havant" <?php if ($pa_options['authority'] == "Havant") echo "selected='selected'"; ?> >Havant Borough Council</option>
<option value="Herefordshire" <?php if ($pa_options['authority'] == "Herefordshire") echo "selected='selected'"; ?> >Herefordshire Council</option>
<option value="Hertsmere" <?php if ($pa_options['authority'] == "Hertsmere") echo "selected='selected'"; ?> >Hertsmere Borough Council</option>
<option value="High Peak" <?php if ($pa_options['authority'] == "High Peak") echo "selected='selected'"; ?> >High Peak Borough Council</option>
<option value="Highland" <?php if ($pa_options['authority'] == "Highland") echo "selected='selected'"; ?> >Highland Council</option>
<option value="Hinckley and Bosworth" <?php if ($pa_options['authority'] == "Hinckley and Bosworth") echo "selected='selected'"; ?> >Hinckley and Bosworth Borough Council</option>
<option value="Horsham" <?php if ($pa_options['authority'] == "Horsham") echo "selected='selected'"; ?> >Horsham District Council</option>
<option value="Huntingdonshire" <?php if ($pa_options['authority'] == "Huntingdonshire") echo "selected='selected'"; ?> >Huntingdonshire District Council</option>
<option value="Isle of Wight" <?php if ($pa_options['authority'] == "Isle of Wight") echo "selected='selected'"; ?> >Isle of Wight Council</option>
<option value="Kennet" <?php if ($pa_options['authority'] == "Kennet") echo "selected='selected'"; ?> >Kennet District Council</option>
<option value="Kerrier" <?php if ($pa_options['authority'] == "Kerrier") echo "selected='selected'"; ?> >Kerrier District Council</option>
<option value="West Norfolk" <?php if ($pa_options['authority'] == "West Norfolk") echo "selected='selected'"; ?> >Kings Lynn and West Norfolk Borough Council</option>
<option value="Kingston upon Hull" <?php if ($pa_options['authority'] == "Kingston upon Hull") echo "selected='selected'"; ?> >Kingston upon Hull City Council</option>
<option value="Kirklees" <?php if ($pa_options['authority'] == "Kirklees") echo "selected='selected'"; ?> >Kirklees Council</option>
<option value="Knowsley" <?php if ($pa_options['authority'] == "Knowsley") echo "selected='selected'"; ?> >Knowsley Council</option>
<option value="Lake District" <?php if ($pa_options['authority'] == "Lake District") echo "selected='selected'"; ?> >Lake District National Park Authority</option>
<option value="Lancaster" <?php if ($pa_options['authority'] == "Lancaster") echo "selected='selected'"; ?> >Lancaster City Council</option>
<option value="Leeds" <?php if ($pa_options['authority'] == "Leeds") echo "selected='selected'"; ?> >Leeds City Council</option>
<option value="Leicestershire" <?php if ($pa_options['authority'] == "Leicestershire") echo "selected='selected'"; ?> >Leicestershire County Council</option>
<option value="Lewes" <?php if ($pa_options['authority'] == "Lewes") echo "selected='selected'"; ?> >Lewes District Council</option>
<option value="Lichfield" <?php if ($pa_options['authority'] == "Lichfield") echo "selected='selected'"; ?> >Lichfield District Council</option>
<option value="Lincoln" <?php if ($pa_options['authority'] == "Lincoln") echo "selected='selected'"; ?> >Lincoln City Council</option>
<option value="Lincolnshire" <?php if ($pa_options['authority'] == "Lincolnshire") echo "selected='selected'"; ?> >Lincolnshire County Council</option>
<option value="Liverpool" <?php if ($pa_options['authority'] == "Liverpool") echo "selected='selected'"; ?> >Liverpool City Council</option>
<option value="Barking and Dagenham" <?php if ($pa_options['authority'] == "Barking and Dagenham") echo "selected='selected'"; ?> >London Borough of Barking and Dagenham</option>
<option value="Barnet" <?php if ($pa_options['authority'] == "Barnet") echo "selected='selected'"; ?> >London Borough of Barnet</option>
<option value="Brent" <?php if ($pa_options['authority'] == "Brent") echo "selected='selected'"; ?> >London Borough of Brent</option>
<option value="Bromley" <?php if ($pa_options['authority'] == "Bromley") echo "selected='selected'"; ?> >London Borough of Bromley</option>
<option value="Camden" <?php if ($pa_options['authority'] == "Camden") echo "selected='selected'"; ?> >London Borough of Camden</option>
<option value="Croydon" <?php if ($pa_options['authority'] == "Croydon") echo "selected='selected'"; ?> >London Borough of Croydon</option>
<option value="Enfield" <?php if ($pa_options['authority'] == "Enfield") echo "selected='selected'"; ?> >London Borough of Enfield</option>
<option value="Greenwich" <?php if ($pa_options['authority'] == "Greenwich") echo "selected='selected'"; ?> >London Borough of Greenwich</option>
<option value="Hackney" <?php if ($pa_options['authority'] == "Hackney") echo "selected='selected'"; ?> >London Borough of Hackney</option>
<option value="Hammersmith and Fulham" <?php if ($pa_options['authority'] == "Hammersmith and Fulham") echo "selected='selected'"; ?> >London Borough of Hammersmith and Fulham</option>
<option value="Harrow" <?php if ($pa_options['authority'] == "Harrow") echo "selected='selected'"; ?> >London Borough of Harrow</option>
<option value="Havering" <?php if ($pa_options['authority'] == "Havering") echo "selected='selected'"; ?> >London Borough of Havering</option>
<option value="Hillingdon" <?php if ($pa_options['authority'] == "Hillingdon") echo "selected='selected'"; ?> >London Borough of Hillingdon</option>
<option value="Hounslow" <?php if ($pa_options['authority'] == "Hounslow") echo "selected='selected'"; ?> >London Borough of Hounslow</option>
<option value="Islington" <?php if ($pa_options['authority'] == "Islington") echo "selected='selected'"; ?> >London Borough of Islington</option>
<option value="Lambeth" <?php if ($pa_options['authority'] == "Lambeth") echo "selected='selected'"; ?> >London Borough of Lambeth</option>
<option value="Lewisham" <?php if ($pa_options['authority'] == "Lewisham") echo "selected='selected'"; ?> >London Borough of Lewisham</option>
<option value="Merton" <?php if ($pa_options['authority'] == "Merton") echo "selected='selected'"; ?> >London Borough of Merton</option>
<option value="Newham" <?php if ($pa_options['authority'] == "Newham") echo "selected='selected'"; ?> >London Borough Of Newham</option>
<option value="Redbridge" <?php if ($pa_options['authority'] == "Redbridge") echo "selected='selected'"; ?> >London Borough of Redbridge</option>
<option value="Richmond" <?php if ($pa_options['authority'] == "Richmond") echo "selected='selected'"; ?> >London Borough of Richmond upon Thames</option>
<option value="Southwark" <?php if ($pa_options['authority'] == "Southwark") echo "selected='selected'"; ?> >London Borough of Southwark</option>
<option value="Sutton" <?php if ($pa_options['authority'] == "Sutton") echo "selected='selected'"; ?> >London Borough of Sutton</option>
<option value="Tower Hamlets" <?php if ($pa_options['authority'] == "Tower Hamlets") echo "selected='selected'"; ?> >London Borough of Tower Hamlets</option>
<option value="Luton" <?php if ($pa_options['authority'] == "Luton") echo "selected='selected'"; ?> >Luton Borough Council</option>
<option value="Macclesfield" <?php if ($pa_options['authority'] == "Macclesfield") echo "selected='selected'"; ?> >Macclesfield Borough Council</option>
<option value="Maidstone" <?php if ($pa_options['authority'] == "Maidstone") echo "selected='selected'"; ?> >Maidstone Borough Council</option>
<option value="Maldon" <?php if ($pa_options['authority'] == "Maldon") echo "selected='selected'"; ?> >Maldon District Council</option>
<option value="Malvern Hills" <?php if ($pa_options['authority'] == "Malvern Hills") echo "selected='selected'"; ?> >Malvern Hills District Council</option>
<option value="Manchester" <?php if ($pa_options['authority'] == "Manchester") echo "selected='selected'"; ?> >Manchester City Council</option>
<option value="Mansfield" <?php if ($pa_options['authority'] == "Mansfield") echo "selected='selected'"; ?> >Mansfield District Council</option>
<option value="Medway" <?php if ($pa_options['authority'] == "Medway") echo "selected='selected'"; ?> >Medway Council</option>
<option value="Melton" <?php if ($pa_options['authority'] == "Melton") echo "selected='selected'"; ?> >Melton Borough Council</option>
<option value="Mendip" <?php if ($pa_options['authority'] == "Mendip") echo "selected='selected'"; ?> >Mendip District Council</option>
<option value="Mid Beds" <?php if ($pa_options['authority'] == "Mid Beds") echo "selected='selected'"; ?> >Mid Bedfordshire District Council</option>
<option value="Mid Devon" <?php if ($pa_options['authority'] == "Mid Devon") echo "selected='selected'"; ?> >Mid Devon District Council</option>
<option value="Mid Suffolk" <?php if ($pa_options['authority'] == "Mid Suffolk") echo "selected='selected'"; ?> >Mid Suffolk District Council</option>
<option value="Mid Sussex" <?php if ($pa_options['authority'] == "Mid Sussex") echo "selected='selected'"; ?> >Mid Sussex District Council</option>
<option value="Middlesbrough" <?php if ($pa_options['authority'] == "Middlesbrough") echo "selected='selected'"; ?> >Middlesbrough Borough Council</option>
<option value="Milton Keynes" <?php if ($pa_options['authority'] == "Milton Keynes") echo "selected='selected'"; ?> >Milton Keynes Council</option>
<option value="Mole Valley" <?php if ($pa_options['authority'] == "Mole Valley") echo "selected='selected'"; ?> >Mole Valley District Council</option>
<option value="Moray" <?php if ($pa_options['authority'] == "Moray") echo "selected='selected'"; ?> >Moray Council</option>
<option value="Neath Port Talbot" <?php if ($pa_options['authority'] == "Neath Port Talbot") echo "selected='selected'"; ?> >Neath Port Talbot County Borough Council</option>
<option value="New Forest DC" <?php if ($pa_options['authority'] == "New Forest DC") echo "selected='selected'"; ?> >New Forest District Council</option>
<option value="New Forest NP" <?php if ($pa_options['authority'] == "New Forest NP") echo "selected='selected'"; ?> >New Forest National Park</option>
<option value="Newcastle" <?php if ($pa_options['authority'] == "Newcastle") echo "selected='selected'"; ?> >Newcastle City Council</option>
<option value="Newcastle-under-Lyme" <?php if ($pa_options['authority'] == "Newcastle-under-Lyme") echo "selected='selected'"; ?> >Newcastle-under-Lyme Borough Council</option>
<option value="Newport" <?php if ($pa_options['authority'] == "Newport") echo "selected='selected'"; ?> >Newport City Council</option>
<option value="North Ayrshire" <?php if ($pa_options['authority'] == "North Ayrshire") echo "selected='selected'"; ?> >North Ayrshire Council</option>
<option value="North East Derbyshire" <?php if ($pa_options['authority'] == "North East Derbyshire") echo "selected='selected'"; ?> >North East Derbyshire District Council</option>
<option value="North East Lincolnshire" <?php if ($pa_options['authority'] == "North East Lincolnshire") echo "selected='selected'"; ?> >North East Lincolnshire Council</option>
<option value="North Hertfordshire" <?php if ($pa_options['authority'] == "North Hertfordshire") echo "selected='selected'"; ?> >North Hertfordshire District Council</option>
<option value="North Lincolnshire" <?php if ($pa_options['authority'] == "North Lincolnshire") echo "selected='selected'"; ?> >North Lincolnshire Council</option>
<option value="North Somerset" <?php if ($pa_options['authority'] == "North Somerset") echo "selected='selected'"; ?> >North Somerset Council</option>
<option value="North Tyneside" <?php if ($pa_options['authority'] == "North Tyneside") echo "selected='selected'"; ?> >North Tyneside Council</option>
<option value="North Warwickshire" <?php if ($pa_options['authority'] == "North Warwickshire") echo "selected='selected'"; ?> >North Warwickshire Borough Council</option>
<option value="North West Leicestershire" <?php if ($pa_options['authority'] == "North West Leicestershire") echo "selected='selected'"; ?> >North West Leicestershire District Council</option>
<option value="North Wiltshire" <?php if ($pa_options['authority'] == "North Wiltshire") echo "selected='selected'"; ?> >North Wiltshire District Council</option>
<option value="North Yorkshire" <?php if ($pa_options['authority'] == "North Yorkshire") echo "selected='selected'"; ?> >North Yorkshire County Council</option>
<option value="Northumberland" <?php if ($pa_options['authority'] == "Northumberland") echo "selected='selected'"; ?> >Northumberland County Council</option>
<option value="Norwich" <?php if ($pa_options['authority'] == "Norwich") echo "selected='selected'"; ?> >Norwich City Council</option>
<option value="Nottingham" <?php if ($pa_options['authority'] == "Nottingham") echo "selected='selected'"; ?> >Nottingham City Council</option>
<option value="Oadby and Wigston" <?php if ($pa_options['authority'] == "Oadby and Wigston") echo "selected='selected'"; ?> >Oadby and Wigston Borough Council</option>
<option value="Oldham" <?php if ($pa_options['authority'] == "Oldham") echo "selected='selected'"; ?> >Oldham Metropolitan Borough Council</option>
<option value="Olympics" <?php if ($pa_options['authority'] == "Olympics") echo "selected='selected'"; ?> >Olympic Delivery Authority</option>
<option value="Oswestry" <?php if ($pa_options['authority'] == "Oswestry") echo "selected='selected'"; ?> >Oswestry Borough Council</option>
<option value="Oxford" <?php if ($pa_options['authority'] == "Oxford") echo "selected='selected'"; ?> >Oxford City Council</option>
<option value="Pembrokeshire" <?php if ($pa_options['authority'] == "Pembrokeshire") echo "selected='selected'"; ?> >Pembrokeshire County Council</option>
<option value="Pendle" <?php if ($pa_options['authority'] == "Pendle") echo "selected='selected'"; ?> >Pendle Borough Council</option>
<option value="Perthshire" <?php if ($pa_options['authority'] == "Perthshire") echo "selected='selected'"; ?> >Perth and Kinross Council</option>
<option value="Peterborough" <?php if ($pa_options['authority'] == "Peterborough") echo "selected='selected'"; ?> >Peterborough City Council</option>
<option value="Poole" <?php if ($pa_options['authority'] == "Poole") echo "selected='selected'"; ?> >Poole Borough Council</option>
<option value="Portsmouth" <?php if ($pa_options['authority'] == "Portsmouth") echo "selected='selected'"; ?> >Portsmouth City Council</option>
<option value="Reading" <?php if ($pa_options['authority'] == "Reading") echo "selected='selected'"; ?> >Reading Borough Council</option>
<option value="Redditch" <?php if ($pa_options['authority'] == "Redditch") echo "selected='selected'"; ?> >Redditch Borough Council</option>
<option value="Reigate and Banstead" <?php if ($pa_options['authority'] == "Reigate and Banstead") echo "selected='selected'"; ?> >Reigate and Banstead Borough Council</option>
<option value="Renfrewshire" <?php if ($pa_options['authority'] == "Renfrewshire") echo "selected='selected'"; ?> >Renfrewshire Council</option>
<option value="Richmondshire" <?php if ($pa_options['authority'] == "Richmondshire") echo "selected='selected'"; ?> >Richmondshire District Council</option>
<option value="Rochdale" <?php if ($pa_options['authority'] == "Rochdale") echo "selected='selected'"; ?> >Rochdale Metropolitan Borough Council</option>
<option value="Rochford" <?php if ($pa_options['authority'] == "Rochford") echo "selected='selected'"; ?> >Rochford District Council</option>
<option value="Rother" <?php if ($pa_options['authority'] == "Rother") echo "selected='selected'"; ?> >Rother District Council</option>
<option value="Kingston upon Thames" <?php if ($pa_options['authority'] == "Kingston upon Thames") echo "selected='selected'"; ?> >Royal Borough of Kingston upon Thames</option>
<option value="Rugby" <?php if ($pa_options['authority'] == "Rugby") echo "selected='selected'"; ?> >Rugby Borough Council</option>
<option value="Rushmoor" <?php if ($pa_options['authority'] == "Rushmoor") echo "selected='selected'"; ?> >Rushmoor Borough Council</option>
<option value="Rutland" <?php if ($pa_options['authority'] == "Rutland") echo "selected='selected'"; ?> >Rutland County Council</option>
<option value="Ryedale" <?php if ($pa_options['authority'] == "Ryedale") echo "selected='selected'"; ?> >Ryedale District Council</option>
<option value="Salford" <?php if ($pa_options['authority'] == "Salford") echo "selected='selected'"; ?> >Salford City Council</option>
<option value="Sandwell" <?php if ($pa_options['authority'] == "Sandwell") echo "selected='selected'"; ?> >Sandwell Metropolitan Borough Council</option>
<option value="Scarborough" <?php if ($pa_options['authority'] == "Scarborough") echo "selected='selected'"; ?> >Scarborough Borough Council</option>
<option value="Scottish Borders" <?php if ($pa_options['authority'] == "Scottish Borders") echo "selected='selected'"; ?> >Scottish Borders Council</option>
<option value="Selby" <?php if ($pa_options['authority'] == "Selby") echo "selected='selected'"; ?> >Selby District Council</option>
<option value="Sevenoaks" <?php if ($pa_options['authority'] == "Sevenoaks") echo "selected='selected'"; ?> >Sevenoaks District Council</option>
<option value="Sheffield" <?php if ($pa_options['authority'] == "Sheffield") echo "selected='selected'"; ?> >Sheffield City Council</option>
<option value="Shetland Islands" <?php if ($pa_options['authority'] == "Shetland Islands") echo "selected='selected'"; ?> >Shetland Islands Council</option>
<option value="Shrewsbury" <?php if ($pa_options['authority'] == "Shrewsbury") echo "selected='selected'"; ?> >Shrewsbury and Atcham Borough Council</option>
<option value="Shropshire" <?php if ($pa_options['authority'] == "Shropshire") echo "selected='selected'"; ?> >Shropshire Council</option>
<option value="Slough" <?php if ($pa_options['authority'] == "Slough") echo "selected='selected'"; ?> >Slough Borough Council</option>
<option value="Snowdonia" <?php if ($pa_options['authority'] == "Snowdonia") echo "selected='selected'"; ?> >Snowdonia National Park Authority</option>
<option value="Solihull" <?php if ($pa_options['authority'] == "Solihull") echo "selected='selected'"; ?> >Solihull Metropolitan Borough Council</option>
<option value="Somerset" <?php if ($pa_options['authority'] == "Somerset") echo "selected='selected'"; ?> >Somerset County Council</option>
<option value="South Bedfordshire" <?php if ($pa_options['authority'] == "South Bedfordshire") echo "selected='selected'"; ?> >South Bedfordshire District Council</option>
<option value="South Bucks" <?php if ($pa_options['authority'] == "South Bucks") echo "selected='selected'"; ?> >South Bucks District Council</option>
<option value="South Cambs" <?php if ($pa_options['authority'] == "South Cambs") echo "selected='selected'"; ?> >South Cambridgeshire District Council</option>
<option value="South Gloucestershire" <?php if ($pa_options['authority'] == "South Gloucestershire") echo "selected='selected'"; ?> >South Gloucestershire Council</option>
<option value="South Lakeland" <?php if ($pa_options['authority'] == "South Lakeland") echo "selected='selected'"; ?> >South Lakeland District Council</option>
<option value="South Norfolk" <?php if ($pa_options['authority'] == "South Norfolk") echo "selected='selected'"; ?> >South Norfolk Council</option>
<option value="South Northamptonshire" <?php if ($pa_options['authority'] == "South Northamptonshire") echo "selected='selected'"; ?> >South Northamptonshire Council</option>
<option value="South Oxfordshire" <?php if ($pa_options['authority'] == "South Oxfordshire") echo "selected='selected'"; ?> >South Oxfordshire District Council</option>
<option value="South Ribble" <?php if ($pa_options['authority'] == "South Ribble") echo "selected='selected'"; ?> >South Ribble Borough Council</option>
<option value="South Shropshire" <?php if ($pa_options['authority'] == "South Shropshire") echo "selected='selected'"; ?> >South Shropshire District Council</option>
<option value="South Somerset" <?php if ($pa_options['authority'] == "South Somerset") echo "selected='selected'"; ?> >South Somerset District Council</option>
<option value="South Staffordshire" <?php if ($pa_options['authority'] == "South Staffordshire") echo "selected='selected'"; ?> >South Staffordshire Council</option>
<option value="South Tyneside" <?php if ($pa_options['authority'] == "South Tyneside") echo "selected='selected'"; ?> >South Tyneside Council</option>
<option value="Southampton" <?php if ($pa_options['authority'] == "Southampton") echo "selected='selected'"; ?> >Southampton City Council</option>
<option value="Southend" <?php if ($pa_options['authority'] == "Southend") echo "selected='selected'"; ?> >Southend-on-Sea Borough Council</option>
<option value="Spelthorne" <?php if ($pa_options['authority'] == "Spelthorne") echo "selected='selected'"; ?> >Spelthorne Borough Council</option>
<option value="Bury St Edmunds" <?php if ($pa_options['authority'] == "Bury St Edmunds") echo "selected='selected'"; ?> >St Edmundsbury Borough Council</option>
<option value="St Helens" <?php if ($pa_options['authority'] == "St Helens") echo "selected='selected'"; ?> >St Helens Council</option>
<option value="Stafford" <?php if ($pa_options['authority'] == "Stafford") echo "selected='selected'"; ?> >Stafford Borough Council</option>
<option value="Staffordshire Moorlands" <?php if ($pa_options['authority'] == "Staffordshire Moorlands") echo "selected='selected'"; ?> >Staffordshire Moorlands District Council</option>
<option value="Stevenage" <?php if ($pa_options['authority'] == "Stevenage") echo "selected='selected'"; ?> >Stevenage Borough Council</option>
<option value="Stirling" <?php if ($pa_options['authority'] == "Stirling") echo "selected='selected'"; ?> >Stirling Council</option>
<option value="Stockport" <?php if ($pa_options['authority'] == "Stockport") echo "selected='selected'"; ?> >Stockport Metropolitan Borough Council</option>
<option value="Stockton-On-Tees" <?php if ($pa_options['authority'] == "Stockton-On-Tees") echo "selected='selected'"; ?> >Stockton-On-Tees Borough Council</option>
<option value="Stratford" <?php if ($pa_options['authority'] == "Stratford") echo "selected='selected'"; ?> >Stratford-on-Avon District Council</option>
<option value="Suffolk Coastal" <?php if ($pa_options['authority'] == "Suffolk Coastal") echo "selected='selected'"; ?> >Suffolk Coastal District Council</option>
<option value="Suffolk" <?php if ($pa_options['authority'] == "Suffolk") echo "selected='selected'"; ?> >Suffolk County Council</option>
<option value="Sunderland" <?php if ($pa_options['authority'] == "Sunderland") echo "selected='selected'"; ?> >Sunderland City Council</option>
<option value="Surrey Heath" <?php if ($pa_options['authority'] == "Surrey Heath") echo "selected='selected'"; ?> >Surrey Heath Borough Council</option>
<option value="Swansea" <?php if ($pa_options['authority'] == "Swansea") echo "selected='selected'"; ?> >Swansea City and County</option>
<option value="Swindon" <?php if ($pa_options['authority'] == "Swindon") echo "selected='selected'"; ?> >Swindon Borough Council</option>
<option value="Tamworth" <?php if ($pa_options['authority'] == "Tamworth") echo "selected='selected'"; ?> >Tamworth Borough Council</option>
<option value="Teignbridge" <?php if ($pa_options['authority'] == "Teignbridge") echo "selected='selected'"; ?> >Teignbridge District Council</option>
<option value="Tendring" <?php if ($pa_options['authority'] == "Tendring") echo "selected='selected'"; ?> >Tendring District Council</option>
<option value="Test Valley" <?php if ($pa_options['authority'] == "Test Valley") echo "selected='selected'"; ?> >Test Valley Borough Council</option>
<option value="Tewkesbury" <?php if ($pa_options['authority'] == "Tewkesbury") echo "selected='selected'"; ?> >Tewkesbury Borough Council</option>
<option value="Edinburgh" <?php if ($pa_options['authority'] == "Edinburgh") echo "selected='selected'"; ?> >The City of Edinburgh Council</option>
<option value="Kensington and Chelsea" <?php if ($pa_options['authority'] == "Kensington and Chelsea") echo "selected='selected'"; ?> >The Royal Borough of Kensington and Chelsea</option>
<option value="Kinglston" <?php if ($pa_options['authority'] == "Kinglston") echo "selected='selected'"; ?> >The Royal Borough of Kingston upon Thames</option>
<option value="Three Rivers" <?php if ($pa_options['authority'] == "Three Rivers") echo "selected='selected'"; ?> >Three Rivers District Council</option>
<option value="thurrock" <?php if ($pa_options['authority'] == "thurrock") echo "selected='selected'"; ?> >Thurrock Borough Council</option>
<option value="Tonbridge" <?php if ($pa_options['authority'] == "Tonbridge") echo "selected='selected'"; ?> >Tonbridge and Malling Borough Council</option>
<option value="Torbay" <?php if ($pa_options['authority'] == "Torbay") echo "selected='selected'"; ?> >Torbay Council</option>
<option value="Torridge" <?php if ($pa_options['authority'] == "Torridge") echo "selected='selected'"; ?> >Torridge District Council</option>
<option value="Trafford" <?php if ($pa_options['authority'] == "Trafford") echo "selected='selected'"; ?> >Trafford Council</option>
<option value="Tunbridge Wells" <?php if ($pa_options['authority'] == "Tunbridge Wells") echo "selected='selected'"; ?> >Tunbridge Wells Borough Council</option>
<option value="Uttlesford" <?php if ($pa_options['authority'] == "Uttlesford") echo "selected='selected'"; ?> >Uttlesford District Council</option>
<option value="Vale of the White Horse" <?php if ($pa_options['authority'] == "Vale of the White Horse") echo "selected='selected'"; ?> >Vale of the White Horse District Council</option>
<option value="Vale Royal" <?php if ($pa_options['authority'] == "Vale Royal") echo "selected='selected'"; ?> >Vale Royal Borough Council</option>
<option value="Wakefield" <?php if ($pa_options['authority'] == "Wakefield") echo "selected='selected'"; ?> >Wakefield Metropolitan District Council</option>
<option value="Waltham Forest" <?php if ($pa_options['authority'] == "Waltham Forest") echo "selected='selected'"; ?> >Waltham Forest Council</option>
<option value="Wansbeck" <?php if ($pa_options['authority'] == "Wansbeck") echo "selected='selected'"; ?> >Wansbeck District Council</option>
<option value="Warrington" <?php if ($pa_options['authority'] == "Warrington") echo "selected='selected'"; ?> >Warrington Borough Council</option>
<option value="Watford" <?php if ($pa_options['authority'] == "Watford") echo "selected='selected'"; ?> >Watford Borough Council</option>
<option value="Waveney" <?php if ($pa_options['authority'] == "Waveney") echo "selected='selected'"; ?> >Waveney District Council</option>
<option value="Wealden" <?php if ($pa_options['authority'] == "Wealden") echo "selected='selected'"; ?> >Wealden District Council</option>
<option value="Wear Valley" <?php if ($pa_options['authority'] == "Wear Valley") echo "selected='selected'"; ?> >Wear Valley District Council</option>
<option value="Wellingborough" <?php if ($pa_options['authority'] == "Wellingborough") echo "selected='selected'"; ?> >Wellingborough Borough Council</option>
<option value="Welwyn-Hatfield" <?php if ($pa_options['authority'] == "Welwyn-Hatfield") echo "selected='selected'"; ?> >Welwyn-Hatfield District Council</option>
<option value="West Berkshire" <?php if ($pa_options['authority'] == "West Berkshire") echo "selected='selected'"; ?> >West Berkshire Council</option>
<option value="West Dorset" <?php if ($pa_options['authority'] == "West Dorset") echo "selected='selected'"; ?> >West Dorset District Council</option>
<option value="West Lancashire" <?php if ($pa_options['authority'] == "West Lancashire") echo "selected='selected'"; ?> >West Lancashire District Council</option>
<option value="West Oxfordshire" <?php if ($pa_options['authority'] == "West Oxfordshire") echo "selected='selected'"; ?> >West Oxfordshire District Council</option>
<option value="West Sussex" <?php if ($pa_options['authority'] == "West Sussex") echo "selected='selected'"; ?> >West Sussex County Council</option>
<option value="West Wiltshire" <?php if ($pa_options['authority'] == "West Wiltshire") echo "selected='selected'"; ?> >West Wiltshire District Council</option>
<option value="Westminster" <?php if ($pa_options['authority'] == "Westminster") echo "selected='selected'"; ?> >Westminster City Council</option>
<option value="Weymouth and Portland" <?php if ($pa_options['authority'] == "Weymouth and Portland") echo "selected='selected'"; ?> >Weymouth and Portland Borough Council</option>
<option value="Wiltshire" <?php if ($pa_options['authority'] == "Wiltshire") echo "selected='selected'"; ?> >Wiltshire County Council</option>
<option value="Winchester" <?php if ($pa_options['authority'] == "Winchester") echo "selected='selected'"; ?> >Winchester City Council</option>
<option value="Woking" <?php if ($pa_options['authority'] == "Woking") echo "selected='selected'"; ?> >Woking Borough Council</option>
<option value="Wolverhampton" <?php if ($pa_options['authority'] == "Wolverhampton") echo "selected='selected'"; ?> >Wolverhampton City Council</option>
<option value="Worcester" <?php if ($pa_options['authority'] == "Worcester") echo "selected='selected'"; ?> >Worcester City Council</option>
<option value="Worthing" <?php if ($pa_options['authority'] == "Worthing") echo "selected='selected'"; ?> >Worthing Borough Council</option>
<option value="Wychavon" <?php if ($pa_options['authority'] == "Wychavon") echo "selected='selected'"; ?> >Wychavon District Council</option>
<option value="Wycombe" <?php if ($pa_options['authority'] == "Wycombe") echo "selected='selected'"; ?> >Wycombe District Council</option>
<option value="Wyre Forest" <?php if ($pa_options['authority'] == "Wyre Forest") echo "selected='selected'"; ?> >Wyre Forest District Council</option>
</select>
</p>
</div>
<script type="text/javascript">
jQuery(document).ready(function($) {
$('.postcode').click(function(){
$('.postcodepanel').show();
$('.authoritypanel').hide();
});
$('.authority').click(function(){
$('.authoritypanel').show();
$('.postcodepanel').hide();
});
});
</script>
<?php
}
// Initialising function
function pa_init(){
register_sidebar_widget(__('Planning Alerts'), 'planningalerts_widget');
register_widget_control( 'Planning Alerts', 'planningalerts_options');
// Set defaults for the widget display
if (!get_option('pa_widget')){
$pa_default_options = array(
'title'=>'Latest Planning Applications',
'limit'=>'5',
'pre_text'=>'',
'location'=>''
);
add_option('pa_widget', $pa_default_options);
}
}
add_action("plugins_loaded", "pa_init");
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment