Go to letter: ';
foreach(range('A','Z') as $letter)
{
@@ -22,7 +32,8 @@
echo '
';
$url = $APIurl."/json/timingpoints";
if ($_REQUEST['allstops']) $url = $APIurl."/json/stops";
-if ($_REQUEST['lat'] && $_REQUEST['lon']) $url = $APIurl."/json/neareststops?lat={$_REQUEST['lat']}&lon={$_REQUEST['lon']}&limit=15";
+if ($_REQUEST['nearby']) $url = $APIurl."/json/neareststops?lat={$_REQUEST['lat']}&lon={$_REQUEST['lon']}&limit=15";
+if ($_REQUEST['suburb']) $url = $APIurl."/json/neareststops?lat={$_REQUEST['suburb']}";
$contents = json_decode(getPage($url));
debug(print_r($contents,true));
foreach ($contents as $key => $row) {
@@ -42,7 +53,7 @@
echo '- '.bracketsMeanNewLine($row[1]).'
';
}
echo '
';
-
+}
include_footer();
?>