Licence and jqmobile beta 3 upgrade
[busui.git] / include / common-request.inc.php
blob:a/include/common-request.inc.php -> blob:b/include/common-request.inc.php
--- a/include/common-request.inc.php
+++ b/include/common-request.inc.php
@@ -33,15 +33,26 @@
 if (isset($_REQUEST['suburb'])) {
     $suburb = $_REQUEST['suburb'];
 }
-$pageKey = 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);
+if (isset($_REQUEST['pageKey'])) {
+    $pageKey = filter_var($_REQUEST['pageKey'], FILTER_SANITIZE_NUMBER_INT);
+}
+if (isset($_REQUEST['lat'])) {
+    $lat = filter_var($_REQUEST['lat'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);
+}
+if (isset($_REQUEST['lon'])) {
+    $lon = filter_var($_REQUEST['lon'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);
+}
+if (isset($_REQUEST['radius'])) {
+    $max_distance = filter_var($_REQUEST['radius'], FILTER_SANITIZE_NUMBER_INT);
+}
 if (isset($_REQUEST['numberSeries'])) {
     $numberSeries = filter_var($_REQUEST['numberSeries'], FILTER_SANITIZE_NUMBER_INT);
 }
 if (isset($_REQUEST['routeDestination'])) {
     $routeDestination = urldecode(filter_var($_REQUEST['routeDestination'], FILTER_SANITIZE_ENCODED));
+}
+if (isset($_REQUEST['routename'])) {
+    $routename = urldecode(filter_var($_REQUEST['routename'], FILTER_SANITIZE_ENCODED));
 }
 if (isset($_REQUEST['stopcode'])) {
     $stopcode = filter_var($_REQUEST['stopcode'], FILTER_SANITIZE_STRING);
@@ -49,16 +60,25 @@
 if (isset($_REQUEST['stopids'])) {
     $stopids = explode(",", filter_var($_REQUEST['stopids'], FILTER_SANITIZE_STRING));
 }
+if (isset($_REQUEST['filterIncludeRoutes'])) {
+    $filterIncludeRoutes = explode(",", filter_var($_REQUEST['filterIncludeRoutes'], FILTER_SANITIZE_STRING));
+}
+if (isset($_REQUEST['filterHasStop'])) {
+    $filterHasStop = filter_var($_REQUEST['filterHasStop'], FILTER_SANITIZE_STRING);
+}
 if (isset($_REQUEST['tripid'])) {
-    $tripid = filter_var($_REQUEST['tripid'], FILTER_SANITIZE_NUMBER_INT);
+    $tripid = filter_var($_REQUEST['tripid'], FILTER_SANITIZE_STRING);
+}
+if (isset($_REQUEST['routeid'])) {
+    $routeid = filter_var($_REQUEST['routeid'], FILTER_SANITIZE_STRING);
+}
+if (isset($_REQUEST['directionid'])) {
+    $directionid = filter_var($_REQUEST['directionid'], FILTER_SANITIZE_STRING);
 }
 if (isset($_REQUEST['stopid'])) {
     $stopid = filter_var($_REQUEST['stopid'], FILTER_SANITIZE_NUMBER_INT);
 }
-if (isset($_REQUEST['routeid'])) {
-    $routeid = filter_var($_REQUEST['routeid'], FILTER_SANITIZE_NUMBER_INT);
-}
 if (isset($_REQUEST['geolocate'])) {
     $geolocate = filter_var($_REQUEST['geolocate'], FILTER_SANITIZE_URL);
 }
-?>
+