Show service alerts for everybody
--- a/aws/awsStartup.sh
+++ b/aws/awsStartup.sh
@@ -11,6 +11,8 @@
chcon -R -h root:object_r:httpd_sys_content_t /var/www/*
chcon -R -t httpd_sys_content_rw_t /var/www/lib/staticmaplite/cache
chmod -R 777 /var/www/lib/staticmaplite/cache
+chcon -R -t httpd_sys_content_rw_t /var/www/labs/tiles
+chmod -R 777 /var/www/labs/tiles
wget http://s3-ap-southeast-1.amazonaws.com/busresources/cbrfeed.zip \
-O /var/www/cbrfeed.zip
--- a/include/common-net.inc.php
+++ b/include/common-net.inc.php
@@ -5,7 +5,7 @@
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
- curl_setopt($ch, CURLOPT_TIMEOUT, 30);
+ curl_setopt($ch, CURLOPT_TIMEOUT, 45);
$page = curl_exec($ch);
if (curl_errno($ch)) {
echo "<font color=red> Database temporarily unavailable: ";
--- a/include/common-template.inc.php
+++ b/include/common-template.inc.php
@@ -188,12 +188,15 @@
</div><!-- /header -->
<a name="maincontent" id="maincontent"></a>
<div data-role="content"> ';
- if (!$_SESSION['service_id']) {
$overrides = getServiceOverride();
if ($overrides['service_id']){
+if ($overrides['service_id'] == "noservice") {
+ echo '<div id="servicewarning">Buses are <strong>not running today</strong> due to industrial action/public holiday. See <a
+href="http://www.action.act.gov.au">http://www.action.act.gov.au</a> for details.</div>';
+ } else {
echo '<div id="servicewarning">Buses are running on an altered timetable today due to industrial action/public holiday. See <a href="http://www.action.act.gov.au">http://www.action.act.gov.au</a> for details.</div>';
- }
- }
+ }
+ }
}
}
function include_footer()
--- a/labs/mywaybalance.php
+++ b/labs/mywaybalance.php
@@ -27,11 +27,14 @@
else {
echo "<h2>Balance: " . $return['myway_carddetails']['Card Balance'] . "</h2>";
echo '<ul data-role="listview" data-inset="true"><li data-role="list-divider"> Recent Transactions </li>';
+ $txCount=0;
foreach ($return['myway_transactions'] as $transaction) {
echo "<li><b>" . $transaction["Date / Time"] . "</b>";
echo "<br><small>" . $transaction["TX Reference No / Type"] . "</small>";
echo '<p class="ui-li-aside">' . $transaction["TX Amount"] . '</p>';
echo "</li>";
+ $txCount++;
+ if ($txCount > 10) break;
}
echo "</ul>";
}
Binary files a/labs/tiles/empty.png and b/labs/tiles/empty.png differ
--- a/readme.txt
+++ b/readme.txt
@@ -18,6 +18,16 @@
End with a backslash and a period on a line by itself.
>> saturday 20110416 2
>> sunday 20110416 1
+>> saturday 20110423 2
+>> sunday 20110423 1
+>> weekday 20110425 2
+>> sunday 20110425 1
+>> weekday 20110422 2
+>> noservice 20110422 1
+>> weekday 20110426 2
+>> noservice 20110426 1
+>> sunday 20110424 2
+>> noservice 20110424 1
>> \.