/**
  * show image from request
  */
 public static function showImageFromRequest()
 {
     $pathCache = self::getPathCache();
     $pathImages = JPATH_SITE . "/";
     $urlImages = JURI::root();
     $pathEmptyImage = JPATH_COMPONENT_ADMINISTRATOR . "/assets/resizer/empty_image.jpg";
     $imageView = new UniteImageViewRev($pathCache, $pathImages, $urlImages, $pathEmptyImage);
     $imageView->showImageFromGet();
     exit;
 }
Example #2
0
 /**
  * 
  * on show image ajax event. outputs image with parameters 
  */
 public static function onShowImage()
 {
     $pathImages = UniteFunctionsWPRev::getPathContent();
     $urlImages = UniteFunctionsWPRev::getUrlContent();
     try {
         $imageView = new UniteImageViewRev(self::$path_cache, $pathImages, $urlImages);
         $imageView->showImageFromGet();
     } catch (Exception $e) {
         header("status: 500");
         echo $e->getMessage();
         exit;
     }
 }
 /**
  * 
  * on show image ajax event. outputs image with parameters 
  */
 public static function onShowImage()
 {
     $img = Tools::getValue('img');
     if (empty($img)) {
         die('Image doesn\'t exists!');
     }
     $pathImages = UniteFunctionsWPRev::getPathContent();
     $urlImages = UniteFunctionsWPRev::getUrlContent();
     try {
         $imageView = new UniteImageViewRev(self::$path_cache, $pathImages, $urlImages);
         $imageView->showImageFromGet();
     } catch (Exception $e) {
         header("status: 500");
         echo $e->getMessage();
         exit;
     }
 }