/* SUBMITTION CODE */ if (isset($_POST['fud_submit']) && !isset($_POST['btn_detach']) && !isset($_POST['btn_upload']) && !register_form_check($uent->id)) { $old_email = $uent->email; $old_avatar_loc = $uent->avatar_loc; $old_avatar = $uent->avatar; /* import data from _POST into $uent object */ $vars = array_keys(get_object_vars($uent)); foreach ($vars as $v) { if (isset($_POST['reg_' . $v])) { $uent->{$v} = $_POST['reg_' . $v]; } } $uent->bday = fmt_year($_POST['b_year']) . str_pad((int) $_POST['b_month'], 2, '0', STR_PAD_LEFT) . str_pad((int) $_POST['b_day'], 2, '0', STR_PAD_LEFT); $uent->sig = apply_custom_replace($uent->sig); if ($FUD_OPT_1 & 131072) { $uent->sig = tags_to_html($uent->sig, $FUD_OPT_1 & 524288); } else { if ($FUD_OPT_1 & 65536) { $uent->sig = nl2br(htmlspecialchars($uent->sig)); } } if ($FUD_OPT_1 & 196608) { char_fix($uent->sig); } if ($FUD_OPT_1 & 262144) { $uent->sig = smiley_to_post($uent->sig); } fud_wordwrap($uent->sig); if ($uent->bio) { $uent->bio = htmlspecialchars($uent->bio); char_fix($uent->bio);
$tab_url .= '&id=' . _uid; } $tabs .= $pg == $tab ? '<td class="tabA"><div class="tabT"><a href="' . $tab_url . '">' . $tab_name . '</a></div></td>' : '<td class="tabI"><div class="tabT"><a href="' . $tab_url . '">' . $tab_name . '</a></div></td>'; } $tabs = '<table border=0 cellspacing=1 cellpadding=0 class="tab"> <tr class="tab">' . $tabs . '</tr> </table>'; } } $cur_ppage = tmpl_cur_ppage('', $folders); $spell_check_button = $FUD_OPT_1 & 2097152 && extension_loaded('pspell') && $usr->pspell_lang ? '<input type="submit" class="button" value="Spell-check Message" name="spell"> ' : ''; if (isset($_POST['preview']) || isset($_POST['spell'])) { $text = apply_custom_replace($_POST['msg_body']); $text_s = apply_custom_replace($_POST['msg_subject']); if ($FUD_OPT_1 & 4096) { $text = tags_to_html($text, $FUD_OPT_1 & 16384); } else { if ($FUD_OPT_1 & 2048) { $text = nl2br(htmlspecialchars($text)); } } if ($FUD_OPT_1 & 6144) { char_fix($text); } if ($FUD_OPT_1 & 8192 && !$msg_smiley_disabled) { $text = smiley_to_post($text); } $text_s = htmlspecialchars($text_s); char_fix($text_s); $spell = $spell_check_button && isset($_POST['spell']); if ($spell && strlen($text)) {
} if (!$th_id) { $label = 'Crea Topic'; } else { if ($msg_id) { $label = 'Applica le modifiche al messaggio'; } else { $label = 'Rispondi'; } } $spell_check_button = $FUD_OPT_1 & 2097152 && extension_loaded('pspell') && $usr->pspell_lang ? '<input type="submit" class="button" value="Controllo ortografico del messaggio" name="spell"> ' : ''; if (isset($_POST['preview']) || isset($_POST['spell'])) { $text = apply_custom_replace($msg_body); $text_s = apply_custom_replace($msg_subject); if ($frm->forum_opt & 16) { $text = tags_to_html($text, $perms & 32768); } else { if ($frm->forum_opt & 8) { $text = nl2br(htmlspecialchars($text)); } } if ($frm->forum_opt & 24) { char_fix($text); } if ($perms & 16384 && !$msg_smiley_disabled) { $text = smiley_to_post($text); } $text_s = htmlspecialchars($text_s); char_fix($text_s); $spell = $spell_check_button && isset($_POST['spell']); if ($spell && $text) {
$emsg->fetch_useful_headers(); $emsg->clean_up_data(); $msg_post = new fud_msg_edit(); // Handler for our own messages, which do not need to be imported. if (isset($emsg->headers['x-fudforum']) && preg_match('!([A-Za-z0-9]{32}) <([0-9]+)>!', $emsg->headers['x-fudforum'], $m)) { if ($m[1] == md5($GLOBALS['WWW_ROOT'])) { q("UPDATE " . sql_p . "msg SET mlist_msg_id='" . addslashes($emsg->msg_id) . "' WHERE id=" . intval($m[2]) . " AND mlist_msg_id IS NULL"); if (db_affected()) { exit; } } } $msg_post->body = apply_custom_replace($emsg->body); if (!($mlist->mlist_opt & 16)) { if ($frm->forum_opt & 16) { $msg_post->body = tags_to_html($msg_post->body, 0); } else { $msg_post->body = nl2br($msg_post->body); } } fud_wordwrap($msg_post->body); $msg_post->subject = htmlspecialchars(apply_custom_replace($emsg->subject)); if (!strlen($msg_post->subject)) { mlist_error_log("Blank Subject", $emsg->raw_msg); } if (!$emsg->from_email || !$emsg->from_name) { $msg_post->poster_id = 0; } else { $msg_post->poster_id = match_user_to_post($emsg->from_email, $emsg->from_name, $mlist->mlist_opt & 64, $emsg->user_id); } $msg_post->ip_addr = $emsg->ip;
reverse_fmt($pl_name); $pl_max_votes = $frm->max_votes; $pl_expiry_date = $frm->expiry_date; } else { $pl_name = $pl_max_votes = $pl_expiry_date = ''; } } /* remove a poll option */ if (isset($_GET['del_id'])) { poll_del_opt((int) $_GET['del_id'], $pl_id); } /* Adding or Updating poll options */ if (!empty($_POST['pl_upd']) || !empty($_POST['pl_add'])) { $pl_option = apply_custom_replace($_POST['pl_option']); if ($frm->forum_opt & 16) { $pl_option = tags_to_html($pl_option, $frm->group_cache_opt & 32768); } else { if ($frm->forum_opt & 8) { $pl_option = nl2br(htmlspecialchars($pl_option)); } } if ($frm->group_cache_opt & 16384 && !isset($_POST['pl_smiley_disabled'])) { $pl_option = smiley_to_post($pl_option); } if (isset($_POST['pl_upd'], $_POST['pl_option_id'])) { poll_opt_sync((int) $_POST['pl_option_id'], $pl_option); } else { poll_opt_add($pl_option, $pl_id); } $pl_option = ''; }