| @@ 46-52 (lines=7) @@ | ||
| 43 | echo json_encode($ret); |
|
| 44 | } |
|
| 45 | ||
| 46 | function endswith($string, $test) |
|
| 47 | { |
|
| 48 | $strlen = strlen($string); |
|
| 49 | $testlen = strlen($test); |
|
| 50 | if ($testlen > $strlen) return false; |
|
| 51 | return substr_compare($string, $test, $strlen - $testlen, $testlen) === 0; |
|
| 52 | } |
|
| 53 | ||
| 54 | function getDestinationsForID($id) |
|
| 55 | { |
|
| @@ 78-87 (lines=10) @@ | ||
| 75 | } |
|
| 76 | } |
|
| 77 | ||
| 78 | function endswith($string, $test) |
|
| 79 | { |
|
| 80 | $strlen = strlen($string); |
|
| 81 | $testlen = strlen($test); |
|
| 82 | if($testlen > $strlen) |
|
| 83 | { |
|
| 84 | return false; |
|
| 85 | } |
|
| 86 | return substr_compare($string, $test, $strlen - $testlen, $testlen) === 0; |
|
| 87 | } |
|
| 88 | ||
| 89 | function getDestinationsForID($id) |
|
| 90 | { |
|