' . staticmap($stopPositions) . '
'; } -timePlaceSettings(); -echo '' . staticmap(Array( - 0 => Array( - $stop[2], - $stop[3] - ) -)) . '
'; +else { + echo '' . staticmap(Array( + 0 => Array( + $stop[2], + $stop[3] + ) + )) . '
'; +} echo '- ';
-$url = $APIurl . "/json/stoptrips?stop=" . $stopid . "&time=" . midnight_seconds() . "&service_period=" . service_period();
-$trips = json_decode(getPage($url));
+if (sizeof($allStopsTrips) > 0) {
+ $trips = $allStopsTrips;
+}
+else {
+ $url = $APIurl . "/json/stoptrips?stop=" . $stopid . "&time=" . midnight_seconds() . "&service_period=" . service_period();
+ $trips = json_decode(getPage($url));
+}
foreach ($trips as $row) {
echo '
- ';
echo '
' . $row[1][1]; if (isFastDevice()) { $viaPoints = viaPointNames($row[1][0], $stopid); - if ($viaPoints != "") echo '
'; + if ($viaPoints != "") echo '
Via: ' . $viaPoints . '
Via: ' . $viaPoints . ''; } + if (sizeof($tripStopNumbers) > 0) { + echo '
Boarding At: '; + foreach ($tripStopNumbers[$row[1][0]] as $key) { + echo $stopNames[$key] .' '; + } + echo ''; + } + echo ''; echo '' . midnight_seconds_to_time($row[0]) . '
'; echo ' ';
}