Fix service alert filtering
[busui.git] / include / common-request.inc.php
Alexander Sadleir















Alexander Sadleir
Alexander Sadleir
Alexander Sadleir
Alexander Sadleir
Alexander Sadleir
Alexander Sadleir
Alexander Sadleir











Alexander Sadleir
Alexander Sadleir
Alexander Sadleir
Alexander Sadleir
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
 
/*
 *    Copyright 2010,2011 Alexander Sadleir 
 
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
 
  http://www.apache.org/licenses/LICENSE-2.0
 
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
 */
if (isset($_REQUEST['firstLetter'])) {
    $firstLetter = filter_var($_REQUEST['firstLetter'], FILTER_SANITIZE_STRING);
}
if (isset($_REQUEST['bysuburbs'])) {
    $bysuburbs = true;
}
if (isset($_REQUEST['bynumber'])) {
    $bynumber = true;
}
if (isset($_REQUEST['allstops'])) {
    $allstops = true;
}
if (isset($_REQUEST['nearby'])) {
    $nearby = true;
}
if (isset($_REQUEST['suburb'])) {
    $suburb = $_REQUEST['suburb'];
}
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['stopcode'])) {
    $stopcode = filter_var($_REQUEST['stopcode'], FILTER_SANITIZE_STRING);
}
if (isset($_REQUEST['stopids'])) {
    $stopids = explode(",", filter_var($_REQUEST['stopids'], FILTER_SANITIZE_STRING));
}
if (isset($_REQUEST['routeids'])) {
    $routeids = explode(",", filter_var($_REQUEST['routeids'], FILTER_SANITIZE_STRING));
}
if (isset($_REQUEST['tripid'])) {
    $tripid = filter_var($_REQUEST['tripid'], FILTER_SANITIZE_STRING);
}
if (isset($_REQUEST['stopid'])) {
    $stopid = filter_var($_REQUEST['stopid'], FILTER_SANITIZE_NUMBER_INT);
}
if (isset($_REQUEST['geolocate'])) {
    $geolocate = filter_var($_REQUEST['geolocate'], FILTER_SANITIZE_URL);
}
?>