-
Notifications
You must be signed in to change notification settings - Fork 2
/
xcplan.php
135 lines (129 loc) · 3.81 KB
/
xcplan.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<?php
$version=strtolower($_GET['version']);
if(empty($version)) {
header('Location: index.html');
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Soaring task planner</title>
<script src="https://maps.googleapis.com/maps/api/js?key=SECRET"></script>
<script src="lib/infobox.js"></script>
<script src="lib/jquery-2.1.3.min.js"></script>
<script src="geocalc.js"></script>
<?php
switch ($version) {
case 'world':
echo "<script src='xcplan_world.js'></script>\n";
break;
case 'uk':
echo "<script src='xcplan_uk.js'></script>\n";
break;
default:
echo "<script src='xcplan_world.js'></script>\n";
}
?>
<script src="xcplan.js"></script>
<link rel="stylesheet" href="xcplan.css" />
</head>
<body>
<div id='titlediv'>
<button id='help'>Help</button>
<button id='about'>About</button>
<h1>XCWebPlan
<?php
if($version==='uk') {
echo "- UK version";
}
?>
</h1>
<p>
A free browser-based tool for planning soaring tasks.
</p>
<p> © 2016 Richard Brisbourne </p>
</div>
<noscript>
<p>
<strong>Please enable JavaScript to use this application.</strong>
</p>
</noscript>
<div id="maincontainer">
<div id="mapwrapper">
<div id="map"></div>
</div>
<div id="controldiv">
<p>
<label for="airclip">Clip airspace above:</label>
<select id="airclip" class="inbutton">
<option value="0">No Airspace</option>
<option value="3001">3000</option>
<option value="4501">4500</option>
<option value="6001" selected>6000</option>
<option value="9001">9000</option>
<option value="12001">12000</option>
<option value="19501">19500</option>
</select>
feet
</p>
<?php
if($version==='world') {
echo " <p id='fileselect'>\n";
echo "<label for='fileControl'>Select a turning point file:</label>\n";
echo " <input id='fileControl' type='file' accept='.cup,.dat' />\n</p>\n";
}
?>
<div id="maincontrol">
<p>Show waypoints: <input type="radio" name="wpt_vis" value="show" /> Hide waypoints: <input type="radio" name="wpt_vis" value="hide" />
</p>
<p>Show labels: <input type="radio" name="label_vis" value="show" /> Hide labels: <input type="radio" name="label_vis" value="hide" />
</p>
<p>Click marker on map to add start/TP/Finish.</p>
<p>Up arrow on list to move TP up, "X" to delete.</p>
<hr />
<table>
<tbody id="tasktab">
</tbody>
</table>
<p id="tasklength"></p>
<hr />
<h4>Print:</h4>
<button id="tasksheet" class="printbutton" disabled>Task Briefing</button><button id="declaration" class="printbutton" disabled>Declaration</button>
<hr>
<div id="zoomto">
<h4>Zoom to waypoint</h4>
<p>
<?php
if($version==='uk') {
echo "Enter trigraph: ";
}
else {
echo "Enter first part of name (min 3 characters): ";
}
?>
<input type='text' id='findpt' /> <button id='tpzoom'>GO</button></p>
</div>
<hr>
<div id='exportdiv'>
<h4>Export:</h4>
<button id='copytask' class='printbutton' disabled>Copy task</button> to IGCWebview
</div>
</div>
</div>
<div id='disclaimer' class='dialogue'>
<p>
<b>Warning:</b> Unless the "no airspace" option is selected opposite, outlines of controlled airspace will be displayed on the map provided we have data for the area.</p>
<p>This information is for guidance only. It may not be accurate, current or complete and is not valid for navigation or flight planning. Always consult the official publications for current and correct information.
</p>
<p>Also note only controlled airspace in the area covered by the waypoints will be shown.</p>
<button id='acceptor'>Accept</button>
</div>
<div id='tpselect' class='dialogue'>
<h4>Select Waypoint</h4>
<div id='tpdetail'>
</div>
<button id='thistp'>Go</button>
</div>
</body>
</html>