X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=lib%2Ffunctions.php;h=2fcbe0e493e3dace99565a6bbb75e9bdf7674e4b;hb=0bb5ed236bdb79e75feb7491b508592d6a0ebe37;hp=7a02b2af054808cd98dd7b2343ab35354c7c5c49;hpb=a646a2cfbd63d70043e60d88afff0add11ad7e81;p=readifood.git
diff --git a/lib/functions.php b/lib/functions.php
index 7a02b2a..2fcbe0e 100644
--- a/lib/functions.php
+++ b/lib/functions.php
@@ -317,6 +317,13 @@
return $q->findOneById($address->getAreaId());
}
+ function get_address_map_link($address) {
+ $postcode = trim($address->getPostcode());
+ if ($postcode) {
+ return " " . get_small_link("Map", "http://maps.google.co.uk/maps?q=" . urlencode($postcode));
+ }
+ }
+
function get_contact_address($contact) {
$q = new AddressQuery;
return $q->findOneById($contact->getAddressId());
@@ -479,32 +486,54 @@
}
function show_date_form($name, $date = null) {
- $past = 60;
- $future = 60;
- echo "\n";
- return;
- if (! isset($date)) $date = date('Y-m-d');
- list($y, $m, $d) = iso8601_to_ymd($date);
-
- echo "Year: ";
- echo "Month: ";
- echo "Day: ";
}
function get_small_link() {