Das habe ich gemacht
ich bekomme ein Fehler
Fatal error: Call to undefined function create_thumb()
in der zeile ist das
create_thumb ($bild_url, $bild_thumb, $allgAr['gallery_preview_width'])
und so habe ich das mal versucht
# avatar speichern START
$avatar_sql_update = '';
if ( !empty ( $_FILES['avatarfile']['name'] ) AND $allgAr['forum_avatar_upload'] ) {
$file_tmpe = $_FILES['avatarfile']['tmp_name'];
$rile_type = ic_mime_type ($_FILES['avatarfile']['tmp_name']);
$file_type = $_FILES['avatarfile']['type'];
$file_size = $_FILES['avatarfile']['size'];
$fmsg = $lang['avatarisnopicture'];
$size = @getimagesize ($file_tmpe);
$endar = array (1 => 'gif', 2 => 'jpg', 3 => 'png');
if ( ($size[2] == 1 OR $size[2] == 2 OR $size[2] == 3) AND $size[0] > 10 AND $size[1] > 10 AND substr ( $file_type , 0 , 6 ) == 'image/' AND substr ( $rile_type , 0 , 6 ) == 'image/' ) {
$endung = $endar[$size[2]];
$breite = $size[0];
$hoehe = $size[1];
$neuer_name = 'include/images/avatars/'.$_SESSION['authid'].'.'.$endung;
@unlink (db_result(db_query("SELECT avatar FROM prefix_user WHERE id = ".$_SESSION['authid']),0));
move_uploaded_file ( $file_tmpe , $neuer_name );
@chmod($neuer_name, 0777);
$bild_thumb = 'include/images/avatar/img_thumb_'.$id.'.'.$endung;
$bild_norm = 'include/images/avatar/img_norm_'.$id.'.'.$endung;
create_thumb ($bild_url, $bild_norm , ($allgAr['gallery_normal_width']-64));
create_thumb ($bild_url, $bild_thumb, $allgAr['gallery_preview_width']);
@chmod($bild_thumb, 0777);
@chmod($bild_norm, 0777);
$avatar_sql_update = "avatar = '".$neuer_name."',";
$fmsg = $lang['pictureuploaded'];
}
}
elseif ( isset($_POST['avatarloeschen']) ) {
$fmsg = $lang['picturedelete'];
@unlink (db_result(db_query("SELECT avatar FROM prefix_user WHERE id = ".$_SESSION['authid']),0));
$avatar_sql_update = "avatar = '',";
}
# avatar speichern ENDE