-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
map_ex.php
132 lines (96 loc) 路 3.23 KB
/
map_ex.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
$compteurX = 0;
$compteurY = 50;
$finX = 50;
$finY = 0;
$debutX = 0;
echo "<head>
<style type='text/css'>
<!--
#Layer1 {
visibility:hidden;
position:absolute;
width:250px;
height:250px;
z-index:1;
background-image: url(images/hover3.png);
left: 275px;
top: 275px;
}
-->
</style>
</head>";
echo '<table id="map" align="left" border="0" width="800" height="800" >', "\n";
while($compteurY >= $finY)
{
echo "\t\t", '<tr class="ligneMap">', "\n";
while($compteurX <= $finX)
{
if($compteurX >= 5 && $compteurX <= 10 && $compteurY >= 5 && $compteurY <= 15){
$basket++;
if($basket < 10){
$basket = "0$basket";
}
echo "\t\t\t", '<td class="caseMap" style="background-image: url(\'images/colorbasket_'.$basket.'.gif\')">';
}
elseif($compteurX >= 13 && $compteurX <= 37 && $compteurY >= 13 && $compteurY <= 37){
if ($compteurX%2){
if($compteurY%2){
echo "\t\t\t", '<td class="caseMap" style="background-image: url(\'images/colormarche_01.gif\')">';
}else{
echo "\t\t\t", '<td class="caseMap" style="background-image: url(\'images/colormarche_03.gif\')">';
}
}else{
if($compteurY%2){
echo "\t\t\t", '<td class="caseMap" style="background-image: url(\'images/colormarche_02.gif\')">';
}else{
echo "\t\t\t", '<td class="caseMap" style="background-image: url(\'images/colormarche_04.gif\')">';
}
}
}
elseif($compteurX >= 43 && $compteurX <= 50 && $compteurY >= 35 && $compteurY <= 50){
if ($compteurX%2){
if($compteurY%2){
echo "\t\t\t", '<td class="caseMap" style="background-image: url(\'images/colormuscu_01.gif\')">';
}else{
echo "\t\t\t", '<td class="caseMap" style="background-image: url(\'images/colormuscu_03.gif\')">';
}
}else{
if($compteurY%2){
echo "\t\t\t", '<td class="caseMap" style="background-image: url(\'images/colormuscu_02.gif\')">';
}else{
echo "\t\t\t", '<td class="caseMap" style="background-image: url(\'images/colormuscu_04.gif\')">';
}
}
}
elseif($compteurX >= 10 && $compteurX <= 24 && $compteurY >= 48 && $compteurY <= 50){
$douche++;
if($douche < 10){
$douche = "0$douche";
}
echo "\t\t\t", '<td class="caseMap" style="background-image: url(\'images/colordouche_'.$douche.'.gif\')">';
}
else{
if ($compteurX%2){
if($compteurY%2){
echo "\t\t\t", '<td class="caseMap" style="background-image: url(\'images/colorcour_01.gif\')">';
}else{
echo "\t\t\t", '<td class="caseMap" style="background-image: url(\'images/colorcour_03.gif\')">';
}
}else{
if($compteurY%2){
echo "\t\t\t", '<td class="caseMap" style="background-image: url(\'images/colorcour_02.gif\')">';
}else{
echo "\t\t\t", '<td class="caseMap" style="background-image: url(\'images/colorcour_04.gif\')">';
}
}
}
echo '</td>', "\n";
$compteurX++;
}
echo "\t\t", '</tr>', "\n";
$compteurX = $debutX;
$compteurY--;
}
echo '</table>';
?>