From: maxious Date: Wed, 20 Jul 2011 10:06:25 +0000 Subject: Link to other native mobile apps X-Git-Url: http://maxious.lambdacomplex.org/git/?p=busui.git&a=commitdiff&h=905a954e4a2aae5984a54e32f7c8ca786182d2f0 --- Link to other native mobile apps --- --- a/about.php +++ b/about.php @@ -17,6 +17,10 @@ Feedback encouraged; contact maxious@lambdacomplex.org

Some icons by Joseph Wain / glyphish.com
+Native clients also available for iPhone(cbrTimetable by Sandor Kolotenko +, ACT Buses by David Sullivan) +and Android (MyBus 2.0 by Imagine Team) +

Disclaimer: The content of this website is of a general and informative nature. Please check with printed timetables or those available on http://action.act.gov.au before your trip. Whilst every effort has been made to ensure the high quality and accuracy of the Site, the Author makes no warranty, --- a/labs/index.php +++ b/labs/index.php @@ -18,11 +18,11 @@

Displays the deviation from the timetable over the day

  • Frequency Distribution of Time Deviation

    Displays spread of time deviations

  • - + $timeDiff, - "stop_code" => $potentialStop['stop_code'] + "stop_code" => $potentialStop['stop_code'], + "stop_sequence" => $timedTrip['stop_sequence'] ); echo "Found trip {$trip['trip_id']} at stop {$potentialStop['stop_code']} (#{$potentialStop['stop_id']}, sequence #{$trip['stop_sequence']})
    "; echo "Arriving at {$timedTrip['arrival_time']}, difference of " . round($timeDiff / 60, 2) . " minutes
    "; @@ -110,18 +111,18 @@ echo "Lowest difference of " . round($lowestDelta / 60, 2) . " minutes will be recorded for this observation
    "; $observation_id = $obsv['observation_id']; $route_full_name = $obsv['route_full_name']; - $myway_route = $obsv['myway_stop']; $stop_code = $timeDeltas[0]["stop_code"]; - $stmt = $conn->prepare("insert into myway_timingdeltas (observation_id, route_full_name, myway_route, stop_code, timing_delta, time, date, timing_period) - values (:observation_id, :route_full_name, :myway_route, :stop_code, :timing_delta, :time, :date, :timing_period)"); + $stop_sequence = $timeDeltas[0]["stop_sequence"]; + $stmt = $conn->prepare("insert into myway_timingdeltas (observation_id, route_full_name, stop_code, timing_delta, time, date, timing_period, stop_sequence) + values (:observation_id, :route_full_name, :stop_code, :timing_delta, :time, :date, :timing_period, :stop_sequence)"); $stmt->bindParam(':observation_id', $observation_id); $stmt->bindParam(':route_full_name', $route_full_name); - $stmt->bindParam(':myway_route', $myway_route); $stmt->bindParam(':stop_code', $stop_code); $stmt->bindParam(':timing_delta', $lowestDelta); $stmt->bindParam(':time', $time); $stmt->bindParam(':date', $date); $stmt->bindParam(':timing_period', $timing_period); + $stmt->bindParam(':stop_sequence', $stop_sequence); // insert a record $stmt->execute(); if ($stmt->rowCount() > 0) { --- /dev/null +++ b/labs/myway_timeliness_route.json.php @@ -1,1 +1,25 @@ - + +{ + "label": "", + "data": prepare($query); +$query->bindParam(':route_full_name', $_REQUEST['routeid'],PDO::PARAM_STR, 42); + +$query->execute(); +if (!$query) { + databaseError($conn->errorInfo()); + return Array(); +} +foreach ($query->fetchAll() as $delta) { + $points[] = "[{$delta['stop_sequence']}, {$delta['timing_delta']}]"; +}; +echo "[".implode(",",$points)."]"; +?> +} --- /dev/null +++ b/labs/myway_timeliness_route.php @@ -1,1 +1,120 @@ + + + + +
    + +
    + --- /dev/null +++ b/labs/myway_timeliness_stop.json.php @@ -1,1 +1,31 @@ - + +{ + "label": "", + "data": prepare($query); +$query->bindParam(':myway_stop', $_REQUEST['stopid'],PDO::PARAM_STR, 42); + +$query->execute(); +if (!$query) { + databaseError($conn->errorInfo()); + return Array(); +} +foreach ($query->fetchAll() as $delta) { + $points[] = "[".((strtotime("00:00Z") + midnight_seconds(strtotime($delta['time'])))*1000).", {$delta['timing_delta']}]"; +}; +if (count($points) == 0) { + echo "[]"; } + else echo "[".implode(",",$points)."]"; +?> +} --- /dev/null +++ b/labs/myway_timeliness_stop.php @@ -1,1 +1,131 @@ + + + + + +
    + --- a/servicealerts_api.php +++ b/servicealerts_api.php @@ -36,7 +36,7 @@ $return['entities'][] = $entity; } } -//header('Content-Type: text/javascript; charset=utf8'); +header('Content-Type: text/javascript; charset=utf8'); // header('Access-Control-Allow-Origin: http://bus.lambdacomplex.org/'); header('Access-Control-Max-Age: 3628800'); header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE');