public function addToImageMap(
        $Type,
        $Plots,
        $Color = null,
        $Title = null,
        $Message = null,
        $HTMLEncode = false
    ) {
        if ($this->ImageMapStorageMode == null) {
            $this->initialiseImageMap();
        }

        /* Encode the characters in the imagemap in HTML standards */
        $Title = htmlentities(
            str_replace("&#8364;", "\u20AC", $Title),
            ENT_QUOTES,
            "ISO-8859-15"
        );
        if ($HTMLEncode) {
            $Message = str_replace(
                "&gt;",
                ">",
                str_replace(
                    "&lt;",
                    "<",
                    htmlentities($Message, ENT_QUOTES, "ISO-8859-15")
                )
            );
        }

        if ($this->ImageMapStorageMode == IMAGE_MAP_STORAGE_SESSION) {
            if (!isset($_SESSION)) {
                $this->initialiseImageMap();
            }
            $_SESSION[$this->ImageMapIndex][] = [$Type, $Plots, $Color, $Title, $Message];
        } elseif ($this->ImageMapStorageMode == IMAGE_MAP_STORAGE_FILE) {
            $Handle = fopen(
                sprintf("%s/%s.map", $this->ImageMapStorageFolder, $this->ImageMapFileName),
                'a'
            );
            fwrite(
                $Handle,
                sprintf(
                    "%s%s%s%s%s%s%s%s%s\r\n",
                    $Type,
                    IMAGE_MAP_DELIMITER,
                    $Plots,
                    IMAGE_MAP_DELIMITER,
                    $Color,
                    IMAGE_MAP_DELIMITER,
                    $Title,
                    IMAGE_MAP_DELIMITER,
                    $Message
                )
            );
            fclose($Handle);
        }
    }
public function addToImageMap(
        $Type,
        $Plots,
        $Color = null,
        $Title = null,
        $Message = null,
        $HTMLEncode = false
    ) {
        if ($this->ImageMapStorageMode == null) {
            $this->initialiseImageMap();
        }

        /* Encode the characters in the imagemap in HTML standards */
        $Title = htmlentities(
            str_replace("&#8364;", "\u20AC", $Title),
            ENT_QUOTES,
            "ISO-8859-15"
        );
        if ($HTMLEncode) {
            $Message = str_replace(
                "&gt;",
                ">",
                str_replace(
                    "&lt;",
                    "<",
                    htmlentities($Message, ENT_QUOTES, "ISO-8859-15")
                )
            );
        }

        if ($this->ImageMapStorageMode == IMAGE_MAP_STORAGE_SESSION) {
            if (!isset($_SESSION)) {
                $this->initialiseImageMap();
            }
            $_SESSION[$this->ImageMapIndex][] = [$Type, $Plots, $Color, $Title, $Message];
        } elseif ($this->ImageMapStorageMode == IMAGE_MAP_STORAGE_FILE) {
            $Handle = fopen(
                sprintf("%s/%s.map", $this->ImageMapStorageFolder, $this->ImageMapFileName),
                'a'
            );
            fwrite(
                $Handle,
                sprintf(
                    "%s%s%s%s%s%s%s%s%s\r\n",
                    $Type,
                    IMAGE_MAP_DELIMITER,
                    $Plots,
                    IMAGE_MAP_DELIMITER,
                    $Color,
                    IMAGE_MAP_DELIMITER,
                    $Title,
                    IMAGE_MAP_DELIMITER,
                    $Message
                )
            );
            fclose($Handle);
        }
    }
public function addToImageMap ( $ Type , $ Plots , $ Color = null , $ Title = null , $ Message = null , $ HTMLEncode = false ) { if ( $ this -> ImageMapStorageMode == null ) { $ this -> initialiseImageMap ( ) ; } /* Encode the characters in the imagemap in HTML standards */ $ Title = htmlentities ( str_replace ( "&#8364;" , "\u20AC" , $ Title ) , ENT_QUOTES , "ISO-8859-15" ) ; if ( $ HTMLEncode ) { $ Message = str_replace ( "&gt;" , ">" , str_replace ( "&lt;" , "<" , htmlentities ( $ Message , ENT_QUOTES , "ISO-8859-15" ) ) ) ; } if ( $ this -> ImageMapStorageMode == IMAGE_MAP_STORAGE_SESSION ) { if ( ! isset ( $ _SESSION ) ) { $ this -> initialiseImageMap ( ) ; } $ _SESSION [ $ this -> ImageMapIndex ] [ ] = [ $ Type , $ Plots , $ Color , $ Title , $ Message ] ; } elseif ( $ this -> ImageMapStorageMode == IMAGE_MAP_STORAGE_FILE ) { $ Handle = fopen ( sprintf ( "%s/%s.map" , $ this -> ImageMapStorageFolder , $ this -> ImageMapFileName ) , 'a' ) ; fwrite ( $ Handle , sprintf ( "%s%s%s%s%s%s%s%s%s\r\n" , $ Type , IMAGE_MAP_DELIMITER , $ Plots , IMAGE_MAP_DELIMITER , $ Color , IMAGE_MAP_DELIMITER , $ Title , IMAGE_MAP_DELIMITER , $ Message ) ) ; fclose ( $ Handle ) ; } }
Add a zone to the image map

@param string $Type
@param string $Plots
@param string|null $Color
@param string $Title
@param string $Message
@param boolean $HTMLEncode
Add a zone to the image map