This repository has been archived by the owner on Jan 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
starmap.php
52 lines (52 loc) · 1.63 KB
/
starmap.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
<?php
if (!$section)
{
echo "<table width=100% bgcolor=#262323 cellspacing=1 cellpadding=1>
<tr>
<td width=100% class=tdmain>/ <strong>Sternenkarte</strong></td>
</tr>
</table><br>
<table cellspacing=1 cellpadding=1 bgcolor=#262323>";
$map = $myMap->getmapsectors();
$j=10;
$x = $mapfields[max_x]/20;
$y = $mapfields[max_y]/20;
$xed=1;
$yed=1;
echo "<tr><td class=tdmainobg width=40 height=40 valign=middle align=center>x/y</td>";
for($i=1;$i<=$x;$i++)
{
echo "<td class=tdmain width=40 height=40>".$xed."/".($xed+19)."</td>";
$xed+=20;
}
for ($i=0;$i<count($map);$i++)
{
if ($j == 10)
{
echo "</tr><tr><td class=tdmain width=40 height=40>".$yed."/".($yed+19)."</td>";
$yed+=20;
$j=0;
}
if ($map[$i][hide] == 0)
{
if ($myMap->checksektor($map[$i][id]) == 1) $lk = "<font color=green>".$map[$i][id]."</font>";
else $lk = $map[$i][id];
echo "<td class=tdmainobg width=40 height=40 align=center><a href=?page=starmap§ion=showsektor&id=".$map[$i][id].">".$lk."</a></td>";
}
else echo "<td class=tdmainobg width=40 height=40> </td>";
$j++;
}
echo "</tr></table>";
}
elseif ($section == "showsektor")
{
echo "<table width=100% bgcolor=#262323 cellspacing=1 cellpadding=1>
<tr>
<td width=100% class=tdmain>/ <a href=?page=starmap>Sternenkarte</a> / <strong>Sektor ".$id."</strong></td>
</tr>
</table><br>";
$return = $myMap->rendersektor($id);
if (is_numeric($return)) echo "<table bgcolor=#262323 cellspacing=1 cellpadding=1><tr><td class=tdmain><strong>Meldung</strong></td></tr><tr><td class=tdmainobg>Du besitzt diesen Teil der Sternenkarte nicht</td></tr></table>";
else echo $return;
}
?>