--- a/routeList.php +++ b/routeList.php @@ -32,23 +32,36 @@ } function displayRoutes($routes) { - global $nearby; echo '
" . $headsign['trip_headsign'] . (strstr($headsign['trip_headsign'], "bound") === false ? "bound" : "") . ", starting at " . $headsign['stop_name'] . " (" . ucwords($headsign['service_id']) . ")
"; + + echo"" . $headsign['trip_headsign'].(strstr($headsign['trip_headsign'], "bound") ===false ?"bound":"").", starting at " . $headsign['stop_name'] . " (" . ucwords($headsign['service_id']) . ")
"; - if (isset($nearby)) { - $time = getRouteAtStop($route['route_id'], $headsign['direction_id'], $route['stop_id']); - echo '' . ($time['arrival_time'] ? $time['arrival_time'] : "No more trips today") . "" . $time['trip_headsign'] . (strstr($time['trip_headsign'], "bound") === false ? "bound" : "") . " from " . $start['stop_name'] . " to " . $end['stop_name'] . " (" . ucwords($time['service_id']) . ")
"; + $stop = getStop($route['stop_id']); + echo "Board at " . $stop['stop_name'] . "
"; + echo '' . ($time['arrival_time'] ? $time['arrival_time'] : "No more trips today") . "