'.staticmap(Array(0 => Array($stop[2],$stop[3]))).'

'; -// change date/time/service_period echo '
    '; $url = $APIurl."/json/stoptrips?stop=".$_REQUEST['stopid']."&time=".midnight_seconds()."&service_period=".service_period(); $trips = json_decode(getPage($url)); --- a/busui/stopList.php +++ b/busui/stopList.php @@ -1,8 +1,9 @@ + +function navbar() { + echo' +
    '; + timePlaceSettings(); +} // By suburb if (isset($_REQUEST['suburbs'])) { + include_header("Stops by Suburb"); + navbar(); echo '
      '; foreach ($suburbs as $suburb) { echo '
    • '.$suburb.'
    • '; @@ -20,6 +25,25 @@ echo '
    '; } else { // Timing Points / All stops + +if ($_REQUEST['allstops']) { + $url = $APIurl."/json/stops"; + include_header("All Stops"); + navbar(); +} else if ($_REQUEST['nearby']) { + $url = $APIurl."/json/neareststops?lat={$_SESSION['lat']}&lon={$_SESSION['lon']}&limit=15"; +include_header("Nearby Stops"); + navbar(); + timePlaceSettings(); +} else if ($_REQUEST['suburb']) { + $url = $APIurl."/json/stopzonesearch?q=".filter_var($_REQUEST['suburb'], FILTER_SANITIZE_STRING); +include_header("Stops in ".ucwords(filter_var($_REQUEST['suburb'], FILTER_SANITIZE_STRING))); + navbar(); +} else { + $url = $APIurl."/json/timingpoints"; + include_header("Timing Points / Major Stops"); + navbar(); +} echo '
    Go to letter: '; foreach(range('A','Z') as $letter) { @@ -30,10 +54,6 @@ $('.noscriptnav').hide(); "; echo '
      '; -$url = $APIurl."/json/timingpoints"; -if ($_REQUEST['allstops']) $url = $APIurl."/json/stops"; -if ($_REQUEST['nearby']) $url = $APIurl."/json/neareststops?lat={$_REQUEST['lat']}&lon={$_REQUEST['lon']}&limit=15"; -if ($_REQUEST['suburb']) $url = $APIurl."/json/stopzonesearch?q={$_REQUEST['suburb']}"; $contents = json_decode(getPage($url)); debug(print_r($contents,true)); foreach ($contents as $key => $row) { --- a/busui/trip.php +++ b/busui/trip.php @@ -1,12 +1,12 @@ route_short_name . ' '. $trips[1]->route_long_name); +timePlaceSettings(); echo '
        '; --- a/busui/tripPlanner.php +++ b/busui/tripPlanner.php @@ -1,14 +1,16 @@ $errorMessage"; + global $date,$time,$from,$to; + echo "$errorMessage"; echo '
        @@ -86,17 +88,17 @@ } if ($_REQUEST['time']) { - $toPlace = (startsWith($_REQUEST['to'], "-") ? $_REQUEST['to'] : geocode(urlencode($_REQUEST['to']), false)); - $fromPlace = (startsWith($_REQUEST['from'], "-") ? $_REQUEST['from'] : geocode(urlencode($_REQUEST['from']), false)); + $toPlace = (startsWith($to, "-") ? $to : geocode($to, false)); + $fromPlace = (startsWith($from, "-") ? $from : geocode($from, false)); if ($toPlace == "" || $fromPlace == "") { $errorMessage = ""; if ($toPlace === "") - $errorMessage .= urlencode($_REQUEST['to']) . " not found.
        \n"; + $errorMessage .= urlencode($to) . " not found.
        \n"; if ($fromPlace === "") - $errorMessage .= urlencode($_REQUEST['from']) . " not found.
        \n"; + $errorMessage .= urlencode($from) . " not found.
        \n"; tripPlanForm($errorMessage); } else { - $url = "http://10.1.0.243:5080/opentripplanner-api-webapp/ws/plan?_dc=1290254798856&arriveBy=false&date=" . urlencode($_REQUEST['date']) . "&time=" . urlencode($_REQUEST['time']) . "&mode=TRANSIT%2CWALK&optimize=QUICK&maxWalkDistance=840&wheelchair=false&toPlace=$toPlace&fromPlace=$fromPlace&intermediatePlaces="; + $url = $otpAPIurl."ws/plan?date=" . urlencode($_REQUEST['date']) . "&time=" . urlencode($_REQUEST['time']) . "&mode=TRANSIT%2CWALK&optimize=QUICK&maxWalkDistance=840&wheelchair=false&toPlace=$toPlace&fromPlace=$fromPlace&intermediatePlaces="; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HEADER, 0); --- a/maxious-canberra-transit-feed/cbrtable.yml.in.in +++ b/maxious-canberra-transit-feed/cbrtable.yml.in.in @@ -5,6 +5,7 @@ agency_name: ACT Internal Omnibus Network (ACTION) agency_url: http://www.action.act.gov.au/ agency_timezone: Australia/Sydney + agency_phone: 131710 + agency_lang: en -