--- a/trip.php +++ b/trip.php @@ -5,7 +5,7 @@ $routeid = filter_var($_REQUEST['routeid'], FILTER_SANITIZE_NUMBER_INT); $routetrips = Array(); if ($_REQUEST['routeid'] && !$_REQUEST['tripid']) { - $tripid = 0; + $tripid = 0; $url = $APIurl . "/json/routetrips?route_id=" . $routeid; $routetrips = json_decode(getPage($url)); foreach ($routetrips as $trip) { @@ -24,22 +24,6 @@ $routetrips = json_decode(getPage($url)); } include_header("Stops on " . $trips[1]->route_short_name . ' ' . $trips[1]->route_long_name, "trip"); -if (isMetricsOn()) { - // Create a new Instance of the tracker - $owa = new owa_php(); - // Set the ID of the site being tracked - $owa->setSiteId($owaSiteID); - // Create a new event object - $event = $owa->makeEvent(); - // Set the Event Type, in this case a "video_play" - $event->setEventType('view_trip'); - // Set a property - $event->set('trip_id', $tripid); - $event->set('route_id', $routeid); - $event->set('stop_id', $stopid); - // Track the event - $owa->trackEvent($event); -} $url = $APIurl . "/json/tripstoptimes?trip=" . $tripid; $json = json_decode(getPage($url)); $stops = $json[0]; @@ -50,20 +34,19 @@ $viaPoints[] = $stop[1]; } } -echo 'Via: ' . implode(", ",$viaPoints) . ''; -echo '

Other Trips: '; +echo '

Via:

' . implode(", ", $viaPoints) . '

'; +echo '

Other Trips:

'; foreach ($routetrips as $othertrip) { echo '' . midnight_seconds_to_time($othertrip[0]) . ' '; } -echo '

Other directions/timing periods: '; +echo '

Other directions/timing periods:

'; $url = $APIurl . "/json/routesearch?routeshortname=" . $trips[1]->route_short_name; $json = json_decode(getPage($url)); foreach ($json as $row) { - if ($row[0] != $routeid) echo '' . $row[2] . ' (' . ucwords($row[3]) . ') '; + if ($row[0] != $routeid) echo '' . $row[2] . ' (' . ucwords($row[3]) . ') '; } - echo '