diff --git a/docs/about.php b/docs/about.php
index 25d0fee..a433059 100644
--- a/docs/about.php
+++ b/docs/about.php
@@ -1,6 +1,7 @@
force_compile = true;
$smarty->compile_dir = SMARTY_COMPILE_DIRECTORY;
-
+ $smarty->assign("stats", stats::get_stats());
$smarty->assign("page_title","About");
$smarty->assign("menu_item", "about");
diff --git a/docs/apihowto.php b/docs/apihowto.php
index 4d5bc24..df31515 100644
--- a/docs/apihowto.php
+++ b/docs/apihowto.php
@@ -1,5 +1,6 @@
force_compile = true;
$smarty->compile_dir = SMARTY_COMPILE_DIRECTORY;
-
+ $smarty->assign("stats", stats::get_stats());
$smarty->assign("page_title","API");
$smarty->assign("menu_item","api");
diff --git a/docs/checkmail.php b/docs/checkmail.php
index 45abdd7..5d7d9f6 100644
--- a/docs/checkmail.php
+++ b/docs/checkmail.php
@@ -1,6 +1,8 @@
force_compile = true;
$smarty->compile_dir = SMARTY_COMPILE_DIRECTORY;
-
+ $smarty->assign("stats", stats::get_stats());
$smarty->assign("page_title","Now check your email");
$smarty->assign("menu_item", "signup");
//Render
diff --git a/docs/confirmed.php b/docs/confirmed.php
index 2aaa26f..b92a613 100644
--- a/docs/confirmed.php
+++ b/docs/confirmed.php
@@ -1,6 +1,8 @@
force_compile = true;
$smarty->compile_dir = SMARTY_COMPILE_DIRECTORY;
-
+ $smarty->assign("stats", stats::get_stats());
$smarty->assign("menu_item", "signup");
$smarty->assign("page_title","Confirmed");
$smarty->assign("form_action", $form_action);
diff --git a/docs/css/main.css b/docs/css/main.css
index 0a7920b..3cde851 100644
--- a/docs/css/main.css
+++ b/docs/css/main.css
@@ -1,4 +1,4 @@
-body {font-family:georgia, serif; text-align:center;line-height:1.8em;margin:0;
+body {font-family:georgia, serif; text-align:center;line-height:1.7em;margin:0;
color:#0f0f0f;}
#divPage {width:500px; margin:0 auto;background:white;text-align:left;}
h1 {font-weight:normal; font-size:2.7em;padding-left:115px;padding-bottom:0.2em;padding-top:0.1em;}
@@ -11,21 +11,23 @@ h2 {font-weight:normal;font-size:1em;border-bottom:dotted 1px #808080;padding-le
h2 em {text-decoration:underline}
h3, h4 {color:#96ca2f;font-style:italic;font-weight:normal}
+#pStats {padding:0; margin:0;position:absolute; left:115px;bottom:1.5em;
+ color:#808080; font-size:0.9em;}
+
#divHeader {margin-top:1.7em;padding-bottom:1em;position:relative;}
#divHeader img {position:absolute;top:-15px;}
/* Menu */
-#divMenu {background:#6E84BD;height:2.3em;font-size:0.7em;}
+#divMenu {background:#6E84BD;height:2.2em;font-size:0.7em;}
#divMenu ul {width:500px;margin:0 auto;}
#divMenu ul li {float:right;text-align:center;}
#divMenu ul li a {margin-left:1em;margin-right:1em;display:block; color:white;
- text-decoration:none;position:relative; top:-0.2em;}
+ text-decoration:none;position:relative; top:-0.2em;padding-bottom:4px;}
#divMenu ul li.selected {background:#96ca2f;}
/* Beta note */
-#pBeta {font-size:0.8em; text-align:center;padding:0;margin:0;position:relative; top:-0.4em;
- color:#666;}
-#pBeta span {background:#fdd9ea;}
+#spnBeta {font-size:0.8em; padding:0;margin:0;
+ color:#666;background:#fdd9ea;line-height:1em; position:relative; top:-5px;}
/* Warnings & errors*/
#divWarning {background:#fdd9ea;font-size:0.9em;text-align:center; margin-bottom:1em;}
@@ -47,8 +49,9 @@ span.number {font-size:2em;float:left;display:block;
#liPostcode small {position:relative; top:0.6em;padding-left:0.3em;}
#pAlertArea {margin-bottom:0;}
#ulAlertArea {font-size:0.9em;line-height:1.3em;}
-#ulAlertArea li {}
-#liSignup input.button {font-size:1.5em;margin-top:0.5em;margin-bottom:0.5em;}
+#liSignup {padding-top:1em;line-height:1.3em;}
+#liSignup input.button {font-size:1.5em;margin-bottom:0.5em;float:left;
+ margin-right:10px;}
/* Attention grabbers */
div.attention {text-align:center; padding-top:1em;}
diff --git a/docs/faq.php b/docs/faq.php
index 6c20fcd..5c4b0dd 100644
--- a/docs/faq.php
+++ b/docs/faq.php
@@ -1,5 +1,6 @@
force_compile = true;
$smarty->compile_dir = SMARTY_COMPILE_DIRECTORY;
-
+ $smarty->assign("stats", stats::get_stats());
$smarty->assign("page_title","Frequently asked questions");
$smarty->assign("menu_item", "faq");
//Render
diff --git a/docs/getinvolved.php b/docs/getinvolved.php
index 70dac82..d3df99f 100644
--- a/docs/getinvolved.php
+++ b/docs/getinvolved.php
@@ -1,5 +1,6 @@
force_compile = true;
$smarty->compile_dir = SMARTY_COMPILE_DIRECTORY;
-
+ $smarty->assign("stats", stats::get_stats());
$smarty->assign("page_title","Get involved");
$smarty->assign("menu_item", "getinvolved");
//Render
diff --git a/docs/include/application.php b/docs/include/application.php
index 0bc3b60..289337c 100644
--- a/docs/include/application.php
+++ b/docs/include/application.php
@@ -108,7 +108,7 @@ class Applications{
//by point
function query($x,$y,$d) {
$db = DB::connect(DB_CONNECTION_STRING);
- $sql = "select council_reference, address, postcode, description, info_url, comment_url, map_url, x, y, date_recieved, full_name
+ $sql = "select council_reference, address, postcode, description, info_url, comment_url, map_url, x, y, date_recieved, date_scraped, full_name
from application
inner join authority on application.authority_id = authority.authority_id
where application.x > " . $db->quote($x - $d) . " and application.x < " . $db->quote($x + $d) .
@@ -122,7 +122,7 @@ class Applications{
function query_area($x1,$y1,$x2,$y2) {
$db = DB::connect(DB_CONNECTION_STRING);
- $sql = "select council_reference, address, postcode, description, info_url, comment_url, map_url, x, y, date_recieved, full_name
+ $sql = "select council_reference, address, postcode, description, info_url, comment_url, map_url, x, y, date_recieved, date_scraped, full_name
from application
inner join authority on application.authority_id = authority.authority_id
where application.x > " . $db->quote($x1) . " and application.x < " . $db->quote($x2) .
@@ -136,7 +136,7 @@ class Applications{
//by authority
function query_authority($authority_short_name) {
$db = DB::connect(DB_CONNECTION_STRING);
- $sql = "select council_reference, address, postcode, description, info_url, comment_url, map_url, x, y, date_recieved, full_name
+ $sql = "select council_reference, address, postcode, description, info_url, comment_url, map_url, x, y, date_recieved, date_scraped, full_name
from application
inner join authority on application.authority_id = authority.authority_id
where authority.short_name = " . $db->quote($authority_short_name) ." order by date_scraped desc limit 100";
@@ -160,7 +160,8 @@ class Applications{
$application->x = $application_results[$i][7];
$application->y = $application_results[$i][8];
$application->date_received = $application_results[$i][9];
- $application->authority_name = $application_results[$i][10];
+ $application->date_scraped = $application_results[$i][10];
+ $application->authority_name = $application_results[$i][11];
$os = new OSRef($application->x, $application->y);
$latlng = $os->toLatLng();
diff --git a/docs/include/stats.php b/docs/include/stats.php
new file mode 100644
index 0000000..467457f
--- /dev/null
+++ b/docs/include/stats.php
@@ -0,0 +1,47 @@
+getAll($alert_sql);
+
+ if(sizeof($results) >0){
+ $alert_count = $results[0][0];
+ }
+
+ //Count of authorities
+ $authority_sql = "select count(authority_id) from authority";
+ $results = $db->getAll($authority_sql);
+ if(sizeof($results) >0){
+ $authority_count = $results[0][0];
+ }
+
+ //save to session
+ $return = array('alert_count' => $alert_count, 'authority_count' => $authority_count);
+ $_SESSION['stats'] = $return;
+ }
+
+ return $return;
+
+ }
+
+ }
+
+?>
\ No newline at end of file
diff --git a/docs/index.php b/docs/index.php
index 88c937e..fcbb1e7 100644
--- a/docs/index.php
+++ b/docs/index.php
@@ -1,7 +1,7 @@
force_compile = true;
$smarty->compile_dir = SMARTY_COMPILE_DIRECTORY;
+ $smarty->assign("stats", stats::get_stats());
$smarty->assign("menu_item", "signup");
$smarty->assign("postcode", $this->postcode);
$smarty->assign("email", $this->email);
@@ -53,7 +54,7 @@ class index_page {
$smarty->assign("page_title","Email alerts of planning applications near you");
$smarty->assign("warnings", $this->warnings);
$smarty->assign("email_warn", $this->email_warn);
- $smarty->assign("postcode_warn", $this->postcode_warn);
+ $smarty->assign("postcode_warn", $this->postcode_warn);
$smarty->assign("onloadscript", $this->onloadscript);
$smarty->assign("small_zone_size",SMALL_ZONE_SIZE);
diff --git a/docs/templates/header.tpl b/docs/templates/header.tpl
index 70e9bfa..fb34b6a 100644
--- a/docs/templates/header.tpl
+++ b/docs/templates/header.tpl
@@ -30,6 +30,7 @@
diff --git a/docs/templates/index.tpl b/docs/templates/index.tpl
index 7b442e0..e59d055 100644
--- a/docs/templates/index.tpl
+++ b/docs/templates/index.tpl
@@ -3,7 +3,7 @@
-
This site is in Beta (test) mode, so local authorities near you may not be included in alerts.
+
-
+
+
+ This site is in Beta (test) mode, so all local authorities near you may not be included in alerts.
+
Recent site updates
+ - July 2007Added 21 councils inc. Lewisham, New Forest National Park and Edinburgh
- April 2007Added 50 more councils.
-
- March 2007 Added an API and a few more councils (inc. Islington and Hackney)
- February 2007 Added loads more councils (inc. Camden and Tower Hamlets)
diff --git a/docs/templates/rss.tpl b/docs/templates/rss.tpl
index 4d98009..698e0c4 100644
--- a/docs/templates/rss.tpl
+++ b/docs/templates/rss.tpl
@@ -7,6 +7,7 @@
{foreach name="applications" from="$applications" item="application"}
-
{$application->address}
+ {$application->date_scraped|date_format:"%a, %e %b %Y"}
{$application->council_reference}
{$application->address}
{$application->lat} {$application->lon}
diff --git a/docs/unsubscribe.php b/docs/unsubscribe.php
index bc1e6fe..9f3b00a 100644
--- a/docs/unsubscribe.php
+++ b/docs/unsubscribe.php
@@ -1,6 +1,8 @@
force_compile = true;
$smarty->compile_dir = SMARTY_COMPILE_DIRECTORY;
-
+ $smarty->assign("stats", stats::get_stats());
$smarty->assign("menu_item", "signup");
$smarty->assign("page_title","Unsubscribed");
$smarty->assign("postcode", $this->postcode);