forked from DBnR1/EDTB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
galmap.php
103 lines (93 loc) · 3.05 KB
/
galmap.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
<?php
/**
* Galaxy map
*
* No description
*
* @package EDTB\Backend
* @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
*/
//http://ed-board.net/3Dgalnet/
/** @var pagetitle */
$pagetitle = "Galaxy Map & Neighborhood Map";
/** @require header file */
require_once($_SERVER["DOCUMENT_ROOT"] . "/style/header.php");
if (valid_coordinates($curSys["x"], $curSys["y"], $curSys["z"]))
{
$ucoordx = $curSys["x"];
$ucoordy = $curSys["y"];
$ucoordz = -$curSys["z"];
}
else
{
// get last known coordinates
$last_coords = last_known_system();
$ucoordx = $last_coords["x"];
$ucoordy = $last_coords["y"];
$ucoordz = -$last_coords["z"];
$is_unknown = " *";
}
if (!valid_coordinates($ucoordx, $ucoordy, $ucoordz))
{
$ucoordx = "0";
$ucoordy = "0";
$ucoordz = "0";
$is_unknown = " *";
}
?>
<div style="display:none" id="curx"><?php echo $ucoordx?></div>
<div style="display:none" id="cury"><?php echo $ucoordy?></div>
<div style="display:none" id="curz"><?php echo $ucoordz?></div>
<div style="display:none" id="rcurx"><?php echo round($ucoordx)?></div>
<div style="display:none" id="rcury"><?php echo round($ucoordy)?></div>
<div style="display:none" id="rcurz"><?php echo round($ucoordz)?></div>
<div class="entries" style="position:absolute;bottom:0;top:0;height:auto">
<table class="edmap_table">
<tbody>
<tr>
<th style="text-align: center">
<ul class="pagination">
<li class="actives"><a href="/GalMap.php">Galaxy Map</a></li>
<li><a href="/Map.php">Neighborhood Map</a></li>
</ul>
</th>
</tr>
</tbody>
</table>
<div class="edmap" id="edmap"></div>
<!-- Launch ED3Dmap -->
<script type="text/javascript">
Ed3d.init({
basePath: '../source/Vendor/ED3D-Galaxy-Map/',
container: 'edmap',
jsonPath: '/map_points.json',
withHudPanel: true,
startAnim: false,
effectScaleSystem: [15,50],
playerPos: [<?php echo $ucoordx;?>,<?php echo $ucoordy;?>,<?php echo $ucoordz;?>]
});
</script>
</div>
<?php
require_once($_SERVER["DOCUMENT_ROOT"] . "/style/footer.php");