for size for size if left 50 213 100 top 39 156 100 elseif left 89 213

 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
for ($y = 0; $y < $size[0]; ++$y) {
for ($x = 0; $x < $size[1]; ++$x) {
if($x == 0 & $y == 0) {
$left = ((50/213)*100);
$top = ((39/156)*100);
}
elseif($x == 1 & $y == 0) {
$left = ((89/213)*100);
$top = ((39/156)*100);
}
elseif($x == 2 & $y == 0) {
$left = ((128/213)*100);
$top = ((39/156)*100);
}
elseif($x == 0 & $y == 1) {
$left = ((50/213)*100);
$top = ((76/156)*100);
}
elseif($x == 1 & $y == 1) {
$left = ((89/213)*100);
$top = ((76/156)*100);
}
elseif($x == 2 & $y == 1) {
$left = ((128/213)*100);
$top = ((76/156)*100);
}
elseif($x == 0 & $y == 2) {
$left = ((50/213)*100);
$top = ((114/156)*100);
}
elseif($x == 1 & $y == 2) {
$left = ((89/213)*100);
$top = ((114/156)*100);
}
elseif($x == 2 & $y == 2) {
$left = ((128/213)*100);
$top = ((114/156)*100);
}
$width = ((34/213)*100);
$height = ((34/156)*100);
echo '
<a style="top:'.$top.'%;left:'.$left.'%;width:'.$width.'%;height:'.$height.'%" href="?i=pickup&x='.$x.'&y='.$y.'"></a>
';
}
}