--- a/include/common-template.inc.php +++ b/include/common-template.inc.php @@ -25,14 +25,14 @@ } function include_header($pageTitle, $pageType, $opendiv = true, $geolocate = false, $datepicker = false) { - global $labsPath; + global $labsPath,$serviceAlertsEnabled; echo ' -' . $pageTitle . ' +' . $pageTitle . ' - Canberra Bus Timetable @@ -156,6 +156,13 @@ echo '
Buses are running on an altered timetable today due to industrial action/public holiday. See http://www.action.act.gov.au for details.
'; } } + if ($GTFSREnabled) { + $serviceAlerts = getServiceAlertsAsArray("agency","0"); + foreach ($serviceAlerts['entity'] as $entity) { + echo "
".date("F j, g:i a",strtotime($entity['alert']['active_period'][0]['start']))." to ". date("F j, g:i a", strtotime($entity['alert']['active_period'][0]['end']))."{$entity['alert']['header_text']['translation'][0]['text']}
Warning: {$entity['alert']['description_text']['translation'][0]['text']} +
Source
"; + } + } } } function include_footer()