-
Notifications
You must be signed in to change notification settings - Fork 159
/
airspace-data.php
67 lines (62 loc) · 1.74 KB
/
airspace-data.php
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
<?php
require_once('require/class.Connection.php');
require_once('require/class.Language.php');
require_once('require/class.NOTAM.php');
?>
<div class="alldetails">
<button type="button" class="close">×</button>
<?php
$airspaceid = filter_input(INPUT_GET,'airspace',FILTER_SANITIZE_NUMBER_INT);
//$notamref = urldecode($notamref);
if ($globalDBdriver == 'mysql') {
$query = "SELECT * FROM airspace WHERE ogr_fid = :id";
} else {
$query = "SELECT * FROM airspace WHERE ogc_fid = :id";
}
$Connection = new Connection();
try {
$sth = $Connection->db->prepare($query);
$sth->execute(array(':id' => $airspaceid));
} catch(PDOException $e) {
echo "error";
}
$result=$sth->fetchAll(PDO::FETCH_ASSOC);
$airspace = $result[0];
date_default_timezone_set('UTC');
print '<div class="top">';
if (isset($airspace['name'])) $airspace['title'] = $airspace['name'];
print '<div class="right"><div class="callsign-details"><div class="callsign">'.$airspace['title'].'</a></div>';
print '</div>';
print '<div class="details">';
if (isset($airspace['type'])) {
print '<div>';
print '<span>'._("Type").'</span>';
print $airspace['type'];
print '</div>';
}
if ($airspace['class'] != '') {
print '<div>';
print '<span>'._("Class").'</span>';
print $airspace['class'];
print '</div>';
}
if (isset($airspace['ceiling'])) $airspace['tops'] = $airspace['ceiling'];
print '<div>';
print '<span>'._("Tops").'</span>';
print $airspace['tops'];
print '</div>';
if (isset($airspace['floor'])) $airspace['base'] = $airspace['floor'];
print '<div>';
print '<span>'._("Base").'</span>';
print $airspace['base'];
print '</div>';
print '</div>';
/*
print '<div class="notamtext">';
print '<span>'._("Text").'</span>';
print $notam['notam_text'];
print '</div>';
*/
print '</div>';
?>
</div>