+ }
+ /* show thumbnail */
+ else {
+ $fullpath = $this->parent->cfg->base_path ."/thumbs/". $width ."_". $this->parent->getMD5($idx);
+ if(!file_exists($fullpath))
+ $this->parent->gen_thumb($idx, 0, 1);
+ }
+
+ if(!file_exists($fullpath)) {
+ $this->parent->showTextImage("File ". $fullpath ." does not exist");
+ return;
+ }
+ if(!is_readable($fullpath)) {
+ $this->parent->showTextImage("File ". $fullpath ." is not readable. Check the permissions");
+ return;
+ }