//Nicht erlaubt if ($message) { $message .= '<br />'; } $message .= $apx->lang->get('MSG_NOUPLOAD', array('FILE' => $file['name'])) . ' '; $message .= $apx->lang->get('MSG_WRONGTYPE'); continue; } elseif ($file['size'] > $typeinfo[$ext][0]) { if ($message) { $message .= '<br />'; } $message .= $apx->lang->get('MSG_NOUPLOAD', array('FILE' => $file['name'])) . ' '; $message .= $apx->lang->get('MSG_TOOBIG', array('MAXSIZE' => $typeinfo[$ext][0])); continue; } $fileid = str_replace(' ', '_', $mm->getname($file['name'])) . '_' . time(); $newname = $fileid . '.' . $ext; $thumbnailPath = ''; $mm->uploadfile($_FILES['file' . $i], 'forum', $newname); //Thumbnail erzeugen if (in_array($ext, array('gif', 'jpg', 'jpe', 'jpeg', 'png'))) { require_once BASEDIR . 'lib/class.image.php'; $img = new image(); $thumbnailPath = 'forum/' . $fileid . '_thumb.' . $ext; list($picture, $picturetype) = $img->getimage('forum/' . $newname); //////// THUMBNAIL $thumbnail = $img->resize($picture, 120, 90, true); $img->saveimage($thumbnail, $picturetype, $thumbnailPath); //Cleanup imagedestroy($picture); imagedestroy($thumbnail);