From: Maxious Date: Tue, 10 May 2011 08:59:36 +0000 Subject: PHPfog database X-Git-Url: http://maxious.lambdacomplex.org/git/?p=busui.git&a=commitdiff&h=7c94c9ef3775bf81c3d756df3073b9e2848737e9 --- PHPfog database --- --- a/include/common-db.inc.php +++ b/include/common-db.inc.php @@ -1,13 +1,15 @@
- Back + Back

' . $pageTitle . '

Home
--- a/include/common.inc.php +++ b/include/common.inc.php @@ -33,7 +33,6 @@ 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/index.php +++ b/index.php @@ -13,14 +13,14 @@
  • Timetables - Stops
  • Major (Timing Point) Stops
  • All Stops
  • -
  • Stops By Suburb
  • +
  • Stops By Suburb
  • Nearby Stops
  • Busness R&D'; include_footer(true) ?> - --- a/labs/networkstats.php +++ b/labs/networkstats.php @@ -31,6 +31,7 @@ {$route['route_short_name']} {$route['route_long_name']}"; foreach (getRouteTrips($routeid) as $key => $trip) { --- a/layar_api.php +++ b/layar_api.php @@ -5,8 +5,11 @@ $output['layer'] = "canberrabusstops"; $max_page = 10; $max_results = 50; -$page_start = 0 + $pageKey; -$page_end = $max_page + $pageKey; +$page_start = 0 + filter_var($_REQUEST['pageKey'], FILTER_SANITIZE_NUMBER_INT); +$page_end = $max_page + filter_var($_REQUEST['pageKey'], FILTER_SANITIZE_NUMBER_INT); +$lat = filter_var($_REQUEST['lat'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION); +$lon = filter_var($_REQUEST['lon'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION); +$max_distance = filter_var($_REQUEST['radius'], FILTER_SANITIZE_NUMBER_INT); $contents = getNearbyStops($lat, $lon, 50, $max_distance); $stopNum = 0; foreach ($contents as $stop) { --- a/routeList.php +++ b/routeList.php @@ -7,70 +7,72 @@ '; } -if (isset($bysuburbs)) { +if ($_REQUEST['bysuburb']) { include_header("Routes by Suburb", "routeList"); navbar(); echo ' '; } -else if (isset($nearby) || isset($suburb)) { +else if ($_REQUEST['nearby'] || $_REQUEST['suburb']) { $routes = Array(); - if ($suburb) { - include_header($suburb . " - " . ucwords(service_period()) , "routeList"); - navbar(); - timePlaceSettings(); - trackEvent("Route Lists", "Routes By Suburb", $suburb); - $routes = getRoutesbysuburbs($suburb); + if ($_REQUEST['suburb']) { + $suburb = filter_var($_REQUEST['suburb'], FILTER_SANITIZE_STRING); + include_header($suburb ." - ".ucwords(service_period()), "routeList"); + navbar(); + timePlaceSettings(); + trackEvent("Route Lists", "Routes By Suburb", $suburb); + $routes = getRoutesBySuburb($suburb); + } - if (isset($nearby)) { + if ($_REQUEST['nearby']) { include_header("Routes Nearby", "routeList", true, true); - trackEvent("Route Lists", "Routes Nearby", $_SESSION['lat'] . "," . $_SESSION['lon']); - navbar(); - timePlaceSettings(true); + trackEvent("Route Lists", "Routes Nearby", $_SESSION['lat'].",".$_SESSION['lon']); + navbar(); + timePlaceSettings(true); if (!isset($_SESSION['lat']) || !isset($_SESSION['lat']) || $_SESSION['lat'] == "" || $_SESSION['lon'] == "") { include_footer(); die(); } - $routes = getRoutesNearby($_SESSION['lat'], $_SESSION['lon']); + $routes = getRoutesNearby($_SESSION['lat'],$_SESSION['lon']); } + echo '