xldrh
Visiteur
Enregistré le 04/03/2004
Messages: 89
Non connecté
|
Ajouté le : 27/10/2004 15:36
Message :
Creér aussi un dossier "trombines" dans votre dossier logo (c'est dans ce dossier que seront stocké les photo perso que vont uploader vos forumeurs).
Maintenant, fichier profile_option, rajouter la partie orange suivant au niveau de la ligne 100 :
if((($_FILES['logo']['type']=="image/pjpeg") || ($_FILES['logo']['type']=="image/gif")) && ($_FILES['logo']['size']<15360))
{
if ($_FILES['logo']['type']=="image/pjpeg")
$ext=".jpg";
elseif ($_FILES['logo']['type']=="image/gif")
$ext=".gif";
$filenamelogo="logo".$_USER[userid].$ext;
copy($_FILES['logo']['tmp_name'],"logos/avatars/".$filenamelogo);
@chmod("logos/avatars/".$filenamelogo, 0777);
}
else
$tpl->box[error]=$tpl->gettemplate("profil",13);
}
else
$tpl->box[error]=$tpl->gettemplate("profil",14);
}
}
//hack trombinoscope
if($_POST[trombinoscopeparticipation]!="Y")
$_POST[trombinoscopeparticipation]="N";
if ($_FILES['photo']['tmp_name']=="none" || empty($_FILES['photo']['tmp_name']))
{
$query = mysql_query("SELECT userphoto FROM CF_user WHERE userid=".$_USER[userid]);
$j=mysql_fetch_array($query);
if(!empty($j[userphoto]))
$filenamephoto=$j[userphoto];
}
else
{
if ($_POST[trombinoscopeparticipation]=="Y")
{
$taille=GetImageSize($_FILES['photo']['tmp_name']);
if (($taille[0]<201) && ($taille[1]<151))
{
if((($_FILES['photo']['type']=="image/pjpeg") || ($_FILES['photo']['type']=="image/gif")) && ($_FILES['photo']['size']<20480))
{
if ($_FILES['photo']['type']=="image/pjpeg")
$ext=".jpg";
elseif ($_FILES['photo']['type']=="image/gif")
$ext=".gif";
$filenamephoto=$_USER[userid]."photo".$ext;
copy($_FILES['photo']['tmp_name'],"logos/trombines/".$filenamephoto);
@chmod("logos/trombines/".$filenamephoto, 0777);
}
else
$tpl->box[errortof]=$tpl->gettemplate("profil",5);
}
else
$tpl->box[errortof]=$tpl->gettemplate("profil",6);
}
}
//
if(!isset($_POST[notifymsg]))
$_POST[notifymsg]=$_POST[notifypm]="N";
$query = mysql_query("UPDATE CF_user SET usermail='$_POST[mail]',usericq='$_POST[icq]',usersite='$_POST[site]', showmail='$_POST[showmail]', showicq='$_POST[showicq]', showusersite='$_POST[showusersite]', usersign='$sign',usercitation='$citation', userlogo='$filenamelogo', userphoto='$filenamephoto', usertrombi='$_POST[trombinoscopeparticipation]', timezone='$_POST[timezone]', notifymsg='$_POST[notifymsg]', notifypm='$_POST[notifypm]', question='$quest', reponse='$rep' WHERE userid=".$_USER[userid]);
if(!$query)
echo(mysql_error());
$_POST[action]="profile";
}
*** Message édité par xldrh le 27/10/2004 15:38 ***
|