add a "already exist" when thumbnails are created on the command line. without it...
[phpfspot.git] / phpfspot_img.php
index a96d5e6f41c1d4ed86dd46933c36bdb9faf441e2..ce3731b3fe92522a855efff12618b31c1793444c 100644 (file)
@@ -62,7 +62,7 @@ class PHPFSPOT_IMG {
       $details = $this->parent->get_photo_details($idx);
    
       if(!$details) {
-         $this->parent->showTextImage("The image you requested is unknown");
+         $this->parent->showTextImage("The image (". $idx .") you requested is unknown");
          return;
       }
 
@@ -76,7 +76,7 @@ class PHPFSPOT_IMG {
          if(!$this->parent->getMD5($idx)) {
             $this->parent->gen_thumb($idx);
          }
-         $fullpath = $this->parent->cfg->base_path ."/thumbs/". $width ."_". $this->parent->getMD5($idx);
+         $fullpath = $this->parent->get_thumb_path($width, $idx);
          /* if the thumb file does not exist, create it */
          if(!file_exists($fullpath)) {
             $this->parent->gen_thumb($idx);
@@ -106,7 +106,10 @@ class PHPFSPOT_IMG {
       Header("Content-Disposition: inline; filename=\"". $details['name'] ."\"");
       Header("Accept-Ranges: bytes");
       Header("Connection: close");
-   
+      Header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+      Header("Cache-Control: no-cache");
+      Header("Pragma: no-cache");
+         
       $file = fopen($fullpath, "rb");
       fpassthru($file);
       @fclose($file);