' . staticmap(Array( - 0 => Array( - $stop[2], - $stop[3] - ) -)) . '
'; + +// time settings +echo 'Change Time (' . (isset($_SESSION['time']) ? $_SESSION['time'] : "Current Time,") . ' ' . ucwords(service_period()) . ')...
+ +- ';
-$url = $APIurl . "/json/stoptrips?stop=" . $stopid . "&time=" . midnight_seconds() . "&service_period=" . service_period();
-$trips = json_decode(getPage($url));
-debug(print_r($trips, true));
-foreach ($trips as $row) {
- echo '
- ';
- echo '
' . $row[1][1]; - if (isFastDevice()) { - $viaPoints = viaPointNames($row[1][0], $stopid); - if ($viaPoints != "") echo '
'; - } - echo '
Via: ' . $viaPoints . '' . midnight_seconds_to_time($row[0]) . '
'; - echo ' ';
+if (sizeof($allStopsTrips) > 0) {
+ sktimesort($allStopsTrips, "arrival_time", true);
+ $trips = $allStopsTrips;
+} else {
+ $trips = getStopTripsWithTimes($stopid);
}
-if (sizeof($trips) == 0) echo " -
No trips in the near future. ";
-echo '