forked from DBnR1/EDTB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
map.php
180 lines (173 loc) · 5.76 KB
/
map.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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<?php
/**
* Neighborhood map
*
* No description
*
* @package EDTB\Main
* @author Mauri Kujala <[email protected]>
* @copyright Copyright (C) 2016, Mauri Kujala
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
*/
/*
* ED ToolBox, a companion web app for the video game Elite Dangerous
* (C) 1984 - 2016 Frontier Developments Plc.
* ED ToolBox or its creator are not affiliated with Frontier Developments Plc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/** @var pagetitle */
$pagetitle = "Galaxy Map & Neighborhood Map";
/** @require header file */
require_once($_SERVER["DOCUMENT_ROOT"] . "/style/header.php");
if (isset($_GET["maxdistance"]) && is_numeric($_GET["maxdistance"]))
{
$settings["maxdistance"] = $_GET["maxdistance"];
}
?>
<div class="entries">
<table class="edmap_table">
<tbody>
<tr>
<th style="text-align: center">
<ul class="pagination">
<li><a href="/GalMap.php">Galaxy Map</a></li>
<li class="actives"><a href="/Map.php">Neighborhood Map</a></li>
</ul>
</th>
</tr>
</tbody>
</table>
<div class="entries_inner" style="overflow:hidden !important">
<div id="container"></div>
<div id="report" onclick="$('#report').fadeToggle('fast')"></div>
<div id="disclaimer" onclick="$('#disclaimer').fadeToggle('fast')"></div>
<div id="map_legend">Legend</div>
<div id="map_legend2">
<table style="padding:5px">
<tr>
<td><div style="background-color:rgba(231, 216, 132, 0.7);width:7px;height:7px;border-radius:50%;vertical-align:middle"></div></td>
<td>Empire</td>
</tr>
<tr>
<td><div style="background-color:rgba(9, 180, 244, 0.7);width:7px;height:7px;border-radius:50%;vertical-align:middle"></div></td>
<td>Alliance</td>
</tr>
<tr>
<td><div style="background-color:rgba(140, 140, 140, 0.7);width:7px;height:7px;border-radius:50%;vertical-align:middle"></div></td>
<td>Federation</td>
</tr>
<tr>
<td><div style="background-color:rgba(255, 255, 255, 0.8);width:7px;height:7px;border-radius:50%;vertical-align:middle"></div></td>
<td>Other</td>
</tr>
<tr>
<td><div style="background-color:#37bf1c;width:7px;height:7px;border-radius:50%;vertical-align:middle"></div></td>
<td>Sol</td>
</tr>
<tr>
<td style="text-align:center;vertical-align:middle">
<div style="background-color:#f00;width:8px;height:8px;border-radius:50%">
<div style="position:relative;left:2px;top:2px;background-color:#ccc;width:4px;height:4px;border-radius:50%"></div>
</div>
</td>
<td>Current Location</td>
</tr>
<tr>
<td style="text-align:center;vertical-align:middle">
<div style="background-color:#2e92e7;width:8px;height:8px;border-radius:50%">
<div style="position:relative;left:2px;top:2px;background-color:#ccc;width:4px;height:4px;border-radius:50%"></div>
</div>
</td>
<td>System With a Log Entry</td>
</tr>
<tr>
<td>
<img src="/style/img/goto-g.png" alt="POI Visited" style="margin-bottom:4px;width:12px;height:12px">
</td>
<td>Visited Point of Interest</td>
</tr>
<tr>
<td>
<img src="/style/img/goto.png" alt="POI Unvisited" style="margin-bottom:4px;width:12px;height:12px">
</td>
<td>Unvisited Point of Interest</td>
</tr>
<tr>
<td>
<img src="/style/img/rare.png" alt="Rare" style="margin-bottom:4px;width:12px;height:12px">
</td>
<td>Rare Commodity</td>
</tr>
<tr>
<td>
<img src="/style/img/bm.png" alt="Rare" style="margin-bottom:4px;width:12px;height:12px">
</td>
<td>Bookmarked System</td>
</tr>
</table>
</div>
<div id="map_settings">
<?php
if (isset($_GET["mode"]) && $_GET["mode"] == "2d")
{
$linkto = "/Map.php";
$linkname = "Switch to 3D mode";
$mode = "2d";
}
else
{
$linkto = "/Map.php?mode=2d";
$linkname = "Switch to 2D mode";
$mode = "3d";
}
?>
<a href="<?php echo $linkto?>" style="margin-left:4px"><?php echo $linkname?></a><br />
<form method="GET" action="Map.php">
<input type="hidden" name="mode" value="<?php echo $mode?>">
<select class="distance" name="maxdistance" onchange="this.form.submit()">
<?php
$dropdowns = array_unique($dropdown);
sort($dropdowns);
foreach ($dropdowns as $value)
{
$selected = $settings["maxdistance"] == $value ? ' selected="selected"' : "";
echo '<option value="' . $value . '"' . $selected . '>Range ' . $value . ' ly</option>';
}
?>
</select>
</form>
</div>
</div>
</div>
<!-- Hide divs by clicking outside of them -->
<script>
$(document).mouseup(function (e)
{
var container = new Array();
container.push($("#disclaimer"));
container.push($("#map_legend2"));
$.each(container, function(key, value)
{
if (!$(value).is(e.target) // if the target of the click isn't the container...
&& $(value).has(e.target).length === 0) // ... nor a descendant of the container
{
$(value).fadeOut("fast");
}
});
});
</script>
<?php
require_once($_SERVER["DOCUMENT_ROOT"] . "/style/footer.php");