0) for($i=1;$i 800 || $h > 600) { $resize = true; } } elseif (!empty($_REQUEST['resize'])) { list($w,$h) = explode("x",$_REQUEST['resize']); $resize = true; } else { $imageInfo = getimagesize(U_ROOT . '/' . $file); $w = $imageInfo[0]; $h = $imageInfo[1]; } $tempDir = CACHE_DIR; $tempDir .= $watermark ? '/wm/1' : ''; $tempDir .= $crop ? '/crop/' .$w.'x'.$h : ''; $tempDir .= !$noresize && $resize ? '/resize/' . $w.'x'.$h : ''; $tempDir .= $noresize ? '/resize/no' : ''; $thumbFile = $tempDir . '/i/' . $file; $dirPath = T::getFileDirPath ($thumbFile); T::checkDirsExistAndCreate ($dirPath); //echo $thumbFile; //exit; if(!is_file($thumbFile)) { if($crop || $resize) { $type = 'jpg'; if(eregi("\.png$",$file)) { $type = 'png'; } elseif(eregi("\.gif$",$file)) { $type = 'gif'; } if($crop) { T::GDCropImage(U_ROOT . '/' . $file, $type, $type , $w, $h , $thumbFile); } else { T::GDResizeImg(U_ROOT . '/' . $file, $w, $h, $thumbFile, 90); } } else { copy(U_ROOT . '/' . $file, $thumbFile); } if ($watermark) { $watermark = ROOT_DIR . "/public/i/watermark.png"; $copyright = !empty($nick) ? "www.".$nick.".mytravelblog.pl" : ''; T::GDWatermark(U_ROOT . '/' . $file, $thumbFile, 90, $watermark, "" . $copyright); } } $expire = 30; // Lebensdauer der Seite im Cache in Minuten $mod_gmt = gmdate("D, d M Y H:i:s", getlastmod()) ." GMT"; // HTTP 1.0 kennt keine privaten Caches, also nix cachen header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . $mod_gmt); // HTTP 1.1 header("Cache-Control: private, max-age=" . $expire * 60); // MSIE 5.x special header("Cache-Control: pre-check=" . $expire * 60, FALSE); if(eregi("\.png$",$file)) { header ("Content-type: image/png"); } elseif(eregi("\.gif$",$file)) { header ("Content-type: image/gif"); } else { header('Content-type: image/jpeg'); } header("Content-Transfer-Encoding: binary"); header("Content-Length: ".@filesize($thumbFile)); @readfile($thumbFile) or die(""); ?>