$msg_body = str_replace('[img]/egroupware/fudforum/3814588639/index.php?t=getfile&id=' . $_POST['file_del_opt'] . '[/img]', '', $msg_body); } $attach_count--; } } } else { $attach_count = 0; $file_array = ''; } /* deal with newly uploaded files */ if ($PRIVATE_ATTACHMENTS > 0 && isset($_FILES['attach_control']) && $_FILES['attach_control']['size'] > 0) { if ($_FILES['attach_control']['size'] > $PRIVATE_ATTACH_SIZE) { $MAX_F_SIZE = $PRIVATE_ATTACH_SIZE; $attach_control_error = '<font class="ErrorText">File Attachment is too big (over allowed limit of ' . $MAX_F_SIZE . ' bytes)</font><br>'; } else { if (filter_ext($_FILES['attach_control']['name'])) { $attach_control_error = '<font class="ErrorText">The file you are trying to upload doesn't match the allowed file types.</font><br>'; } else { if ($attach_count + 1 <= $PRIVATE_ATTACHMENTS) { $val = attach_add($_FILES['attach_control'], _uid, 1); $attach_list[$val] = $val; $attach_count++; } else { $attach_control_error = '<font class="ErrorText">You are trying to upload more files then it is allowed.</font><br>'; } } } } if (isset($_POST['btn_submit']) && !check_ppost_form($_POST['msg_subject']) || isset($_POST['btn_draft'])) { $msg_p = new fud_pmsg(); $msg_p->pmsg_opt = (int) $msg_smiley_disabled | (int) $msg_show_sig | (int) $msg_track;
} if ($frm->forum_opt & 32 && $MOD) { $frm->max_attach_size = (int) ini_get('upload_max_filesize'); $t = str_replace($frm->max_attach_size, '', ini_get('upload_max_filesize')); if ($t == 'M' || $t == 'm') { $frm->max_attach_size *= 1024; } $frm->max_file_attachments = 100; } $MAX_F_SIZE = $frm->max_attach_size * 1024; /* newly uploaded files */ if (isset($_FILES['attach_control']) && $_FILES['attach_control']['size']) { if ($_FILES['attach_control']['size'] > $MAX_F_SIZE) { $attach_control_error = '<font class="ErrorText">Il file allegato è troppo grande (supera il limite consentito di ' . $MAX_F_SIZE . ' byte)</font><br>'; } else { if (!($MOD && $frm->forum_opt & 32) && filter_ext($_FILES['attach_control']['name'])) { $attach_control_error = '<font class="ErrorText">Il file che stai cercando di spedire non appartiene ai tipi di file consentiti.</font><br>'; } else { if ($attach_count + 1 <= $frm->max_file_attachments) { $val = attach_add($_FILES['attach_control'], _uid); $attach_list[$val] = $val; $attach_count++; } else { $attach_control_error = '<font class="ErrorText">Stai cercando di spedire più file di quanti sia consentito spedire.</font><br>'; } } } } $attach_cnt = $attach_count; } else { $attach_cnt = 0;