You are here

function pImage::initialiseImageMap in Visitors 7

Same name and namespace in other branches
  1. 7.2 pChart/class/pImage.class.php \pImage::initialiseImageMap()
1 call to pImage::initialiseImageMap()
pImage::addToImageMap in pChart/class/pImage.class.php

File

pChart/class/pImage.class.php, line 271

Class

pImage

Code

function initialiseImageMap($Name = "pChart", $StorageMode = IMAGE_MAP_STORAGE_SESSION, $UniqueID = "imageMap", $StorageFolder = "tmp") {
  $this->ImageMapIndex = $Name;
  $this->ImageMapStorageMode = $StorageMode;
  if ($StorageMode == IMAGE_MAP_STORAGE_SESSION) {
    if (!isset($_SESSION)) {
      session_start();
    }
    $_SESSION[$this->ImageMapIndex] = NULL;
  }
  elseif ($StorageMode == IMAGE_MAP_STORAGE_FILE) {
    $this->ImageMapFileName = $UniqueID;
    $this->ImageMapStorageFolder = $StorageFolder;
    if (file_exists($StorageFolder . "/" . $UniqueID . ".map")) {
      unlink($StorageFolder . "/" . $UniqueID . ".map");
    }
  }
}