From: Maxious Date: Thu, 02 Jun 2011 08:58:01 +0000 Subject: Merge branch 'master' of https://github.com/maxious/ACTBus-ui X-Git-Url: https://maxious.lambdacomplex.org/git/?p=busui.git&a=commitdiff&h=535257650610c1a7a745800d36c9624d231309a5 --- Merge branch 'master' of https://github.com/maxious/ACTBus-ui Conflicts: include/common-db.inc.php --- --- a/include/common-template.inc.php +++ b/include/common-template.inc.php @@ -5,6 +5,7 @@ function googleAnalyticsGetImageUrl() { global $GA_ACCOUNT, $GA_PIXEL; + //if (stristr($_SERVER['HTTP_USER_AGENT'], 'Googlebot') return ""; $url = ""; $url.= $GA_PIXEL . "?"; $url.= "utmac=" . $GA_ACCOUNT; @@ -125,7 +126,25 @@ border-radius: 15px; } - +/*#leftcolumn { + float: none; +} +.min-width-768px #leftcolumn { + float: left; + width: 30%; +} +#rightcolumn { + float: none; +} +.min-width-768px #rightcolumn { + float: right; + width: 68%; +}*/ + +#footer { +clear:both; +text-align:center; +} // source http://webaim.org/techniques/skipnav/ #skip a, #skip a:hover, #skip a:visited { @@ -144,7 +163,7 @@ height:auto; } '; - if (strstr($_SERVER['HTTP_USER_AGENT'], 'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'], 'iPod')) { + if (strstr($_SERVER['HTTP_USER_AGENT'], 'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'], 'iPod') || strstr($_SERVER['HTTP_USER_AGENT'], 'iPad')) { echo ' @@ -175,7 +194,11 @@ } $(document).ready(function() { $('#here').click(function(event) { $('#geolocate').val(geolocate()); return false;}); -$('#here').show(); + $('#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();"; @@ -187,6 +210,7 @@ var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-22173039-1']); _gaq.push(['_trackPageview']); + _gaq.push(['_trackPageLoadTime']); "; echo ' @@ -249,7 +273,7 @@ or enter an address/co-ordinates in the box below.'; } echo ''; - echo '
+ echo '

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

--- a/include/common.inc.php +++ b/include/common.inc.php @@ -30,10 +30,11 @@ include_once ("common-geo.inc.php"); include_once ("common-net.inc.php"); include_once ("common-transit.inc.php"); +include_once ("common-db.inc.php"); + +include_once ("common-request.inc.php"); include_once ("common-session.inc.php"); -include_once ("common-db.inc.php"); include_once ("common-template.inc.php"); -include_once ("common-request.inc.php"); function isDebugServer() { --- a/include/db/route-dao.inc.php +++ b/include/db/route-dao.inc.php @@ -200,7 +200,7 @@ $query = $conn->prepare($query); $query->bindParam(":service_period", $service_period); $query->bindParam(":distance", $distance); - $query->bindParam(":limit", $limit); + if ($limit != "") $query->bindParam(":limit", $limit); $query->execute(); if (!$query) { databaseError($conn->errorInfo()); --- a/index.php +++ b/index.php @@ -28,5 +28,4 @@ echo ' Busness R&D'; include_footer(true) ?> - --- a/labs/myway_api.json.php +++ b/labs/myway_api.json.php @@ -23,7 +23,7 @@ "DOBday" => "day", "DOByear" => "year", "secret_answer" => "pwrd", - "button" => "button" + "button" => "Submit" ); foreach (Array( "card_number", @@ -64,6 +64,7 @@ curl_setopt($ch, CURLOPT_POST, count($fields)); curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_REFERER, "https://www.action.act.gov.au/ARTS/getbalance.asp"); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_TIMEOUT, 30); //execute post @@ -75,6 +76,7 @@ if (!isset($return['error'])) { include_once ('lib/simple_html_dom.php'); + //print_r($pageHTML); $page = str_get_html($pageHTML); $pageAlerts = $page->find(".smartCardAlert"); if (sizeof($pageAlerts) > 0) { @@ -94,12 +96,14 @@ $tableColumns[$tableColumnNum] = cleanString($th->plaintext); $tableColumnNum++; } + //print_r($tableColumns); $tableRowNum = 0; foreach ($table->find("tr") as $tr) { $tableColumnNum = 0; foreach ($tr->find("td") as $td) { if ($tableNum == 1) $return[$tableName[$tableNum]][$tableColumns[$tableColumnNum]] = cleanString($td->plaintext); else $return[$tableName[$tableNum]][$tableRowNum][$tableColumns[$tableColumnNum]] = cleanString($td->plaintext); + //print_r($return); $tableColumnNum++; } $tableRowNum++; --- a/labs/mywaybalance.php +++ b/labs/mywaybalance.php @@ -29,8 +29,10 @@ echo '