if (!$mod_id) { check_return($usr->returnto); } else { header('Location: adm/admuser.php?usr_id=' . $uent->id . '&' . _rsidl . '&act=nada'); exit; } } /* populate form variables based on user's profile */ if (!isset($_POST['prev_loaded'])) { foreach ($uent as $k => $v) { ${'reg_' . $k} = htmlspecialchars($v); } reverse_fmt($reg_sig); $reg_sig = apply_reverse_replace($reg_sig); if ($FUD_OPT_1 & 262144) { $reg_sig = post_to_smiley($reg_sig); } if ($FUD_OPT_1 & 131072) { $reg_sig = html_to_tags($reg_sig); } else { if ($FUD_OPT_1 & 65536) { reverse_nl2br($reg_sig); } } if ($FUD_OPT_1 & 196608) { char_fix($reg_sig); } char_fix($reg_bio); if ($uent->bday) { $b_year = substr($uent->bday, 0, 4); $b_month = substr($uent->bday, 4, 2);
function export_msg_data($m, &$msg_subject, &$msg_body, &$msg_icon, &$msg_smiley_disabled, &$msg_show_sig, &$msg_track, &$msg_to_list, $repl = 0) { $msg_subject = $m->subject; $msg_body = read_pmsg_body($m->foff, $m->length); $msg_icon = $m->icon; $msg_smiley_disabled = $m->pmsg_opt & 2 ? '2' : ''; $msg_show_sig = $m->pmsg_opt & 1 ? '1' : ''; $msg_track = $m->pmsg_opt & 4 ? '4' : ''; $msg_to_list = $m->to_list; reverse_fmt($msg_subject); /* we do not revert replacment for forward/quote */ if ($repl) { $msg_subject = apply_reverse_replace($msg_subject); $msg_body = apply_reverse_replace($msg_body); } if (!$msg_smiley_disabled) { $msg_body = post_to_smiley($msg_body); } if ($GLOBALS['FUD_OPT_1'] & 4096) { $msg_body = html_to_tags($msg_body); } else { if ($GLOBALS['FUD_OPT_1'] & 2048) { reverse_fmt($msg_body); reverse_nl2br($msg_body); } } }
$pl_option_id = $_GET['pl_optedit']; } $TITLE_EXTRA = ': Editor di sondaggi'; $pl_expiry_date_data = tmpl_draw_select_opt("0\n3600\n21600\n43200\n86400\n259200\n604800\n2635200\n31536000", "Illimitato\n1 ora\n6 ore\n12 ore\n1 giorno\n3 giorni\n1 settimana\n1 mese\n1 anno", $pl_expiry_date, '', ''); $pl_max_votes_data = tmpl_draw_select_opt("0\n10\n50\n100\n200\n500\n1000\n10000\n100000", "Illimitato\n10\n50\n100\n200\n500\n1000\n10000\n100000", $pl_max_votes, '', ''); if ($frm->group_cache_opt & 16384) { $checked = isset($_POST['pl_smiley_disabled']) ? ' checked' : ''; $pl_smiley_disabled_chk = '<tr><td align="right" valign="top" colspan=2 class="GenText"><input type="checkbox" name="pl_smiley_disabled" value="Y"' . $checked . '>Disabilita gli smiley</td></tr>'; } else { $pl_smiley_disabled_chk = ''; } $pl_submit = !$pl_id ? '<input type="submit" class="button" name="pl_submit" value="Crea sondaggio">' : '<input type="submit" class="button" name="pl_submit" value="Aggiorna sondaggio">'; /* this is only available on a created poll */ if ($pl_id) { if (isset($pl_option)) { $pl_option = post_to_smiley($pl_option); if ($frm->forum_opt & 16) { $pl_option = html_to_tags($pl_option); } else { if ($frm->forum_opt & 8) { reverse_nl2br($pl_option); } } $pl_option = apply_reverse_replace($pl_option); } else { $pl_option = ''; } $pl_action = !isset($_GET['pl_optedit']) ? '<input type="submit" class="button" name="pl_add" onClick="javascript: return check_submission();" value="Aggiungi risposta">' : '<input type="hidden" name="pl_option_id" value="' . $pl_option_id . '"> <input type="submit" class="button" name="pl_upd" onClick="javascript: return check_submission();" value="Aggiorna risposta">'; $poll_option_entry_data = ''; if (!empty($poll_opts)) {
} else { if ($frm->forum_opt & 8) { $text = htmlspecialchars($text); } } if ($frm->forum_opt & 24) { char_fix($text); } if ($perms & 16384 && !$msg_smiley_disabled) { $text = smiley_to_post($text); } if (strlen($text)) { $wa = tokenize_string($text); $msg_body = spell_replace($wa, 'body'); if ($perms & 16384 && !$msg_smiley_disabled) { $msg_body = post_to_smiley($msg_body); } if ($frm->forum_opt & 16) { $msg_body = html_to_tags($msg_body); } else { if ($frm->forum_opt & 8) { reverse_fmt($msg_body); } } $msg_body = apply_reverse_replace($msg_body); } $wa = ''; if (strlen($_POST['msg_subject']) && empty($no_spell_subject)) { $text_s = htmlspecialchars($text_s); char_fix($text_s); $wa = tokenize_string($text_s);
if ($o->attach_cnt && $o->attach_cache) { $a = unserialize($o->attach_cache); if (is_array($a) && @count($a)) { foreach ($a as $i) { $attch[] = array('id' => $i[0], 'name' => $i[1], 'nd' => $i[3]); } $fpdf->add_attacments($attch); } } /* handle polls */ if ($o->poll_name && $o->poll_cache) { $pc = @unserialize($o->poll_cache); if (is_array($pc) && count($pc)) { reverse_fmt($o->poll_name); foreach ($pc as $opt) { $opt[0] = strip_tags(post_to_smiley($opt[0], $re)); reverse_fmt($opt[0]); $votes[] = array('name' => $opt[0], 'votes' => $opt[1]); } $fpdf->add_poll($o->poll_name, $votes, $o->total_votes); } } $fpdf->end_message(); } while ($o = db_rowobj($c)); un_register_fps(); $fpdf->end_page(); pdf_close($fpdf->pdf); $pdf = pdf_get_buffer($fpdf->pdf); header('Content-type: application/pdf'); header('Content-length: ' . strlen($pdf)); header('Content-disposition: inline; filename=FUDforum' . date('Ymd') . '.pdf');