Code standards
[busui.git] / stop.php
blob:a/stop.php -> blob:b/stop.php
--- a/stop.php
+++ b/stop.php
@@ -48,7 +48,13 @@
     foreach ($stops as $key => $sub_stop) {
 
         $stopNames[$key] = $sub_stop["stop_name"];
-        $stopLinks.= '<a href="stop.php?stopid=' . $sub_stop["stop_id"] . '&amp;stopcode=' . $sub_stop["stop_code"] . '">' . $sub_stop["stop_name"] . '</a>  ';
+        $stopLinks.= '<span itemscope itemtype="http://schema.org/BusStop"> 
+            <a itemprop="url" href="stop.php?stopid=' . $sub_stop["stop_id"] . 
+                '&amp;stopcode=' . $sub_stop["stop_code"] . '">' . $sub_stop["stop_name"] 
+                . '</a><meta itemprop="latitude" content="'.$sub_stop["stop_lat"].'" />
+                 <abbr class="latitude" title="'.$sub_stop["stop_lat"].'"></abbr> 
+ <abbr class="longitude" title="'.$sub_stop["stop_lon"].'"></abbr>
+    <meta itemprop="longitude" content="'.$sub_stop["stop_lon"].'" /></span>';
 
         $stopPositions[$key] = Array(
             $sub_stop["stop_lat"],
@@ -86,7 +92,7 @@
   echo '<div id="servicewarning">'.$serviceAlert['alert']['description']['translation'].'</div>';
   } */
 
-echo '<div class="content-secondary">';
+echo '<div class="content-secondary"><br>';
 echo $stopLinks;
 if (sizeof($stops) > 0) {
     trackEvent("View Stops", "View Combined Stops", $stop["stop_name"], $stop["stop_id"]);
@@ -110,6 +116,7 @@
     $trips = $allStopsTrips;
 } else {
     $trips = getStopTripsWithTimes($stopid, "", "", "", (isset($filterIncludeRoutes) || isset($filterHasStop) ? "75" : ""));
+    
 }
 
 echo "<div class='ui-header' style='overflow: visible; height: 2.5em'>";
@@ -171,10 +178,10 @@
                 || (isset($filterIncludeRoutes) && in_array($trip["route_short_name"], $filterIncludeRoutes))
                 || (!isset($filterIncludeRoutes) && !isset($filterHasStop))
         ) {
-            echo '<li>';
+            echo '<li class="vevent">';
 
             $destination = getTripDestination($trip['trip_id']);
-            echo '<a href="trip.php?stopid=' . $stopid . '&amp;tripid=' . $trip['trip_id'] . '"><h3>' . $trip['route_short_name'] . " towards " . $destination['stop_name'] . "</h3><p>";
+            echo '<a href="trip.php?stopid=' . $stopid . '&amp;tripid=' . $trip['trip_id'] . '"><h3 class="summary">' . $trip['route_short_name'] . " towards " . $destination['stop_name'] . "</h3><p>";
             $viaPoints = viaPointNames($trip['trip_id'], $trip['stop_sequence']);
 if (isset($labs)) {
                 echo '<br><span class="eta">ETA: ' . $tripETA[$trip['trip_id']] . '</span>';
@@ -193,7 +200,7 @@
                 echo '</small>';
             }
             echo '</p>';
-            echo '<p class="ui-li-aside"><strong>' . $trip['arrival_time'] . '</strong></p>';
+            echo '<p class="ui-li-aside"><time class="dtstart" datetime="'.date("c",strtotime($trip['arrival_time'])).'">' . $trip['arrival_time'] . '</time></p>';
             echo '</a></li>';
             flush();
             @ob_flush();