} $private_message = make_clickable($private_message); if ($privmsg['privmsgs_enable_smilies']) { $old_config = $board_config['smilies_path']; $board_config['smilies_path'] = '../' . $board_config['smilies_path']; $private_message = smilies_pass($private_message); $board_config['smilies_path'] = $old_config; } $private_message = str_replace("\n", '<br />', $private_message); $template->set_filenames(array('viewmsg_body' => 'admin/admin_priv_msgs_view_body.tpl')); $template->assign_vars(array('L_SUBJECT' => $lang['Subject'], 'L_TO' => $lang['To'], 'L_FROM' => $lang['From'], 'L_SENT_DATE' => $lang['Sent_Date'], 'L_PRIVATE_MESSAGES' => $aprvmUtil->modName)); $template->assign_vars(array('SUBJECT' => $privmsg['privmsgs_subject'], 'FROM' => $aprvmUtil->id_2_name($privmsg['privmsgs_from_userid']), 'FROM_IP' => $board_config['aprvmIP'] ? ' : (' . decode_ip($privmsg['privmsgs_ip']) . ')' : '', 'TO' => $aprvmUtil->id_2_name($privmsg['privmsgs_to_userid']), 'DATE' => create_date($lang['DATE_FORMAT'], $privmsg['privmsgs_date'], $board_config['board_timezone']), 'MESSAGE' => $private_message)); if ($board_config['aprvmView']) { $template->assign_block_vars('popup_switch', array()); $template->pparse('viewmsg_body'); $aprvmUtil->copyright(); break; } else { $template->assign_var_from_handle('PM_MESSAGE', 'viewmsg_body'); } case 'remove_old': if ($pmaction == 'remove_old') { // Build user sql list $user_id_sql_list = ''; $sql = 'SELECT user_id FROM ' . USERS_TABLE . ' WHERE user_id <> ' . ANONYMOUS; if (!($result = $db->sql_query($sql))) { message_die(GENERAL_ERROR, $lang['Error_Other_Table'], '', __LINE__, __FILE__); } while ($row = $db->sql_fetchrow($result)) { $user_id_sql_list .= $user_id_sql_list != '' ? ', ' . $row['user_id'] : $row['user_id'];
FROM ' . PRIVMSGS_TABLE . "{$archive_text} pm\n\t\t\tWHERE pm.privmsgs_id = {$view_id}"; $result = $db->sql_query($sql); $privmsg = $db->sql_fetchrow($result); // Just stole all the phpBB code for message processing :) And edited a ton of it out since we are all admins here $private_message = $privmsg['privmsgs_text']; $bbcode->allow_html = $config['allow_html'] ? true : false; $bbcode->allow_bbcode = $config['allow_bbcode'] && $privmsg['privmsgs_enable_bbcode'] ? true : false; $bbcode->allow_smilies = $config['allow_smilies'] && $privmsg['privmsgs_enable_smilies'] ? true : false; $private_message = $bbcode->parse($private_message); //$private_message = str_replace("\n", '<br />', $private_message); $template->set_filenames(array('viewmsg_body' => ADM_TPL . 'admin_priv_msgs_view_body.tpl')); $template->assign_vars(array('L_SUBJECT' => $lang['Subject'], 'L_TO' => $lang['To'], 'L_FROM' => $lang['From'], 'L_SENT_DATE' => $lang['Sent_Date'], 'L_PRIVATE_MESSAGES' => $aprvmUtil->modName, 'SUBJECT' => $privmsg['privmsgs_subject'], 'FROM_IP' => $config['aprvmIP'] ? ' : (' . htmlspecialchars($privmsg['privmsgs_ip']) . ')' : '', 'FROM' => $aprvmUtil->id_2_name($privmsg['privmsgs_from_userid'], 'user_formatted'), 'TO' => $aprvmUtil->id_2_name($privmsg['privmsgs_to_userid'], 'user_formatted'), 'DATE' => create_date($lang['DATE_FORMAT'], $privmsg['privmsgs_date'], $config['board_timezone']), 'MESSAGE' => $private_message)); if ($config['aprvmView']) { $template->assign_block_vars('popup_switch', array()); $template->pparse('viewmsg_body'); $aprvmUtil->copyright(); break; } else { $template->assign_var_from_handle('PM_MESSAGE', 'viewmsg_body'); } case 'remove_old': if ($pmaction == 'remove_old') { // Build user sql list $user_id_sql_list = ''; $sql = 'SELECT user_id FROM ' . USERS_TABLE . ' WHERE user_id <> ' . ANONYMOUS; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { $user_id_sql_list .= $user_id_sql_list != '' ? ', ' . $row['user_id'] : $row['user_id']; } // Get orphan PM ids