name; if ($thumb) { preg_match("/(.*)\.(jpeg|gif|jpg|pjpeg|png)/", $fn, $name); $fn = $name[1] . "_thumbnail" . "." . $name[2]; } header("Cache-Control: no-cache"); header("Pragma: no-cache"); header("Content-size: ".$image->size); header('Content-Disposition: filename='.$fn); header("Content-type: ".$image->type); readfile(DATA_STORE . $fn); } else { return ""; } ?>