imagemap.class.php
1.34 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
<?php
class imagemap {
var $mp = "1";
var $place_width = "10";
var $place_height = "10";
var $map_name = "paikkakartta";
var $notice_color = "white";
var $notice_width = "200";
function __constructor() {
$this->start();
} // end of constructor
function start() {
return("<map name=\"$this->map_name\" id=\"$this->map_name\">\n");
} // end of func start()
function end() {
return("</map>\n");
}
function write_place($x, $y, $href, $kuvaus) {
$x = $x * $this->mp;
$y = $y * $this->mp;
$x2 = $x + ($this->place_width * $this->mp);
$y2 = $y + ($this->place_height * $this->mp);
$vari = $this->notice_color;
$width = $this->width;
/* return("
<area shape=\"rect\"
href=\"$href\"
COORDS=\"$x,$y,$x2,$y2\"
onMouseover=\"ddrivetip('$kuvaus','$vari', '$width')\"
onMouseout=\"hideddrivetip()\"
alt=\"$href\">\n");
*/
return ("\t\t<area shape='rect' href='$href' coords='$x,$y,$x2,$y2' alt='$href' onMouseOver=\"Tip('$kuvaus')\" OnMouseOut=\"UnTip()\" >\n");
# return ("\t\t<area shape='rect' href='$href' coords='$x,$y,$x2,$y2' onMouseOver=\"ddrivetip('$kuvaus', '$vari', '$width')\" onMouseOut=\"hidedrivetip()\" alt='$href'>\n");
} // end of write_place()
}