From f2711b492d8a0fff64764b489ed55547b3755c50 Mon Sep 17 00:00:00 2001 From: ars Date: Tue, 6 Oct 2020 18:49:33 +0100 Subject: Remove duplicate Source? hyperlink. Fix displaying of timetable dates of service if not received from API. Sort bus stops by order rather than displaying in the order received from API --- index.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index 392dedf..90a58f3 100644 --- a/index.php +++ b/index.php @@ -14,7 +14,6 @@ tr:nth-child(even) {background-color: #f2f2f2;}

bus.of.je | Liberty Bus Timetables

-
source?
' . ucfirst($direction) . ' | ' . $displayDay . ''; echo ''; $trips = getData('trips', $route, $direction, $day); - // TODO: sort $stopList by $stopList['order'] // TODO: must be a more efficient way to search for $rowStop['stop_name'] in $trip? // search for $stopList['stop_name'] in each trip and print time in row on table foreach ($stopList as $rowStop) { @@ -128,7 +132,11 @@ if (isset($_GET['route'])) { else { $routes = getData('routes', false, false, false); $meta = getData('meta', false, false, false); - echo '

' . $meta['name']. ' | ' . $meta['from'] . ' - ' . $meta['to'] . '

'; + if ($meta['from'] = "-- --- ----") { + echo '

' . $meta['name']. '

'; + } else { + echo '

' . $meta['name']. ' | ' . $meta['from'] . ' - ' . $meta['to'] . '

'; + } echo '

Service Updates:

'; foreach ($servUpdates as $update) { echo $update['content'] . '- Affected Routes: ' . implode(", ",$update['services']) . '

'; -- cgit v1.2.3