<?php |
<?php |
include('common.inc.php'); |
include('common.inc.php'); |
$url = $APIurl."/json/stop?stop_id=".$_REQUEST['stopid']; |
$url = $APIurl."/json/stop?stop_id=".$_REQUEST['stopid']; |
$stop = json_decode(getPage($url)); |
$stop = json_decode(getPage($url)); |
|
|
include_header("Trips passing ".$stop[1]); |
include_header("Trips passing ".$stop[1]); |
echo ' <ul data-role="listview" >'; |
echo ' <ul data-role="listview" >'; |
$url = $APIurl."/json/stoptrips?stop=".$_REQUEST['stopid']."&time=".midnight_seconds(); |
$url = $APIurl."/json/stoptrips?stop=".$_REQUEST['stopid']."&time=".midnight_seconds()."&service_period=".service_period(); |
$page = getPage($url); |
$page = getPage($url); |
|
echo $page; |
foreach (json_decode($page) as $row) |
foreach (json_decode($page) as $row) |
{ |
{ |
if ($row[1][2] === service_period()) echo '<li>'.midnight_seconds_to_time($row[0]).' <a href="trip.php?stopid='.$_REQUEST['stopid'].'&tripid='.$row[1][0].'">'.$row[1][1].'</a></li>'; |
echo '<li>'.midnight_seconds_to_time($row[0]).' <a href="trip.php?stopid='.$_REQUEST['stopid'].'&tripid='.$row[1][0].'">'.$row[1][1].'</a></li>'; |
} |
} |
echo '</ul>'; |
echo '</ul>'; |
include_footer(); |
include_footer(); |
?> |
?> |
|
|