Révision e2b1b9c1
Ajouté par Jocelyn Delande il y a plus de 10 ans
show_capline.php | ||
---|---|---|
1 |
<?php |
|
2 |
$fields_spec = array( |
|
3 |
'cap' => array('numeric'), |
|
4 |
'org_lat' => array('numeric'), |
|
5 |
'org_lon' => array('numeric'), |
|
6 |
'dist' => array('numeric'), |
|
7 |
'title' => array(), |
|
8 |
); |
|
9 |
|
|
10 |
$validator = new FormValidator($fields_spec); |
|
11 |
|
|
12 |
$is_valid = $validator->validate($_GET); |
|
13 |
|
|
14 |
|
|
15 |
if ($is_valid) { |
|
16 |
$input = $validator->sane_values(); |
|
17 |
if (isset($input['cap'], $input['org_lat'], $input['org_lon'])) { |
|
18 |
$cap = $input['cap']; |
|
19 |
$org_lat = $input['org_lat']; |
|
20 |
$org_lon = $input['org_lon']; |
|
21 |
$show_capline = true; |
|
22 |
} else { |
|
23 |
$show_capline = false; |
|
24 |
} |
|
25 |
} |
|
26 |
|
|
27 |
?> |
|
28 |
|
|
1 | 29 |
<head> |
2 | 30 |
<title>Visualisation axe horizontal sur OSM</title> |
3 | 31 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
Formats disponibles : Unified diff
input validation on show_capline.php