Beispiel #1
0
         }
     }
 } else {
     if ($VideoID) {
         $CacheImage = CacheImage::GetCacheImages(new CacheImageSearchParameters(FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, $VideoID, FALSE, $Width, $Height));
         if ($CacheImage) {
             $CacheImage = $CacheImage[0];
             Image::OutputImage($CacheImage->getFilenameOnDisk(), $CacheImage->getImageWidth(), $CacheImage->getImageHeight(), TRUE);
         } else {
             $Video = Video::GetVideos(new VideoSearchParameters($VideoID));
             if ($Video) {
                 $Video = $Video[0];
                 $filename = sprintf('%1$s/%2$s/%3$s.jpg', CANDYPATH, CANDYVIDEOTHUMBPATH, $Video->getFileName());
                 if (file_exists($filename)) {
                     $CacheImage = new CacheImage();
                     $CacheImage->setVideoID($VideoID);
                     $CacheImage->setKind(CACHEIMAGE_KIND_VIDEO);
                     $CacheImage->setImageWidth($Width);
                     $CacheImage->setImageHeight($Height);
                     CacheImage::Insert($CacheImage, $CurrentUser);
                     Image::OutputImage($filename, $Width, $Height, TRUE, $CacheImage->getFilenameOnDisk());
                 } else {
                     Image::OutputImage();
                 }
             } else {
                 Image::OutputImage();
             }
         }
     } else {
         if ($ImageID) {
             $CacheImage = CacheImage::GetCacheImages(new CacheImageSearchParameters(FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, $ImageID, FALSE, FALSE, FALSE, $Width, $Height));