X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=lib%2Farea.php;h=77272f76e9ba375d5d076471f17c9c87da834e59;hb=f02dbb704b8c6f04529bf9cae3b99d379f998567;hp=8872a43308975cd3746d48931e909b5a2bd4f35c;hpb=56f5e034aebe1b00dbd1cc976fd165d03420c632;p=readifood.git diff --git a/lib/area.php b/lib/area.php index 8872a43..77272f7 100644 --- a/lib/area.php +++ b/lib/area.php @@ -1,6 +1,7 @@ Added area.

\n"; @@ -8,8 +9,10 @@ } } else if ($_POST['city_id']) { - /* XXX: city_id is actually a string $city_name/$city_id */ - header(sprintf("Location: http%s://%s/%s/in/city/%s", ($_SERVER['HTTPS']) ? "s" : "", $_SERVER['HTTP_HOST'], $module, $_POST['city_id'])); + set_last_selected("city_id", $_POST['city_id']); + $city_id = $_POST['city_id']; + $city = get_city_by_id($city_id); + header(sprintf("Location: http%s://%s/%s/in/city/%s/%d", ($_SERVER['HTTPS']) ? "s" : "", $_SERVER['HTTP_HOST'], $module, $city->getName(), $city_id)); exit; } else if ($_POST['update_area']) { @@ -64,7 +67,7 @@ echo "

Show areas in\n"; echo "\n"; echo "\n"; @@ -131,9 +134,9 @@ echo "Delivery days:"; if (check_admin(1)) { for ($i = 0; $i < count($week); $i++) { - echo " $week[$i]\n"; + echo ">\n"; } } else {