X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=lib%2Farea.php;h=51f57d39ad9d38ad4abdec426be6196a4d13ed0f;hb=6bd4ad3daf2cc870d96a3fed9ea9caf6798d2b78;hp=5785ed2947c0e2a7b006c1784af801a5eb94078c;hpb=6fdbfe32798452ec1c0fdbda57edabb892518409;p=readifood.git
diff --git a/lib/area.php b/lib/area.php
index 5785ed2..51f57d3 100644
--- a/lib/area.php
+++ b/lib/area.php
@@ -9,7 +9,7 @@
}
else if ($_POST['city_id']) {
/* XXX: city_id is actually a string $city_name/$city_id */
- header(sprintf("Location: http%s://%s/%s/in/%s", ($_SERVER['HTTPS']) ? "s" : "", $_SERVER['HTTP_HOST'], $module, $_POST['city_id']));
+ header(sprintf("Location: http%s://%s/%s/in/city/%s", ($_SERVER['HTTPS']) ? "s" : "", $_SERVER['HTTP_HOST'], $module, $_POST['city_id']));
exit;
}
else if ($_POST['update_area']) {
@@ -27,10 +27,12 @@
if (count($areas)) {
foreach ($areas as $area) {
- echo "
\nArea: " . $area->getStrongLink();
- printf(" Contacts", urlencode($area->getName()), $area->getId());
- printf(" Donations", urlencode($area->getName()), $area->getId());
- printf(" Orders", urlencode($area->getName()), $area->getId());
+ echo "
\nArea: " . $area->getStrongLink() . "\n";
+ $n = urlencode($area->getName());
+ $i = $area->getId();
+ echo " " . get_small_link("Contacts", "/contact/in/area/%s/%d", $n, $i);
+ echo " " . get_small_link("Donations", "/donation/in/area/%s/%d", $n, $i);
+ echo " " . get_small_link("Orders", "/order/in/area/%s/%d", $n, $i);
if (check_admin(1)) {
echo " " . $area->getDeleteLink();
}
@@ -51,7 +53,7 @@
return;
}
- echo "