$mesg=dol_add_file_process($upload_dir,0,1); } if (! $isupload) { $mil->sujet = trim($_POST["sujet"]); $mil->body = trim($_POST["body"]); $mil->bgcolor = trim($_POST["bgcolor"]); $mil->bgimage = trim($_POST["bgimage"]); if (! $mil->sujet) $message.=($message?'<br>':'').$langs->trans("ErrorFieldRequired",$langs->trans("MailTopic")); if (! $mil->body) $message.=($message?'<br>':'').$langs->trans("ErrorFieldRequired",$langs->trans("MailBody")); if (! $message) { if ($mil->update($user) >= 0) { Header("Location: fiche.php?id=".$mil->id); exit; } $message=$mil->error; } $message='<div class="error">'.$message.'</div>'; $_GET["action"]="edit"; $_GET["id"]=$_POST["id"]; } else { $_GET["action"]="edit"; $_GET["id"]=$_POST["id"];