-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
72 lines (64 loc) · 1.62 KB
/
Copy pathindex.php
File metadata and controls
72 lines (64 loc) · 1.62 KB
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
<?php
spl_autoload_register(function ($class_name) {
include $class_name . '.php';
});
?>
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Space</title>
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>
</head>
<body>
<?php
if(!isset($_GET['posx'])) {
$monde = new Monde();
}
$secteursMonde = $monde->getSecteurs();
echo "<br><br><br><table>";
foreach ($secteursMonde as $secteurs) {
echo "<tr>";
foreach ($secteurs as $sec) {
switch ($sec->getSecteurType()) {
case '0':
$color="#FFFFFF";
break;
case '1':
$color="#AAAAAA";
break;
case '2':
$color="#0000FF";
break;
case '3':
$color="#FF0000";
break;
case '4':
$color="#000000";
break;
case '99':
$color="#FFFF00";
break;
default:
$color="#FFFFFF";
break;
}
echo '<td width=20 bgcolor="'.$color.'" >';
echo "<div class='tooltip'>".$sec->getSecteurType()."";
echo "<span class='tooltiptext'>";
echo "Pos X: ".$sec->getPosX()."<br />";
echo "Pos Y: ".$sec->getPosY()."<br />";
echo "Volume: ".$sec->getSecteurVolume()."<br />";
echo "Ordre pop: ".$sec->getSecteurOrdre()."<br />";
echo "</span>";
echo "</div>";
// echo "<a href='index.php?posx=".$sec->getPosX()."&posy=".$sec->getPosY()."'>S</a>";
echo "</td>";
}
echo "</tr>";
}
echo "</table>";
?>
</body>
</html>