--- a/stop.php +++ b/stop.php @@ -1,7 +1,5 @@ <?php include ('include/common.inc.php'); -$stopid = filter_var($_REQUEST['stopid'], FILTER_SANITIZE_NUMBER_INT); -$stopcode = filter_var($_REQUEST['stopcode'], FILTER_SANITIZE_STRING); if ($stopid) $stop = getStop($stopid); /*if ($stopcode != "" && $stop[5] != $stopcode) { $url = $APIurl . "/json/stopcodesearch?q=" . $stopcode; @@ -14,6 +12,7 @@ // expand out to all platforms }*/ + $stops = Array(); $stopPositions = Array(); $stopNames = Array(); @@ -21,8 +20,7 @@ $allStopsTrips = Array(); $fetchedTripSequences = Array(); $stopLinks = ""; -if (isset($_REQUEST['stopids'])) { - $stopids = explode(",", filter_var($_REQUEST['stopids'], FILTER_SANITIZE_STRING)); +if (isset($stopids)) { foreach ($stopids as $sub_stopid) { $stops[] = getStop($sub_stopid); } @@ -63,7 +61,13 @@ } } include_header($stop['stop_name'], "stop"); -timePlaceSettings(); +/*$serviceAlerts = json_decode(getPage(curPageURL() . "/servicealerts_api.php?filter_class=stop&filter_id=".$stopid) , true); + +foreach($serviceAlerts['entities'] as $serviceAlert) { + echo '<div id="servicewarning">'.$serviceAlert['alert']['description']['translation'].'</div>'; +}*/ + +echo '<span class="content-secondary">'; echo $stopLinks; if (sizeof($stops) > 0) { trackEvent("View Stops", "View Combined Stops", $stop["stop_name"], $stop["stop_id"]); @@ -78,6 +82,8 @@ ) )) ; } +timePlaceSettings(); +echo '</span><span class="content-primary">'; echo ' <ul data-role="listview" data-inset="true">'; if (sizeof($allStopsTrips) > 0) { sktimesort($allStopsTrips,"arrival_time", true); @@ -110,6 +116,7 @@ } } echo '</ul>'; +echo '</span>'; include_footer(); ?>