--- a/include/common-template.inc.php +++ b/include/common-template.inc.php @@ -23,46 +23,42 @@ $url.= "&guid=ON"; return str_replace("&", "&", $url); } - -$labsPath = ""; -if (strstr($_SERVER['PHP_SELF'],"labs")) $labsPath = "../"; - function include_header($pageTitle, $pageType, $opendiv = true, $geolocate = false, $datepicker = false) { -global $labsPath; + global $labsPath,$serviceAlertsEnabled; echo ' - ' . $pageTitle . ' - - '; + +' . $pageTitle . ' + + + + '; if (isDebugServer()) { - echo ' - - - + - '; - } - else { - echo ' - - - '; - } - echo ' - - - - + + + + + + + - '; - echo ''; + echo ''; + echo ''; if (strstr($_SERVER['HTTP_USER_AGENT'], 'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'], 'iPod') || strstr($_SERVER['HTTP_USER_AGENT'], 'iPad')) { echo ' @@ -211,10 +118,6 @@ $(document).ready(function() { $('#here').click(function(event) { $('#geolocate').val(geolocate()); return false;}); $('#here').show(); - /*if ($.mobile.media('screen and (min-width: 768px)')) { - $('map a:first').click(); - $('#settings a:first').click(); - }*/ }); "; if (!isset($_SESSION['lat']) || $_SESSION['lat'] == "") echo "geolocate();"; @@ -239,28 +142,33 @@
Back

' . $pageTitle . '

- Home + Home
'; $overrides = getServiceOverride(); if ($overrides['service_id']) { - if ($overrides['service_id'] == "noservice") { - echo '
Buses are not running today due to industrial action/public holiday. See Buses are not running today due to industrial action/public holiday. See http://www.action.act.gov.au for details.
'; - } - else { - echo '
Buses are running on an altered timetable today due to industrial action/public holiday. See http://www.action.act.gov.au for details.
'; - } + } + else { + 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 ($serviceAlertsEnabled) { + $serviceAlerts = getServiceAlerts("network","network"); + foreach ($serviceAlerts['entities'] as $entity) { + echo "
".date("F j, g:i a",strtotime($entity['alert']['active_period']['start']))." to ". date("F j, g:i a", strtotime($entity['alert']['active_period']['end']))."{$entity['alert']['header_text']['translation']['text']}
Warning: {$entity['alert']['description_text']['translation']['text']} +
Source
"; + } + } + } } function include_footer() { - -global $labsPath; - echo '
"; -} -function timePlaceSettings($geolocate = false) + } + echo "\n"; +} +function placeSettings() { global $service_periods; $geoerror = false; - if ($geolocate == true) { $geoerror = !isset($_SESSION['lat']) || !isset($_SESSION['lat']) || $_SESSION['lat'] == "" || $_SESSION['lon'] == ""; - } + echo '
'; if ($geoerror) { echo 'Sorry, but your location could not currently be detected. @@ -292,27 +198,13 @@ } echo '
'; echo '
-

Change Time/Place (' . (isset($_SESSION['time']) ? $_SESSION['time'] : "Current Time,") . ' ' . ucwords(service_period()) . ')...

+

Change Location...

-
- - - Current Time? -
-
- - - -