Zeile 12 | Zeile 12 |
---|
define("IGNORE_CLEAN_VARS", "sid"); define('THIS_SCRIPT', 'private.php');
|
define("IGNORE_CLEAN_VARS", "sid"); define('THIS_SCRIPT', 'private.php');
|
$templatelist = "private_send,private_send_buddyselect,private_read,private_tracking,private_tracking_readmessage,private_tracking_unreadmessage,private_orderarrow,usercp_nav_attachments,usercp_nav_messenger_compose,private_tracking_readmessage_stop"; $templatelist .= ",private_folders,private_folders_folder,private_folders_folder_unremovable,private,usercp_nav,private_empty_folder,private_empty,private_archive_txt,private_archive_csv,private_archive_html,private_tracking_unreadmessage_stop"; $templatelist .= ",usercp_nav_messenger,usercp_nav_changename,usercp_nav_profile,usercp_nav_misc,multipage,multipage_end,multipage_jump_page,multipage_nextpage,multipage_page,multipage_page_current,multipage_page_link_current,multipage_prevpage,multipage_start,usercp_nav_editsignature,posticons_icon"; $templatelist .= ",private_messagebit,codebuttons,smilieinsert,smilieinsert_getmore,smilieinsert_smilie,smilieinsert_smilie_empty,posticons,private_send_autocomplete,private_messagebit_denyreceipt,private_read_to,postbit_online,postbit_warninglevel_formatted,postbit_iplogged_hiden";
| $templatelist = "private_send,private_send_buddyselect,private_tracking,private_tracking_readmessage,private_tracking_unreadmessage,usercp_nav_attachments,usercp_nav_messenger_compose,private_tracking_readmessage_stop"; $templatelist .= ",private_folders,private_folders_folder,private_folders_folder_unremovable,private,usercp_nav,private_empty_folder,private_archive_txt,private_archive_csv,private_archive_html,private_tracking_unreadmessage_stop"; $templatelist .= ",usercp_nav_messenger,usercp_nav_changename,multipage,multipage_end,multipage_jump_page,multipage_nextpage,multipage_page,multipage_page_current,multipage_page_link_current,multipage_prevpage,multipage_start"; $templatelist .= ",private_messagebit,codebuttons,posticons,private_send_autocomplete,private_messagebit_denyreceipt,postbit_warninglevel_formatted,private_emptyexportlink,postbit_purgespammer,postbit_gotopost,private_read";
|
$templatelist .= ",postbit_delete_pm,postbit,private_tracking_nomessage,private_nomessages,postbit_author_guest,private_multiple_recipients_user,private_multiple_recipients_bcc,private_multiple_recipients,usercp_nav_messenger_folder";
|
$templatelist .= ",postbit_delete_pm,postbit,private_tracking_nomessage,private_nomessages,postbit_author_guest,private_multiple_recipients_user,private_multiple_recipients_bcc,private_multiple_recipients,usercp_nav_messenger_folder";
|
$templatelist .= ",private_search_messagebit,private_search_results_nomessages,private_search_results,private_advanced_search,previewpost,private_send_tracking,private_send_signature,private_read_bcc,private_composelink,postbit_purgespammer"; $templatelist .= ",private_archive,private_quickreply,private_pmspace,private_limitwarning,postbit_groupimage,postbit_offline,postbit_www,postbit_replyall_pm,postbit_signature,postbit_classic,postbit_gotopost,postbit_userstar,postbit_reputation_formatted_link,postbit_icon"; $templatelist .= ",private_archive_folders_folder,private_archive_folders,postbit_warninglevel,postbit_author_user,postbit_reply_pm,postbit_forward_pm,private_messagebit_icon,private_jump_folders_folder,private_advanced_search_folders"; $templatelist .= ",private_jump_folders,postbit_avatar,postbit_warn,postbit_rep_button,postbit_email,postbit_reputation,private_move,private_read_action,postbit_away,postbit_pm,usercp_nav_messenger_tracking,postbit_find,private_emptyexportlink";
| $templatelist .= ",private_search_messagebit,private_search_results_nomessages,private_search_results,private_advanced_search,previewpost,private_send_tracking,private_send_signature,private_read_bcc,private_composelink"; $templatelist .= ",private_archive,private_quickreply,private_pmspace,private_limitwarning,postbit_groupimage,postbit_offline,postbit_www,postbit_replyall_pm,postbit_signature,postbit_classic,postbit_reputation_formatted_link"; $templatelist .= ",private_archive_folders_folder,private_archive_folders,postbit_warninglevel,postbit_author_user,postbit_forward_pm,private_messagebit_icon,private_jump_folders_folder,private_advanced_search_folders,usercp_nav_home"; $templatelist .= ",private_jump_folders,postbit_avatar,postbit_warn,postbit_rep_button,postbit_email,postbit_reputation,private_move,private_read_action,postbit_away,postbit_pm,usercp_nav_messenger_tracking,postbit_find"; $templatelist .= ",usercp_nav_editsignature,posticons_icon,postbit_icon,postbit_iplogged_hiden,usercp_nav_profile,usercp_nav_misc,postbit_userstar,private_read_to,postbit_online,private_empty,private_orderarrow,postbit_reply_pm";
|
require_once "./global.php"; require_once MYBB_ROOT."inc/functions_post.php";
| require_once "./global.php"; require_once MYBB_ROOT."inc/functions_post.php";
|
Zeile 41 | Zeile 42 |
---|
error_no_permission(); }
|
error_no_permission(); }
|
| $update = false;
|
if(!$mybb->user['pmfolders']) {
|
if(!$mybb->user['pmfolders']) {
|
$mybb->user['pmfolders'] = "1**$%%$2**$%%$3**$%%$4**";
| $update = true; $mybb->user['pmfolders'] = "0**$%%$1**$%%$2**$%%$3**$%%$4**"; } elseif ((int)my_substr($mybb->user['pmfolders'], 0, 1) != 0) { // Old folder structure. Need to update // Since MyBB 1.8.20 fid[0] represents 'Inbox' and fid[1] represents 'Unread' $update = true; $mybb->user['pmfolders'] = '0'. ltrim(str_replace("$%%$2**", "$%%$1**$%%$2**", $mybb->user['pmfolders']), '1'); }
|
|
|
| // Folder structure update required? if($update) {
|
$sql_array = array( "pmfolders" => $mybb->user['pmfolders'] ); $db->update_query("users", $sql_array, "uid = ".$mybb->user['uid']);
|
$sql_array = array( "pmfolders" => $mybb->user['pmfolders'] ); $db->update_query("users", $sql_array, "uid = ".$mybb->user['uid']);
|
}
// On a random occassion, recount the user's pms just to make sure everything is in sync. $rand = my_rand(0, 9); if($rand == 5) { update_pm_count();
| |
}
$mybb->input['fid'] = $mybb->get_input('fid', MyBB::INPUT_INT);
| }
$mybb->input['fid'] = $mybb->get_input('fid', MyBB::INPUT_INT);
|
Zeile 85 | Zeile 92 |
---|
eval("\$folderoplist_folder .= \"".$templates->get("private_jump_folders_folder")."\";"); eval("\$foldersearch_folder .= \"".$templates->get("private_jump_folders_folder")."\";"); }
|
eval("\$folderoplist_folder .= \"".$templates->get("private_jump_folders_folder")."\";"); eval("\$foldersearch_folder .= \"".$templates->get("private_jump_folders_folder")."\";"); }
|
| $from_fid = $mybb->input['fid'];
|
eval("\$folderjump = \"".$templates->get("private_jump_folders")."\";"); eval("\$folderoplist = \"".$templates->get("private_move")."\";");
| eval("\$folderjump = \"".$templates->get("private_jump_folders")."\";"); eval("\$folderoplist = \"".$templates->get("private_move")."\";");
|
Zeile 145 | Zeile 154 |
---|
// Check if search flood checking is enabled and user is not admin if($mybb->settings['searchfloodtime'] > 0 && $mybb->usergroup['cancp'] != 1)
|
// Check if search flood checking is enabled and user is not admin if($mybb->settings['searchfloodtime'] > 0 && $mybb->usergroup['cancp'] != 1)
|
{
| {
|
// Fetch the time this user last searched $timecut = TIME_NOW-$mybb->settings['searchfloodtime']; $query = $db->simple_select("searchlog", "*", "uid='{$mybb->user['uid']}' AND dateline > '$timecut'", array('order_by' => "dateline", 'order_dir' => "DESC"));
| // Fetch the time this user last searched $timecut = TIME_NOW-$mybb->settings['searchfloodtime']; $query = $db->simple_select("searchlog", "*", "uid='{$mybb->user['uid']}' AND dateline > '$timecut'", array('order_by' => "dateline", 'order_dir' => "DESC"));
|
Zeile 271 | Zeile 280 |
---|
else { $sortby = $query_sortby = "dateline";
|
else { $sortby = $query_sortby = "dateline";
|
}
if($order != "asc") { $order = "desc"; }
| }
if($order != "asc") { $order = "desc"; }
|
if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1) { $mybb->settings['threadsperpage'] = 20; }
|
if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1) { $mybb->settings['threadsperpage'] = 20; }
|
| $query = $db->simple_select("privatemessages", "COUNT(*) AS total", "pmid IN(".$db->escape_string($search['querycache']).")"); $pmscount = $db->fetch_field($query, "total");
|
// Work out pagination, which page we're at, as well as the limits. $perpage = $mybb->settings['threadsperpage'];
| // Work out pagination, which page we're at, as well as the limits. $perpage = $mybb->settings['threadsperpage'];
|
Zeile 289 | Zeile 301 |
---|
if($page > 0) { $start = ($page-1) * $perpage;
|
if($page > 0) { $start = ($page-1) * $perpage;
|
| $pages = ceil($pmscount / $perpage); if($page > $pages) { $start = 0; $page = 1; }
|
} else {
| } else {
|
Zeile 307 | Zeile 325 |
---|
}
// Do Multi Pages
|
}
// Do Multi Pages
|
$query = $db->simple_select("privatemessages", "COUNT(*) AS total", "pmid IN(".$db->escape_string($search['querycache']).")"); $pmscount = $db->fetch_array($query);
| |
if($upper > $pmscount) { $upper = $pmscount; }
|
if($upper > $pmscount) { $upper = $pmscount; }
|
$multipage = multipage($pmscount['total'], $perpage, $page, "private.php?action=results&sid=".htmlspecialchars_uni($mybb->get_input('sid'))."&sortby={$sortby}&order={$order}");
| $multipage = multipage($pmscount, $perpage, $page, "private.php?action=results&sid=".htmlspecialchars_uni($mybb->get_input('sid'))."&sortby={$sortby}&order={$order}");
|
$messagelist = '';
$icon_cache = $cache->read("posticons");
| $messagelist = '';
$icon_cache = $cache->read("posticons");
|
Zeile 360 | Zeile 375 |
---|
"); while($message = $db->fetch_array($query)) {
|
"); while($message = $db->fetch_array($query)) {
|
$msgalt = $msgsuffix = $msgprefix = '';
| $msgalt = $msgstatus = '';
|
// Determine Folder Icon if($message['status'] == 0) {
|
// Determine Folder Icon if($message['status'] == 0) {
|
$msgfolder = 'new_pm.png';
| $msgstatus = 'new_pm';
|
$msgalt = $lang->new_pm;
|
$msgalt = $lang->new_pm;
|
$msgprefix = "<strong>"; $msgsuffix = "</strong>";
| |
}
|
}
|
elseif($message['status'] == 1)
| else if($message['status'] == 1)
|
{
|
{
|
$msgfolder = 'old_pm.png';
| $msgstatus = 'old_pm';
|
$msgalt = $lang->old_pm; }
|
$msgalt = $lang->old_pm; }
|
elseif($message['status'] == 3)
| else if($message['status'] == 3)
|
{
|
{
|
$msgfolder = 're_pm.png';
| $msgstatus = 're_pm';
|
$msgalt = $lang->reply_pm; } else if($message['status'] == 4) {
|
$msgalt = $lang->reply_pm; } else if($message['status'] == 4) {
|
$msgfolder = 'fw_pm.png';
| $msgstatus = 'fw_pm';
|
$msgalt = $lang->fwd_pm; }
| $msgalt = $lang->fwd_pm; }
|
Zeile 400 | Zeile 413 |
---|
{ $profilelink = get_profile_link($uid); $user = $cached_users[$uid];
|
{ $profilelink = get_profile_link($uid); $user = $cached_users[$uid];
|
| $user['username'] = htmlspecialchars_uni($user['username']);
|
$username = format_name($user['username'], $user['usergroup'], $user['displaygroup']); eval("\$to_users .= \"".$templates->get("private_multiple_recipients_user")."\";"); }
| $username = format_name($user['username'], $user['usergroup'], $user['displaygroup']); eval("\$to_users .= \"".$templates->get("private_multiple_recipients_user")."\";"); }
|
Zeile 410 | Zeile 424 |
---|
{ $profilelink = get_profile_link($uid); $user = $cached_users[$uid];
|
{ $profilelink = get_profile_link($uid); $user = $cached_users[$uid];
|
| $user['username'] = htmlspecialchars_uni($user['username']);
|
$username = format_name($user['username'], $user['usergroup'], $user['displaygroup']); eval("\$bcc_users .= \"".$templates->get("private_multiple_recipients_user")."\";"); }
| $username = format_name($user['username'], $user['usergroup'], $user['displaygroup']); eval("\$bcc_users .= \"".$templates->get("private_multiple_recipients_user")."\";"); }
|
Zeile 419 | Zeile 434 |
---|
} else if($message['toid']) {
|
} else if($message['toid']) {
|
$tofromusername = $message['tousername'];
| $tofromusername = htmlspecialchars_uni($message['tousername']);
|
$tofromuid = $message['toid']; } else
| $tofromuid = $message['toid']; } else
|
Zeile 429 | Zeile 444 |
---|
} else {
|
} else {
|
$tofromusername = $message['fromusername'];
| $tofromusername = htmlspecialchars_uni($message['fromusername']);
|
$tofromuid = $message['fromid']; if($tofromuid == 0) {
| $tofromuid = $message['fromid']; if($tofromuid == 0) {
|
Zeile 561 | Zeile 576 |
---|
$plugins->run_hooks("private_send_do_send");
// Attempt to see if this PM is a duplicate or not
|
$plugins->run_hooks("private_send_do_send");
// Attempt to see if this PM is a duplicate or not
|
| $to = array_map("trim", explode(",", $mybb->get_input('to'))); $to = array_unique($to); // Filter out any duplicates $to_escaped = implode("','", array_map(array($db, 'escape_string'), array_map('my_strtolower', $to)));
|
$time_cutoff = TIME_NOW - (5 * 60 * 60); $query = $db->query(" SELECT pm.pmid FROM ".TABLE_PREFIX."privatemessages pm LEFT JOIN ".TABLE_PREFIX."users u ON(u.uid=pm.toid)
|
$time_cutoff = TIME_NOW - (5 * 60 * 60); $query = $db->query(" SELECT pm.pmid FROM ".TABLE_PREFIX."privatemessages pm LEFT JOIN ".TABLE_PREFIX."users u ON(u.uid=pm.toid)
|
WHERE LOWER(u.username)='".$db->escape_string(my_strtolower($mybb->get_input('to')))."' AND pm.dateline > {$time_cutoff} AND pm.fromid='{$mybb->user['uid']}' AND pm.subject='".$db->escape_string($mybb->get_input('subject'))."' AND pm.message='".$db->escape_string($mybb->get_input('message'))."' AND pm.folder!='3'
| WHERE LOWER(u.username) IN ('{$to_escaped}') AND pm.dateline > {$time_cutoff} AND pm.fromid='{$mybb->user['uid']}' AND pm.subject='".$db->escape_string($mybb->get_input('subject'))."' AND pm.message='".$db->escape_string($mybb->get_input('message'))."' AND pm.folder!='3' LIMIT 0, 1
|
"); $duplicate_check = $db->fetch_field($query, "pmid"); if($duplicate_check)
| "); $duplicate_check = $db->fetch_field($query, "pmid"); if($duplicate_check)
|
Zeile 588 | Zeile 607 |
---|
);
// Split up any recipients we have
|
);
// Split up any recipients we have
|
$pm['to'] = explode(",", $mybb->get_input('to')); $pm['to'] = array_map("trim", $pm['to']);
| $pm['to'] = $to;
|
if(!empty($mybb->input['bcc'])) { $pm['bcc'] = explode(",", $mybb->get_input('bcc'));
| if(!empty($mybb->input['bcc'])) { $pm['bcc'] = explode(",", $mybb->get_input('bcc'));
|
Zeile 615 | Zeile 633 |
---|
if(isset($mybb->input['options']['disablesmilies'])) { $pm['options']['disablesmilies'] = $mybb->input['options']['disablesmilies'];
|
if(isset($mybb->input['options']['disablesmilies'])) { $pm['options']['disablesmilies'] = $mybb->input['options']['disablesmilies'];
|
}
| }
|
if(isset($mybb->input['options']['savecopy']) && $mybb->input['options']['savecopy'] == 1) { $pm['options']['savecopy'] = 1;
|
if(isset($mybb->input['options']['savecopy']) && $mybb->input['options']['savecopy'] == 1) { $pm['options']['savecopy'] = 1;
|
} else
| } else
|
{ $pm['options']['savecopy'] = 0;
|
{ $pm['options']['savecopy'] = 0;
|
} if(isset($mybb->input['options']['readreceipt']))
| } if(isset($mybb->input['options']['readreceipt']))
|
{ $pm['options']['readreceipt'] = $mybb->input['options']['readreceipt']; }
| { $pm['options']['readreceipt'] = $mybb->input['options']['readreceipt']; }
|
Zeile 637 | Zeile 655 |
---|
// Now let the pm handler do all the hard work. if(!$pmhandler->validate_pm())
|
// Now let the pm handler do all the hard work. if(!$pmhandler->validate_pm())
|
{
| {
|
$pm_errors = $pmhandler->get_friendly_errors(); $send_errors = inline_error($pm_errors); $mybb->input['action'] = "send";
| $pm_errors = $pmhandler->get_friendly_errors(); $send_errors = inline_error($pm_errors); $mybb->input['action'] = "send";
|
Zeile 650 | Zeile 668 |
---|
if(isset($pminfo['draftsaved'])) { redirect("private.php", $lang->redirect_pmsaved);
|
if(isset($pminfo['draftsaved'])) { redirect("private.php", $lang->redirect_pmsaved);
|
}
| }
|
else { redirect("private.php", $lang->redirect_pmsent);
| else { redirect("private.php", $lang->redirect_pmsent);
|
Zeile 706 | Zeile 724 |
---|
{ $optionschecked['readreceipt'] = 'checked="checked"'; }
|
{ $optionschecked['readreceipt'] = 'checked="checked"'; }
|
$to = htmlspecialchars_uni($mybb->get_input('to')); $bcc = htmlspecialchars_uni($mybb->get_input('bcc'));
| $to = htmlspecialchars_uni(implode(', ', array_unique(array_map('trim', explode(',', $mybb->get_input('to')))))); $bcc = htmlspecialchars_uni(implode(', ', array_unique(array_map('trim', explode(',', $mybb->get_input('bcc'))))));
|
}
$preview = '';
| }
$preview = '';
|
Zeile 720 | Zeile 738 |
---|
FROM ".TABLE_PREFIX."users u LEFT JOIN ".TABLE_PREFIX."userfields f ON (f.ufid=u.uid) WHERE u.uid='".$mybb->user['uid']."'
|
FROM ".TABLE_PREFIX."users u LEFT JOIN ".TABLE_PREFIX."userfields f ON (f.ufid=u.uid) WHERE u.uid='".$mybb->user['uid']."'
|
");
| ");
|
$post = $db->fetch_array($query);
$post['userusername'] = $mybb->user['username'];
| $post = $db->fetch_array($query);
$post['userusername'] = $mybb->user['username'];
|
Zeile 791 | Zeile 809 |
---|
$pm = $db->fetch_array($query); $message = htmlspecialchars_uni($parser->parse_badwords($pm['message'])); $subject = htmlspecialchars_uni($parser->parse_badwords($pm['subject']));
|
$pm = $db->fetch_array($query); $message = htmlspecialchars_uni($parser->parse_badwords($pm['message'])); $subject = htmlspecialchars_uni($parser->parse_badwords($pm['subject']));
|
|
|
if($pm['folder'] == "3") { // message saved in drafts
| if($pm['folder'] == "3") { // message saved in drafts
|
Zeile 894 | Zeile 912 |
---|
foreach($recipients['to'] as $recipient) { if($recipient == $mybb->user['uid'])
|
foreach($recipients['to'] as $recipient) { if($recipient == $mybb->user['uid'])
|
{
| {
|
continue; } $recipientids .= ','.$recipient;
| continue; } $recipientids .= ','.$recipient;
|
Zeile 926 | Zeile 944 |
---|
if($send_errors) {
|
if($send_errors) {
|
$to = htmlspecialchars_uni($mybb->get_input('to')); $bcc = htmlspecialchars_uni($mybb->get_input('bcc'));
| $to = htmlspecialchars_uni(implode(', ', array_unique(array_map('trim', explode(',', $mybb->get_input('to')))))); $bcc = htmlspecialchars_uni(implode(', ', array_unique(array_map('trim', explode(',', $mybb->get_input('bcc'))))));
|
}
// Load the auto complete javascript if it is enabled.
| }
// Load the auto complete javascript if it is enabled.
|
Zeile 1000 | Zeile 1018 |
---|
);
foreach($data_key as $field => $key)
|
);
foreach($data_key as $field => $key)
|
{
| {
|
$pm[$key] = $groupscache[$pm['usergroup']][$field]; }
if($pm['receipt'] == 1)
|
$pm[$key] = $groupscache[$pm['usergroup']][$field]; }
if($pm['receipt'] == 1)
|
{
| {
|
if($mybb->usergroup['candenypmreceipts'] == 1 && $mybb->get_input('denyreceipt', MyBB::INPUT_INT) == 1) { $receiptadd = 0;
|
if($mybb->usergroup['candenypmreceipts'] == 1 && $mybb->get_input('denyreceipt', MyBB::INPUT_INT) == 1) { $receiptadd = 0;
|
}
| }
|
else { $receiptadd = 2;
|
else { $receiptadd = 2;
|
}
| }
|
}
$action_time = '';
| }
$action_time = '';
|
Zeile 1034 | Zeile 1052 |
---|
// Update the unread count - it has now changed. update_pm_count($mybb->user['uid'], 6);
|
// Update the unread count - it has now changed. update_pm_count($mybb->user['uid'], 6);
|
|
|
// Update PM notice value if this is our last unread PM if($mybb->user['unreadpms']-1 <= 0 && $mybb->user['pmnotice'] == 2) {
| // Update PM notice value if this is our last unread PM if($mybb->user['unreadpms']-1 <= 0 && $mybb->user['pmnotice'] == 2) {
|
Zeile 1103 | Zeile 1121 |
---|
// If we have any BCC recipients and this user is an Administrator, add them on to the query if(isset($pm['recipients']['bcc']) && count($pm['recipients']['bcc']) > 0 && $mybb->usergroup['cancp'] == 1)
|
// If we have any BCC recipients and this user is an Administrator, add them on to the query if(isset($pm['recipients']['bcc']) && count($pm['recipients']['bcc']) > 0 && $mybb->usergroup['cancp'] == 1)
|
{
| {
|
$show_bcc = 1; $uid_sql .= ','.implode(',', $pm['recipients']['bcc']); }
// Fetch recipient names from the database
|
$show_bcc = 1; $uid_sql .= ','.implode(',', $pm['recipients']['bcc']); }
// Fetch recipient names from the database
|
$bcc_recipients = $to_recipients = array();
| $bcc_recipients = $to_recipients = $bcc_form_val = array();
|
$query = $db->simple_select('users', 'uid, username', "uid IN ({$uid_sql})"); while($recipient = $db->fetch_array($query)) { // User is a BCC recipient
|
$query = $db->simple_select('users', 'uid, username', "uid IN ({$uid_sql})"); while($recipient = $db->fetch_array($query)) { // User is a BCC recipient
|
| $recipient['username'] = htmlspecialchars_uni($recipient['username']);
|
if($show_bcc && in_array($recipient['uid'], $pm['recipients']['bcc'])) { $bcc_recipients[] = build_profile_link($recipient['username'], $recipient['uid']);
|
if($show_bcc && in_array($recipient['uid'], $pm['recipients']['bcc'])) { $bcc_recipients[] = build_profile_link($recipient['username'], $recipient['uid']);
|
| $bcc_form_val[] = $recipient['username'];
|
} // User is a normal recipient else if(in_array($recipient['uid'], $pm['recipients']['to']))
| } // User is a normal recipient else if(in_array($recipient['uid'], $pm['recipients']['to']))
|
Zeile 1129 | Zeile 1149 |
---|
if(count($bcc_recipients) > 0) { $bcc_recipients = implode(', ', $bcc_recipients);
|
if(count($bcc_recipients) > 0) { $bcc_recipients = implode(', ', $bcc_recipients);
|
| $bcc_form_val = implode(',', $bcc_form_val);
|
eval("\$bcc = \"".$templates->get("private_read_bcc")."\";");
|
eval("\$bcc = \"".$templates->get("private_read_bcc")."\";");
|
}
| } else { $bcc_form_val = ''; }
|
$replyall = false; if(count($to_recipients) > 1) {
| $replyall = false; if(count($to_recipients) > 1) {
|
Zeile 1139 | Zeile 1164 |
---|
}
if(count($to_recipients) > 0)
|
}
if(count($to_recipients) > 0)
|
{ $to_recipients = implode(", ", $to_recipients);
| { $to_recipients = implode($lang->comma, $to_recipients);
|
} else {
| } else {
|
Zeile 1157 | Zeile 1182 |
---|
if($mybb->settings['pmquickreply'] != 0 && $mybb->user['showquickreply'] != 0 && $mybb->usergroup['cansendpms'] != 0 && $pm['fromid'] != 0 && $pm['folder'] != 3) { $trow = alt_trow();
|
if($mybb->settings['pmquickreply'] != 0 && $mybb->user['showquickreply'] != 0 && $mybb->usergroup['cansendpms'] != 0 && $pm['fromid'] != 0 && $pm['folder'] != 3) { $trow = alt_trow();
|
|
|
$optionschecked = array('savecopy' => 'checked="checked"'); if(!empty($mybb->user['signature'])) { $optionschecked['signature'] = 'checked="checked"';
|
$optionschecked = array('savecopy' => 'checked="checked"'); if(!empty($mybb->user['signature'])) { $optionschecked['signature'] = 'checked="checked"';
|
}
| }
|
if($mybb->usergroup['cantrackpms'] == 1) { $optionschecked['readreceipt'] = 'checked="checked"';
| if($mybb->usergroup['cantrackpms'] == 1) { $optionschecked['readreceipt'] = 'checked="checked"';
|
Zeile 1174 | Zeile 1199 |
---|
'message' => htmlspecialchars_uni($parser->parse_badwords($pm['message'])), 'username' => $pm['username'], 'quote_is_pm' => true
|
'message' => htmlspecialchars_uni($parser->parse_badwords($pm['message'])), 'username' => $pm['username'], 'quote_is_pm' => true
|
);
| );
|
$quoted_message = parse_quoted_message($quoted_message);
if($mybb->settings['maxpmquotedepth'] != '0') { $quoted_message = remove_message_quotes($quoted_message, $mybb->settings['maxpmquotedepth']);
|
$quoted_message = parse_quoted_message($quoted_message);
if($mybb->settings['maxpmquotedepth'] != '0') { $quoted_message = remove_message_quotes($quoted_message, $mybb->settings['maxpmquotedepth']);
|
}
$subject = preg_replace("#(FW|RE):( *)#is", '', $pm['subject']);
| }
$subject = preg_replace("#(FW|RE):( *)#is", '', $pm['subject']);
|
if($mybb->user['uid'] == $pm['fromid']) { $to = htmlspecialchars_uni($mybb->user['username']);
|
if($mybb->user['uid'] == $pm['fromid']) { $to = htmlspecialchars_uni($mybb->user['username']);
|
}
| }
|
else { $query = $db->simple_select('users', 'username', "uid='{$pm['fromid']}'");
| else { $query = $db->simple_select('users', 'username', "uid='{$pm['fromid']}'");
|
Zeile 1201 | Zeile 1226 |
---|
eval("\$private_send_tracking = \"".$templates->get("private_send_tracking")."\";"); }
|
eval("\$private_send_tracking = \"".$templates->get("private_send_tracking")."\";"); }
|
| $expaltext = (in_array("quickreply", $collapse)) ? "[+]" : "[-]";
|
eval("\$quickreply = \"".$templates->get("private_quickreply")."\";"); }
|
eval("\$quickreply = \"".$templates->get("private_quickreply")."\";"); }
|
|
|
$plugins->run_hooks("private_read_end");
eval("\$read = \"".$templates->get("private_read")."\";"); output_page($read);
|
$plugins->run_hooks("private_read_end");
eval("\$read = \"".$templates->get("private_read")."\";"); output_page($read);
|
}
| }
|
if($mybb->input['action'] == "tracking") { if(!$mybb->usergroup['cantrackpms']) { error_no_permission();
|
if($mybb->input['action'] == "tracking") { if(!$mybb->usergroup['cantrackpms']) { error_no_permission();
|
}
| }
|
$plugins->run_hooks("private_tracking_start"); $readmessages = ''; $unreadmessages = '';
if(!$mybb->settings['postsperpage'] || (int)$mybb->settings['postsperpage'] < 1)
|
$plugins->run_hooks("private_tracking_start"); $readmessages = ''; $unreadmessages = '';
if(!$mybb->settings['postsperpage'] || (int)$mybb->settings['postsperpage'] < 1)
|
{
| {
|
$mybb->settings['postsperpage'] = 20; }
| $mybb->settings['postsperpage'] = 20; }
|
Zeile 1238 | Zeile 1264 |
---|
$pages = ceil($pages);
if($mybb->get_input('read_page') == "last")
|
$pages = ceil($pages);
if($mybb->get_input('read_page') == "last")
|
{ $page = $pages; }
if($page > $pages || $page <= 0) {
| { $page = $pages; }
if($page > $pages || $page <= 0) {
|
$page = 1; }
if($page)
|
$page = 1; }
if($page)
|
{
| {
|
$start = ($page-1) * $perpage; } else
|
$start = ($page-1) * $perpage; } else
|
{
| {
|
$start = 0; $page = 1;
|
$start = 0; $page = 1;
|
}
$read_multipage = multipage($postcount, $perpage, $page, "private.php?action=tracking&read_page={page}");
| }
$read_multipage = multipage($postcount, $perpage, $page, "private.php?action=tracking&read_page={page}");
|
$query = $db->query(" SELECT pm.pmid, pm.subject, pm.toid, pm.readtime, u.username as tousername
| $query = $db->query(" SELECT pm.pmid, pm.subject, pm.toid, pm.readtime, u.username as tousername
|
Zeile 1270 | Zeile 1296 |
---|
while($readmessage = $db->fetch_array($query)) { $readmessage['subject'] = htmlspecialchars_uni($parser->parse_badwords($readmessage['subject']));
|
while($readmessage = $db->fetch_array($query)) { $readmessage['subject'] = htmlspecialchars_uni($parser->parse_badwords($readmessage['subject']));
|
| $readmessage['tousername'] = htmlspecialchars_uni($readmessage['tousername']);
|
$readmessage['profilelink'] = build_profile_link($readmessage['tousername'], $readmessage['toid']); $readdate = my_date('relative', $readmessage['readtime']); eval("\$readmessages .= \"".$templates->get("private_tracking_readmessage")."\";");
| $readmessage['profilelink'] = build_profile_link($readmessage['tousername'], $readmessage['toid']); $readdate = my_date('relative', $readmessage['readtime']); eval("\$readmessages .= \"".$templates->get("private_tracking_readmessage")."\";");
|
Zeile 1277 | Zeile 1304 |
---|
$stoptrackingread = ''; if(!empty($readmessages))
|
$stoptrackingread = ''; if(!empty($readmessages))
|
{ eval("\$stoptrackingread = \"".$templates->get("private_tracking_readmessage_stop")."\";");
| { eval("\$stoptrackingread = \"".$templates->get("private_tracking_readmessage_stop")."\";");
|
}
if(!$readmessages) { eval("\$readmessages = \"".$templates->get("private_tracking_nomessage")."\";");
|
}
if(!$readmessages) { eval("\$readmessages = \"".$templates->get("private_tracking_nomessage")."\";");
|
}
| }
|
$query = $db->simple_select("privatemessages", "COUNT(pmid) as unreadpms", "receipt='1' AND folder!='3' AND status='0' AND fromid='".$mybb->user['uid']."'"); $postcount = $db->fetch_field($query, "unreadpms");
| $query = $db->simple_select("privatemessages", "COUNT(pmid) as unreadpms", "receipt='1' AND folder!='3' AND status='0' AND fromid='".$mybb->user['uid']."'"); $postcount = $db->fetch_field($query, "unreadpms");
|
Zeile 1299 | Zeile 1326 |
---|
}
if($page > $pages || $page <= 0)
|
}
if($page > $pages || $page <= 0)
|
{ $page = 1; }
| { $page = 1; }
|
if($page) { $start = ($page-1) * $perpage;
| if($page) { $start = ($page-1) * $perpage;
|
Zeile 1311 | Zeile 1338 |
---|
{ $start = 0; $page = 1;
|
{ $start = 0; $page = 1;
|
}
| }
|
$unread_multipage = multipage($postcount, $perpage, $page, "private.php?action=tracking&unread_page={page}");
$query = $db->query("
| $unread_multipage = multipage($postcount, $perpage, $page, "private.php?action=tracking&unread_page={page}");
$query = $db->query("
|
Zeile 1326 | Zeile 1353 |
---|
while($unreadmessage = $db->fetch_array($query)) { $unreadmessage['subject'] = htmlspecialchars_uni($parser->parse_badwords($unreadmessage['subject']));
|
while($unreadmessage = $db->fetch_array($query)) { $unreadmessage['subject'] = htmlspecialchars_uni($parser->parse_badwords($unreadmessage['subject']));
|
| $unreadmessage['tousername'] = htmlspecialchars_uni($unreadmessage['tousername']);
|
$unreadmessage['profilelink'] = build_profile_link($unreadmessage['tousername'], $unreadmessage['toid']); $senddate = my_date('relative', $unreadmessage['dateline']); eval("\$unreadmessages .= \"".$templates->get("private_tracking_unreadmessage")."\";");
| $unreadmessage['profilelink'] = build_profile_link($unreadmessage['tousername'], $unreadmessage['toid']); $senddate = my_date('relative', $unreadmessage['dateline']); eval("\$unreadmessages .= \"".$templates->get("private_tracking_unreadmessage")."\";");
|
Zeile 1415 | Zeile 1443 |
---|
$plugins->run_hooks("private_do_tracking_end"); redirect("private.php?action=tracking", $lang->redirect_pmstrackingcanceled); }
|
$plugins->run_hooks("private_do_tracking_end"); redirect("private.php?action=tracking", $lang->redirect_pmstrackingcanceled); }
|
}
| }
|
if($mybb->input['action'] == "stopalltracking") {
| if($mybb->input['action'] == "stopalltracking") {
|
Zeile 1428 | Zeile 1456 |
---|
"receipt" => 0 ); $db->update_query("privatemessages", $sql_array, "receipt='2' AND folder!='3' AND status!='0' AND fromid=".$mybb->user['uid']);
|
"receipt" => 0 ); $db->update_query("privatemessages", $sql_array, "receipt='2' AND folder!='3' AND status!='0' AND fromid=".$mybb->user['uid']);
|
|
|
$plugins->run_hooks("private_stopalltracking_end"); redirect("private.php?action=tracking", $lang->redirect_allpmstrackingstopped); }
|
$plugins->run_hooks("private_stopalltracking_end"); redirect("private.php?action=tracking", $lang->redirect_allpmstrackingstopped); }
|
|
|
if($mybb->input['action'] == "folders") { $plugins->run_hooks("private_folders_start");
| if($mybb->input['action'] == "folders") { $plugins->run_hooks("private_folders_start");
|
Zeile 1446 | Zeile 1474 |
---|
$fid = $folderinfo[0]; $foldername = get_pm_folder_name($fid, $foldername);
|
$fid = $folderinfo[0]; $foldername = get_pm_folder_name($fid, $foldername);
|
if($folderinfo[0] == "1" || $folderinfo[0] == "2" || $folderinfo[0] == "3" || $folderinfo[0] == "4")
| if((int)$folderinfo[0] < 5)
|
{ $foldername2 = get_pm_folder_name($fid); eval("\$folderlist .= \"".$templates->get("private_folders_folder_unremovable")."\";"); unset($name);
|
{ $foldername2 = get_pm_folder_name($fid); eval("\$folderlist .= \"".$templates->get("private_folders_folder_unremovable")."\";"); unset($name);
|
} else
| } else
|
{ eval("\$folderlist .= \"".$templates->get("private_folders_folder")."\";"); }
|
{ eval("\$folderlist .= \"".$templates->get("private_folders_folder")."\";"); }
|
}
| }
|
$newfolders = ''; for($i = 1; $i <= 5; ++$i)
|
$newfolders = ''; for($i = 1; $i <= 5; ++$i)
|
{
| {
|
$fid = "new$i"; $foldername = ''; eval("\$newfolders .= \"".$templates->get("private_folders_folder")."\";");
| $fid = "new$i"; $foldername = ''; eval("\$newfolders .= \"".$templates->get("private_folders_folder")."\";");
|
Zeile 1476 | Zeile 1504 |
---|
{ // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
{ // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
|
|
$plugins->run_hooks("private_do_folders_start");
$highestid = 2;
| $plugins->run_hooks("private_do_folders_start");
$highestid = 2;
|
Zeile 1484 | Zeile 1512 |
---|
$donefolders = array(); $mybb->input['folder'] = $mybb->get_input('folder', MyBB::INPUT_ARRAY); foreach($mybb->input['folder'] as $key => $val)
|
$donefolders = array(); $mybb->input['folder'] = $mybb->get_input('folder', MyBB::INPUT_ARRAY); foreach($mybb->input['folder'] as $key => $val)
|
{
| {
|
if(empty($donefolders[$val]) )// Probably was a check for duplicate folder names, but doesn't seem to be used now { if(my_substr($key, 0, 3) == "new") // Create a new folder
| if(empty($donefolders[$val]) )// Probably was a check for duplicate folder names, but doesn't seem to be used now { if(my_substr($key, 0, 3) == "new") // Create a new folder
|
Zeile 1495 | Zeile 1523 |
---|
else // Editing an existing folder { if($key > $highestid)
|
else // Editing an existing folder { if($key > $highestid)
|
{
| {
|
$highestid = $key; }
$fid = (int)$key; // Use default language strings if empty or value is language string
|
$highestid = $key; }
$fid = (int)$key; // Use default language strings if empty or value is language string
|
switch($fid)
| if($val == get_pm_folder_name($fid) || trim($val) == '')
|
{
|
{
|
case 1: if($val == $lang->folder_inbox || trim($val) == '') { $val = ''; } break; case 2: if($val == $lang->folder_sent_items || trim($val) == '') { $val = ''; } break; case 3: if($val == $lang->folder_drafts || trim($val) == '') { $val = ''; } break; case 4: if($val == $lang->folder_trash || trim($val) == '') { $val = ''; } break;
| $val = '';
|
} }
|
} }
|
if($val != '' && trim($val) == '' && !($key >= 1 && $key <= 4))
| if($val != '' && trim($val) == '' && !(is_numeric($key) && $key <= 4))
|
{ // If the name only contains whitespace and it's not a default folder, print an error error($lang->error_emptypmfoldername); }
|
{ // If the name only contains whitespace and it's not a default folder, print an error error($lang->error_emptypmfoldername); }
|
if($val != '' || ($key >= 1 && $key <= 4))
| if($val != '' || (is_numeric($key) && $key <= 4))
|
{ // If there is a name or if this is a default folder, save it $foldername = $db->escape_string(htmlspecialchars_uni($val));
| { // If there is a name or if this is a default folder, save it $foldername = $db->escape_string(htmlspecialchars_uni($val));
|
Zeile 1578 | Zeile 1583 |
---|
if($mybb->input['action'] == "empty") { if($mybb->user['totalpms'] == 0)
|
if($mybb->input['action'] == "empty") { if($mybb->user['totalpms'] == 0)
|
{
| {
|
error($lang->error_nopms); }
| error($lang->error_nopms); }
|
Zeile 1643 | Zeile 1648 |
---|
$plugins->run_hooks("private_do_empty_end"); redirect("private.php", $lang->redirect_pmfoldersemptied);
|
$plugins->run_hooks("private_do_empty_end"); redirect("private.php", $lang->redirect_pmfoldersemptied);
|
}
| }
|
if($mybb->input['action'] == "do_stuff" && $mybb->request_method == "post") { // Verify incoming POST request
| if($mybb->input['action'] == "do_stuff" && $mybb->request_method == "post") { // Verify incoming POST request
|
Zeile 1745 | Zeile 1750 |
---|
if($db->num_rows($query) == 1) { $db->delete_query("privatemessages", "pmid='".$mybb->get_input('pmid', MyBB::INPUT_INT)."'");
|
if($db->num_rows($query) == 1) { $db->delete_query("privatemessages", "pmid='".$mybb->get_input('pmid', MyBB::INPUT_INT)."'");
|
} else {
| } else {
|
$sql_array = array( "folder" => 4, "deletetime" => TIME_NOW
| $sql_array = array( "folder" => 4, "deletetime" => TIME_NOW
|
Zeile 1761 | Zeile 1766 |
---|
$plugins->run_hooks("private_delete_end"); redirect("private.php", $lang->redirect_pmsdeleted); }
|
$plugins->run_hooks("private_delete_end"); redirect("private.php", $lang->redirect_pmsdeleted); }
|
|
|
if($mybb->input['action'] == "export") { if($mybb->user['totalpms'] == 0)
|
if($mybb->input['action'] == "export") { if($mybb->user['totalpms'] == 0)
|
{
| {
|
error($lang->error_nopms); }
| error($lang->error_nopms); }
|
Zeile 1782 | Zeile 1787 |
---|
$folder_name = $folderinfo[1];
eval("\$folderlist_folder .= \"".$templates->get("private_archive_folders_folder")."\";");
|
$folder_name = $folderinfo[1];
eval("\$folderlist_folder .= \"".$templates->get("private_archive_folders_folder")."\";");
|
}
| }
|
eval("\$folderlist = \"".$templates->get("private_archive_folders")."\";");
| eval("\$folderlist = \"".$templates->get("private_archive_folders")."\";");
|
Zeile 1800 | Zeile 1805 |
---|
$plugins->run_hooks("private_do_export_start");
|
$plugins->run_hooks("private_do_export_start");
|
$lang->private_messages_for = $lang->sprintf($lang->private_messages_for, $mybb->user['username']);
| $lang->private_messages_for = $lang->sprintf($lang->private_messages_for, htmlspecialchars_uni($mybb->user['username']));
|
$exdate = my_date($mybb->settings['dateformat'], TIME_NOW, 0, 0); $extime = my_date($mybb->settings['timeformat'], TIME_NOW, 0, 0); $lang->exported_date = $lang->sprintf($lang->exported_date, $exdate, $extime);
| $exdate = my_date($mybb->settings['dateformat'], TIME_NOW, 0, 0); $extime = my_date($mybb->settings['timeformat'], TIME_NOW, 0, 0); $lang->exported_date = $lang->sprintf($lang->exported_date, $exdate, $extime);
|
Zeile 1852 | Zeile 1857 |
---|
else { if(!$folderlst)
|
else { if(!$folderlst)
|
{
| {
|
$folderlst = " AND pm.folder IN ('$val'"; } else
| $folderlst = " AND pm.folder IN ('$val'"; } else
|
Zeile 1866 | Zeile 1871 |
---|
$folderlst .= ")"; } $wsql .= "$folderlst";
|
$folderlst .= ")"; } $wsql .= "$folderlst";
|
}
| }
|
else { error($lang->error_pmnoarchivefolders);
|
else { error($lang->error_pmnoarchivefolders);
|
}
| }
|
if($mybb->get_input('exportunread', MyBB::INPUT_INT) != 1) {
| if($mybb->get_input('exportunread', MyBB::INPUT_INT) != 1) {
|
Zeile 1887 | Zeile 1892 |
---|
"); $numpms = $db->num_rows($query); if(!$numpms)
|
"); $numpms = $db->num_rows($query); if(!$numpms)
|
{
| {
|
error($lang->error_nopmsarchive); }
| error($lang->error_nopmsarchive); }
|
Zeile 1909 | Zeile 1914 |
---|
{ $tofromusername = build_profile_link($message['tousername'], $tofromuid); }
|
{ $tofromusername = build_profile_link($message['tousername'], $tofromuid); }
|
}
| }
|
else { $tofromusername = $lang->not_sent;
| else { $tofromusername = $lang->not_sent;
|
Zeile 1922 | Zeile 1927 |
---|
if($mybb->input['exporttype'] == "txt") { $tofromusername = $message['fromusername'];
|
if($mybb->input['exporttype'] == "txt") { $tofromusername = $message['fromusername'];
|
}
| }
|
else { $tofromusername = build_profile_link($message['fromusername'], $tofromuid);
|
else { $tofromusername = build_profile_link($message['fromusername'], $tofromuid);
|
}
| }
|
if($tofromuid == 0) { $tofromusername = $lang->mybb_engine;
| if($tofromuid == 0) { $tofromusername = $lang->mybb_engine;
|
Zeile 1938 | Zeile 1943 |
---|
if($tofromuid == 0) { $message['fromusername'] = $lang->mybb_engine;
|
if($tofromuid == 0) { $message['fromusername'] = $lang->mybb_engine;
|
}
| }
|
if(!$message['toid'] && $message['folder'] == 3) { $message['tousername'] = $lang->not_sent;
|
if(!$message['toid'] && $message['folder'] == 3) { $message['tousername'] = $lang->not_sent;
|
}
| }
|
$message['subject'] = $parser->parse_badwords($message['subject']); if($message['folder'] != "3") {
|
$message['subject'] = $parser->parse_badwords($message['subject']); if($message['folder'] != "3") {
|
$senddate = my_date($mybb->settings['dateformat'], $message['dateline']); $sendtime = my_date($mybb->settings['timeformat'], $message['dateline']);
| $senddate = my_date($mybb->settings['dateformat'], $message['dateline'], "", false); $sendtime = my_date($mybb->settings['timeformat'], $message['dateline'], "", false);
|
$senddate .= " $lang->at $sendtime"; } else
| $senddate .= " $lang->at $sendtime"; } else
|
Zeile 1958 | Zeile 1963 |
---|
}
if($mybb->input['exporttype'] == "html")
|
}
if($mybb->input['exporttype'] == "html")
|
{
| {
|
$parser_options = array( "allow_html" => $mybb->settings['pmsallowhtml'], "allow_mycode" => $mybb->settings['pmsallowmycode'],
| $parser_options = array( "allow_html" => $mybb->settings['pmsallowhtml'], "allow_mycode" => $mybb->settings['pmsallowmycode'],
|
Zeile 1971 | Zeile 1976 |
---|
$message['message'] = $parser->parse_message($message['message'], $parser_options); $message['subject'] = htmlspecialchars_uni($message['subject']);
|
$message['message'] = $parser->parse_message($message['message'], $parser_options); $message['subject'] = htmlspecialchars_uni($message['subject']);
|
}
| }
|
if($mybb->input['exporttype'] == "txt" || $mybb->input['exporttype'] == "csv") { $message['message'] = str_replace("\r\n", "\n", $message['message']);
| if($mybb->input['exporttype'] == "txt" || $mybb->input['exporttype'] == "csv") { $message['message'] = str_replace("\r\n", "\n", $message['message']);
|
Zeile 1980 | Zeile 1985 |
---|
}
if($mybb->input['exporttype'] == "csv")
|
}
if($mybb->input['exporttype'] == "csv")
|
{ $message['message'] = addslashes($message['message']); $message['subject'] = addslashes($message['subject']); $message['tousername'] = addslashes($message['tousername']); $message['fromusername'] = addslashes($message['fromusername']);
| { $message['message'] = my_escape_csv($message['message']); $message['subject'] = my_escape_csv($message['subject']); $message['tousername'] = my_escape_csv($message['tousername']); $message['fromusername'] = my_escape_csv($message['fromusername']);
|
}
if(empty($donefolder[$message['folder']]))
| }
if(empty($donefolder[$message['folder']]))
|
Zeile 1997 | Zeile 2002 |
---|
{ $foldername = $folderinfo[1]; if($mybb->input['exporttype'] != "csv")
|
{ $foldername = $folderinfo[1]; if($mybb->input['exporttype'] != "csv")
|
{
| {
|
if($mybb->input['exporttype'] != "html") { $mybb->input['exporttype'] == "txt";
| if($mybb->input['exporttype'] != "html") { $mybb->input['exporttype'] == "txt";
|
Zeile 2006 | Zeile 2011 |
---|
} else {
|
} else {
|
$foldername = addslashes($folderinfo[1]);
| $foldername = my_escape_csv($folderinfo[1]);
|
} $donefolder[$message['folder']] = 1; }
| } $donefolder[$message['folder']] = 1; }
|
Zeile 2015 | Zeile 2020 |
---|
eval("\$pmsdownload .= \"".$templates->get("private_archive_".$mybb->input['exporttype']."_message", 1, 0)."\";"); $ids .= ",'{$message['pmid']}'";
|
eval("\$pmsdownload .= \"".$templates->get("private_archive_".$mybb->input['exporttype']."_message", 1, 0)."\";"); $ids .= ",'{$message['pmid']}'";
|
}
| }
|
if($mybb->input['exporttype'] == "html") {
| if($mybb->input['exporttype'] == "html") {
|
Zeile 2032 | Zeile 2037 |
---|
$db->delete_query("privatemessages", "pmid IN ('0'$ids)"); // Update PM count update_pm_count();
|
$db->delete_query("privatemessages", "pmid IN ('0'$ids)"); // Update PM count update_pm_count();
|
}
| }
|
if($mybb->input['exporttype'] == "html") {
| if($mybb->input['exporttype'] == "html") {
|
Zeile 2060 | Zeile 2065 |
---|
} else {
|
} else {
|
| echo "\xEF\xBB\xBF"; // UTF-8 BOM
|
echo $archived; } }
| echo $archived; } }
|
Zeile 2067 | Zeile 2073 |
---|
if(!$mybb->input['action']) { $plugins->run_hooks("private_inbox");
|
if(!$mybb->input['action']) { $plugins->run_hooks("private_inbox");
|
|
|
if(!$mybb->input['fid'] || !array_key_exists($mybb->input['fid'], $foldernames)) {
|
if(!$mybb->input['fid'] || !array_key_exists($mybb->input['fid'], $foldernames)) {
|
$mybb->input['fid'] = 1;
| $mybb->input['fid'] = 0;
|
}
|
}
|
$folder = $mybb->input['fid']; $foldername = $foldernames[$folder];
| $fid = (int)$mybb->input['fid']; $folder = !$fid ? 1 : $fid; $foldername = $foldernames[$fid];
|
if($folder == 2 || $folder == 3) { // Sent Items Folder
| if($folder == 2 || $folder == 3) { // Sent Items Folder
|
Zeile 2126 | Zeile 2133 |
---|
// Do Multi Pages $query = $db->simple_select("privatemessages", "COUNT(*) AS total", "uid='".$mybb->user['uid']."' AND folder='$folder'");
|
// Do Multi Pages $query = $db->simple_select("privatemessages", "COUNT(*) AS total", "uid='".$mybb->user['uid']."' AND folder='$folder'");
|
$pmscount = $db->fetch_array($query);
| $pmscount = $db->fetch_field($query, "total");
|
if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1) {
| if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1) {
|
Zeile 2139 | Zeile 2146 |
---|
if($page > 0) { $start = ($page-1) *$perpage;
|
if($page > 0) { $start = ($page-1) *$perpage;
|
} else
| $pages = ceil($pmscount / $perpage); if($page > $pages) { $start = 0; $page = 1; } } else
|
{ $start = 0; $page = 1;
|
{ $start = 0; $page = 1;
|
}
| }
|
$end = $start + $perpage; $lower = $start+1; $upper = $end;
|
$end = $start + $perpage; $lower = $start+1; $upper = $end;
|
|
|
if($upper > $pmscount) { $upper = $pmscount;
|
if($upper > $pmscount) { $upper = $pmscount;
|
}
| }
|
if($mybb->input['order'] || ($sortby && $sortby != "dateline"))
|
if($mybb->input['order'] || ($sortby && $sortby != "dateline"))
|
{ $page_url = "private.php?fid={$folder}&sortby={$sortby}&order={$mybb->input['order']}"; }
| { $page_url = "private.php?fid={$fid}&sortby={$sortby}&order={$sortordernow}"; }
|
else {
|
else {
|
$page_url = "private.php?fid={$folder}";
| $page_url = "private.php?fid={$fid}";
|
}
|
}
|
$multipage = multipage($pmscount['total'], $perpage, $page, $page_url); $messagelist = '';
| $multipage = multipage($pmscount, $perpage, $page, $page_url); $selective = $messagelist = '';
|
$icon_cache = $cache->read("posticons");
// Cache users in multiple recipients for sent & drafts folder
| $icon_cache = $cache->read("posticons");
// Cache users in multiple recipients for sent & drafts folder
|
Zeile 2175 | Zeile 2188 |
---|
if($sortfield == "username") { $u = "u.";
|
if($sortfield == "username") { $u = "u.";
|
} else {
| } else {
|
$u = "pm."; }
| $u = "pm."; }
|
Zeile 2188 | Zeile 2201 |
---|
FROM ".TABLE_PREFIX."privatemessages pm LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=pm.toid) WHERE pm.folder='{$folder}' AND pm.uid='{$mybb->user['uid']}'
|
FROM ".TABLE_PREFIX."privatemessages pm LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=pm.toid) WHERE pm.folder='{$folder}' AND pm.uid='{$mybb->user['uid']}'
|
ORDER BY {$u}{$sortfield} {$mybb->input['order']}
| ORDER BY {$u}{$sortfield} {$sortordernow}
|
LIMIT {$start}, {$perpage} "); while($row = $db->fetch_array($users_query))
| LIMIT {$start}, {$perpage} "); while($row = $db->fetch_array($users_query))
|
Zeile 2231 | Zeile 2244 |
---|
} else {
|
} else {
|
| if($fid == 1) { $selective = ' AND pm.status="0"'; }
|
if($sortfield == "username") { $pm = "fu.";
| if($sortfield == "username") { $pm = "fu.";
|
Zeile 2246 | Zeile 2264 |
---|
FROM ".TABLE_PREFIX."privatemessages pm LEFT JOIN ".TABLE_PREFIX."users fu ON (fu.uid=pm.fromid) LEFT JOIN ".TABLE_PREFIX."users tu ON (tu.uid=pm.toid)
|
FROM ".TABLE_PREFIX."privatemessages pm LEFT JOIN ".TABLE_PREFIX."users fu ON (fu.uid=pm.fromid) LEFT JOIN ".TABLE_PREFIX."users tu ON (tu.uid=pm.toid)
|
WHERE pm.folder='$folder' AND pm.uid='".$mybb->user['uid']."'
| WHERE pm.folder='$folder' AND pm.uid='".$mybb->user['uid']."'{$selective}
|
ORDER BY {$pm}{$sortfield} {$sortordernow} LIMIT $start, $perpage ");
| ORDER BY {$pm}{$sortfield} {$sortordernow} LIMIT $start, $perpage ");
|
Zeile 2255 | Zeile 2273 |
---|
{ while($message = $db->fetch_array($query)) {
|
{ while($message = $db->fetch_array($query)) {
|
$msgalt = $msgsuffix = $msgprefix = '';
| $msgalt = $msgstatus = '';
|
// Determine Folder Icon if($message['status'] == 0) {
|
// Determine Folder Icon if($message['status'] == 0) {
|
$msgfolder = 'new_pm.png';
| $msgstatus = 'new_pm';
|
$msgalt = $lang->new_pm;
|
$msgalt = $lang->new_pm;
|
$msgprefix = "<strong>"; $msgsuffix = "</strong>";
| |
}
|
}
|
elseif($message['status'] == 1)
| else if($message['status'] == 1)
|
{
|
{
|
$msgfolder = 'old_pm.png';
| $msgstatus = 'old_pm';
|
$msgalt = $lang->old_pm; }
|
$msgalt = $lang->old_pm; }
|
elseif($message['status'] == 3)
| else if($message['status'] == 3)
|
{
|
{
|
$msgfolder = 're_pm.png';
| $msgstatus = 're_pm';
|
$msgalt = $lang->reply_pm; }
|
$msgalt = $lang->reply_pm; }
|
elseif($message['status'] == 4)
| else if($message['status'] == 4)
|
{
|
{
|
$msgfolder = 'fw_pm.png';
| $msgstatus = 'fw_pm';
|
$msgalt = $lang->fwd_pm; }
| $msgalt = $lang->fwd_pm; }
|
Zeile 2285 | Zeile 2302 |
---|
{ // Sent Items or Drafts Folder Check $recipients = my_unserialize($message['recipients']); $to_users = $bcc_users = '';
|
{ // Sent Items or Drafts Folder Check $recipients = my_unserialize($message['recipients']); $to_users = $bcc_users = '';
|
if(count($recipients['to']) > 1 || (count($recipients['to']) == 1 && isset($recipients['bcc']) && count($recipients['bcc']) > 0))
| if(isset($recipients['to']) && count($recipients['to']) > 1 || (isset($recipients['to']) && count($recipients['to']) == 1 && isset($recipients['bcc']) && count($recipients['bcc']) > 0))
|
{ foreach($recipients['to'] as $uid) { $profilelink = get_profile_link($uid); $user = $cached_users[$uid];
|
{ foreach($recipients['to'] as $uid) { $profilelink = get_profile_link($uid); $user = $cached_users[$uid];
|
| $user['username'] = htmlspecialchars_uni($user['username']);
|
$username = format_name($user['username'], $user['usergroup'], $user['displaygroup']); if(!$user['username']) {
| $username = format_name($user['username'], $user['usergroup'], $user['displaygroup']); if(!$user['username']) {
|
Zeile 2305 | Zeile 2323 |
---|
{ $profilelink = get_profile_link($uid); $user = $cached_users[$uid];
|
{ $profilelink = get_profile_link($uid); $user = $cached_users[$uid];
|
| $user['username'] = htmlspecialchars_uni($user['username']);
|
$username = format_name($user['username'], $user['usergroup'], $user['displaygroup']); if(!$user['username']) {
| $username = format_name($user['username'], $user['usergroup'], $user['displaygroup']); if(!$user['username']) {
|
Zeile 2318 | Zeile 2337 |
---|
} else if($message['toid']) {
|
} else if($message['toid']) {
|
$tofromusername = $message['tousername'];
| $tofromusername = htmlspecialchars_uni($message['tousername']);
|
$tofromuid = $message['toid'];
|
$tofromuid = $message['toid'];
|
}
| }
|
else { $tofromusername = $lang->not_sent;
| else { $tofromusername = $lang->not_sent;
|
Zeile 2328 | Zeile 2347 |
---|
} else {
|
} else {
|
$tofromusername = $message['fromusername'];
| $tofromusername = htmlspecialchars_uni($message['fromusername']);
|
$tofromuid = $message['fromid']; if($tofromuid == 0) {
| $tofromuid = $message['fromid']; if($tofromuid == 0) {
|
Zeile 2392 | Zeile 2411 |
---|
}
$pmspacebar = '';
|
}
$pmspacebar = '';
|
if($mybb->usergroup['pmquota'] != '0' && $mybb->usergroup['cancp'] != 1)
| if($mybb->usergroup['pmquota'] != 0)
|
{ $query = $db->simple_select("privatemessages", "COUNT(*) AS total", "uid='".$mybb->user['uid']."'"); $pmscount = $db->fetch_array($query);
| { $query = $db->simple_select("privatemessages", "COUNT(*) AS total", "uid='".$mybb->user['uid']."'"); $pmscount = $db->fetch_array($query);
|
Zeile 2456 | Zeile 2475 |
---|
}
$limitwarning = '';
|
}
$limitwarning = '';
|
if($mybb->usergroup['pmquota'] != "0" && $pmscount['total'] >= $mybb->usergroup['pmquota'] && $mybb->usergroup['cancp'] != 1)
| if($mybb->usergroup['pmquota'] != 0 && $pmscount['total'] >= $mybb->usergroup['pmquota'])
|
{ eval("\$limitwarning = \"".$templates->get("private_limitwarning")."\";"); }
| { eval("\$limitwarning = \"".$templates->get("private_limitwarning")."\";"); }
|