Check if input is a valid stop id
This commit is contained in:
parent
7e5b91a73f
commit
48bd4135f7
1 changed files with 11 additions and 0 deletions
11
libdata.php
11
libdata.php
|
@ -54,6 +54,17 @@ function isValidLine($line){
|
|||
return false;
|
||||
}
|
||||
|
||||
function isValidStop($stp){
|
||||
global $stops;
|
||||
foreach ($stops as $stop){
|
||||
if ($stop['id'] == $stp){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function getRouteInfo($id){
|
||||
global $routes;
|
||||
foreach ($routes as $route){
|
||||
|
|
Reference in a new issue