--- a/busui/stopList.php +++ b/busui/stopList.php @@ -1,15 +1,49 @@ + +function navbar() { + echo' +
'; - + timePlaceSettings(); +} +// By suburb +if (isset($_REQUEST['suburbs'])) { + include_header("Stops by Suburb"); + navbar(); + echo ' '; +} else { +// Timing Points / All stops + +if ($_REQUEST['allstops']) { + $url = $APIurl."/json/stops"; + include_header("All Stops"); + navbar(); +} else if ($_REQUEST['nearby']) { + $url = $APIurl."/json/neareststops?lat={$_SESSION['lat']}&lon={$_SESSION['lon']}&limit=15"; +include_header("Nearby Stops"); + navbar(); + timePlaceSettings(); +} else if ($_REQUEST['suburb']) { + $url = $APIurl."/json/stopzonesearch?q=".filter_var($_REQUEST['suburb'], FILTER_SANITIZE_STRING); +include_header("Stops in ".ucwords(filter_var($_REQUEST['suburb'], FILTER_SANITIZE_STRING))); + navbar(); +} else { + $url = $APIurl."/json/timingpoints"; + include_header("Timing Points / Major Stops"); + navbar(); +} echo '
Go to letter: '; foreach(range('A','Z') as $letter) { @@ -20,9 +54,6 @@ $('.noscriptnav').hide(); "; echo ' '; - +} include_footer(); ?>