mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
- private messages - not finished yet.
git-svn-id: file:///svn/phpbb/trunk@4908 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
7d24e82aa0
commit
061b261f79
17 changed files with 4652 additions and 10 deletions
1039
phpBB/includes/functions_privmsgs.php
Normal file
1039
phpBB/includes/functions_privmsgs.php
Normal file
File diff suppressed because it is too large
Load diff
|
@ -759,7 +759,8 @@ class user extends session
|
||||||
{
|
{
|
||||||
if (!$this->theme['primary'][$img])
|
if (!$this->theme['primary'][$img])
|
||||||
{
|
{
|
||||||
$imgs[$img . $suffix] = $alt; //'{{IMG:' . $img . '}}';
|
// Do not fill the image to let designers decide what to do if the image is empty
|
||||||
|
$imgs[$img . $suffix] = '';
|
||||||
return $imgs[$img . $suffix];
|
return $imgs[$img . $suffix];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,15 +11,12 @@
|
||||||
//
|
//
|
||||||
// -------------------------------------------------------------
|
// -------------------------------------------------------------
|
||||||
|
|
||||||
// TODO for 2.2:
|
// TODO for M-4:
|
||||||
//
|
//
|
||||||
// * Utilise more code from posting, modularise as appropriate
|
|
||||||
// * Give option of recieving a receipt upon reading (sender)
|
|
||||||
// * Give option of not sending a receipt upon reading (recipient)
|
|
||||||
// * Archive inbox to text file? to email?
|
|
||||||
// * Review of post when replying/quoting
|
// * Review of post when replying/quoting
|
||||||
// * Introduce post/post thread forwarding
|
// * Introduce post/post thread forwarding
|
||||||
// * Introduce (option of) emailing entire PM when notifying user of new message
|
// * Introduce (option of) emailing entire PM when notifying user of new message
|
||||||
|
// * Handle delete flag (user deletes PM from outbox)
|
||||||
|
|
||||||
class ucp_pm extends module
|
class ucp_pm extends module
|
||||||
{
|
{
|
||||||
|
@ -41,7 +38,290 @@ class ucp_pm extends module
|
||||||
$user->add_lang('posting');
|
$user->add_lang('posting');
|
||||||
$template->assign_var('S_PRIVMSGS', true);
|
$template->assign_var('S_PRIVMSGS', true);
|
||||||
|
|
||||||
trigger_error('No, not yet. :P');
|
$folder_specified = request_var('folder', '');
|
||||||
|
if (!in_array($folder_specified, array('inbox', 'outbox', 'sentbox')))
|
||||||
|
{
|
||||||
|
$folder_specified = (int) $folder_specified;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$folder_specified = ($folder_specified == 'inbox') ? PRIVMSGS_INBOX : (($folder_specified == 'outbox') ? PRIVMSGS_OUTBOX : PRIVMSGS_SENTBOX);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$folder_specified)
|
||||||
|
{
|
||||||
|
$mode = (!$mode) ? request_var('mode', 'view_messages') : $mode;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$mode = 'view_messages';
|
||||||
|
}
|
||||||
|
|
||||||
|
include($phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx);
|
||||||
|
|
||||||
|
$tpl_file = 'ucp_pm_' . $mode . '.html';
|
||||||
|
switch ($mode)
|
||||||
|
{
|
||||||
|
// New private messages popup
|
||||||
|
case 'popup':
|
||||||
|
|
||||||
|
$l_new_message = '';
|
||||||
|
if ($user->data['user_id'] != ANONYMOUS)
|
||||||
|
{
|
||||||
|
if ($user->data['user_new_privmsg'])
|
||||||
|
{
|
||||||
|
$l_new_message = ($user->data['user_new_privmsg'] == 1 ) ? $user->lang['YOU_NEW_PM'] : $user->lang['YOU_NEW_PMS'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$l_new_message = $user->lang['YOU_NO_NEW_PM'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$l_new_message .= '<br /><br />' . sprintf($user->lang['CLICK_VIEW_PRIVMSG'], '<a href="' . $phpbb_root_path . 'ucp.' . $phpEx . $SID . '&i=pm&folder=inbox" onclick="jump_to_inbox();return false;" target="_new">', '</a>');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$l_new_message = $user->lang['LOGIN_CHECK_PM'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'MESSAGE' => $l_new_message)
|
||||||
|
);
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
// Compose message
|
||||||
|
case 'compose':
|
||||||
|
$action = request_var('action', 'post');
|
||||||
|
|
||||||
|
if (!$auth->acl_get('u_sendpm'))
|
||||||
|
{
|
||||||
|
trigger_error('NOT_AUTHORIZED');
|
||||||
|
}
|
||||||
|
|
||||||
|
include($phpbb_root_path . 'includes/ucp/ucp_pm_compose.'.$phpEx);
|
||||||
|
compose_pm($id, $mode, $action);
|
||||||
|
|
||||||
|
$tpl_file = 'posting_body.html';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'options':
|
||||||
|
include($phpbb_root_path . 'includes/ucp/ucp_pm_options.'.$phpEx);
|
||||||
|
message_options($id, $mode, $global_privmsgs_rules, $global_rule_conditions);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'drafts':
|
||||||
|
include($phpbb_root_path . 'includes/ucp/ucp_main.'.$phpEx);
|
||||||
|
$module = new ucp_main($id, $mode);
|
||||||
|
unset($module);
|
||||||
|
exit;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'unread':
|
||||||
|
case 'view_messages':
|
||||||
|
if ($folder_specified)
|
||||||
|
{
|
||||||
|
$folder_id = $folder_specified;
|
||||||
|
$action = 'view_folder';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$folder_id = request_var('f', PRIVMSGS_NO_BOX);
|
||||||
|
$action = request_var('action', 'view_folder');
|
||||||
|
}
|
||||||
|
|
||||||
|
$msg_id = request_var('p', 0);
|
||||||
|
$view = request_var('view', '');
|
||||||
|
|
||||||
|
if ($msg_id && $action == 'view_folder')
|
||||||
|
{
|
||||||
|
$action = 'view_message';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$auth->acl_get('u_readpm'))
|
||||||
|
{
|
||||||
|
trigger_error('NOT_AUTHORIZED');
|
||||||
|
}
|
||||||
|
|
||||||
|
// First Handle Mark actions and moving messages
|
||||||
|
|
||||||
|
// Move PM
|
||||||
|
if (isset($_REQUEST['move_pm']))
|
||||||
|
{
|
||||||
|
$message_limit = (!$user->data['group_message_limit']) ? $config['pm_max_msgs'] : $user->data['group_message_limit'];
|
||||||
|
|
||||||
|
if (move_pm($user->data['user_id'], $message_limit))
|
||||||
|
{
|
||||||
|
// Return to folder view if single message moved
|
||||||
|
if ($action == 'view_message')
|
||||||
|
{
|
||||||
|
$msg_id = 0;
|
||||||
|
$folder_id = request_var('cur_folder_id', PRIVMSGS_NO_BOX);
|
||||||
|
$action = 'view_folder';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Message Mark Options
|
||||||
|
if (isset($_REQUEST['submit_mark']))
|
||||||
|
{
|
||||||
|
handle_mark_actions($user->data['user_id'], request_var('mark_option', ''));
|
||||||
|
}
|
||||||
|
|
||||||
|
// If new messages arrived, place them into the appropiate folder
|
||||||
|
$num_not_moved = 0;
|
||||||
|
if ($user->data['user_new_privmsg'] && $action == 'view_folder')
|
||||||
|
{
|
||||||
|
place_pm_into_folder($global_privmsgs_rules, request_var('release', 0));
|
||||||
|
$num_not_moved = $user->data['user_new_privmsg'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$msg_id && $folder_id == PRIVMSGS_NO_BOX && $mode != 'unread')
|
||||||
|
{
|
||||||
|
$folder_id = PRIVMSGS_INBOX;
|
||||||
|
}
|
||||||
|
else if ($msg_id && $folder_id == PRIVMSGS_NO_BOX)
|
||||||
|
{
|
||||||
|
$sql = 'SELECT folder_id
|
||||||
|
FROM ' . PRIVMSGS_TO_TABLE . "
|
||||||
|
WHERE msg_id = $msg_id
|
||||||
|
AND user_id = " . $user->data['user_id'];
|
||||||
|
$result = $db->sql_query_limit($sql, 1);
|
||||||
|
if (!($row = $db->sql_fetchrow($result)))
|
||||||
|
{
|
||||||
|
trigger_error('MESSAGE_NO_LONGER_AVAILABLE');
|
||||||
|
}
|
||||||
|
$folder_id = (int) $row['folder_id'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$message_row = array();
|
||||||
|
if ($mode == 'view_messages' && $action == 'view_message' && $msg_id)
|
||||||
|
{
|
||||||
|
// Get Message user want to see
|
||||||
|
|
||||||
|
if ($view == 'next' || $view == 'previous')
|
||||||
|
{
|
||||||
|
$sql_condition = ($view == 'next') ? '>' : '<';
|
||||||
|
$sql_ordering = ($view == 'next') ? 'ASC' : 'DESC';
|
||||||
|
|
||||||
|
$sql = 'SELECT t.msg_id
|
||||||
|
FROM ' . PRIVMSGS_TO_TABLE . ' t, ' . PRIVMSGS_TABLE . ' p, ' . PRIVMSGS_TABLE . " p2
|
||||||
|
WHERE p2.msg_id = $msg_id
|
||||||
|
AND t.folder_id = $folder_id
|
||||||
|
AND t.user_id = " . $user->data['user_id'] . "
|
||||||
|
AND t.msg_id = p.msg_id
|
||||||
|
AND p.message_time $sql_condition p2.message_time
|
||||||
|
ORDER BY p.message_time $sql_ordering";
|
||||||
|
$result = $db->sql_query_limit($sql, 1);
|
||||||
|
|
||||||
|
if (!($row = $db->sql_fetchrow($result)))
|
||||||
|
{
|
||||||
|
$message = ($view == 'next') ? 'NO_NEWER_PM' : 'NO_OLDER_PM';
|
||||||
|
trigger_error($message);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$msg_id = $row['msg_id'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = 'SELECT t.*, p.*, u.*
|
||||||
|
FROM ' . PRIVMSGS_TO_TABLE . ' t, ' . PRIVMSGS_TABLE . ' p, ' . USERS_TABLE . ' u
|
||||||
|
WHERE t.user_id = ' . $user->data['user_id'] . "
|
||||||
|
AND p.author_id = u.user_id
|
||||||
|
AND t.folder_id = $folder_id
|
||||||
|
AND t.msg_id = p.msg_id
|
||||||
|
AND p.msg_id = $msg_id";
|
||||||
|
$result = $db->sql_query_limit($sql, 1);
|
||||||
|
|
||||||
|
if (!($message_row = $db->sql_fetchrow($result)))
|
||||||
|
{
|
||||||
|
trigger_error('MESSAGE_NO_LONGER_AVAILABLE');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update unread status
|
||||||
|
update_unread_status($message_row['unread'], $message_row['msg_id'], $user->data['user_id'], $folder_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
$unread_pm = array();
|
||||||
|
if ($user->data['user_unread_privmsg'])
|
||||||
|
{
|
||||||
|
$unread_pm = get_unread_pm($user->data['user_id']);
|
||||||
|
}
|
||||||
|
$folder = array();
|
||||||
|
|
||||||
|
if ($mode == 'unread')
|
||||||
|
{
|
||||||
|
$folder['unread'] = array('folder_name' => $user->lang['UNREAD_MESSAGES']);
|
||||||
|
}
|
||||||
|
get_folder($user->data['user_id'], $folder);
|
||||||
|
|
||||||
|
$s_folder_options = $s_to_folder_options = '';
|
||||||
|
foreach ($folder as $f_id => $folder_ary)
|
||||||
|
{
|
||||||
|
$unread = ((isset($unread_pm[$f_id]) || ($f_id == PRIVMSGS_OUTBOX && $folder_ary['num_messages'])) ? ' [' . (($f_id == PRIVMSGS_OUTBOX) ? $folder_ary['num_messages'] : $unread_pm[$f_id]) . ']' : '');
|
||||||
|
|
||||||
|
$option = '<option' . ((!in_array($f_id, array(PRIVMSGS_INBOX, PRIVMSGS_OUTBOX, PRIVMSGS_SENTBOX))) ? ' class="blue"' : '') . ' value="' . $f_id . '"' . ((($f_id == $folder_id && $mode != 'unread') || ($f_id === 'unread' && $mode == 'unread')) ? ' selected="selected"' : '') . '>' . $folder_ary['folder_name'] . $unread . '</option>';
|
||||||
|
|
||||||
|
$s_to_folder_options .= ($f_id != PRIVMSGS_OUTBOX && $f_id != PRIVMSGS_SENTBOX) ? $option : '';
|
||||||
|
$s_folder_options .= $option;
|
||||||
|
}
|
||||||
|
|
||||||
|
clean_sentbox($folder[PRIVMSGS_SENTBOX]['num_messages']);
|
||||||
|
|
||||||
|
// Header for message view - folder and so on
|
||||||
|
$folder_status = get_folder_status($folder_id, $folder);
|
||||||
|
$url = "{$phpbb_root_path}ucp.$phpEx$SID&i=$id";
|
||||||
|
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'CUR_FOLDER_ID' => $folder_id,
|
||||||
|
'CUR_FOLDER_NAME' => $folder_status['folder_name'],
|
||||||
|
'NUM_NOT_MOVED' => $num_not_moved,
|
||||||
|
'RELEASE_MESSAGE_INFO' => sprintf($user->lang['RELEASE_MESSAGES'], '<a href="' . $url . '&folder=' . $folder_id . '&release=1">', '</a>'),
|
||||||
|
'NOT_MOVED_MESSAGES' => ($num_not_moved == 1) ? $user->lang['NOT_MOVED_MESSAGE'] : sprintf($user->lang['NOT_MOVED_MESSAGES'], $num_not_moved),
|
||||||
|
|
||||||
|
'S_FOLDER_OPTIONS' => $s_folder_options,
|
||||||
|
'S_TO_FOLDER_OPTIONS' => $s_to_folder_options,
|
||||||
|
'S_FOLDER_ACTION' => "$url&mode=view_messages&action=view_folder",
|
||||||
|
'S_PM_ACTION' => "$url&mode=$mode&action=$action",
|
||||||
|
|
||||||
|
'U_INBOX' => ($folder_id != PRIVMSGS_INBOX) ? "$url&folder=inbox" : '',
|
||||||
|
'U_OUTBOX' => ($folder_id != PRIVMSGS_OUTBOX) ? "$url&folder=outbox" : '',
|
||||||
|
'U_SENTBOX' => ($folder_id != PRIVMSGS_SENTBOX) ? "$url&folder=sentbox" : '',
|
||||||
|
'U_CREATE_FOLDER' => "$url&mode=options",
|
||||||
|
|
||||||
|
'FOLDER_STATUS' => $folder_status['message'],
|
||||||
|
'FOLDER_MAX_MESSAGES' => $folder_status['max'],
|
||||||
|
'FOLDER_CUR_MESSAGES' => $folder_status['cur'],
|
||||||
|
'FOLDER_REMAINING_MESSAGES' => $folder_status['remaining'],
|
||||||
|
'FOLDER_PERCENT' => $folder_status['percent'])
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($mode == 'unread' || $action == 'view_folder')
|
||||||
|
{
|
||||||
|
include($phpbb_root_path . 'includes/ucp/ucp_pm_viewfolder.'.$phpEx);
|
||||||
|
view_folder($id, $mode, $folder_id, $folder, (($mode == 'unread') ? 'unread' : 'folder'));
|
||||||
|
|
||||||
|
$tpl_file = 'ucp_pm_viewfolder.html';
|
||||||
|
}
|
||||||
|
else if ($action == 'view_message')
|
||||||
|
{
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'S_VIEW_MESSAGE'=> true,
|
||||||
|
'MSG_ID' => $msg_id)
|
||||||
|
);
|
||||||
|
|
||||||
|
include($phpbb_root_path . 'includes/ucp/ucp_pm_viewmessage.'.$phpEx);
|
||||||
|
view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row);
|
||||||
|
|
||||||
|
$tpl_file = ($view == 'print') ? 'ucp_pm_viewmessage_print.html' : 'ucp_pm_viewmessage.html';
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
trigger_error('NOT_AUTHORIZED');
|
||||||
|
}
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'L_TITLE' => $user->lang['UCP_PM_' . strtoupper($mode)],
|
'L_TITLE' => $user->lang['UCP_PM_' . strtoupper($mode)],
|
||||||
|
|
1176
phpBB/includes/ucp/ucp_pm_compose.php
Normal file
1176
phpBB/includes/ucp/ucp_pm_compose.php
Normal file
File diff suppressed because it is too large
Load diff
543
phpBB/includes/ucp/ucp_pm_options.php
Normal file
543
phpBB/includes/ucp/ucp_pm_options.php
Normal file
|
@ -0,0 +1,543 @@
|
||||||
|
<?php
|
||||||
|
// -------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// $Id$
|
||||||
|
//
|
||||||
|
// FILENAME : options.php
|
||||||
|
// STARTED : Mon Apr 19, 2004
|
||||||
|
// COPYRIGHT : © 2004 phpBB Group
|
||||||
|
// WWW : http://www.phpbb.com/
|
||||||
|
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
||||||
|
//
|
||||||
|
// -------------------------------------------------------------
|
||||||
|
|
||||||
|
function message_options($id, $mode, $global_privmsgs_rules, $global_rule_conditions)
|
||||||
|
{
|
||||||
|
global $phpbb_root_path, $phpEx, $SID, $user, $template, $auth, $config, $db;
|
||||||
|
|
||||||
|
$redirect_url = "{$phpbb_root_path}ucp.$phpEx$SID&i=pm&mode=options";
|
||||||
|
|
||||||
|
if (isset($_POST['fullfolder']))
|
||||||
|
{
|
||||||
|
$full_action = request_var('full_action', 0);
|
||||||
|
|
||||||
|
$set_folder_id = 0;
|
||||||
|
switch ($full_action)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
$set_folder_id = FULL_FOLDER_DELETE;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
$set_folder_id = request_var('full_move_to', PRIVMSGS_INBOX);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
$set_folder_id = FULL_FOLDER_HOLD;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$full_action = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($full_action)
|
||||||
|
{
|
||||||
|
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||||
|
SET user_full_folder = ' . $set_folder_id . '
|
||||||
|
WHERE user_id = ' . $user->data['user_id'];
|
||||||
|
$db->sql_query($sql);
|
||||||
|
|
||||||
|
$user->data['user_full_folder'] = $set_folder_id;
|
||||||
|
|
||||||
|
$message = $user->lang['FULL_FOLDER_OPTION_CHANGED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $redirect_url . '">', '</a>');
|
||||||
|
meta_refresh(3, $redirect_url);
|
||||||
|
trigger_error($message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($_POST['addfolder']))
|
||||||
|
{
|
||||||
|
$folder_name = request_var('foldername', '');
|
||||||
|
|
||||||
|
if ($folder_name)
|
||||||
|
{
|
||||||
|
$sql = 'SELECT folder_name
|
||||||
|
FROM ' . PRIVMSGS_FOLDER_TABLE . "
|
||||||
|
WHERE folder_name = '$folder_name'
|
||||||
|
AND user_id = " . $user->data['user_id'];
|
||||||
|
$result = $db->sql_query_limit($sql, 1);
|
||||||
|
|
||||||
|
if ($db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
trigger_error(sprintf($user->lang['FOLDER_NAME_EXIST'], $folder_name));
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
$sql = 'SELECT COUNT(folder_id) as num_folder
|
||||||
|
FROM ' . PRIVMSGS_FOLDER_TABLE . '
|
||||||
|
WHERE user_id = ' . $user->data['user_id'];
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
if ($db->sql_fetchfield('num_folder', 0, $result) >= $config['pm_max_boxes'])
|
||||||
|
{
|
||||||
|
trigger_error('MAX_FOLDER_REACHED');
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
$sql = 'INSERT INTO ' . PRIVMSGS_FOLDER_TABLE . ' ' . $db->sql_build_array('INSERT', array(
|
||||||
|
'user_id' => (int) $user->data['user_id'], 'folder_name' => $folder_name));
|
||||||
|
$db->sql_query($sql);
|
||||||
|
|
||||||
|
$message = $user->lang['FOLDER_ADDED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $redirect_url . '">', '</a>');
|
||||||
|
meta_refresh(3, $redirect_url);
|
||||||
|
trigger_error($message);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($_POST['add_rule']))
|
||||||
|
{
|
||||||
|
$check_option = request_var('check_option', 0);
|
||||||
|
$rule_option = request_var('rule_option', 0);
|
||||||
|
$cond_option = request_var('cond_option', '');
|
||||||
|
$action_option = explode('|', request_var('action_option', ''));
|
||||||
|
$rule_string = ($cond_option != 'none') ? request_var('rule_string', '') : '';
|
||||||
|
$rule_user_id = ($cond_option != 'none') ? request_var('rule_user_id', 0) : 0;
|
||||||
|
$rule_group_id = ($cond_option != 'none') ? request_var('rule_group_id', 0) : 0;
|
||||||
|
|
||||||
|
$action = (int) $action_option[0];
|
||||||
|
$folder_id = (int) $action_option[1];
|
||||||
|
|
||||||
|
if (!$action || !$check_option || !$rule_option || !$cond_option || ($cond_option != 'none' && !$rule_string))
|
||||||
|
{
|
||||||
|
trigger_error('RULE_NOT_DEFINED');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (($cond_option == 'user' && !$rule_user_id) || ($cond_option == 'group' && !$rule_group_id))
|
||||||
|
{
|
||||||
|
trigger_error('RULE_NOT_DEFINED');
|
||||||
|
}
|
||||||
|
|
||||||
|
$rule_ary = array(
|
||||||
|
'user_id' => $user->data['user_id'],
|
||||||
|
'rule_check' => $check_option,
|
||||||
|
'rule_connection' => $rule_option,
|
||||||
|
'rule_string' => $rule_string,
|
||||||
|
'rule_user_id' => $rule_user_id,
|
||||||
|
'rule_group_id' => $rule_group_id,
|
||||||
|
'rule_action' => $action,
|
||||||
|
'rule_folder_id'=> $folder_id
|
||||||
|
);
|
||||||
|
|
||||||
|
$sql = 'SELECT rule_id
|
||||||
|
FROM ' . PRIVMSGS_RULES_TABLE . '
|
||||||
|
WHERE ' . $db->sql_build_array('SELECT', $rule_ary);
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
if ($db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
trigger_error('RULE_ALREADY_DEFINED');
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
$sql = 'INSERT INTO ' . PRIVMSGS_RULES_TABLE . ' ' . $db->sql_build_array('INSERT', $rule_ary);
|
||||||
|
$db->sql_query($sql);
|
||||||
|
|
||||||
|
$message = $user->lang['RULE_ADDED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $redirect_url . '">', '</a>');
|
||||||
|
meta_refresh(3, $redirect_url);
|
||||||
|
trigger_error($message);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($_POST['delete_rule']) && !isset($_POST['cancel']))
|
||||||
|
{
|
||||||
|
$delete_id = array_map('intval', array_keys($_POST['delete_rule']));
|
||||||
|
$delete_id = (int) $delete_id[0];
|
||||||
|
|
||||||
|
if (!$delete_id)
|
||||||
|
{
|
||||||
|
redirect("{$phpbb_root_path}ucp.$phpEx$SID&i=pm&mode=$mode");
|
||||||
|
}
|
||||||
|
|
||||||
|
$s_hidden_fields = '<input type="hidden" name="delete_rule[' . $delete_id . ']" value="1" />';
|
||||||
|
|
||||||
|
// Do we need to confirm ?
|
||||||
|
if (confirm_box(true))
|
||||||
|
{
|
||||||
|
$sql = 'DELETE FROM ' . PRIVMSGS_RULES_TABLE . '
|
||||||
|
WHERE user_id = ' . $user->data['user_id'] . "
|
||||||
|
AND rule_id = $delete_id";
|
||||||
|
$db->sql_query($sql);
|
||||||
|
|
||||||
|
$meta_info = "{$phpbb_root_path}ucp.$phpEx$SID&i=pm&mode=$mode";
|
||||||
|
$message = $user->lang['RULE_DELETED'];
|
||||||
|
|
||||||
|
meta_refresh(3, $meta_info);
|
||||||
|
$message .= '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $meta_info . '">', '</a>');
|
||||||
|
trigger_error($message);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
confirm_box(false, 'DELETE_RULE', $s_hidden_fields);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$folder = array();
|
||||||
|
$message_limit = (!$user->data['group_message_limit']) ? $config['pm_max_msgs'] : $user->data['group_message_limit'];
|
||||||
|
|
||||||
|
$sql = 'SELECT COUNT(msg_id) as num_messages
|
||||||
|
FROM ' . PRIVMSGS_TO_TABLE . '
|
||||||
|
WHERE user_id = ' . $user->data['user_id'] . '
|
||||||
|
AND folder_id = ' . PRIVMSGS_INBOX;
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
$num_messages = $db->sql_fetchfield('num_messages', 0, $result);
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
$folder[PRIVMSGS_INBOX] = array(
|
||||||
|
'folder_name' => $user->lang['PM_INBOX'],
|
||||||
|
'message_status'=> sprintf($user->lang['FOLDER_MESSAGE_STATUS'], $num_messages, $message_limit)
|
||||||
|
);
|
||||||
|
|
||||||
|
$sql = 'SELECT folder_id, folder_name, pm_count
|
||||||
|
FROM ' . PRIVMSGS_FOLDER_TABLE . '
|
||||||
|
WHERE user_id = ' . $user->data['user_id'];
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
$num_user_folder = 0;
|
||||||
|
while ($row = $db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
$num_user_folder++;
|
||||||
|
$folder[$row['folder_id']] = array(
|
||||||
|
'folder_name' => $row['folder_name'],
|
||||||
|
'message_status'=> sprintf($user->lang['FOLDER_MESSAGE_STATUS'], $row['pm_count'], $message_limit)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
$s_full_folder_options = $s_to_folder_options = $s_folder_options = '';
|
||||||
|
|
||||||
|
foreach ($folder as $folder_id => $folder_ary)
|
||||||
|
{
|
||||||
|
$s_full_folder_options .= '<option value="' . $folder_id . '"' . (($user->data['user_full_folder'] == $folder_id) ? ' selected="selected"' : '') . '>' . $folder_ary['folder_name'] . ' (' . $folder_ary['message_status'] . ')</option>';
|
||||||
|
$s_to_folder_options .= '<option value="' . $folder_id . '"' . (($to_folder_id == $folder_id) ? ' selected="selected"' : '') . '>' . $folder_ary['folder_name'] . ' (' . $folder_ary['message_status'] . ')</option>';
|
||||||
|
|
||||||
|
if ($folder_id != PRIVMSGS_INBOX)
|
||||||
|
{
|
||||||
|
$s_folder_options .= '<option value="' . $folder_id . '">' . $folder_ary['folder_name'] . ' (' . $folder_ary['message_status'] . ')</option>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$s_delete_checked = ($user->data['user_full_folder'] == FULL_FOLDER_DELETE) ? ' checked="checked"' : '';
|
||||||
|
$s_hold_checked = ($user->data['user_full_folder'] == FULL_FOLDER_HOLD) ? ' checked="checked"' : '';
|
||||||
|
$s_move_checked = ($user->data['user_full_folder'] >= 0) ? ' checked="checked"' : '';
|
||||||
|
|
||||||
|
if ($user->data['user_full_folder'] == FULL_FOLDER_NONE)
|
||||||
|
{
|
||||||
|
switch ($config['full_folder_action'])
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
$s_delete_checked = ' checked="checked"';
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
$s_hold_checked = ' checked="checked"';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'S_FULL_FOLDER_OPTIONS' => $s_full_folder_options,
|
||||||
|
'S_TO_FOLDER_OPTIONS' => $s_to_folder_options,
|
||||||
|
'S_FOLDER_OPTIONS' => $s_folder_options,
|
||||||
|
'S_DELETE_CHECKED' => $s_delete_checked,
|
||||||
|
'S_HOLD_CHECKED' => $s_hold_checked,
|
||||||
|
'S_MOVE_CHECKED' => $s_move_checked,
|
||||||
|
'S_MAX_FOLDER_REACHED' => ($num_user_folder >= $config['pm_max_boxes']) ? true : false,
|
||||||
|
|
||||||
|
'DEFAULT_ACTION' => ($config['full_folder_action'] == 1) ? $user->lang['DELETE_OLDEST_MESSAGES'] : $user->lang['HOLD_NEW_MESSAGES'],
|
||||||
|
|
||||||
|
'U_FIND_USERNAME' => "{$phpbb_root_path}memberlist.$phpEx$SID&mode=searchuser&form=ucp&field=rule_string")
|
||||||
|
);
|
||||||
|
|
||||||
|
$rule_lang = $action_lang = $check_lang = array();
|
||||||
|
|
||||||
|
// Build all three language arrays
|
||||||
|
preg_replace('#(?:)((RULE|ACTION|CHECK)_([A-Z0-9_]+))(?:)#e', "\${strtolower('\\2') . '_lang'}[constant('\\1')] = \$user->lang['PM_\\2']['\\3']", implode(':', array_keys(get_defined_constants())));
|
||||||
|
|
||||||
|
/*
|
||||||
|
Rule Ordering:
|
||||||
|
-> CHECK_* -> RULE_* [IN $global_privmsgs_rules:CHECK_*] -> [IF $rule_conditions[RULE_*] [|text|bool|user|group|own_group]] -> ACTION_*
|
||||||
|
*/
|
||||||
|
|
||||||
|
$check_option = request_var('check_option', 0);
|
||||||
|
$rule_option = request_var('rule_option', 0);
|
||||||
|
$cond_option = request_var('cond_option', '');
|
||||||
|
$action_option = request_var('action_option', '');
|
||||||
|
$back = (isset($_REQUEST['back'])) ? request_var('back', '') : array();
|
||||||
|
|
||||||
|
if (sizeof($back))
|
||||||
|
{
|
||||||
|
if ($action_option)
|
||||||
|
{
|
||||||
|
$action_option = '';
|
||||||
|
}
|
||||||
|
else if ($cond_option)
|
||||||
|
{
|
||||||
|
$cond_option = '';
|
||||||
|
}
|
||||||
|
else if ($rule_option)
|
||||||
|
{
|
||||||
|
$rule_option = 0;
|
||||||
|
}
|
||||||
|
else if ($check_option)
|
||||||
|
{
|
||||||
|
$check_option = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($back['action']) && $cond_option == 'none')
|
||||||
|
{
|
||||||
|
$back['cond'] = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check
|
||||||
|
define_check_option(($check_option && !isset($back['rule'])) ? true : false, $check_option, $check_lang);
|
||||||
|
|
||||||
|
if ($check_option && !isset($back['rule']))
|
||||||
|
{
|
||||||
|
define_rule_option(($rule_option && !isset($back['cond'])) ? true : false, $rule_option, $rule_lang, $global_privmsgs_rules[$check_option]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($rule_option && !isset($back['cond']))
|
||||||
|
{
|
||||||
|
if (!isset($global_rule_conditions[$rule_option]))
|
||||||
|
{
|
||||||
|
$cond_option = 'none';
|
||||||
|
$template->assign_var('NONE_CONDITION', true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
define_cond_option(($cond_option && !isset($back['action'])) ? true : false, $cond_option, $rule_option, $global_rule_conditions);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($cond_option && !isset($back['action']))
|
||||||
|
{
|
||||||
|
define_action_option(false, $action_option, $action_lang, $folder);
|
||||||
|
}
|
||||||
|
|
||||||
|
show_defined_rules($user->data['user_id'], $check_lang, $rule_lang, $action_lang, $folder);
|
||||||
|
}
|
||||||
|
|
||||||
|
function define_check_option($hardcoded, $check_option, $check_lang)
|
||||||
|
{
|
||||||
|
global $template;
|
||||||
|
|
||||||
|
$s_check_options = '';
|
||||||
|
if (!$hardcoded)
|
||||||
|
{
|
||||||
|
foreach ($check_lang as $value => $lang)
|
||||||
|
{
|
||||||
|
$s_check_options .= '<option value="' . $value . '"' . (($value == $check_option) ? ' selected="selected"' : '') . '>' . $lang . '</option>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'S_CHECK_DEFINED' => true,
|
||||||
|
'S_CHECK_SELECT' => ($hardcoded) ? false : true,
|
||||||
|
'CHECK_CURRENT' => isset($check_lang[$check_option]) ? $check_lang[$check_option] : '',
|
||||||
|
'S_CHECK_OPTIONS' => $s_check_options,
|
||||||
|
'CHECK_OPTION' => $check_option)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function define_action_option($hardcoded, $action_option, $action_lang, $folder)
|
||||||
|
{
|
||||||
|
global $db, $template, $user;
|
||||||
|
|
||||||
|
$l_action = $s_action_options = '';
|
||||||
|
if ($hardcoded)
|
||||||
|
{
|
||||||
|
$option = explode('|', $action_option);
|
||||||
|
$action = (int) $option[0];
|
||||||
|
$folder_id = (int) $option[1];
|
||||||
|
|
||||||
|
$l_action = $action_lang[$action];
|
||||||
|
if ($action == ACTION_PLACE_INTO_FOLDER)
|
||||||
|
{
|
||||||
|
$l_action .= ' -> ' . $folder[$folder_id]['folder_name'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
foreach ($action_lang as $action => $lang)
|
||||||
|
{
|
||||||
|
if ($action == ACTION_PLACE_INTO_FOLDER)
|
||||||
|
{
|
||||||
|
foreach ($folder as $folder_id => $folder_ary)
|
||||||
|
{
|
||||||
|
$s_action_options .= '<option value="' . $action . '|' . $folder_id . '"' . (($action_option == $action . '|' . $folder_id) ? ' selected="selected"' : '') . '>' . $lang . ' -> ' . $folder_ary['folder_name'] . '</option>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$s_action_options .= '<option value="' . $action . '|0"' . (($action_option == $action . '|0') ? ' selected="selected"' : '') . '>' . $lang . '</option>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'S_ACTION_DEFINED' => true,
|
||||||
|
'S_ACTION_SELECT' => ($hardcoded) ? false : true,
|
||||||
|
'ACTION_CURRENT' => $l_action,
|
||||||
|
'S_ACTION_OPTIONS' => $s_action_options,
|
||||||
|
'ACTION_OPTION' => $action_option)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function define_rule_option($hardcoded, $rule_option, $rule_lang, $check_ary)
|
||||||
|
{
|
||||||
|
global $template;
|
||||||
|
|
||||||
|
$s_rule_options = '';
|
||||||
|
if (!$hardcoded)
|
||||||
|
{
|
||||||
|
foreach ($check_ary as $value => $_check)
|
||||||
|
{
|
||||||
|
$s_rule_options .= '<option value="' . $value . '"' . (($value == $rule_option) ? ' selected="selected"' : '') . '>' . $rule_lang[$value] . '</option>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'S_RULE_DEFINED' => true,
|
||||||
|
'S_RULE_SELECT' => !$hardcoded,
|
||||||
|
'RULE_CURRENT' => isset($rule_lang[$rule_option]) ? $rule_lang[$rule_option] : '',
|
||||||
|
'S_RULE_OPTIONS' => $s_rule_options,
|
||||||
|
'RULE_OPTION' => $rule_option)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule_conditions, &$rule_save_ary)
|
||||||
|
{
|
||||||
|
global $db, $template, $_REQUEST;
|
||||||
|
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'S_COND_DEFINED' => true,
|
||||||
|
'S_COND_SELECT' => (!$hardcoded && isset($global_rule_conditions[$rule_option])) ? true : false)
|
||||||
|
);
|
||||||
|
|
||||||
|
// Define COND_OPTION
|
||||||
|
if (!isset($global_rule_conditions[$rule_option]))
|
||||||
|
{
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'COND_OPTION' => 'none',
|
||||||
|
'COND_CURRENT' => false)
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Define Condition
|
||||||
|
$condition = $global_rule_conditions[$rule_option];
|
||||||
|
$current_value = '';
|
||||||
|
|
||||||
|
switch ($condition)
|
||||||
|
{
|
||||||
|
case 'text':
|
||||||
|
$rule_string = request_var('rule_string', '');
|
||||||
|
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'S_TEXT_CONDITION' => true,
|
||||||
|
'CURRENT_STRING' => $rule_string,
|
||||||
|
'CURRENT_USER_ID' => 0,
|
||||||
|
'CURRENT_GROUP_ID' => 0)
|
||||||
|
);
|
||||||
|
|
||||||
|
$current_value = $rule_string;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'user':
|
||||||
|
$rule_user_id = request_var('rule_user_id', 0);
|
||||||
|
$rule_string = request_var('rule_string', '');
|
||||||
|
|
||||||
|
if ($rule_string && !$rule_user_id)
|
||||||
|
{
|
||||||
|
$sql = 'SELECT user_id
|
||||||
|
FROM ' . USERS_TABLE . "
|
||||||
|
WHERE username = '" . $db->sql_escape($rule_string) . "'";
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
if (!($rule_user_id = $db->sql_fetchfield('user_id', 0, $result)))
|
||||||
|
{
|
||||||
|
$rule_string = '';
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
}
|
||||||
|
else if (!$rule_string && $rule_user_id)
|
||||||
|
{
|
||||||
|
$sql = 'SELECT username
|
||||||
|
FROM ' . USERS_TABLE . "
|
||||||
|
WHERE user_id = $rule_user_id";
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
if (!($rule_string = $db->sql_fetchfield('username', 0, $result)))
|
||||||
|
{
|
||||||
|
$rule_user_id = 0;
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
}
|
||||||
|
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'S_USER_CONDITION' => true,
|
||||||
|
'CURRENT_STRING' => $rule_string,
|
||||||
|
'CURRENT_USER_ID' => $rule_user_id,
|
||||||
|
'CURRENT_GROUP_ID' => 0)
|
||||||
|
);
|
||||||
|
|
||||||
|
$current_value = $rule_string;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'group':
|
||||||
|
$rule_group_id = request_var('rule_group_id', 0);
|
||||||
|
$rule_string = request_var('rule_string', '');
|
||||||
|
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'S_GROUP_CONDITION' => true,
|
||||||
|
'CURRENT_STRING' => $rule_string,
|
||||||
|
'CURRENT_USER_ID' => 0,
|
||||||
|
'CURRENT_GROUP_ID' => $rule_group_id)
|
||||||
|
);
|
||||||
|
|
||||||
|
$current_value = $rule_string;
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'COND_OPTION' => $condition,
|
||||||
|
'COND_CURRENT' => $current_value)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function show_defined_rules($user_id, $check_lang, $rule_lang, $action_lang, $folder)
|
||||||
|
{
|
||||||
|
global $db, $template;
|
||||||
|
|
||||||
|
$sql = 'SELECT *
|
||||||
|
FROM ' . PRIVMSGS_RULES_TABLE . '
|
||||||
|
WHERE user_id = ' . $user_id;
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
$count = 0;
|
||||||
|
while ($row = $db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
$template->assign_block_vars('rule', array(
|
||||||
|
'COUNT' => ++$count,
|
||||||
|
'RULE_ID' => $row['rule_id'],
|
||||||
|
'CHECK' => $check_lang[$row['rule_check']],
|
||||||
|
'RULE' => $rule_lang[$row['rule_connection']],
|
||||||
|
'STRING' => $row['rule_string'],
|
||||||
|
'ACTION' => $action_lang[$row['rule_action']],
|
||||||
|
'FOLDER' => ($row['rule_action'] == ACTION_PLACE_INTO_FOLDER) ? $folder[$row['rule_folder_id']]['folder_name'] : '')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
343
phpBB/includes/ucp/ucp_pm_viewfolder.php
Normal file
343
phpBB/includes/ucp/ucp_pm_viewfolder.php
Normal file
|
@ -0,0 +1,343 @@
|
||||||
|
<?php
|
||||||
|
// -------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// $Id$
|
||||||
|
//
|
||||||
|
// FILENAME : viewfolder.php
|
||||||
|
// STARTED : Sun Apr 11, 2004
|
||||||
|
// COPYRIGHT : © 2004 phpBB Group
|
||||||
|
// WWW : http://www.phpbb.com/
|
||||||
|
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
||||||
|
//
|
||||||
|
// -------------------------------------------------------------
|
||||||
|
|
||||||
|
// * Called from ucp_pm with mode == 'view_messages' && action == 'view_folder'
|
||||||
|
|
||||||
|
function view_folder($id, $mode, $folder_id, $folder, $type)
|
||||||
|
{
|
||||||
|
global $phpbb_root_path, $phpEx, $SID, $user, $template, $auth, $config, $db;
|
||||||
|
|
||||||
|
$user->add_lang('viewforum');
|
||||||
|
|
||||||
|
// Grab icons
|
||||||
|
$icons = array();
|
||||||
|
obtain_icons($icons);
|
||||||
|
|
||||||
|
$color_rows = array('marked', 'replied', 'message_reported', 'friend', 'foe');
|
||||||
|
|
||||||
|
foreach ($color_rows as $var)
|
||||||
|
{
|
||||||
|
$template->assign_block_vars('pm_colour_info', array(
|
||||||
|
'IMG' => $user->img("pm_{$var}", ''),
|
||||||
|
'CLASS' => "pm_{$var}_colour",
|
||||||
|
'LANG' => $user->lang[strtoupper($var) . '_MESSAGE'])
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$mark_options = array('mark_important', 'delete_marked');
|
||||||
|
|
||||||
|
$s_mark_options = '';
|
||||||
|
foreach ($mark_options as $mark_option)
|
||||||
|
{
|
||||||
|
$s_mark_options .= '<option value="' . $mark_option . '">' . $user->lang[strtoupper($mark_option)] . '</option>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$friend = $foe = array();
|
||||||
|
|
||||||
|
// Get friends and foes
|
||||||
|
$sql = 'SELECT *
|
||||||
|
FROM ' . ZEBRA_TABLE . '
|
||||||
|
WHERE user_id = ' . $user->data['user_id'];
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
while ($row = $db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
$friend[$row['zebra_id']] = $row['friend'];
|
||||||
|
$foe[$row['zebra_id']] = $row['foe'];
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'S_UNREAD' => ($type == 'unread'),
|
||||||
|
'S_MARK_OPTIONS'=> $s_mark_options)
|
||||||
|
);
|
||||||
|
|
||||||
|
$folder_info = get_pm_from($folder_id, $folder, $user->data['user_id'], "{$phpbb_root_path}ucp.$phpEx$SID&i=$id", $type);
|
||||||
|
|
||||||
|
// Okay, lets dump out the page ...
|
||||||
|
if (sizeof($folder_info['pm_list']))
|
||||||
|
{
|
||||||
|
// Build Recipient List if in outbox/sentbox - max two additional queries
|
||||||
|
$recipient_list = $address_list = $address = array();
|
||||||
|
if ($folder_id == PRIVMSGS_OUTBOX || $folder_id == PRIVMSGS_SENTBOX)
|
||||||
|
{
|
||||||
|
|
||||||
|
foreach ($folder_info['rowset'] as $message_id => $row)
|
||||||
|
{
|
||||||
|
$address[$message_id] = rebuild_header(array('to' => $row['to_address'], 'bcc' => $row['bcc_address']));
|
||||||
|
foreach (array('u', 'g') as $save)
|
||||||
|
{
|
||||||
|
if (isset($address[$message_id][$save]) && sizeof($address[$message_id][$save]))
|
||||||
|
{
|
||||||
|
foreach (array_keys($address[$message_id][$save]) as $ug_id)
|
||||||
|
{
|
||||||
|
$recipient_list[$save][$ug_id] = array('name' => $user->lang['NA'], 'colour' => '');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (array('u', 'g') as $ug_type)
|
||||||
|
{
|
||||||
|
if (isset($recipient_list[$ug_type]) && sizeof($recipient_list[$ug_type]))
|
||||||
|
{
|
||||||
|
$sql = ($ug_type == 'u') ? 'SELECT user_id as id, username as name, user_colour as colour FROM ' . USERS_TABLE . ' WHERE user_id' : 'SELECT group_id as id, group_name as name, group_colour as colour FROM ' . GROUPS_TABLE . ' WHERE group_id';
|
||||||
|
$sql .= ' IN (' . implode(', ', array_keys($recipient_list[$ug_type])) . ')';
|
||||||
|
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
while ($row = $db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
$recipient_list[$ug_type][$row['id']] = array('name' => $row['name'], 'colour' => $row['colour']);
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($address as $message_id => $adr_ary)
|
||||||
|
{
|
||||||
|
foreach ($adr_ary as $type => $id_ary)
|
||||||
|
{
|
||||||
|
foreach ($id_ary as $ug_id => $_id)
|
||||||
|
{
|
||||||
|
$address_list[$message_id][] = (($type == 'u') ? "<a href=\"{$phpbb_root_path}memberlist.$phpEx$SID&mode=viewprofile&u=$ug_id\">" : "<a href=\"{$phpbb_root_path}groupcp.$phpEx$SID&g=$ug_id\">") . (($recipient_list[$type][$ug_id]['colour']) ? '<span style="color:#' . $recipient_list[$type][$ug_id]['colour'] . '">' : '<span>') . $recipient_list[$type][$ug_id]['name'] . '</span></a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
unset($recipient_list, $address);
|
||||||
|
}
|
||||||
|
|
||||||
|
$i = 0;
|
||||||
|
$url = "{$phpbb_root_path}ucp.$phpEx$SID&i=$id";
|
||||||
|
|
||||||
|
foreach ($folder_info['pm_list'] as $message_id)
|
||||||
|
{
|
||||||
|
$row =& $folder_info['rowset'][$message_id];
|
||||||
|
|
||||||
|
$folder_img = ($row['unread']) ? 'folder_new' : 'folder';
|
||||||
|
$folder_alt = ($row['unread']) ? 'NEW_MESSAGES' : 'NO_NEW_MESSAGES';
|
||||||
|
|
||||||
|
// Generate all URIs ...
|
||||||
|
$message_author = "<a href=\"{$phpbb_root_path}memberlist.$phpEx$SID&mode=viewprofile&u=" . $row['author_id'] . '">' . $row['username'] . '</a>';
|
||||||
|
$view_message_url = "$url&f=$folder_id&p=$message_id";
|
||||||
|
|
||||||
|
$row_indicator = '';
|
||||||
|
foreach ($color_rows as $var)
|
||||||
|
{
|
||||||
|
if (($var != 'friend' && $var != 'foe' && $row[$var])
|
||||||
|
||
|
||||||
|
(($var == 'friend' || $var == 'foe') && isset(${$var}[$row['author_id']]) && ${$var}[$row['author_id']]))
|
||||||
|
{
|
||||||
|
$row_indicator = $var;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Send vars to template
|
||||||
|
$template->assign_block_vars('messagerow', array(
|
||||||
|
'PM_CLASS' => ($row_indicator) ? 'pm_' . $row_indicator . '_colour' : '',
|
||||||
|
|
||||||
|
'FOLDER_ID' => $folder_id,
|
||||||
|
'MESSAGE_ID' => $message_id,
|
||||||
|
'MESSAGE_AUTHOR' => $message_author,
|
||||||
|
'SENT_TIME' => $user->format_date($row['message_time'], $config['board_timezone']),
|
||||||
|
'SUBJECT' => censor_text($row['message_subject']),
|
||||||
|
'FOLDER' => (isset($folder[$row['folder_id']])) ? $folder[$row['folder_id']]['folder_name'] : '',
|
||||||
|
'U_FOLDER' => (isset($folder[$row['folder_id']])) ? "$url&folder=" . $row['folder_id'] : '',
|
||||||
|
'PM_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? '<img src="' . $config['icons_path'] . '/' . $icons[$row['icon_id']]['img'] . '" width="' . $icons[$row['icon_id']]['width'] . '" height="' . $icons[$row['icon_id']]['height'] . '" alt="" title="" />' : '',
|
||||||
|
'FOLDER_IMG' => $user->img($folder_img, $folder_alt),
|
||||||
|
'PM_IMG' => ($row_indicator) ? $user->img('pm_' . $row_indicator, '') : '',
|
||||||
|
'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $row['message_attachment'] && $config['pm_attachments'] && $config['auth_download_pm']) ? $user->img('icon_attach', sprintf($user->lang['TOTAL_ATTACHMENTS'], $row['message_attachment'])) : '',
|
||||||
|
|
||||||
|
'S_ROW_COUNT' => $i,
|
||||||
|
'S_PM_REPORTED' => (!empty($row['message_reported']) && $auth->acl_get('m_')) ? true : false,
|
||||||
|
|
||||||
|
'U_VIEW_PM' => $view_message_url,
|
||||||
|
'RECIPIENTS' => ($folder_id == PRIVMSGS_OUTBOX || $folder_id == PRIVMSGS_SENTBOX) ? implode(', ', $address_list[$message_id]) : '',
|
||||||
|
'U_MCP_REPORT' => "{$phpbb_root_path}mcp.$phpEx?sid={$user->session_id}&mode=reports&pm=$message_id")
|
||||||
|
// 'U_MCP_QUEUE' => "mcp.$phpEx?sid={$user->session_id}&mode=mod_queue&t=$topic_id")
|
||||||
|
);
|
||||||
|
|
||||||
|
$i++;
|
||||||
|
|
||||||
|
unset($folder_info['rowset'][$message_id]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'S_SHOW_RECIPIENTS' => ($folder_id == PRIVMSGS_OUTBOX || $folder_id == PRIVMSGS_SENTBOX) ? true : false,
|
||||||
|
'S_SHOW_COLOUR_LEGEND' => true)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get PM's in folder x from user x
|
||||||
|
// Get PM's in all folders from user x with type of x (unread, new)
|
||||||
|
function get_pm_from($folder_id, $folder, $user_id, $url, $type = 'folder')
|
||||||
|
{
|
||||||
|
global $user, $db, $template, $config, $auth, $_POST;
|
||||||
|
|
||||||
|
$start = request_var('start', 0);
|
||||||
|
|
||||||
|
$sort_days = (isset($_REQUEST['st'])) ? max(intval($_REQUEST['st']), 0) : ((!empty($user->data['user_show_days'])) ? $user->data['user_show_days'] : 0);
|
||||||
|
$sort_key = (!empty($_REQUEST['sk'])) ? htmlspecialchars($_REQUEST['sk']) : ((!empty($user->data['user_sortby_type'])) ? $user->data['user_sortby_type'] : 't');
|
||||||
|
$sort_dir = (!empty($_REQUEST['sd'])) ? htmlspecialchars($_REQUEST['sd']) : ((!empty($user->data['user_sortby_dir'])) ? $user->data['user_sortby_dir'] : 'd');
|
||||||
|
|
||||||
|
// PM ordering options
|
||||||
|
$limit_days = array(0 => $user->lang['ALL_MESSAGES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 364 => $user->lang['1_YEAR']);
|
||||||
|
$sort_by_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 's' => $user->lang['SUBJECT']);
|
||||||
|
$sort_by_sql = array('a' => 'u.username', 't' => 'p.message_time', 's' => 'p.subject');
|
||||||
|
|
||||||
|
$sort_key = (!in_array($sort_key, array('a', 't', 's'))) ? 't' : $sort_key;
|
||||||
|
|
||||||
|
$s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
|
||||||
|
gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
|
||||||
|
|
||||||
|
if ($type != 'folder')
|
||||||
|
{
|
||||||
|
$folder_sql = ($type == 'unread') ? 't.unread = 1' : 't.new = 1';
|
||||||
|
$folder_id = PRIVMSGS_INBOX;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$folder_sql = 't.folder_id = ' . (int) $folder_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Limit pms to certain time frame, obtain correct pm count
|
||||||
|
if ($sort_days)
|
||||||
|
{
|
||||||
|
$min_post_time = time() - ($sort_days * 86400);
|
||||||
|
|
||||||
|
$sql = 'SELECT COUNT(t.msg_id) AS pm_count
|
||||||
|
FROM ' . PRIVMSGS_TO_TABLE . ' t, ' . PRIVMSGS_TABLE . " p
|
||||||
|
WHERE $folder_sql
|
||||||
|
AND t.user_id = $user_id
|
||||||
|
AND t.msg_id = p.msg_id
|
||||||
|
AND p.message_time >= $min_post_time";
|
||||||
|
$result = $db->sql_query_limit($sql, 1);
|
||||||
|
|
||||||
|
if (isset($_POST['sort']))
|
||||||
|
{
|
||||||
|
$start = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
$pm_count = ($row = $db->sql_fetchrow($result)) ? $row['pm_count'] : 0;
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
$sql_limit_time = "AND p.message_time >= $min_post_time";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ($type == 'folder')
|
||||||
|
{
|
||||||
|
$pm_count = $folder[$folder_id]['num_messages'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (in_array($folder_id, array(PRIVMSGS_INBOX, PRIVMSGS_OUTBOX, PRIVMSGS_SENTBOX)))
|
||||||
|
{
|
||||||
|
$sql = 'SELECT COUNT(t.msg_id) AS pm_count
|
||||||
|
FROM ' . PRIVMSGS_TO_TABLE . ' t, ' . PRIVMSGS_TABLE . " p
|
||||||
|
WHERE $folder_sql
|
||||||
|
AND t.user_id = $user_id
|
||||||
|
AND t.msg_id = p.msg_id";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$sql = 'SELECT pm_count
|
||||||
|
FROM ' . PRIVMSGS_FOLDER_TABLE . "
|
||||||
|
WHERE folder_id = $folder_id
|
||||||
|
AND user_id = $user_id";
|
||||||
|
}
|
||||||
|
$result = $db->sql_query_limit($sql, 1);
|
||||||
|
$pm_count = ($row = $db->sql_fetchrow($result)) ? $row['pm_count'] : 0;
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql_limit_time = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'PAGINATION' => generate_pagination("$url&mode=view_messages&action=view_folder&f=$folder_id&$u_sort_param", $pm_count, $config['topics_per_page'], $start),
|
||||||
|
'PAGE_NUMBER' => on_page($pm_count, $config['topics_per_page'], $start),
|
||||||
|
'TOTAL_MESSAGES'=> (($pm_count == 1) ? $user->lang['VIEW_PM_MESSAGE'] : sprintf($user->lang['VIEW_PM_MESSAGES'], $pm_count)),
|
||||||
|
|
||||||
|
'POST_IMG' => (!$auth->acl_get('u_sendpm')) ? $user->img('btn_locked', $post_alt) : $user->img('btn_post_pm', $post_alt),
|
||||||
|
|
||||||
|
'REPORTED_IMG' => $user->img('icon_reported', 'MESSAGE_REPORTED'),
|
||||||
|
|
||||||
|
'L_NO_MESSAGES' => (!$auth->acl_get('u_sendpm')) ? $user->lang['POST_PM_LOCKED'] : $user->lang['NO_MESSAGES'],
|
||||||
|
|
||||||
|
'S_SELECT_SORT_DIR' => $s_sort_dir,
|
||||||
|
'S_SELECT_SORT_KEY' => $s_sort_key,
|
||||||
|
'S_SELECT_SORT_DAYS' => $s_limit_days,
|
||||||
|
'S_TOPIC_ICONS' => ($config['enable_pm_icons']) ? true : false,
|
||||||
|
|
||||||
|
'U_POST_NEW_TOPIC' => ($auth->acl_get('u_sendpm')) ? "$url&mode=compose&action=post" : '',
|
||||||
|
'S_PM_ACTION' => "$url&mode=view_messages&action=view_folder&f=$folder_id")
|
||||||
|
);
|
||||||
|
|
||||||
|
// Grab all pm data
|
||||||
|
$rowset = $pm_list = array();
|
||||||
|
|
||||||
|
// If the user is trying to reach late pages, start searching from the end
|
||||||
|
$store_reverse = false;
|
||||||
|
$sql_limit = $config['topics_per_page'];
|
||||||
|
if ($start > $pm_count / 2)
|
||||||
|
{
|
||||||
|
$store_reverse = true;
|
||||||
|
|
||||||
|
if ($start + $config['topics_per_page'] > $pm_count)
|
||||||
|
{
|
||||||
|
$sql_limit = min($config['topics_per_page'], max(1, $pm_count - $start));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Select the sort order
|
||||||
|
$sql_sort_order = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'ASC' : 'DESC');
|
||||||
|
$sql_start = max(0, $pm_count - $sql_limit - $start);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Select the sort order
|
||||||
|
$sql_sort_order = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
|
||||||
|
$sql_start = $start;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = 'SELECT t.*, p.author_id, p.root_level, p.message_time, p.message_subject, p.icon_id, p.message_reported, p.to_address, p.message_attachment, p.bcc_address, u.username
|
||||||
|
FROM ' . PRIVMSGS_TO_TABLE . ' t, ' . PRIVMSGS_TABLE . ' p, ' . USERS_TABLE . " u
|
||||||
|
WHERE t.user_id = $user_id
|
||||||
|
AND p.author_id = u.user_id
|
||||||
|
AND $folder_sql
|
||||||
|
AND t.msg_id = p.msg_id
|
||||||
|
$sql_limit_time
|
||||||
|
ORDER BY $sql_sort_order";
|
||||||
|
|
||||||
|
$result = $db->sql_query_limit($sql, $sql_limit, $sql_start);
|
||||||
|
|
||||||
|
while($row = $db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
$rowset[$row['msg_id']] = $row;
|
||||||
|
$pm_list[] = $row['msg_id'];
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
$pm_list = ($store_reverse) ? array_reverse($pm_list) : $pm_list;
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'pm_count' => $pm_count,
|
||||||
|
'pm_list' => $pm_list,
|
||||||
|
'rowset' => $rowset
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
471
phpBB/includes/ucp/ucp_pm_viewmessage.php
Normal file
471
phpBB/includes/ucp/ucp_pm_viewmessage.php
Normal file
|
@ -0,0 +1,471 @@
|
||||||
|
<?php
|
||||||
|
// -------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// $Id$
|
||||||
|
//
|
||||||
|
// FILENAME : viewmessage.php
|
||||||
|
// STARTED : Mon Apr 12, 2004
|
||||||
|
// COPYRIGHT : © 2004 phpBB Group
|
||||||
|
// WWW : http://www.phpbb.com/
|
||||||
|
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
||||||
|
//
|
||||||
|
// -------------------------------------------------------------
|
||||||
|
|
||||||
|
function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
||||||
|
{
|
||||||
|
global $phpbb_root_path, $phpEx, $SID, $user, $template, $auth, $config, $db;
|
||||||
|
|
||||||
|
$user->add_lang('viewtopic');
|
||||||
|
|
||||||
|
$msg_id = (int) $msg_id;
|
||||||
|
$folder_id = (int) $folder_id;
|
||||||
|
$author_id = (int) $message_row['author_id'];
|
||||||
|
|
||||||
|
// Grab icons
|
||||||
|
$icons = array();
|
||||||
|
obtain_icons($icons);
|
||||||
|
|
||||||
|
// Instantiate BBCode if need be
|
||||||
|
if ($message_row['bbcode_bitfield'])
|
||||||
|
{
|
||||||
|
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
|
||||||
|
$bbcode = new bbcode($message_row['bbcode_bitfield']);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Assign TO/BCC Addresses to template
|
||||||
|
write_pm_addresses(array('to' => $message_row['to_address'], 'bcc' => $message_row['bcc_address']), $author_id);
|
||||||
|
|
||||||
|
$user_info = get_user_informations($author_id, $message_row);
|
||||||
|
|
||||||
|
// Parse the message and subject
|
||||||
|
$message = $message_row['message_text'];
|
||||||
|
|
||||||
|
// If the board has HTML off but the message has HTML on then we process it, else leave it alone
|
||||||
|
if (!$config['auth_html_pm'] || !$auth->acl_get('u_pm_html'))
|
||||||
|
{
|
||||||
|
if ($message_row['enable_html'] && $config['auth_bbcode_pm'] && $auth->acl_get('u_pm_bbcode'))
|
||||||
|
{
|
||||||
|
$message = preg_replace('#(<)([\/]?.*?)(>)#is', "<\\2>", $message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Second parse bbcode here
|
||||||
|
if ($message_row['bbcode_bitfield'])
|
||||||
|
{
|
||||||
|
$bbcode->bbcode_second_pass($message, $message_row['bbcode_uid'], $message_row['bbcode_bitfield']);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Always process smilies after parsing bbcodes
|
||||||
|
$message = smilie_text($message);
|
||||||
|
|
||||||
|
// Replace naughty words such as farty pants
|
||||||
|
$message_row['message_subject'] = censor_text($message_row['message_subject']);
|
||||||
|
$message = str_replace("\n", '<br />', censor_text($message));
|
||||||
|
|
||||||
|
// Editing information
|
||||||
|
if ($message_row['message_edit_count'] && $config['display_last_edited'])
|
||||||
|
{
|
||||||
|
$l_edit_time_total = ($message_row['message_edit_count'] == 1) ? $user->lang['EDITED_TIME_TOTAL'] : $user->lang['EDITED_TIMES_TOTAL'];
|
||||||
|
$l_edited_by = '<br /><br />' . sprintf($l_edit_time_total, (!$message_row['message_edit_user']) ? $message_row['username'] : $message_row['message_edit_user'], $user->format_date($message_row['message_edit_time']), $message_row['message_edit_count']);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$l_edited_by = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Pull attachment data
|
||||||
|
$display_notice = false;
|
||||||
|
$attachments = array();
|
||||||
|
|
||||||
|
if ($message_row['message_attachment'] && $config['allow_pm_attach'])
|
||||||
|
{
|
||||||
|
if ($config['auth_download_pm'] && $auth->acl_get('u_pm_download'))
|
||||||
|
{
|
||||||
|
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
|
||||||
|
|
||||||
|
$sql = 'SELECT *
|
||||||
|
FROM ' . ATTACHMENTS_TABLE . "
|
||||||
|
WHERE post_msg_id = $msg_id
|
||||||
|
AND in_message = 1
|
||||||
|
ORDER BY filetime " . ((!$config['display_order']) ? 'DESC' : 'ASC') . ', post_msg_id ASC';
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
while ($row = $db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
$attachments[] = $row;
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
// No attachments exist, but message table thinks they do so go ahead and reset attach flags
|
||||||
|
if (!sizeof($attachments))
|
||||||
|
{
|
||||||
|
$sql = 'UPDATE ' . PRIVMSGS_TABLE . "
|
||||||
|
SET message_attachment = 0
|
||||||
|
WHERE msg_id = $msg_id";
|
||||||
|
$db->sql_query($sql);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$display_notice = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Assign inline attachments
|
||||||
|
if (sizeof($attachments))
|
||||||
|
{
|
||||||
|
// preg_replace_callback does not work here because of inability to correctly assign globals (seems to be a bug in some PHP versions)
|
||||||
|
process_inline_attachments($message, $attachments, $update_count);
|
||||||
|
}
|
||||||
|
|
||||||
|
$user_info['sig'] = '';
|
||||||
|
|
||||||
|
$signature = ($message_row['enable_sig'] && $config['allow_sig_pm'] && $auth->acl_get('u_pm_sig') && $user->optionget('viewsigs')) ? $user_info['user_sig'] : '';
|
||||||
|
|
||||||
|
// End signature parsing, only if needed
|
||||||
|
if ($signature)
|
||||||
|
{
|
||||||
|
if ($user_info['user_sig_bbcode_bitfield'])
|
||||||
|
{
|
||||||
|
if (!isset($bbcode) || !$bbcode)
|
||||||
|
{
|
||||||
|
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
|
||||||
|
$bbcode = new bbcode($user_info['user_sig_bbcode_bitfield']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$bbcode->bbcode_second_pass($signature, $user_info['user_sig_bbcode_uid'], $user_info['user_sig_bbcode_bitfield']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$signature = smilie_text($signature);
|
||||||
|
$signature = str_replace("\n", '<br />', censor_text($signature));
|
||||||
|
}
|
||||||
|
|
||||||
|
$url = "{$phpbb_root_path}ucp.$phpEx$SID&i=$id";
|
||||||
|
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'AUTHOR_NAME' => ($user_info['user_colour']) ? '<span style="color:#' . $user_info['user_colour'] . '">' . $user_info['username'] . '</span>' : $user_info['username'],
|
||||||
|
'AUTHOR_RANK' => $user_info['rank_title'],
|
||||||
|
'RANK_IMAGE' => $user_info['rank_image'],
|
||||||
|
'AUTHOR_AVATAR' => (isset($user_info['avatar'])) ? $user_info['avatar'] : '',
|
||||||
|
'AUTHOR_JOINED' => $user->format_date($user_info['user_regdate'], $user->lang['DATE_FORMAT']),
|
||||||
|
'AUTHOR_POSTS' => (!empty($user_info['user_posts'])) ? $user_info['user_posts'] : '',
|
||||||
|
'AUTHOR_FROM' => (!empty($user_info['user_from'])) ? $user_info['user_from'] : '',
|
||||||
|
|
||||||
|
'ONLINE_IMG' => (!$config['load_onlinetrack']) ? '' : (($user_info['online']) ? $user->img('btn_online', $user->lang['ONLINE']) : $user->img('btn_offline', $user->lang['OFFLINE'])),
|
||||||
|
'DELETE_IMG' => $user->img('btn_delete', $user->lang['DELETE_PM']),
|
||||||
|
'IP_IMG' => $user->img('btn_ip', $user->lang['VIEW_IP']),
|
||||||
|
'REPORT_IMG' => $user->img('btn_report', $user->lang['REPORT_PM']),
|
||||||
|
'REPORTED_IMG' => $user->img('icon_reported', $user->lang['REPORTED_MESSAGE']),
|
||||||
|
'PROFILE_IMG' => $user->img('btn_profile', $user->lang['READ_PROFILE']),
|
||||||
|
'EMAIL_IMG' => $user->img('btn_email', $user->lang['SEND_EMAIL']),
|
||||||
|
'QUOTE_IMG' => $user->img('btn_quote', $user->lang['POST_QUOTE_PM']),
|
||||||
|
'REPLY_IMG' => $user->img('btn_reply_pm', $user->lang['POST_REPLY_PM']),
|
||||||
|
'EDIT_IMG' => $user->img('btn_edit', $user->lang['POST_EDIT_PM']),
|
||||||
|
'MINI_POST_IMG' => $user->img('icon_post', $user->lang['PM']),
|
||||||
|
|
||||||
|
'SENT_DATE' => $user->format_date($message_row['message_time']),
|
||||||
|
'SUBJECT' => $message_row['message_subject'],
|
||||||
|
'MESSAGE' => $message,
|
||||||
|
'SIGNATURE' => ($message_row['enable_sig']) ? $signature : '',
|
||||||
|
'EDITED_MESSAGE' => $l_edited_by,
|
||||||
|
|
||||||
|
'U_MCP_REPORT' => "{$phpbb_root_path}mcp.$phpEx$SID&mode=pm_details&p=" . $message_row['msg_id'],
|
||||||
|
'U_REPORT' => ($config['auth_report_pm'] && $auth->acl_get('u_pm_report')) ? "{$phpbb_root_path}report.$phpEx$SID&pm=" . $message_row['msg_id'] : '',
|
||||||
|
'U_IP' => ($auth->acl_get('m_') && $message_row['message_reported']) ? "{$phpbb_root_path}mcp.$phpEx?sid=" . $user->session_id . "&mode=pm_details&p=" . $message_row['msg_id'] . '#ip' : '',
|
||||||
|
'U_DELETE' => ($auth->acl_get('u_pm_delete')) ? "$url&mode=compose&action=delete&f=$folder_id&p=" . $message_row['msg_id'] : '',
|
||||||
|
'U_AUTHOR_PROFILE' => "{$phpbb_root_path}memberlist.$phpEx$SID&mode=viewprofile&u=" . $author_id,
|
||||||
|
'U_EMAIL' => $user_info['email'],
|
||||||
|
'U_QUOTE' => ($config['auth_quote_pm'] && $auth->acl_get('u_sendpm') && $author_id != $user->data['user_id']) ? "$url&mode=compose&action=quote&f=$folder_id&p=" . $message_row['msg_id'] : '',
|
||||||
|
'U_EDIT' => (($message_row['message_time'] > time() - $config['pm_edit_time'] || !$config['pm_edit_time']) && $folder_id == PRIVMSGS_OUTBOX && $auth->acl_get('u_pm_edit')) ? "$url&mode=compose&action=edit&f=$folder_id&p=" . $message_row['msg_id'] : '',
|
||||||
|
'U_POST_REPLY_PM' => ($author_id != $user->data['user_id'] && $auth->acl_get('u_sendpm')) ? "$url&mode=compose&action=reply&f=$folder_id&p=" . $message_row['msg_id'] : '',
|
||||||
|
'U_PREVIOUS_PM' => "$url&f=$folder_id&p=" . $message_row['msg_id'] . "&view=previous",
|
||||||
|
'U_NEXT_PM' => "$url&f=$folder_id&p=" . $message_row['msg_id'] . "&view=next",
|
||||||
|
|
||||||
|
'S_MESSAGE_REPORTED'=> ($message_row['message_reported'] && $auth->acl_get('m_')) ? true : false,
|
||||||
|
'S_HAS_ATTACHMENTS' => (sizeof($attachments)) ? true : false,
|
||||||
|
'S_DISPLAY_NOTICE' => $display_notice && $message_row['message_attachment'],
|
||||||
|
|
||||||
|
'U_PRINT_PM' => ($config['print_pm'] && $auth->acl_get('u_pm_printpm')) ? "$url&f=$folder_id&p=" . $message_row['msg_id'] . "&view=print" : '',
|
||||||
|
'U_EMAIL_PM' => ($config['email_pm'] && $config['email_enable'] && $auth->acl_get('u_pm_emailpm')) ? 'Email' : '',
|
||||||
|
'U_FORWARD_PM' => ($config['forward_pm'] && $auth->acl_get('u_pm_forward')) ? "$url&mode=compose&action=forward&f=$folder_id&p=" . $message_row['msg_id'] : '')
|
||||||
|
);
|
||||||
|
|
||||||
|
// Display not already displayed Attachments for this post, we already parsed them. ;)
|
||||||
|
if (sizeof($attachments))
|
||||||
|
{
|
||||||
|
foreach ($attachments as $attachment)
|
||||||
|
{
|
||||||
|
$template->assign_block_vars('attachment', array(
|
||||||
|
'DISPLAY_ATTACHMENT' => $attachment)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($_REQUEST['view'] != 'print')
|
||||||
|
{
|
||||||
|
// Message History
|
||||||
|
if (message_history($msg_id, $user->data['user_id'], $message_row, $folder))
|
||||||
|
{
|
||||||
|
$template->assign_var('S_DISPLAY_HISTORY', true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Display Message History
|
||||||
|
function message_history($msg_id, $user_id, $message_row, $folder)
|
||||||
|
{
|
||||||
|
global $db, $user, $config, $template, $phpbb_root_path, $phpEx, $SID, $auth, $bbcode;
|
||||||
|
|
||||||
|
// Get History Messages (could be newer)
|
||||||
|
$sql = 'SELECT t.*, p.*, u.*
|
||||||
|
FROM ' . PRIVMSGS_TABLE . ' p, ' . PRIVMSGS_TO_TABLE . ' t, ' . USERS_TABLE . ' u
|
||||||
|
WHERE t.msg_id = p.msg_id
|
||||||
|
AND p.author_id = u.user_id
|
||||||
|
AND t.folder_id <> ' . PRIVMSGS_NO_BOX . "
|
||||||
|
AND t.user_id = $user_id";
|
||||||
|
|
||||||
|
if (!$message_row['root_level'])
|
||||||
|
{
|
||||||
|
$sql .= " AND (p.root_level = $msg_id OR (p.root_level = 0 AND p.msg_id = $msg_id))";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$sql .= " AND (p.root_level = " . $message_row['root_level'] . ' OR p.msg_id = ' . $message_row['root_level'] . ')';
|
||||||
|
}
|
||||||
|
$sql .= ' ORDER BY p.message_time ';
|
||||||
|
$sort_dir = (!empty($user->data['user_sortby_dir'])) ? $user->data['user_sortby_dir'] : 'd';
|
||||||
|
$sql .= ($sort_dir == 'd') ? 'ASC' : 'DESC';
|
||||||
|
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
if (!($row = $db->sql_fetchrow($result)))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$rowset = array();
|
||||||
|
$bbcode_bitfield = 0;
|
||||||
|
$folder_url = "{$phpbb_root_path}ucp.$phpEx$SID&i=pm&folder=";
|
||||||
|
|
||||||
|
$title = ($sort_dir == 'd') ? $row['message_subject'] : '';
|
||||||
|
do
|
||||||
|
{
|
||||||
|
$folder_id = (int) $row['folder_id'];
|
||||||
|
|
||||||
|
$row['folder'][] = (isset($folder[$folder_id])) ? '<a href="' . $folder_url . $folder_id . '">' . $folder[$folder_id]['folder_name'] . '</a>' : $user->lang['UNKOWN_FOLDER'];
|
||||||
|
|
||||||
|
if (isset($rowset[$row['msg_id']]))
|
||||||
|
{
|
||||||
|
$rowset[$row['msg_id']]['folder'][] = (isset($folder[$folder_id])) ? '<a href="' . $folder_url . $folder_id . '">' . $folder[$folder_id]['folder_name'] . '</a>' : $user->lang['UNKOWN_FOLDER'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$rowset[$row['msg_id']] = $row;
|
||||||
|
$bbcode_bitfield |= $row['bbcode_bitfield'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while ($row = $db->sql_fetchrow($result));
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
$title = ($sort_dir == 'a') ? $row['message_subject'] : $title;
|
||||||
|
|
||||||
|
if (sizeof($rowset) == 1)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Instantiate BBCode class
|
||||||
|
if (!isset($bbcode) && $bbcode_bitfield)
|
||||||
|
{
|
||||||
|
if (!class_exists('bbcode'))
|
||||||
|
{
|
||||||
|
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
|
||||||
|
}
|
||||||
|
$bbcode = new bbcode($bbcode_bitfield);
|
||||||
|
}
|
||||||
|
|
||||||
|
$title = censor_text($title);
|
||||||
|
|
||||||
|
$i = 1;
|
||||||
|
$url = "{$phpbb_root_path}ucp.$phpEx$SID&i=pm";
|
||||||
|
$next_history_pm = $previous_history_pm = $prev_id = 0;
|
||||||
|
|
||||||
|
foreach ($rowset as $id => $row)
|
||||||
|
{
|
||||||
|
$author_id = $row['author_id'];
|
||||||
|
$author = $row['username'];
|
||||||
|
$folder_id = (int) $row['folder_id'];
|
||||||
|
|
||||||
|
$subject = $row['message_subject'];
|
||||||
|
$message = $row['message_text'];
|
||||||
|
|
||||||
|
if ($row['bbcode_bitfield'])
|
||||||
|
{
|
||||||
|
$bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$message = smilie_text($message, !$row['enable_smilies']);
|
||||||
|
|
||||||
|
$subject = censor_text($subject);
|
||||||
|
$message = censor_text($message);
|
||||||
|
|
||||||
|
if ($id == $msg_id)
|
||||||
|
{
|
||||||
|
$next_history_pm = next($rowset);
|
||||||
|
$next_history_pm = (sizeof($next_history_pm)) ? (int) $next_history_pm['msg_id'] : 0;
|
||||||
|
$previous_history_pm = $prev_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
$template->assign_block_vars('history_row', array(
|
||||||
|
'AUTHOR_NAME' => $author,
|
||||||
|
'SUBJECT' => $subject,
|
||||||
|
'SENT_DATE' => $user->format_date($row['message_time']),
|
||||||
|
'MESSAGE' => str_replace("\n", '<br />', $message),
|
||||||
|
'FOLDER' => implode(', ', $row['folder']),
|
||||||
|
|
||||||
|
'S_CURRENT_MSG' => ($row['msg_id'] == $msg_id),
|
||||||
|
|
||||||
|
'U_MSG_ID' => $row['msg_id'],
|
||||||
|
'U_VIEW_MESSAGE'=> "$url&f=$folder_id&p=" . $row['msg_id'],
|
||||||
|
'U_AUTHOR_PROFILE' => "{$phpbb_root_path}memberlist.$phpEx$SID&mode=viewprofile&u=$author_id",
|
||||||
|
'U_QUOTE' => ($config['auth_quote_pm'] && $auth->acl_get('u_sendpm') && $author_id != $user->data['user_id']) ? "$url&mode=compose&action=quote&f=" . $folder_id . "&p=" . $row['msg_id'] : '',
|
||||||
|
'U_POST_REPLY_PM' => ($author_id != $user->data['user_id'] && $auth->acl_get('u_sendpm')) ? "$url&mode=compose&action=reply&f=$folder_id&p=" . $row['msg_id'] : '',
|
||||||
|
|
||||||
|
'S_ROW_COUNT' => $i)
|
||||||
|
);
|
||||||
|
unset($rowset[$id]);
|
||||||
|
$prev_id = $id;
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'QUOTE_IMG' => $user->img('btn_quote', $user->lang['REPLY_WITH_QUOTE']),
|
||||||
|
'TITLE' => $title,
|
||||||
|
|
||||||
|
'U_VIEW_NEXT_HISTORY' => "$url&p=" . (($next_history_pm) ? $next_history_pm : $msg_id),
|
||||||
|
'U_VIEW_PREVIOUS_HISTORY' => "$url&p=" . (($previous_history_pm) ? $previous_history_pm : $msg_id))
|
||||||
|
);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get User Informations (only for message display)
|
||||||
|
function get_user_informations($user_id, $user_row)
|
||||||
|
{
|
||||||
|
global $config, $db, $auth, $user, $phpbb_root_path, $phpEx, $SID;
|
||||||
|
|
||||||
|
if (!$user_id)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($user_row))
|
||||||
|
{
|
||||||
|
$user_row = get_userdata((int) $user_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Grab ranks
|
||||||
|
$ranks = array();
|
||||||
|
obtain_ranks($ranks);
|
||||||
|
|
||||||
|
// Generate online information for user
|
||||||
|
if ($config['load_onlinetrack'])
|
||||||
|
{
|
||||||
|
$sql = 'SELECT session_user_id, MAX(session_time) as online_time, MIN(session_allow_viewonline) AS viewonline
|
||||||
|
FROM ' . SESSIONS_TABLE . "
|
||||||
|
WHERE session_user_id = $user_id
|
||||||
|
GROUP BY session_user_id";
|
||||||
|
$result = $db->sql_query_limit($sql, 1);
|
||||||
|
|
||||||
|
$update_time = $config['load_online_time'] * 60;
|
||||||
|
if ($row = $db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
$user_row['online'] = (time() - $update_time < $row['online_time'] && ($row['viewonline'] && $user_row['user_allow_viewonline'])) ? true : false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$user_row['online'] = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($user_row['user_avatar'] && $user->optionget('viewavatars'))
|
||||||
|
{
|
||||||
|
$avatar_img = '';
|
||||||
|
switch ($user_row['user_avatar_type'])
|
||||||
|
{
|
||||||
|
case AVATAR_UPLOAD:
|
||||||
|
$avatar_img = $config['avatar_path'] . '/';
|
||||||
|
break;
|
||||||
|
case AVATAR_GALLERY:
|
||||||
|
$avatar_img = $config['avatar_gallery_path'] . '/';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$avatar_img .= $user_row['user_avatar'];
|
||||||
|
|
||||||
|
$user_row['avatar'] = '<img src="' . $avatar_img . '" width="' . $user_row['user_avatar_width'] . '" height="' . $user_row['user_avatar_height'] . '" border="0" alt="" />';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($user_row['user_rank']))
|
||||||
|
{
|
||||||
|
$user_row['rank_title'] = $ranks['special'][$user_row['user_rank']]['rank_title'];
|
||||||
|
$user_row['rank_image'] = (!empty($ranks['special'][$user_row['user_rank']]['rank_image'])) ? '<img src="' . $config['ranks_path'] . '/' . $ranks['special'][$user_row['user_rank']]['rank_image'] . '" border="0" alt="' . $ranks['special'][$user_row['user_rank']]['rank_title'] . '" title="' . $ranks['special'][$user_row['user_rank']]['rank_title'] . '" /><br />' : '';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
foreach ($ranks['normal'] as $rank)
|
||||||
|
{
|
||||||
|
if ($user_row['user_posts'] >= $rank['rank_min'])
|
||||||
|
{
|
||||||
|
$user_row['rank_title'] = $rank['rank_title'];
|
||||||
|
$user_row['rank_image'] = (!empty($rank['rank_image'])) ? '<img src="' . $config['ranks_path'] . '/' . $rank['rank_image'] . '" border="0" alt="' . $rank['rank_title'] . '" title="' . $rank['rank_title'] . '" /><br />' : '';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($user_row['user_allow_viewemail']) || $auth->acl_get('a_email'))
|
||||||
|
{
|
||||||
|
$user_row['email'] = ($config['board_email_form'] && $config['email_enable']) ? "{$phpbb_root_path}memberlist.$phpEx$SID&mode=email&u=" . $user_id : 'mailto:' . $user_row['user_email'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$user_row['email'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
return $user_row;
|
||||||
|
}
|
||||||
|
|
||||||
|
function process_inline_attachments(&$message, &$attachments, &$update_count)
|
||||||
|
{
|
||||||
|
global $user, $config;
|
||||||
|
|
||||||
|
$tpl = array();
|
||||||
|
$tpl = display_attachments(0, NULL, $attachments, $update_count, false, true);
|
||||||
|
$tpl_size = sizeof($tpl);
|
||||||
|
|
||||||
|
$unset_tpl = array();
|
||||||
|
|
||||||
|
preg_match_all('#<!\-\- ia([0-9]+) \-\->(.*?)<!\-\- ia\1 \-\->#', $message, $matches);
|
||||||
|
|
||||||
|
$replace = array();
|
||||||
|
foreach ($matches[0] as $num => $capture)
|
||||||
|
{
|
||||||
|
// Flip index if we are displaying the reverse way
|
||||||
|
$index = ($config['display_order']) ? ($tpl_size-($matches[1][$num] + 1)) : $matches[1][$num];
|
||||||
|
|
||||||
|
$replace['from'][] = $matches[0][$index];
|
||||||
|
$replace['to'][] = (isset($tpl[$index])) ? $tpl[$index] : sprintf($user->lang['MISSING_INLINE_ATTACHMENT'], $matches[2][$num]);
|
||||||
|
|
||||||
|
$unset_tpl[] = $index;
|
||||||
|
}
|
||||||
|
unset($tpl, $tpl_size);
|
||||||
|
|
||||||
|
$message = str_replace($replace['from'], $replace['to'], $message);
|
||||||
|
|
||||||
|
foreach (array_unique($unset_tpl) as $index)
|
||||||
|
{
|
||||||
|
unset($attachments[$index]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
|
@ -64,6 +64,7 @@ $lang += array(
|
||||||
'AVATAR_WRONG_SIZE' => 'The avatar must be at least %1$d pixels wide, %2$d pixels high and at most %3$d pixels wide and %4$d pixels high.',
|
'AVATAR_WRONG_SIZE' => 'The avatar must be at least %1$d pixels wide, %2$d pixels high and at most %3$d pixels wide and %4$d pixels high.',
|
||||||
|
|
||||||
'BACK_TO_TOP' => 'Top',
|
'BACK_TO_TOP' => 'Top',
|
||||||
|
'BCC' => 'Bcc',
|
||||||
'BIRTHDAYS' => 'Birthdays',
|
'BIRTHDAYS' => 'Birthdays',
|
||||||
'BOARD_BAN_PERM' => 'You have been <b>permanently</b> banned from this board.<br /><br />Please contact the %2$sBoard Administrator%3$s for more information.',
|
'BOARD_BAN_PERM' => 'You have been <b>permanently</b> banned from this board.<br /><br />Please contact the %2$sBoard Administrator%3$s for more information.',
|
||||||
'BOARD_BAN_REASON' => 'Reason given for ban: <b>%s</b>',
|
'BOARD_BAN_REASON' => 'Reason given for ban: <b>%s</b>',
|
||||||
|
@ -75,6 +76,7 @@ $lang += array(
|
||||||
'BYTES' => 'Bytes',
|
'BYTES' => 'Bytes',
|
||||||
|
|
||||||
'CANCEL' => 'Cancel',
|
'CANCEL' => 'Cancel',
|
||||||
|
'CHANGE' => 'Change',
|
||||||
'CLICK_VIEW_PRIVMSG' => 'Click %sHere%s to visit your Inbox',
|
'CLICK_VIEW_PRIVMSG' => 'Click %sHere%s to visit your Inbox',
|
||||||
'CONFIRM' => 'Confirm',
|
'CONFIRM' => 'Confirm',
|
||||||
'CONGRATULATIONS' => 'Congratulations to',
|
'CONGRATULATIONS' => 'Congratulations to',
|
||||||
|
@ -288,6 +290,7 @@ $lang += array(
|
||||||
'REG_USERS_ZERO_TOTAL' => '0 Registered, ',
|
'REG_USERS_ZERO_TOTAL' => '0 Registered, ',
|
||||||
'REG_USER_ONLINE' => 'There is %d Registered user and ',
|
'REG_USER_ONLINE' => 'There is %d Registered user and ',
|
||||||
'REG_USER_TOTAL' => '%d Registered, ',
|
'REG_USER_TOTAL' => '%d Registered, ',
|
||||||
|
'REMOVE' => 'Remove',
|
||||||
'REMOVE_INSTALL' => 'Please delete, move or rename the install directory.',
|
'REMOVE_INSTALL' => 'Please delete, move or rename the install directory.',
|
||||||
'REPLIES' => 'Replies',
|
'REPLIES' => 'Replies',
|
||||||
'REPLY_WITH_QUOTE' => 'Reply with quote',
|
'REPLY_WITH_QUOTE' => 'Reply with quote',
|
||||||
|
|
|
@ -41,6 +41,7 @@ $lang += array(
|
||||||
'ADD_FRIENDS' => 'Add new friends',
|
'ADD_FRIENDS' => 'Add new friends',
|
||||||
'ADD_FRIENDS_EXPLAIN' => 'You may enter several usernames each on a different line',
|
'ADD_FRIENDS_EXPLAIN' => 'You may enter several usernames each on a different line',
|
||||||
'ADD_NEW_RULE' => 'Add new Rule',
|
'ADD_NEW_RULE' => 'Add new Rule',
|
||||||
|
'ADD_RULE' => 'Add Rule',
|
||||||
'ADD_TO' => 'Add [To]',
|
'ADD_TO' => 'Add [To]',
|
||||||
'ADMIN_EMAIL' => 'Administrators can email me information',
|
'ADMIN_EMAIL' => 'Administrators can email me information',
|
||||||
'AGREE' => 'I agree to these terms',
|
'AGREE' => 'I agree to these terms',
|
||||||
|
@ -86,6 +87,7 @@ $lang += array(
|
||||||
'CUR_PASSWORD_ERROR' => 'The current password you entered is incorrect.',
|
'CUR_PASSWORD_ERROR' => 'The current password you entered is incorrect.',
|
||||||
|
|
||||||
'DEFAULT_ACTION' => 'Default Action',
|
'DEFAULT_ACTION' => 'Default Action',
|
||||||
|
'DEFAULT_ACTION_EXPLAIN' => 'This Action will be triggered if none of the above is applicable',
|
||||||
'DEFAULT_ADD_SIG' => 'Attach my signature by default',
|
'DEFAULT_ADD_SIG' => 'Attach my signature by default',
|
||||||
'DEFAULT_BBCODE' => 'Enable BBCode by default',
|
'DEFAULT_BBCODE' => 'Enable BBCode by default',
|
||||||
'DEFAULT_HTML' => 'Enable HTML by default',
|
'DEFAULT_HTML' => 'Enable HTML by default',
|
||||||
|
@ -126,6 +128,7 @@ $lang += array(
|
||||||
'FOLDER_ADDED' => 'Folder successfully added',
|
'FOLDER_ADDED' => 'Folder successfully added',
|
||||||
'FOLDER_MESSAGE_STATUS' => '%1$d from %2$d messages stored',
|
'FOLDER_MESSAGE_STATUS' => '%1$d from %2$d messages stored',
|
||||||
'FOLDER_NAME_EXIST' => 'Folder <b>%s</b> already exist',
|
'FOLDER_NAME_EXIST' => 'Folder <b>%s</b> already exist',
|
||||||
|
'FOLDER_OPTIONS' => 'Folder Options',
|
||||||
'FOLDER_STATUS_MSG' => 'Folder is %1$d%% full (%2$d from %3$d messages stored)',
|
'FOLDER_STATUS_MSG' => 'Folder is %1$d%% full (%2$d from %3$d messages stored)',
|
||||||
'FORWARD_PM' => 'Forward PM',
|
'FORWARD_PM' => 'Forward PM',
|
||||||
'FRIEND_MESSAGE' => 'Message from friend',
|
'FRIEND_MESSAGE' => 'Message from friend',
|
||||||
|
@ -159,6 +162,7 @@ $lang += array(
|
||||||
'MESSAGE_REPORTED_MESSAGE' => 'Reported Message',
|
'MESSAGE_REPORTED_MESSAGE' => 'Reported Message',
|
||||||
'MINIMUM_KARMA' => 'Minimum User Karma',
|
'MINIMUM_KARMA' => 'Minimum User Karma',
|
||||||
'MINIMUM_KARMA_EXPLAIN' => 'Posts by users with Karma less than this will be ignored.',
|
'MINIMUM_KARMA_EXPLAIN' => 'Posts by users with Karma less than this will be ignored.',
|
||||||
|
'MOVE_TO_FOLDER' => 'Move to Folder',
|
||||||
|
|
||||||
'NEW_EMAIL_ERROR' => 'The email addresses you entered do not match.',
|
'NEW_EMAIL_ERROR' => 'The email addresses you entered do not match.',
|
||||||
'NEW_PASSWORD' => 'Password',
|
'NEW_PASSWORD' => 'Password',
|
||||||
|
|
|
@ -6,6 +6,47 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td width="20%" valign="top">
|
<td width="20%" valign="top">
|
||||||
|
|
||||||
|
<!-- IF S_SHOW_PM_BOX and S_POST_ACTION -->
|
||||||
|
<form action="{S_POST_ACTION}" method="post" name="post"{S_FORM_ENCTYPE}>
|
||||||
|
<table class="tablebg" width="100%" cellspacing="1">
|
||||||
|
<tr>
|
||||||
|
<th>{L_PM_TO}</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="row1"><b class="genmed">{L_USERNAME}:</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="row2"><input class="post" type="text" name="username" size="20" maxlength="40" value="" /> <input class="post" type="submit" name="add_to" value="{L_ADD}" /></td>
|
||||||
|
</tr>
|
||||||
|
<!-- IF S_ALLOW_MASS_PM -->
|
||||||
|
<tr>
|
||||||
|
<td class="row1"><b class="genmed">{L_USERNAMES}:</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="row2"><textarea name="username_list" rows="5" cols="22"></textarea><br />
|
||||||
|
<ul class="nav" style="margin: 0px; padding: 0px; list-style-type: none; line-height: 175%;">
|
||||||
|
<li>» <a href="{U_SEARCH_USER}" onclick="window.open('{U_SEARCH_USER}', '_phpbbsearch', 'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=740');return false">{L_FIND_USERNAME}</a></li>
|
||||||
|
</ul>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
<!-- IF S_GROUP_OPTIONS -->
|
||||||
|
<tr>
|
||||||
|
<td class="row1"><b class="genmed">{L_USERGROUPS}:</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="row2"><select name="group_list[]" multiple="true" size="5" style="width:150px">{S_GROUP_OPTIONS}</select></td>
|
||||||
|
</tr>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
<!-- IF S_ALLOW_MASS_PM -->
|
||||||
|
<tr>
|
||||||
|
<td class="row1"><div style="float:left"> <input class="post" type="submit" name="add_bcc" value="{L_ADD_BCC}" /> </div><div style="float:right"> <input class="post" type="submit" name="add_to" value="{L_ADD_TO}" /> </div></td>
|
||||||
|
</tr>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
</table>
|
||||||
|
<div style="padding: 2px;"></div>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
|
||||||
<table class="tablebg" width="100%" cellspacing="1">
|
<table class="tablebg" width="100%" cellspacing="1">
|
||||||
<tr>
|
<tr>
|
||||||
<th>{L_OPTIONS}</th>
|
<th>{L_OPTIONS}</th>
|
||||||
|
@ -31,6 +72,26 @@
|
||||||
|
|
||||||
<div style="padding: 2px;"></div>
|
<div style="padding: 2px;"></div>
|
||||||
|
|
||||||
|
<!-- IF S_SHOW_COLOUR_LEGEND -->
|
||||||
|
<table class="tablebg" width="100%" cellspacing="1" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<th colspan="2">{L_MESSAGE_COLOURS}</th>
|
||||||
|
</tr>
|
||||||
|
<!-- BEGIN pm_colour_info -->
|
||||||
|
<tr>
|
||||||
|
<!-- IF not pm_colour_info.IMG -->
|
||||||
|
<td class="row1 {pm_colour_info.CLASS}" width="5"><img src="images/spacer.gif" width="5" alt="{pm_colour_info.LANG}" border="0" /></td>
|
||||||
|
<!-- ELSE -->
|
||||||
|
<td class="row1" width="25" align="center">{pm_colour_info.IMG}</td>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
<td class="row1"><span class="genmed">{pm_colour_info.LANG}</span></td>
|
||||||
|
</tr>
|
||||||
|
<!-- END pm_colour_info -->
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div style="padding: 2px;"></div>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
|
||||||
<table class="tablebg" width="100%" cellspacing="1">
|
<table class="tablebg" width="100%" cellspacing="1">
|
||||||
<tr>
|
<tr>
|
||||||
<th>{L_FRIENDS}</th>
|
<th>{L_FRIENDS}</th>
|
||||||
|
@ -42,7 +103,11 @@
|
||||||
|
|
||||||
<ul class="nav" style="margin: 0px; padding: 0px; list-style-type: none; line-height: 175%;">
|
<ul class="nav" style="margin: 0px; padding: 0px; list-style-type: none; line-height: 175%;">
|
||||||
<!-- BEGIN friends_online -->
|
<!-- BEGIN friends_online -->
|
||||||
<li><a href="{friends_online.U_PROFILE}">{friends_online.USERNAME}</a></li>
|
<li><a href="{friends_online.U_PROFILE}">{friends_online.USERNAME}</a>
|
||||||
|
<!-- IF S_SHOW_PM_BOX -->
|
||||||
|
[ <input class="post" type="submit" name="add_to[{friends_online.USER_ID}]" value="{L_ADD}" /> ]
|
||||||
|
<!-- ENDIF -->
|
||||||
|
</li>
|
||||||
<!-- BEGINELSE -->
|
<!-- BEGINELSE -->
|
||||||
<li>{L_NO_FRIENDS_ONLINE}</li>
|
<li>{L_NO_FRIENDS_ONLINE}</li>
|
||||||
<!-- END friends_online -->
|
<!-- END friends_online -->
|
||||||
|
@ -54,7 +119,10 @@
|
||||||
|
|
||||||
<ul class="nav" style="margin: 0px; padding: 0px; list-style-type: none; line-height: 175%;">
|
<ul class="nav" style="margin: 0px; padding: 0px; list-style-type: none; line-height: 175%;">
|
||||||
<!-- BEGIN friends_offline -->
|
<!-- BEGIN friends_offline -->
|
||||||
<li><a href="{friends_online.U_PROFILE}">{friends_offline.USERNAME}</a></li>
|
<li><a href="{friends_offline.U_PROFILE}">{friends_offline.USERNAME}</a>
|
||||||
|
<!-- IF S_SHOW_PM_BOX -->
|
||||||
|
[ <input class="post" type="submit" name="add_to[{friends_offline.USER_ID}]" value="{L_ADD}" /> ]
|
||||||
|
<!-- ENDIF -->
|
||||||
<!-- BEGINELSE -->
|
<!-- BEGINELSE -->
|
||||||
<li>{L_NO_FRIENDS_OFFLINE}</li>
|
<li>{L_NO_FRIENDS_OFFLINE}</li>
|
||||||
<!-- END friends_offline -->
|
<!-- END friends_offline -->
|
||||||
|
@ -66,4 +134,4 @@
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td><img src="images/spacer.gif" width="4" alt="" /></td>
|
<td><img src="images/spacer.gif" width="4" alt="" /></td>
|
||||||
<td width="80%" valign="top"><form name="ucp" method="post" action="{S_UCP_ACTION}">
|
<td width="80%" valign="top"><!-- IF not S_PRIVMSGS --><form name="ucp" method="post" action="{S_UCP_ACTION}"><!-- ENDIF -->
|
||||||
|
|
67
phpBB/styles/subSilver/template/ucp_pm_history.html
Normal file
67
phpBB/styles/subSilver/template/ucp_pm_history.html
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
|
||||||
|
<!-- $Id$ -->
|
||||||
|
|
||||||
|
<table class="tablebg" width="100%" cellspacing="1">
|
||||||
|
<tr>
|
||||||
|
<th align="center">{L_MESSAGE_HISTORY} - {TITLE}</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="row1"><div style="overflow: auto; width: 100%; height: 300px;">
|
||||||
|
|
||||||
|
<table class="tablebg" width="100%" cellspacing="1">
|
||||||
|
<tr>
|
||||||
|
<th width="22%">{L_AUTHOR}</th>
|
||||||
|
<th>{L_MESSAGE}</th>
|
||||||
|
</tr>
|
||||||
|
<!-- BEGIN history_row -->
|
||||||
|
|
||||||
|
<!-- IF history_row.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
||||||
|
<td rowspan="2" align="left" valign="top"><a name="{history_row.U_POST_ID}"></a>
|
||||||
|
<table width="150" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td align="center" colspan="2"><b class="postauthor">{history_row.AUTHOR_NAME}</b></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td width="100%"<!-- IF history_row.S_CURRENT_MSG --> style="background-color:lightblue"<!-- ENDIF -->>
|
||||||
|
<div class="gensmall" style="float:left"><b>{L_PM_SUBJECT}:</b> {history_row.SUBJECT}</div><div class="gensmall" style="float:right"><b>{L_FOLDER}:</b> {history_row.FOLDER}</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<!-- IF history_row.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
||||||
|
<td valign="top"><table width="100%" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td valign="top"><table width="100%" cellspacing="0" cellpadding="2">
|
||||||
|
<tr>
|
||||||
|
<td><div id="message_{history_row.U_POST_ID}"><div class="postbody">{history_row.MESSAGE}</div></div></td>
|
||||||
|
</tr>
|
||||||
|
</table></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><table width="100%" cellspacing="0">
|
||||||
|
<tr valign="middle">
|
||||||
|
<td width="100%"> </td>
|
||||||
|
<td width="10" nowrap="nowrap">{history_row.MINI_POST_IMG}</td>
|
||||||
|
<td class="gensmall" nowrap="nowrap"><b>{L_SENT_AT}:</b> {history_row.SENT_DATE}</td>
|
||||||
|
</tr>
|
||||||
|
</table></td>
|
||||||
|
</tr>
|
||||||
|
</table></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<!-- IF history_row.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
||||||
|
<td class="gensmall"><a href="{history_row.U_VIEW_MESSAGE}">{L_VIEW_PM}</a></td>
|
||||||
|
<td><div class="gensmall" style="float:left"> <!-- IF history_row.U_PROFILE --><a href="{history_row.U_PROFILE}">{PROFILE_IMG}</a> <!-- ENDIF --> <!-- IF history_row.U_EMAIL --><a href="{history_row.U_EMAIL}">{EMAIL_IMG}</a> <!-- ENDIF --> </div> <div class="gensmall" style="float:right"><!-- IF history_row.U_QUOTE --><a href="{history_row.U_QUOTE}">{QUOTE_IMG}</a> <!-- ENDIF --> <!-- IF history_row.U_POST_REPLY_PM --><a href="{history_row.U_POST_REPLY_PM}">{REPLY_IMG}</a><!-- ENDIF --> </div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="spacer" colspan="2"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
|
||||||
|
</tr>
|
||||||
|
<!-- END history_row -->
|
||||||
|
</table>
|
||||||
|
</div></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br clear="all" />
|
39
phpBB/styles/subSilver/template/ucp_pm_message_footer.html
Normal file
39
phpBB/styles/subSilver/template/ucp_pm_message_footer.html
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
|
||||||
|
<!-- $Id$ -->
|
||||||
|
|
||||||
|
<table class="tablebg" width="100%" cellspacing="1" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td class="row1"><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td align="left">
|
||||||
|
<!-- IF TOTAL_MESSAGES -->
|
||||||
|
<table width="100%" cellspacing="1">
|
||||||
|
<tr>
|
||||||
|
<td class="nav" valign="middle" nowrap="nowrap"> {PAGE_NUMBER}<br /></td>
|
||||||
|
<td class="gensmall" nowrap="nowrap"> [ {TOTAL_MESSAGES} ] </td>
|
||||||
|
<td class="gensmall" width="100%" align="right" nowrap="nowrap"><b>{PAGINATION}</b></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
<!-- IF S_VIEW_MESSAGE -->
|
||||||
|
<span class="gensmall">
|
||||||
|
<!-- IF U_PRINT_PM --><a href="{U_PRINT_PM}" title="{L_PRINT_PM}">{L_PRINT_PM}</a><!-- IF U_EMAIL_PM or U_FORWARD_PM--> | <!-- ENDIF --><!-- ENDIF -->
|
||||||
|
<!-- IF U_EMAIL_PM --><a href="{U_EMAIL_PM}" title="{L_EMAIL_PM}">{L_EMAIL_PM}</a><!-- IF U_FORWARD_PM --> | <!-- ENDIF --><!-- ENDIF -->
|
||||||
|
<!-- IF U_FORWARD_PM --><a href="{U_FORWARD_PM}" title="{L_FORWARD_PM}">{L_FORWARD_PM}</a><!-- ENDIF -->
|
||||||
|
</span>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
</td>
|
||||||
|
<td align="right" nowrap="nowrap">
|
||||||
|
<!-- IF S_VIEW_MESSAGE -->
|
||||||
|
<form name="movepm" method="post" action="{S_PM_ACTION}" style="margin:0px">
|
||||||
|
<input type="hidden" name="marked_msg_id[]" value="{MSG_ID}" />
|
||||||
|
<input type="hidden" name="cur_folder_id" value="{CUR_FOLDER_ID}" />
|
||||||
|
<input type="hidden" name="p" value="{MSG_ID}" />
|
||||||
|
<!-- ENDIF -->
|
||||||
|
<!-- IF not S_UNREAD -->
|
||||||
|
<select name="dest_folder">{S_TO_FOLDER_OPTIONS}</select> <input class="btnlite" type="submit" name="move_pm" value="<!-- IF S_VIEW_MESSAGE -->Place Message into Folder<!-- ELSE -->Place Marked into Folder<!-- ENDIF -->" />
|
||||||
|
<!-- ENDIF -->
|
||||||
|
</form>
|
||||||
|
</td></tr></table></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<!-- IF not S_VIEW_MESSAGE --><div style="float:right"><b class="gensmall"><a href="javascript:marklist('viewfolder', true);">{L_MARK_ALL}</a> :: <a href="javascript:marklist('viewfolder', false);">{L_UNMARK_ALL}</a></b></div><!-- ENDIF -->
|
||||||
|
|
46
phpBB/styles/subSilver/template/ucp_pm_message_header.html
Normal file
46
phpBB/styles/subSilver/template/ucp_pm_message_header.html
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
|
||||||
|
<!-- $Id$ -->
|
||||||
|
|
||||||
|
<script language="javascript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
function marklist(form_name, status)
|
||||||
|
{
|
||||||
|
for (i = 0; i < document.forms[form_name].length; i++)
|
||||||
|
{
|
||||||
|
document.forms[form_name].elements[i].checked = status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<table width="100%" cellspacing="1">
|
||||||
|
<tr>
|
||||||
|
<td class="gensmall" nowrap="nowrap" align="left">
|
||||||
|
<!-- IF S_UNREAD --><b>{L_UNREAD_MESSAGES}</b><!-- ELSE -->{FOLDER_STATUS}<!-- ENDIF -->
|
||||||
|
<td class="gensmall" nowrap="nowrap" align="right"><!-- IF U_INBOX --><a href="{U_INBOX}">{L_PM_INBOX}</a><!-- ELSE -->{L_PM_INBOX}<!-- ENDIF --> | <!-- IF U_OUTBOX --><a href="{U_OUTBOX}">{L_PM_OUTBOX}</a><!-- ELSE -->{L_PM_OUTBOX}<!-- ENDIF --> | <!-- IF U_SENTBOX --><a href="{U_SENTBOX}">{L_PM_SENTBOX}</a><!-- ELSE -->{L_PM_SENTBOX}<!-- ENDIF --> | <a href="{U_CREATE_FOLDER}">{L_CREATE_FOLDER}</a></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<table class="tablebg" width="100%" cellspacing="1" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td class="row1"><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td align="left">
|
||||||
|
<!-- IF TOTAL_MESSAGES -->
|
||||||
|
<table width="100%" cellspacing="1">
|
||||||
|
<tr>
|
||||||
|
<td class="nav" valign="middle" nowrap="nowrap"> {PAGE_NUMBER}<br /></td>
|
||||||
|
<td class="gensmall" nowrap="nowrap"> [ {TOTAL_MESSAGES} ] </td>
|
||||||
|
<td class="gensmall" width="100%" align="right" nowrap="nowrap"><b>{PAGINATION}</b></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
<!-- IF S_VIEW_MESSAGE -->
|
||||||
|
<span class="gensmall">
|
||||||
|
<!-- IF S_DISPLAY_HISTORY --><a href="{U_VIEW_PREVIOUS_HISTORY}">{L_VIEW_PREVIOUS_HISTORY}</a> | <a href="{U_VIEW_NEXT_HISTORY}">{L_VIEW_NEXT_HISTORY}</a> | <!-- ENDIF --><a href="{U_PREVIOUS_PM}">{L_VIEW_PREVIOUS_PM}</a> | <a href="{U_NEXT_PM}">{L_VIEW_NEXT_PM}</a>
|
||||||
|
</span>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
</td><td align="right" nowrap="nowrap"><form name="choosefolder" method="post" action="{S_FOLDER_ACTION}" style="margin:0px">
|
||||||
|
<select name="f">{S_FOLDER_OPTIONS}</select> <input class="btnlite" type="submit" name="folder" value="{L_GO}" /></form>
|
||||||
|
</td></tr></table></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
170
phpBB/styles/subSilver/template/ucp_pm_options.html
Normal file
170
phpBB/styles/subSilver/template/ucp_pm_options.html
Normal file
|
@ -0,0 +1,170 @@
|
||||||
|
<!-- INCLUDE ucp_header.html -->
|
||||||
|
|
||||||
|
<!-- $Id$ -->
|
||||||
|
|
||||||
|
<!-- IF ERROR_MESSAGE or NOTIFICATION_MESSAGE -->
|
||||||
|
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
||||||
|
<tr>
|
||||||
|
<td class="row3" align="center">
|
||||||
|
<!-- IF ERROR_MESSAGE --><span class="genmed" style="color:red">{ERROR_MESSAGE}</span><!-- ENDIF -->
|
||||||
|
<!-- IF NOTIFICATION_MESSAGE --><span class="genmed" style="color:red">{NOTIFICATION_MESSAGE}</span><!-- ENDIF -->
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<div style="padding: 2px;"></div>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
|
||||||
|
<form name="ucp" method="post" action="{S_UCP_ACTION}">
|
||||||
|
|
||||||
|
<table class="tablebg" width="100%" cellspacing="1">
|
||||||
|
<tr>
|
||||||
|
<th colspan="3">{L_ADD_NEW_RULE}</th>
|
||||||
|
</tr>
|
||||||
|
<!-- IF S_CHECK_DEFINED -->
|
||||||
|
<tr>
|
||||||
|
<td class="row1" width="50" align="left" valign="top"><b class="gen">{L_IF}:</b></td>
|
||||||
|
<td class="row2" align="center" valign="top"><!-- IF S_CHECK_SELECT --><select name="check_option">{S_CHECK_OPTIONS}</select><!-- ELSE --><b class="gen">{CHECK_CURRENT}</b><input type="hidden" name="check_option" value="{CHECK_OPTION}" /><!-- ENDIF --></td>
|
||||||
|
<td class="row1" width="50" align="right" valign="top"><!-- IF S_CHECK_SELECT --><input type="submit" name="next" value="{L_NEXT}" class="btnlite" /><!-- ELSE --> <!-- ENDIF --></td>
|
||||||
|
</tr>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
<!-- IF S_RULE_DEFINED -->
|
||||||
|
<tr>
|
||||||
|
<td class="row1" width="50" align="left" valign="top"><!-- IF S_RULE_SELECT --><input type="submit" name="back[rule]" value="{L_PREVIOUS}" class="btnlite" /><!-- ELSE --> <!-- ENDIF --></td>
|
||||||
|
<td class="row2" align="center" valign="top"><!-- IF S_RULE_SELECT --><select name="rule_option">{S_RULE_OPTIONS}</select><!-- ELSE --><b class="gen">{RULE_CURRENT}</b><input type="hidden" name="rule_option" value="{RULE_OPTION}" /><!-- ENDIF --></td>
|
||||||
|
<td class="row1" width="50" align="right" valign="top"><!-- IF S_RULE_SELECT --><input type="submit" name="next" value="{L_NEXT}" class="btnlite" /><!-- ELSE --> <!-- ENDIF --></td>
|
||||||
|
</tr>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
|
||||||
|
<!-- IF S_COND_DEFINED -->
|
||||||
|
<!-- IF S_COND_SELECT or COND_CURRENT -->
|
||||||
|
<tr>
|
||||||
|
<td class="row1" width="50" align="left" valign="top"><!-- IF S_COND_SELECT --><input type="submit" name="back[cond]" value="{L_PREVIOUS}" class="btnlite" /><!-- ELSE --> <!-- ENDIF --></td>
|
||||||
|
<td class="row2" align="center" valign="top">
|
||||||
|
<!-- IF S_COND_SELECT -->
|
||||||
|
<!-- IF S_TEXT_CONDITION -->
|
||||||
|
<input type="text" name="rule_string" value="{CURRENT_STRING}" size="30" maxlength="250" class="post" />
|
||||||
|
<!-- ELSEIF S_USER_CONDITION -->
|
||||||
|
<input type="text" class="post" name="rule_string" value="{CURRENT_STRING}" maxlength="50" size="20" /> <span class="gensmall">[ <a href="{U_FIND_USERNAME}" onclick="window.open('{U_FIND_USERNAME}', '_phpbbsearch', 'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=740');return false;">{L_FIND_USERNAME}</a> ]</span>
|
||||||
|
<!-- ELSEIF S_GROUP_CONDITION -->
|
||||||
|
SELECT GROUP
|
||||||
|
<!-- ENDIF -->
|
||||||
|
<!-- ELSE -->
|
||||||
|
<b class="gen">{COND_CURRENT}</b>
|
||||||
|
<input type="hidden" name="rule_string" value="{CURRENT_STRING}" /><input type="hidden" name="rule_user_id" value="{CURRENT_USER_ID}" /><input type="hidden" name="rule_group_id" value="{CURRENT_GROUP_ID}" />
|
||||||
|
<!-- ENDIF -->
|
||||||
|
</td>
|
||||||
|
<td class="row1" width="50" align="right" valign="top"><!-- IF S_COND_SELECT --><input type="submit" name="next" value="{L_NEXT}" class="btnlite" /><!-- ELSE --> <!-- ENDIF --></td>
|
||||||
|
</tr>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
<input type="hidden" name="cond_option" value="{COND_OPTION}" />
|
||||||
|
<!-- ENDIF -->
|
||||||
|
<!-- IF NONE_CONDITION --><input type="hidden" name="cond_option" value="none" /><!-- ENDIF -->
|
||||||
|
|
||||||
|
<!-- IF S_ACTION_DEFINED -->
|
||||||
|
<tr>
|
||||||
|
<td class="row1" width="50" align="left" valign="top"><!-- IF S_ACTION_SELECT --><input type="submit" name="back[action]" value="{L_PREVIOUS}" class="btnlite" /><!-- ELSE --> <!-- ENDIF --></td>
|
||||||
|
<td class="row2" align="center" valign="top"><!-- IF S_ACTION_SELECT --><select name="action_option">{S_ACTION_OPTIONS}</select><!-- ELSE --><b class="gen">{ACTION_CURRENT}</b><input type="hidden" name="action_option" value="{ACTION_OPTION}" /><!-- ENDIF --></td>
|
||||||
|
<td class="row1" width="50" align="right" valign="top"><!-- IF S_ACTION_SELECT --><input type="submit" name="add_rule" value="{L_ADD_RULE}" class="btnlite" /><!-- ELSE --> <!-- ENDIF --></td>
|
||||||
|
</tr>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div style="padding: 2px;"></div>
|
||||||
|
|
||||||
|
<table class="tablebg" width="100%" cellspacing="1">
|
||||||
|
<tr>
|
||||||
|
<th colspan="6">{L_DEFINED_RULES}</th>
|
||||||
|
</tr>
|
||||||
|
<!-- BEGIN rule -->
|
||||||
|
<tr>
|
||||||
|
<td class="row1" width="25" align="center"><span class="gen">{rule.COUNT}</span></td>
|
||||||
|
<td class="row2" width="120"><span class="gen">{rule.CHECK}</span></td>
|
||||||
|
<td class="row1" width="120"><span class="gen">{rule.RULE}</span></td>
|
||||||
|
<td class="row2" width="120"><span class="gen"><!-- IF rule.STRING -->{rule.STRING}<!-- ENDIF --></span></td>
|
||||||
|
<td class="row1"><span class="gen">{rule.ACTION}<!-- IF rule.FOLDER --> -> {rule.FOLDER}<!-- ENDIF --></span></td>
|
||||||
|
<td class="row2" width="25"><input type="submit" name="delete_rule[{rule.RULE_ID}]" value="{L_DELETE_RULE}" class="btnlite" /></td>
|
||||||
|
</tr>
|
||||||
|
<!-- BEGINELSE -->
|
||||||
|
<tr>
|
||||||
|
<td colspan="6" class="row3" align="center"><span class="gen">{L_NO_RULES_DEFINED}</span></td>
|
||||||
|
</tr>
|
||||||
|
<!-- END rule -->
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div style="padding: 2px;"></div>
|
||||||
|
|
||||||
|
<table class="tablebg" width="100%" cellspacing="1">
|
||||||
|
<tr>
|
||||||
|
<th colspan="2">{L_ADD_FOLDER}</th>
|
||||||
|
</tr>
|
||||||
|
<!-- IF S_MAX_FOLDER_REACHED -->
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">{L_MAX_FOLDER_REACHED}</td>
|
||||||
|
</tr>
|
||||||
|
<!-- ELSE -->
|
||||||
|
<tr>
|
||||||
|
<td class="row1" width="200"><b class="gen">{L_ADD_FOLDER}: </b></td>
|
||||||
|
<td class="row1"><input type="text" class="post" name="foldername" size="30" maxlength="30" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="row1" align="right" colspan="2"><input class="btnlite" style="width:150px" type="submit" name="addfolder" value="{L_ADD}" /></td>
|
||||||
|
</tr>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div style="padding: 2px;"></div>
|
||||||
|
|
||||||
|
<!-- IF S_FOLDER_OPTIONS -->
|
||||||
|
<table class="tablebg" width="100%" cellspacing="1">
|
||||||
|
<tr>
|
||||||
|
<th colspan="3">{L_REMOVE_FOLDER}</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="row1" width="200"><b class="gen">{L_REMOVE_FOLDER}: </b></td>
|
||||||
|
<td class="row1"><select name="removefolder">{S_FOLDER_OPTIONS}</select></td>
|
||||||
|
<td class="row1"><b class="genmed">{L_AND}</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="row2" width="200"> </td>
|
||||||
|
<td class="row2" colspan="2"><input type="radio" name="remove_action" value="1" checked="checked" /> <span class="genmed">Move messages from removed folder to </span> <select name="move_to">{S_TO_FOLDER_OPTIONS}</select></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="row2" width="200"> </td>
|
||||||
|
<td class="row2" colspan="2"><input type="radio" name="remove_action" value="2" /> <span class="genmed">Delete all messages within removed folder</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="row2" width="200"> </td>
|
||||||
|
<td class="row2" colspan="2" align="right"><input class="btnlite" style="width:150px" type="submit" name="remove" value="{L_REMOVE}" /></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div style="padding: 2px;"></div>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
|
||||||
|
<table class="tablebg" width="100%" cellspacing="1">
|
||||||
|
<tr>
|
||||||
|
<th colspan="2">{L_FOLDER_OPTIONS}</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="row1" width="200"><b class="genmed">{L_IF_FOLDER_FULL}: </b></span></td>
|
||||||
|
<td class="row1"><input type="radio" name="full_action" value="1"{S_DELETE_CHECKED} /> <span class="genmed">{L_DELETE_OLDEST_MESSAGES}</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="row1" width="200"> </td>
|
||||||
|
<td class="row1"><input type="radio" name="full_action" value="2"{S_MOVE_CHECKED} /> <span class="genmed">{L_MOVE_TO_FOLDER}: </span><select name="full_move_to">{S_FULL_FOLDER_OPTIONS}</select></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="row1" width="200"> </td>
|
||||||
|
<td class="row1"><input type="radio" name="full_action" value="3"{S_HOLD_CHECKED} /> <span class="genmed">{L_HOLD_NEW_MESSAGES}</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="row2" width="200"><b class="genmed">{L_DEFAULT_ACTION}: </b><br /><span class="gensmall">{L_DEFAULT_ACTION_EXPLAIN}</span></td>
|
||||||
|
<td class="row2"><span class="genmed">{DEFAULT_ACTION}</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="row1" colspan="2" align="right"><input class="btnlite" style="width:150px" type="submit" name="fullfolder" value="{L_CHANGE}" /></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<!-- INCLUDE ucp_footer.html -->
|
83
phpBB/styles/subSilver/template/ucp_pm_viewfolder.html
Normal file
83
phpBB/styles/subSilver/template/ucp_pm_viewfolder.html
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
<!-- INCLUDE ucp_header.html -->
|
||||||
|
|
||||||
|
<!-- $Id$ -->
|
||||||
|
|
||||||
|
<div id="pagecontent">
|
||||||
|
|
||||||
|
<!-- INCLUDE ucp_pm_message_header.html -->
|
||||||
|
<div style="padding: 2px;"></div>
|
||||||
|
|
||||||
|
<!-- IF S_PM_ICONS and S_UNREAD -->
|
||||||
|
<!-- DEFINE $COLSPAN = 7 -->
|
||||||
|
<!-- ELSEIF not S_PM_ICONS and not S_UNREAD -->
|
||||||
|
<!-- DEFINE $COLSPAN = 5 -->
|
||||||
|
<!-- ELSE -->
|
||||||
|
<!-- DEFINE $COLSPAN = 6 -->
|
||||||
|
<!-- ENDIF -->
|
||||||
|
|
||||||
|
<form name="viewfolder" method="post" action="{S_PM_ACTION}" style="margin:0px">
|
||||||
|
|
||||||
|
<table class="tablebg" width="100%" cellspacing="1" cellpadding="0" border="0">
|
||||||
|
<!-- IF NUM_NOT_MOVED -->
|
||||||
|
<tr>
|
||||||
|
<td class="row3" colspan="{$COLSPAN}" align="center"><span class="gen">{NOT_MOVED_MESSAGES}<br />{RELEASE_MESSAGE_INFO}</span></td>
|
||||||
|
</tr>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
<tr>
|
||||||
|
<th colspan="<!-- IF S_PM_ICONS -->3<!-- ELSE -->2<!-- ENDIF -->"> {L_SUBJECT} </th>
|
||||||
|
<!-- IF S_UNREAD -->
|
||||||
|
<th> <!-- IF S_SHOW_RECIPIENTS -->{L_RECIPIENTS}<!-- ELSE -->{L_AUTHOR}<!-- ENDIF --> </th>
|
||||||
|
<th> {L_FOLDER} </th>
|
||||||
|
<!-- ELSE -->
|
||||||
|
<th> <!-- IF S_SHOW_RECIPIENTS -->{L_RECIPIENTS}<!-- ELSE -->{L_AUTHOR}<!-- ENDIF --> </th>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
<th> {L_SENT_AT} </th>
|
||||||
|
<th> {L_MARK} </th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<!-- BEGIN messagerow -->
|
||||||
|
<tr>
|
||||||
|
<td class="row1" width="25" align="center" nowrap="nowrap">{messagerow.FOLDER_IMG}</td>
|
||||||
|
<!-- IF S_PM_ICONS -->
|
||||||
|
<td class="row1" width="25" align="center">{messagerow.PM_ICON_IMG}</td>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
<td class="row1">
|
||||||
|
<!-- IF messagerow.S_PM_REPORTED -->
|
||||||
|
<a href="{messagerow.U_MCP_REPORT}">{REPORTED_IMG}</a>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
<!-- IF not messagerow.PM_IMG and messagerow.PM_CLASS -->
|
||||||
|
<span class="{messagerow.PM_CLASS}"><img src="images/spacer.gif" width="10" height="10" alt="" border="0" /></span>
|
||||||
|
<!-- ELSEIF messagerow.PM_IMG -->
|
||||||
|
{messagerow.PM_IMG}
|
||||||
|
<!-- ENDIF -->
|
||||||
|
<p class="topictitle">{messagerow.ATTACH_ICON_IMG} <a href="{messagerow.U_VIEW_PM}">{messagerow.SUBJECT}</a></p></td>
|
||||||
|
<td class="row1" width="100" align="center"><p class="topicauthor"><!-- IF S_SHOW_RECIPIENTS -->{messagerow.RECIPIENTS}<!-- ELSE -->{messagerow.MESSAGE_AUTHOR}<!-- ENDIF --></p></td>
|
||||||
|
<!-- IF S_UNREAD -->
|
||||||
|
<td class="row1" width="100" align="center"><p class="topicauthor"><!-- IF messagerow.FOLDER --><a href="{messagerow.U_FOLDER}">{messagerow.FOLDER}</a><!-- ELSE -->{L_UNKNOWN_FOLDER}<!-- ENDIF --></p></td>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
<td class="row1" width="120" align="center"><p class="topicdetails">{messagerow.SENT_TIME}</p></td>
|
||||||
|
<td class="row1" width="20" align="center"><p class="topicdetails"><input type="checkbox" name="marked_msg_id[]" value="{messagerow.MESSAGE_ID}" /></p></td>
|
||||||
|
</tr>
|
||||||
|
<!-- BEGINELSE -->
|
||||||
|
<tr>
|
||||||
|
<td class="row1" colspan="{$COLSPAN}" height="30" align="center" valign="middle"><span class="gen">{L_NO_MESSAGES}</span></td>
|
||||||
|
</tr>
|
||||||
|
<!-- END messagerow -->
|
||||||
|
|
||||||
|
<input type="hidden" name="cur_folder_id" value="{CUR_FOLDER_ID}" />
|
||||||
|
</table>
|
||||||
|
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
||||||
|
<tr>
|
||||||
|
<td class="cat" align="left"><span class="gensmall">{L_DISPLAY_MESSAGES}:</span> {S_SELECT_SORT_DAYS} <span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} <input class="btnlite" type="submit" name="sort" value="{L_GO}" /></td>
|
||||||
|
<td class="cat" align="right"><select name="mark_option">{S_MARK_OPTIONS}</select> <input class="btnlite" type="submit" name="submit_mark" value="{L_GO}" /> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div style="padding: 2px;"></div>
|
||||||
|
<!-- INCLUDE ucp_pm_message_footer.html -->
|
||||||
|
|
||||||
|
<br clear="all" />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- INCLUDE ucp_footer.html -->
|
182
phpBB/styles/subSilver/template/ucp_pm_viewmessage.html
Normal file
182
phpBB/styles/subSilver/template/ucp_pm_viewmessage.html
Normal file
|
@ -0,0 +1,182 @@
|
||||||
|
<!-- INCLUDE ucp_header.html -->
|
||||||
|
|
||||||
|
<!-- $Id$ -->
|
||||||
|
|
||||||
|
<div id="pagecontent">
|
||||||
|
|
||||||
|
<!-- INCLUDE ucp_pm_message_header.html -->
|
||||||
|
<div style="padding: 2px;"></div>
|
||||||
|
|
||||||
|
<table class="tablebg" width="100%" cellspacing="1" cellpadding="4">
|
||||||
|
|
||||||
|
<tr class="row1">
|
||||||
|
<td class="genmed" nowrap="nowrap" width="150"><b>{L_PM_SUBJECT}:</b></td>
|
||||||
|
<td class="gen">{SUBJECT}</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr class="row1">
|
||||||
|
<td class="genmed" nowrap="nowrap" width="150"><b>{L_PM_FROM}:</b></td>
|
||||||
|
<td class="gen"><a href="{U_AUTHOR_PROFILE}">{AUTHOR_NAME}</a></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr class="row1">
|
||||||
|
<td class="genmed" nowrap="nowrap" width="150"><b>{L_SENT_AT}:</b></td>
|
||||||
|
<td class="gen">{SENT_DATE}</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<!-- IF S_TO_RECIPIENT -->
|
||||||
|
<tr class="row1">
|
||||||
|
<td class="genmed" nowrap="nowrap" width="150"><b>{L_TO}:</b></td>
|
||||||
|
<td class="gen">
|
||||||
|
<!-- BEGIN to_recipient -->
|
||||||
|
<a href="{to_recipient.U_VIEW}"><!-- IF to_recipient.COLOUR --><span style="color:#{to_recipient.COLOUR}"><!-- ELSE --><span<!-- IF to_recipient.IS_GROUP --> class="blue"<!-- ENDIF -->><!-- ENDIF -->{to_recipient.NAME}</span></a>
|
||||||
|
<!-- END to_recipient -->
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
|
||||||
|
<!-- IF S_BCC_RECIPIENT -->
|
||||||
|
<tr class="row1">
|
||||||
|
<td class="genmed" nowrap="nowrap" width="150"><b>{L_BCC}:</b></td>
|
||||||
|
<td class="gen">
|
||||||
|
<!-- BEGIN bcc_recipient -->
|
||||||
|
<a href="{bcc_recipient.U_VIEW}"><!-- IF bcc_recipient.COLOUR --><span style="color:#{bcc_recipient.COLOUR}"><!-- ELSE --><span<!-- IF bcc_recipient.IS_GROUP --> class="blue"<!-- ENDIF -->><!-- ENDIF -->{bcc_recipient.NAME}</span></a>
|
||||||
|
<!-- END bcc_recipient -->
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div style="padding: 2px;"></div>
|
||||||
|
|
||||||
|
<table class="tablebg" width="100%" cellspacing="1" cellpadding="0">
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th width="150" nowrap="nowrap">{L_AUTHOR}</th>
|
||||||
|
<th nowrap="nowrap">{L_MESSAGE}</th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="spacer" colspan="2" height="1"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr class="row1">
|
||||||
|
<td valign="top">
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
|
||||||
|
<b class="postauthor">{AUTHOR_NAME}</b><br /><br />
|
||||||
|
|
||||||
|
<table cellspacing="4" align="center">
|
||||||
|
<!-- IF ONLINE_IMG -->
|
||||||
|
<tr>
|
||||||
|
<td>{ONLINE_IMG}</td>
|
||||||
|
</tr>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
<!-- IF AUTHOR_RANK -->
|
||||||
|
<tr>
|
||||||
|
<td class="postdetails">{AUTHOR_RANK}</td>
|
||||||
|
</tr>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
<!-- IF RANK_IMAGE -->
|
||||||
|
<tr>
|
||||||
|
<td>{RANK_IMAGE}</td>
|
||||||
|
</tr>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
<!-- IF AUTHOR_AVATAR -->
|
||||||
|
<tr>
|
||||||
|
<td>{AUTHOR_AVATAR}</td>
|
||||||
|
</tr>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<span class="postdetails">
|
||||||
|
<!-- IF AUTHOR_POSTS --><br /><b>{L_JOINED}:</b> {AUTHOR_JOINED}<!-- ENDIF -->
|
||||||
|
<!-- IF AUTHOR_POSTS --><br /><b>{L_POSTS}:</b> {AUTHOR_POSTS}<!-- ENDIF -->
|
||||||
|
<!-- IF AUTHOR_FROM --><br /><b>{L_LOCATION}:</b> {AUTHOR_FROM}<!-- ENDIF -->
|
||||||
|
</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td valign="top"><table width="100%" cellspacing="5">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<!-- IF S_MESSAGE_REPORTED -->
|
||||||
|
<table width="100%" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="gensmall"><b class="postreported">» <a class="postreported" href="{U_MCP_REPORT}">{L_MESSAGE_REPORTED}</a></b></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br clear="all" />
|
||||||
|
<!-- ENDIF -->
|
||||||
|
|
||||||
|
<div class="postbody">{MESSAGE}</div>
|
||||||
|
|
||||||
|
<!-- IF S_HAS_ATTACHMENTS -->
|
||||||
|
<br clear="all" /><br />
|
||||||
|
|
||||||
|
<table class="tablebg" width="100%" cellspacing="1">
|
||||||
|
<tr>
|
||||||
|
<td class="row3"><b class="genmed">{L_ATTACHMENTS}: </b></td>
|
||||||
|
</tr>
|
||||||
|
<!-- BEGIN attachment -->
|
||||||
|
<tr>
|
||||||
|
<td class="row2">{attachment.DISPLAY_ATTACHMENT}</td>
|
||||||
|
</tr>
|
||||||
|
<!-- END attachment -->
|
||||||
|
</table>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
|
||||||
|
<!-- IF S_DISPLAY_NOTICE -->
|
||||||
|
<span class="gensmall" style="color:red;"><br /><br />{L_DOWNLOAD_NOTICE}</span>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
<!-- IF SIGNATURE -->
|
||||||
|
<span class="postbody"><br />_________________<br />{SIGNATURE}</span>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
<!-- IF EDITED_MESSAGE -->
|
||||||
|
<span class="gensmall">{EDITED_MESSAGE}</span>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
|
||||||
|
<!-- IF not S_HAS_ATTACHMENTS --><br clear="all" /><br /><!-- ENDIF -->
|
||||||
|
|
||||||
|
<table width="100%" cellspacing="0">
|
||||||
|
<tr valign="middle">
|
||||||
|
<td class="gensmall" align="right"><!-- IF U_REPORT --><a href="{U_REPORT}">{REPORT_IMG}</a> <!-- ENDIF --> <!-- IF U_IP --><a href="{U_IP}">{IP_IMG}</a> <!-- ENDIF --> <!-- IF U_DELETE --><a href="{U_DELETE}">{DELETE_IMG}</a> <!-- ENDIF --></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr class="row1">
|
||||||
|
<td></td>
|
||||||
|
<td><div class="gensmall" style="float:left"> <!-- IF U_AUTHOR_PROFILE --><a href="{U_AUTHOR_PROFILE}">{PROFILE_IMG}</a> <!-- ENDIF --> <!-- IF U_EMAIL --><a href="{U_EMAIL}">{EMAIL_IMG}</a> <!-- ENDIF --> </div> <div class="gensmall" style="float:right"><!-- IF U_QUOTE --><a href="{U_QUOTE}">{QUOTE_IMG}</a> <!-- ENDIF --> <!-- IF U_POST_REPLY_PM --><a href="{U_POST_REPLY_PM}">{REPLY_IMG}</a><!-- ENDIF --> <!-- IF U_EDIT --><a href="{U_EDIT}">{EDIT_IMG}</a> <!-- ENDIF --> </div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="spacer" colspan="2" height="1"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<table width="100%" cellspacing="1">
|
||||||
|
<tr>
|
||||||
|
<td align="left" valign="middle" nowrap="nowrap"><a href="{U_POST_REPLY_PM}">{REPLY_IMG}</a></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
//-->
|
||||||
|
|
||||||
|
<div style="padding: 2px;"></div>
|
||||||
|
<!-- INCLUDE ucp_pm_message_footer.html -->
|
||||||
|
|
||||||
|
<br clear="all" />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- IF S_DISPLAY_HISTORY --><!-- INCLUDE ucp_pm_history.html --><!-- ENDIF -->
|
||||||
|
|
||||||
|
<!-- INCLUDE ucp_footer.html -->
|
127
phpBB/styles/subSilver/template/ucp_pm_viewmessage_print.html
Normal file
127
phpBB/styles/subSilver/template/ucp_pm_viewmessage_print.html
Normal file
|
@ -0,0 +1,127 @@
|
||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<html dir="{S_CONTENT_DIRECTION}">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}">
|
||||||
|
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||||
|
<title>{SITENAME} :: {PAGE_TITLE}</title>
|
||||||
|
<style type="text/css">
|
||||||
|
<!--
|
||||||
|
body {
|
||||||
|
font-family: Verdana,serif;
|
||||||
|
font-size: 10pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
font-family: Verdana,serif;
|
||||||
|
font-size: 10pt;
|
||||||
|
line-height: 150%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.code, .quote {
|
||||||
|
font-size: smaller;
|
||||||
|
border: black solid 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.forum {
|
||||||
|
font-family: Arial,Helvetica,sans-serif;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 18pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.topic {
|
||||||
|
font-family: Arial,Helvetica,sans-serif;
|
||||||
|
font-size: 14pt;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gensmall {
|
||||||
|
font-size: 8pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
color: #888888;
|
||||||
|
height: 3px;
|
||||||
|
border-style: solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr.sep {
|
||||||
|
color: #AAAAAA;
|
||||||
|
height: 1px;
|
||||||
|
border-style: dashed;
|
||||||
|
}
|
||||||
|
-->
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<table width="85%" cellspacing="3" cellpadding="0" border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="center"><span class="Forum">{SITENAME}</span><br /><span class="gensmall">{L_PRIVATE_MESSAGING}</a></span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"><br /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><span class="Topic">{SUBJECT}</span><br /></td>
|
||||||
|
<td align="right" valign="bottom"><span class="gensmall">{PAGE_NUMBER}</span></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<hr width="85%" />
|
||||||
|
|
||||||
|
<table width="85%" cellspacing="3" cellpadding="0" border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td width="10%" nowrap="nowrap">{L_PM_FROM}: </td>
|
||||||
|
<td><b>{AUTHOR_NAME}</b> [ {SENT_DATE} ]</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<!-- IF S_TO_RECIPIENT -->
|
||||||
|
<tr>
|
||||||
|
<td width="10%" nowrap="nowrap">{L_TO}:</td>
|
||||||
|
<td>
|
||||||
|
<!-- BEGIN to_recipient -->
|
||||||
|
<!-- IF to_recipient.COLOUR --><span style="color:#{to_recipient.COLOUR}"><!-- ELSE --><span<!-- IF to_recipient.IS_GROUP --> class="blue"<!-- ENDIF -->><!-- ENDIF -->{to_recipient.NAME}</span>
|
||||||
|
<!-- END to_recipient -->
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
|
||||||
|
<!-- IF S_BCC_RECIPIENT -->
|
||||||
|
<tr>
|
||||||
|
<td width="10%" nowrap="nowrap">{L_BCC}:</td>
|
||||||
|
<td>
|
||||||
|
<!-- BEGIN bcc_recipient -->
|
||||||
|
<!-- IF bcc_recipient.COLOUR --><span style="color:#{bcc_recipient.COLOUR}"><!-- ELSE --><span<!-- IF bcc_recipient.IS_GROUP --> class="blue"<!-- ENDIF -->><!-- ENDIF -->{bcc_recipient.NAME}</span>
|
||||||
|
<!-- END bcc_recipient -->
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"><hr class="sep" />{MESSAGE}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<hr width="85%" />
|
||||||
|
<!--
|
||||||
|
We request you retain the full copyright notice below including the link to www.phpbb.com.
|
||||||
|
This not only gives respect to the large amount of time given freely by the developers
|
||||||
|
but also helps build interest, traffic and use of phpBB2. If you (honestly) cannot retain
|
||||||
|
the full copyright we ask you at least leave in place the "Powered by phpBB {PHPBB_VERSION}"
|
||||||
|
line, with phpBB linked to www.phpbb.com. If you refuse to include even this then support on
|
||||||
|
our forums may be affected.
|
||||||
|
|
||||||
|
The phpBB Group : 2002
|
||||||
|
// -->
|
||||||
|
<table width="85%" cellspacing="3" cellpadding="0" border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td><span class="gensmall">{PAGE_NUMBER}</span></td>
|
||||||
|
<td align="right"><span class="gensmall">{S_TIMEZONE}</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="center"><span class="gensmall">Powered by phpBB {PHPBB_VERSION} © 2002 phpBB Group<br />http://www.phpbb.com/</span></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Add table
Reference in a new issue