summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/index.php b/index.php
index 1fed29c..ac19989 100644
--- a/index.php
+++ b/index.php
@@ -60,6 +60,7 @@ function cmp($a, $b) {
$servUpdates = getData('service', false, false, false);
if (isset($_GET['route'])) {
+ echo '<a href="index.php">Home</a>';
$route = $_GET['route'];
$days = array('mon_fri', 'sat', 'sun');
$directions = array('outbound', 'inbound');
@@ -81,7 +82,7 @@ if (isset($_GET['route'])) {
}
//print friday only gmp_legend
- echo '<br><table align="left" border="1" cellpadding="3" style="background-color: #039DFF;"><tr><td>Friday Only</td><tr><table><br>';
+ echo '<table align="left" border="1" cellpadding="3" style="background-color: #039DFF;"><tr><td>Friday Only</td><tr><table>';
// print timetables
foreach ($days as $day) {
@@ -108,7 +109,7 @@ if (isset($_GET['route'])) {
usort($stopList,"cmp");
$trips = getData('trips', $route, $direction, $day);
// print timetable info while setting display friendly case for directions
- // TODO: add linebreaks between end of table and next table title
+ echo '&nbsp;';
echo '<h3>' . ucfirst($direction) . ' | ' . $displayDay . '</h3>';
echo '<table align="left" border="1" cellpadding="3" width="100%">';
// search for $stopList['stop_name'] in each trip and print time in row on table
@@ -149,9 +150,11 @@ else {
} else {
echo '<h3>' . $meta['name']. ' | ' . $meta['from'] . ' - ' . $meta['to'] . '</h3>';
}
- echo '<h4>Service Updates:</h4><p>';
- foreach ($servUpdates as $update) {
- echo $update['content'] . '- <b>Affected Routes: </b>' . implode(", ",$update['services']) . '<br><br>';
+ if (!empty($routeUpdates)) {
+ echo '<h4>Service Updates:</h4><p>';
+ foreach ($servUpdates as $update) {
+ echo $update['content'] . '- <b>Affected Routes: </b>' . implode(", ",$update['services']) . '<br><br>';
+ }
}
foreach ($routes as $route) {
echo '<h4><a href="index.php?route=' . $route['service_number'] . '">' . $route['service_number'] . ' - ' . $route['service_name'] . '</a></h4>';