if($attach['isimage'] && empty($nothumb) && $attach['thumb']) {
if($attach['isimage'] && empty($nothumb) && $attach['thumb']&& !$down) {
require_once './include/common.inc.php';
require_once './include/attachment.func.php';
if(empty($noupdate) && $down) {
dheader('location:'.$ftp['attachurl'].'/'.$attach['attachment']);
include template('download');
if($isimage && !empty($noupdate)) {
dheader('Content-Disposition: inline; filename='.$attach['filename']);
} else {
dheader('Content-Disposition: attachment; filename='.$attach['filename']);
}
if($isimage && !empty($noupdate)) {
dheader('Content-Disposition: inline; filename='.$attach['filename']);
} else {
if($down){
dheader('Content-Disposition: attachment; filename='.$attach['filename']);
} else {
$dlink = $ftp['attachurl'].'/'.$attach['attachment'];
include template('download');
exit;
}
}