Zeile 128 | Zeile 128 |
---|
if(($mybb->input['action'] == "do_search" || $mybb->input['action'] == "do_stuff" && ($mybb->input['quick_search'] || !$mybb->input['hop'] && !$mybb->input['moveto'] && !$mybb->input['delete'])) && $mybb->request_method == "post") { $plugins->run_hooks("private_do_search_start");
|
if(($mybb->input['action'] == "do_search" || $mybb->input['action'] == "do_stuff" && ($mybb->input['quick_search'] || !$mybb->input['hop'] && !$mybb->input['moveto'] && !$mybb->input['delete'])) && $mybb->request_method == "post") { $plugins->run_hooks("private_do_search_start");
|
|
|
// Simulate coming from our advanced search form with some preset options if($mybb->input['quick_search']) {
| // Simulate coming from our advanced search form with some preset options if($mybb->input['quick_search']) {
|
Zeile 162 | Zeile 162 |
---|
error($lang->error_searchflooding); } }
|
error($lang->error_searchflooding); } }
|
|
|
if($mybb->input['subject'] != 1 && $mybb->input['message'] != 1) { error($lang->error_nosearchresults); }
|
if($mybb->input['subject'] != 1 && $mybb->input['message'] != 1) { error($lang->error_nosearchresults); }
|
|
|
if($mybb->input['message'] == 1)
|
if($mybb->input['message'] == 1)
|
{
| {
|
$resulttype = "pmmessages"; } else { $resulttype = "pmsubjects"; }
|
$resulttype = "pmmessages"; } else { $resulttype = "pmsubjects"; }
|
|
|
$search_data = array( "keywords" => $mybb->input['keywords'], "subject" => $mybb->input['subject'],
| $search_data = array( "keywords" => $mybb->input['keywords'], "subject" => $mybb->input['subject'],
|
Zeile 189 | Zeile 189 |
---|
if($db->can_search == true) { require_once MYBB_ROOT."inc/functions_search.php";
|
if($db->can_search == true) { require_once MYBB_ROOT."inc/functions_search.php";
|
|
|
$search_results = privatemessage_perform_search_mysql($search_data);
|
$search_results = privatemessage_perform_search_mysql($search_data);
|
}
| }
|
else { error($lang->error_no_search_support);
|
else { error($lang->error_no_search_support);
|
}
| }
|
$sid = md5(uniqid(microtime(), 1)); $searcharray = array( "sid" => $db->escape_string($sid),
| $sid = md5(uniqid(microtime(), 1)); $searcharray = array( "sid" => $db->escape_string($sid),
|
Zeile 211 | Zeile 211 |
---|
$plugins->run_hooks("private_do_search_process");
$db->insert_query("searchlog", $searcharray);
|
$plugins->run_hooks("private_do_search_process");
$db->insert_query("searchlog", $searcharray);
|
|
|
// Sender sort won't work yet $sortby = array('subject', 'sender', 'dateline');
|
// Sender sort won't work yet $sortby = array('subject', 'sender', 'dateline');
|
|
|
if(in_array($mybb->input['sort'], $sortby)) { $sortby = $mybb->input['sort'];
| if(in_array($mybb->input['sort'], $sortby)) { $sortby = $mybb->input['sort'];
|
Zeile 222 | Zeile 222 |
---|
else { $sortby = "dateline";
|
else { $sortby = "dateline";
|
}
| }
|
if(my_strtolower($mybb->input['sortordr']) == "asc" || my_strtolower($mybb->input['sortordr']) == "desc") {
| if(my_strtolower($mybb->input['sortordr']) == "asc" || my_strtolower($mybb->input['sortordr']) == "desc") {
|
Zeile 232 | Zeile 232 |
---|
{ $sortorder = "desc"; }
|
{ $sortorder = "desc"; }
|
|
|
$plugins->run_hooks("private_do_search_end"); redirect("private.php?action=results&sid=".$sid."&sortby=".$sortby."&order=".$sortorder, $lang->redirect_searchresults); }
| $plugins->run_hooks("private_do_search_end"); redirect("private.php?action=results&sid=".$sid."&sortby=".$sortby."&order=".$sortorder, $lang->redirect_searchresults); }
|
Zeile 242 | Zeile 242 |
---|
$sid = $db->escape_string($mybb->input['sid']); $query = $db->simple_select("searchlog", "*", "sid='{$sid}' AND uid='{$mybb->user['uid']}'"); $search = $db->fetch_array($query);
|
$sid = $db->escape_string($mybb->input['sid']); $query = $db->simple_select("searchlog", "*", "sid='{$sid}' AND uid='{$mybb->user['uid']}'"); $search = $db->fetch_array($query);
|
|
|
if(!$search['sid']) { error($lang->error_invalidsearch);
| if(!$search['sid']) { error($lang->error_invalidsearch);
|
Zeile 253 | Zeile 253 |
---|
// Decide on our sorting fields and sorting order. $order = my_strtolower(htmlspecialchars_uni($mybb->input['order'])); $sortby = my_strtolower(htmlspecialchars_uni($mybb->input['sortby']));
|
// Decide on our sorting fields and sorting order. $order = my_strtolower(htmlspecialchars_uni($mybb->input['order'])); $sortby = my_strtolower(htmlspecialchars_uni($mybb->input['sortby']));
|
|
|
$sortby_accepted = array('subject', 'username', 'dateline');
|
$sortby_accepted = array('subject', 'username', 'dateline');
|
|
|
if(in_array($sortby, $sortby_accepted))
|
if(in_array($sortby, $sortby_accepted))
|
{
| {
|
$query_sortby = $sortby;
|
$query_sortby = $sortby;
|
|
|
if($query_sortby == "username") { $query_sortby = "fromusername"; } } else
|
if($query_sortby == "username") { $query_sortby = "fromusername"; } } else
|
{
| {
|
$sortby = $query_sortby = "dateline"; }
|
$sortby = $query_sortby = "dateline"; }
|
|
|
if($order != "asc") { $order = "desc";
|
if($order != "asc") { $order = "desc";
|
}
| }
|
if(!$mybb->settings['threadsperpage']) { $mybb->settings['threadsperpage'] = 20;
| if(!$mybb->settings['threadsperpage']) { $mybb->settings['threadsperpage'] = 20;
|
Zeile 286 | Zeile 286 |
---|
if($page > 0) { $start = ($page-1) * $perpage;
|
if($page > 0) { $start = ($page-1) * $perpage;
|
}
| }
|
else { $start = 0;
| else { $start = 0;
|
Zeile 295 | Zeile 295 |
---|
$end = $start + $perpage; $lower = $start+1; $upper = $end;
|
$end = $start + $perpage; $lower = $start+1; $upper = $end;
|
|
|
// Work out if we have terms to highlight $highlight = ""; if($search['keywords']) { $highlight = "&highlight=".urlencode($search['keywords']);
|
// Work out if we have terms to highlight $highlight = ""; if($search['keywords']) { $highlight = "&highlight=".urlencode($search['keywords']);
|
}
| }
|
// Do Multi Pages $query = $db->simple_select("privatemessages", "COUNT(*) AS total", "pmid IN(".$db->escape_string($search['querycache']).")"); $pmscount = $db->fetch_array($query);
|
// 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 > $threadcount) { $upper = $threadcount; } $multipage = multipage($pmscount['total'], $perpage, $page, "private.php?action=results&sid=".htmlspecialchars_uni($mybb->input['sid'])."&sortby={$sortby}&order={$order}"); $messagelist = '';
|
if($upper > $threadcount) { $upper = $threadcount; } $multipage = multipage($pmscount['total'], $perpage, $page, "private.php?action=results&sid=".htmlspecialchars_uni($mybb->input['sid'])."&sortby={$sortby}&order={$order}"); $messagelist = '';
|
|
|
$icon_cache = $cache->read("posticons");
|
$icon_cache = $cache->read("posticons");
|
|
|
// Cache users in multiple recipients for sent & drafts folder // Get all recipients into an array $cached_users = $get_users = array();
| // Cache users in multiple recipients for sent & drafts folder // Get all recipients into an array $cached_users = $get_users = array();
|
Zeile 327 | Zeile 327 |
---|
{ $get_users = array_merge($get_users, $recipients['to']); }
|
{ $get_users = array_merge($get_users, $recipients['to']); }
|
|
|
if(is_array($recipients['bcc']) && count($recipients['bcc'])) { $get_users = array_merge($get_users, $recipients['bcc']);
|
if(is_array($recipients['bcc']) && count($recipients['bcc'])) { $get_users = array_merge($get_users, $recipients['bcc']);
|
} }
| } }
|
$get_users = implode(',', array_unique($get_users));
|
$get_users = implode(',', array_unique($get_users));
|
|
|
// Grab info if($get_users) {
| // Grab info if($get_users) {
|
Zeile 345 | Zeile 345 |
---|
$cached_users[$user['uid']] = $user; } }
|
$cached_users[$user['uid']] = $user; } }
|
|
|
$query = $db->query(" SELECT pm.*, fu.username AS fromusername, tu.username as tousername FROM ".TABLE_PREFIX."privatemessages pm
| $query = $db->query(" SELECT pm.*, fu.username AS fromusername, tu.username as tousername FROM ".TABLE_PREFIX."privatemessages pm
|
Zeile 358 | Zeile 358 |
---|
while($message = $db->fetch_array($query)) { $msgalt = $msgsuffix = $msgprefix = '';
|
while($message = $db->fetch_array($query)) { $msgalt = $msgsuffix = $msgprefix = '';
|
|
|
// Determine Folder Icon if($message['status'] == 0)
|
// Determine Folder Icon if($message['status'] == 0)
|
{
| {
|
$msgfolder = 'new_pm.gif'; $msgalt = $lang->new_pm; $msgprefix = "<strong>";
| $msgfolder = 'new_pm.gif'; $msgalt = $lang->new_pm; $msgprefix = "<strong>";
|
Zeile 373 | Zeile 373 |
---|
$msgalt = $lang->old_pm; } elseif($message['status'] == 3)
|
$msgalt = $lang->old_pm; } elseif($message['status'] == 3)
|
{
| {
|
$msgfolder = 're_pm.gif'; $msgalt = $lang->reply_pm;
|
$msgfolder = 're_pm.gif'; $msgalt = $lang->reply_pm;
|
}
| }
|
else if($message['status'] == 4) { $msgfolder = 'fw_pm.gif'; $msgalt = $lang->fwd_pm; }
|
else if($message['status'] == 4) { $msgfolder = 'fw_pm.gif'; $msgalt = $lang->fwd_pm; }
|
|
|
if($folder == 2 || $folder == 3) { // Sent Items or Drafts Folder Check
| if($folder == 2 || $folder == 3) { // Sent Items or Drafts Folder Check
|
Zeile 395 | Zeile 395 |
---|
$profilelink = get_profile_link($uid); $user = $cached_users[$uid]; $username = format_name($user['username'], $user['usergroup'], $user['displaygroup']);
|
$profilelink = get_profile_link($uid); $user = $cached_users[$uid]; $username = format_name($user['username'], $user['usergroup'], $user['displaygroup']);
|
eval("\$to_users .= \"".$templates->get("private_multiple_recipients_user")."\";");
| eval("\$to_users .= \"".$templates->get("private_multiple_recipients_user")."\";");
|
} if(is_array($recipients['bcc']) && count($recipients['bcc'])) {
| } if(is_array($recipients['bcc']) && count($recipients['bcc'])) {
|
Zeile 405 | Zeile 405 |
---|
$profilelink = get_profile_link($uid); $user = $cached_users[$uid]; $username = format_name($user['username'], $user['usergroup'], $user['displaygroup']);
|
$profilelink = get_profile_link($uid); $user = $cached_users[$uid]; $username = format_name($user['username'], $user['usergroup'], $user['displaygroup']);
|
eval("\$bcc_users .= \"".$templates->get("private_multiple_recipients_user")."\";");
| eval("\$bcc_users .= \"".$templates->get("private_multiple_recipients_user")."\";");
|
} }
|
} }
|
|
|
eval("\$tofromusername = \"".$templates->get("private_multiple_recipients")."\";"); } else if($message['toid'])
|
eval("\$tofromusername = \"".$templates->get("private_multiple_recipients")."\";"); } else if($message['toid'])
|
{
| {
|
$tofromusername = $message['tousername']; $tofromuid = $message['toid']; } else { $tofromusername = $lang->not_sent;
|
$tofromusername = $message['tousername']; $tofromuid = $message['toid']; } else { $tofromusername = $lang->not_sent;
|
}
| }
|
} else {
| } else {
|
Zeile 430 | Zeile 430 |
---|
$tofromusername = $lang->mybb_engine; } }
|
$tofromusername = $lang->mybb_engine; } }
|
|
|
$tofromusername = build_profile_link($tofromusername, $tofromuid);
|
$tofromusername = build_profile_link($tofromusername, $tofromuid);
|
|
|
$denyreceipt = '';
|
$denyreceipt = '';
|
|
|
if($message['icon'] > 0 && $icon_cache[$message['icon']]) { $icon = $icon_cache[$message['icon']];
|
if($message['icon'] > 0 && $icon_cache[$message['icon']]) { $icon = $icon_cache[$message['icon']];
|
| $icon['path'] = htmlspecialchars_uni($icon['path']); $icon['name'] = htmlspecialchars_uni($icon['name']);
|
$icon = "<img src=\"{$icon['path']}\" alt=\"{$icon['name']}\" align=\"center\" valign=\"middle\" />";
|
$icon = "<img src=\"{$icon['path']}\" alt=\"{$icon['name']}\" align=\"center\" valign=\"middle\" />";
|
} else
| } else
|
{ $icon = '	'; }
|
{ $icon = '	'; }
|
|
|
if(!trim($message['subject'])) { $message['subject'] = $lang->pm_no_subject;
|
if(!trim($message['subject'])) { $message['subject'] = $lang->pm_no_subject;
|
}
| }
|
$message['subject'] = $parser->parse_badwords($message['subject']);
|
$message['subject'] = $parser->parse_badwords($message['subject']);
|
|
|
if(my_strlen($message['subject']) > 50)
|
if(my_strlen($message['subject']) > 50)
|
{
| {
|
$message['subject'] = htmlspecialchars_uni(my_substr($message['subject'], 0, 50)."...");
|
$message['subject'] = htmlspecialchars_uni(my_substr($message['subject'], 0, 50)."...");
|
} else
| } else
|
{ $message['subject'] = htmlspecialchars_uni($message['subject']); }
|
{ $message['subject'] = htmlspecialchars_uni($message['subject']); }
|
|
|
if($message['folder'] != "3") { $sendpmdate = my_date($mybb->settings['dateformat'], $message['dateline']);
| if($message['folder'] != "3") { $sendpmdate = my_date($mybb->settings['dateformat'], $message['dateline']);
|
Zeile 471 | Zeile 473 |
---|
{ $senddate = $lang->not_sent; }
|
{ $senddate = $lang->not_sent; }
|
|
|
$foldername = $foldernames[$message['folder']];
|
$foldername = $foldernames[$message['folder']];
|
|
|
// What we do here is parse the post using our post parser, then strip the tags from it $parser_options = array( 'allow_html' => 0,
| // What we do here is parse the post using our post parser, then strip the tags from it $parser_options = array( 'allow_html' => 0,
|
Zeile 487 | Zeile 489 |
---|
{ $message['message'] = my_substr($message['message'], 0, 200)."..."; }
|
{ $message['message'] = my_substr($message['message'], 0, 200)."..."; }
|
|
|
eval("\$messagelist .= \"".$templates->get("private_search_messagebit")."\";");
|
eval("\$messagelist .= \"".$templates->get("private_search_messagebit")."\";");
|
}
| }
|
if($db->num_rows($query) == 0) { eval("\$messagelist = \"".$templates->get("private_search_results_nomessages")."\";"); }
|
if($db->num_rows($query) == 0) { eval("\$messagelist = \"".$templates->get("private_search_results_nomessages")."\";"); }
|
|
|
$plugins->run_hooks("private_results_end");
|
$plugins->run_hooks("private_results_end");
|
|
|
eval("\$results = \"".$templates->get("private_search_results")."\";"); output_page($results); }
if($mybb->input['action'] == "advanced_search")
|
eval("\$results = \"".$templates->get("private_search_results")."\";"); output_page($results); }
if($mybb->input['action'] == "advanced_search")
|
{
| {
|
$plugins->run_hooks("private_advanced_search");
|
$plugins->run_hooks("private_advanced_search");
|
|
|
eval("\$advanced_search = \"".$templates->get("private_advanced_search")."\";");
|
eval("\$advanced_search = \"".$templates->get("private_advanced_search")."\";");
|
|
|
output_page($advanced_search); }
| output_page($advanced_search); }
|
Zeile 515 | Zeile 517 |
---|
if($mybb->input['action'] == "dismiss_notice") { if($mybb->user['pmnotice'] != 2)
|
if($mybb->input['action'] == "dismiss_notice") { if($mybb->user['pmnotice'] != 2)
|
{ exit;
| { exit;
|
}
// Verify incoming POST request
| }
// Verify incoming POST request
|
Zeile 530 | Zeile 532 |
---|
if($mybb->input['ajax']) { echo 1;
|
if($mybb->input['ajax']) { echo 1;
|
exit; } else
| exit; } else
|
{ header("Location: index.php"); exit;
| { header("Location: index.php"); exit;
|
Zeile 589 | Zeile 591 |
---|
}
if(!$mybb->usergroup['cantrackpms'])
|
}
if(!$mybb->usergroup['cantrackpms'])
|
{
| {
|
$mybb->input['options']['readreceipt'] = false; }
| $mybb->input['options']['readreceipt'] = false; }
|
Zeile 639 | Zeile 641 |
---|
$plugins->run_hooks("private_send_start");
$smilieinserter = $codebuttons = '';
|
$plugins->run_hooks("private_send_start");
$smilieinserter = $codebuttons = '';
|
|
|
if($mybb->settings['bbcodeinserter'] != 0 && $mybb->settings['pmsallowmycode'] != 0 && $mybb->user['showcodebuttons'] != 0) { $codebuttons = build_mycode_inserter(); if($mybb->settings['pmsallowsmilies'] != 0) { $smilieinserter = build_clickable_smilies();
|
if($mybb->settings['bbcodeinserter'] != 0 && $mybb->settings['pmsallowmycode'] != 0 && $mybb->user['showcodebuttons'] != 0) { $codebuttons = build_mycode_inserter(); if($mybb->settings['pmsallowsmilies'] != 0) { $smilieinserter = build_clickable_smilies();
|
}
| }
|
}
$lang->post_icon = $lang->message_icon;
| }
$lang->post_icon = $lang->message_icon;
|
Zeile 739 | Zeile 741 |
---|
$optionschecked['readreceipt'] = 'checked="checked"'; } $optionschecked['savecopy'] = 'checked="checked"';
|
$optionschecked['readreceipt'] = 'checked="checked"'; } $optionschecked['savecopy'] = 'checked="checked"';
|
}
| }
|
// Draft, reply, forward if($mybb->input['pmid'] && !$mybb->input['preview'] && !$send_errors) {
| // Draft, reply, forward if($mybb->input['pmid'] && !$mybb->input['preview'] && !$send_errors) {
|
Zeile 771 | Zeile 773 |
---|
if($pm['receipt']) { $optionschecked['readreceipt'] = 'checked="checked"';
|
if($pm['receipt']) { $optionschecked['readreceipt'] = 'checked="checked"';
|
}
| }
|
// Get list of recipients $recipients = unserialize($pm['recipients']);
| // Get list of recipients $recipients = unserialize($pm['recipients']);
|
Zeile 779 | Zeile 781 |
---|
if(isset($recipients['to']) && is_array($recipients['to'])) { foreach($recipients['to'] as $recipient)
|
if(isset($recipients['to']) && is_array($recipients['to'])) { foreach($recipients['to'] as $recipient)
|
{
| {
|
$recipient_list['to'][] = $recipient;
|
$recipient_list['to'][] = $recipient;
|
$recipientids .= $comma.$recipient; $comma = ','; }
| $recipientids .= $comma.$recipient; $comma = ','; }
|
}
|
}
|
|
|
if(isset($recipients['bcc']) && is_array($recipients['bcc'])) { foreach($recipients['bcc'] as $recipient)
| if(isset($recipients['bcc']) && is_array($recipients['bcc'])) { foreach($recipients['bcc'] as $recipient)
|
Zeile 793 | Zeile 795 |
---|
$recipient_list['bcc'][] = $recipient; $recipientids .= $comma.$recipient; $comma = ',';
|
$recipient_list['bcc'][] = $recipient; $recipientids .= $comma.$recipient; $comma = ',';
|
}
| }
|
}
|
}
|
|
|
if(!empty($recipientids)) { $query = $db->simple_select("users", "uid, username", "uid IN ({$recipientids})");
| if(!empty($recipientids)) { $query = $db->simple_select("users", "uid, username", "uid IN ({$recipientids})");
|
Zeile 806 | Zeile 808 |
---|
$bcc .= htmlspecialchars_uni($user['username']).', '; } else
|
$bcc .= htmlspecialchars_uni($user['username']).', '; } else
|
{
| {
|
$to .= htmlspecialchars_uni($user['username']).', '; }
|
$to .= htmlspecialchars_uni($user['username']).', '; }
|
} }
| } }
|
} else {
| } else {
|
Zeile 822 | Zeile 824 |
---|
$message = preg_replace('#^/me (.*)$#im', "* ".$pm['quotename']." \\1", $message);
if($mybb->input['do'] == 'forward')
|
$message = preg_replace('#^/me (.*)$#im', "* ".$pm['quotename']." \\1", $message);
if($mybb->input['do'] == 'forward')
|
{
| {
|
$subject = "Fw: $subject"; } elseif($mybb->input['do'] == 'reply')
| $subject = "Fw: $subject"; } elseif($mybb->input['do'] == 'reply')
|
Zeile 830 | Zeile 832 |
---|
$subject = "Re: $subject"; $uid = $pm['fromid']; if($mybb->user['uid'] == $uid)
|
$subject = "Re: $subject"; $uid = $pm['fromid']; if($mybb->user['uid'] == $uid)
|
{
| {
|
$to = $mybb->user['username']; } else { $query = $db->simple_select('users', 'username', "uid='{$uid}'"); $to = $db->fetch_field($query, 'username');
|
$to = $mybb->user['username']; } else { $query = $db->simple_select('users', 'username', "uid='{$uid}'"); $to = $db->fetch_field($query, 'username');
|
}
| }
|
$to = htmlspecialchars_uni($to); } else if($mybb->input['do'] == 'replyall')
| $to = htmlspecialchars_uni($to); } else if($mybb->input['do'] == 'replyall')
|
Zeile 848 | Zeile 850 |
---|
$recipients = unserialize($pm['recipients']); $recipientids = $pm['fromid']; if(isset($recipients['to']) && is_array($recipients['to']))
|
$recipients = unserialize($pm['recipients']); $recipientids = $pm['fromid']; if(isset($recipients['to']) && is_array($recipients['to']))
|
{
| {
|
foreach($recipients['to'] as $recipient) { if($recipient == $mybb->user['uid'])
| foreach($recipients['to'] as $recipient) { if($recipient == $mybb->user['uid'])
|
Zeile 867 | Zeile 869 |
---|
} } }
|
} } }
|
}
| }
|
// New PM with recipient preset if($mybb->input['uid'] && !$mybb->input['preview']) {
| // New PM with recipient preset if($mybb->input['uid'] && !$mybb->input['preview']) {
|
Zeile 880 | Zeile 882 |
---|
if($mybb->usergroup['maxpmrecipients'] > 0) { $max_recipients = $lang->sprintf($lang->max_recipients, $mybb->usergroup['maxpmrecipients']);
|
if($mybb->usergroup['maxpmrecipients'] > 0) { $max_recipients = $lang->sprintf($lang->max_recipients, $mybb->usergroup['maxpmrecipients']);
|
}
| }
|
if($send_errors) { $to = htmlspecialchars_uni($mybb->input['to']);
|
if($send_errors) { $to = htmlspecialchars_uni($mybb->input['to']);
|
$bcc = htmlspecialchars_uni($mybb->input['bcc']);
| $bcc = htmlspecialchars_uni($mybb->input['bcc']);
|
}
// Load the auto complete javascript if it is enabled.
| }
// Load the auto complete javascript if it is enabled.
|
Zeile 897 | Zeile 899 |
---|
{ $do = ''; }
|
{ $do = ''; }
|
|
|
// See if it's actually worth showing the buddylist icon. if($mybb->user['buddylist'] != '' && $mybb->settings['use_xmlhttprequest'] == 1)
|
// See if it's actually worth showing the buddylist icon. if($mybb->user['buddylist'] != '' && $mybb->settings['use_xmlhttprequest'] == 1)
|
{
| {
|
$buddy_select = 'to'; eval("\$buddy_select_to = \"".$templates->get("private_send_buddyselect")."\";"); $buddy_select = 'bcc';
| $buddy_select = 'to'; eval("\$buddy_select_to = \"".$templates->get("private_send_buddyselect")."\";"); $buddy_select = 'bcc';
|
Zeile 915 | Zeile 917 |
---|
$tracking = $templates->get("private_send_tracking"); } eval("\$private_send_tracking = \"".$tracking."\";");
|
$tracking = $templates->get("private_send_tracking"); } eval("\$private_send_tracking = \"".$tracking."\";");
|
|
|
// Hide signature option if no permission $option_signature = ''; if($mybb->usergroup['canusesig'] && !$mybb->user['suspendsignature'])
| // Hide signature option if no permission $option_signature = ''; if($mybb->usergroup['canusesig'] && !$mybb->user['suspendsignature'])
|
Zeile 923 | Zeile 925 |
---|
$option_signature = $templates->get('private_send_signature'); } eval("\$private_send_signature = \"".$option_signature."\";");
|
$option_signature = $templates->get('private_send_signature'); } eval("\$private_send_signature = \"".$option_signature."\";");
|
|
|
$plugins->run_hooks("private_send_end");
eval("\$send = \"".$private_send."\";");
| $plugins->run_hooks("private_send_end");
eval("\$send = \"".$private_send."\";");
|
Zeile 931 | Zeile 933 |
---|
}
if($mybb->input['action'] == "read")
|
}
if($mybb->input['action'] == "read")
|
{
| {
|
$plugins->run_hooks("private_read");
$pmid = intval($mybb->input['pmid']);
| $plugins->run_hooks("private_read");
$pmid = intval($mybb->input['pmid']);
|
Zeile 972 | Zeile 974 |
---|
if($pm['receipt'] == 1) {
|
if($pm['receipt'] == 1) {
|
if($mybb->usergroup['cantrackpms'] == 1 && $mybb->usergroup['candenypmreceipts'] == 1 && $mybb->input['denyreceipt'] == 1)
| if($mybb->usergroup['candenypmreceipts'] == 1 && $mybb->input['denyreceipt'] == 1)
|
{ $receiptadd = 0; }
| { $receiptadd = 0; }
|
Zeile 993 | Zeile 995 |
---|
if(isset($receiptadd)) { $updatearray['receipt'] = $receiptadd;
|
if(isset($receiptadd)) { $updatearray['receipt'] = $receiptadd;
|
}
$db->update_query('privatemessages', $updatearray, "pmid='{$pmid}'");
| }
$db->update_query('privatemessages', $updatearray, "pmid='{$pmid}'");
|
// 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);
|
Zeile 1007 | Zeile 1009 |
---|
"pmnotice" => 1 ); $db->update_query("users", $updated_user, "uid='{$mybb->user['uid']}'");
|
"pmnotice" => 1 ); $db->update_query("users", $updated_user, "uid='{$mybb->user['uid']}'");
|
}
| }
|
} // Replied PM? else if($pm['status'] == 3 && $pm['statustime']) { $reply_date = my_date($mybb->settings['dateformat'], $pm['statustime']);
|
} // Replied PM? else if($pm['status'] == 3 && $pm['statustime']) { $reply_date = my_date($mybb->settings['dateformat'], $pm['statustime']);
|
|
|
if($reply_date == $lang->today || $reply_date == $lang->yesterday)
|
if($reply_date == $lang->today || $reply_date == $lang->yesterday)
|
{
| {
|
$reply_date .= $lang->comma.my_date($mybb->settings['timeformat'], $pm['statustime']); $actioned_on = $lang->sprintf($lang->you_replied, $reply_date); }
| $reply_date .= $lang->comma.my_date($mybb->settings['timeformat'], $pm['statustime']); $actioned_on = $lang->sprintf($lang->you_replied, $reply_date); }
|
Zeile 1023 | Zeile 1025 |
---|
{ $reply_date .= $lang->comma.my_date($mybb->settings['timeformat'], $pm['statustime']); $actioned_on = $lang->sprintf($lang->you_replied_on, $reply_date);
|
{ $reply_date .= $lang->comma.my_date($mybb->settings['timeformat'], $pm['statustime']); $actioned_on = $lang->sprintf($lang->you_replied_on, $reply_date);
|
} eval("\$action_time = \"".$templates->get("private_read_action")."\";");
| }
eval("\$action_time = \"".$templates->get("private_read_action")."\";");
|
} else if($pm['status'] == 4 && $pm['statustime']) { $forward_date = my_date($mybb->settings['dateformat'], $pm['statustime']);
|
} else if($pm['status'] == 4 && $pm['statustime']) { $forward_date = my_date($mybb->settings['dateformat'], $pm['statustime']);
|
|
|
if(strpos($forward_date, $lang->today) !== false || strpos($forward_date, $lang->yesterday) !== false)
|
if(strpos($forward_date, $lang->today) !== false || strpos($forward_date, $lang->yesterday) !== false)
|
{
| {
|
$forward_date .= $lang->comma.my_date($mybb->settings['timeformat'], $pm['statustime']); $actioned_on = $lang->sprintf($lang->you_forwarded, $forward_date); }
| $forward_date .= $lang->comma.my_date($mybb->settings['timeformat'], $pm['statustime']); $actioned_on = $lang->sprintf($lang->you_forwarded, $forward_date); }
|
Zeile 1041 | Zeile 1043 |
---|
$forward_date .= $lang->comma.my_date($mybb->settings['timeformat'], $pm['statustime']); $actioned_on = $lang->sprintf($lang->you_forwarded_on, $forward_date); }
|
$forward_date .= $lang->comma.my_date($mybb->settings['timeformat'], $pm['statustime']); $actioned_on = $lang->sprintf($lang->you_forwarded_on, $forward_date); }
|
|
|
eval("\$action_time = \"".$templates->get("private_read_action")."\";");
|
eval("\$action_time = \"".$templates->get("private_read_action")."\";");
|
}
| }
|
$pm['userusername'] = $pm['username']; $pm['subject'] = htmlspecialchars_uni($parser->parse_badwords($pm['subject']));
if($pm['fromid'] == 0) { $pm['username'] = $lang->mybb_engine;
|
$pm['userusername'] = $pm['username']; $pm['subject'] = htmlspecialchars_uni($parser->parse_badwords($pm['subject']));
if($pm['fromid'] == 0) { $pm['username'] = $lang->mybb_engine;
|
}
| }
|
if(!$pm['username']) { $pm['username'] = $lang->na;
|
if(!$pm['username']) { $pm['username'] = $lang->na;
|
}
| }
|
// Fetch the recipients for this message $pm['recipients'] = @unserialize($pm['recipients']);
| // Fetch the recipients for this message $pm['recipients'] = @unserialize($pm['recipients']);
|
Zeile 1069 | Zeile 1071 |
---|
{ $uid_sql = $pm['toid']; $pm['recipients']['to'] = array($pm['toid']);
|
{ $uid_sql = $pm['toid']; $pm['recipients']['to'] = array($pm['toid']);
|
}
$show_bcc = 0;
| }
$show_bcc = 0;
|
// If we have any BCC recipients and this user is an Administrator, add them on to the query if(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(count($pm['recipients']['bcc']) > 0 && $mybb->usergroup['cancp'] == 1)
|
{
| {
|
$show_bcc = 1; $uid_sql .= ','.implode(',', $pm['recipients']['bcc']); }
|
$show_bcc = 1; $uid_sql .= ','.implode(',', $pm['recipients']['bcc']); }
|
|
|
// Fetch recipient names from the database $bcc_recipients = $to_recipients = array(); $query = $db->simple_select('users', 'uid, username', "uid IN ({$uid_sql})");
| // Fetch recipient names from the database $bcc_recipients = $to_recipients = array(); $query = $db->simple_select('users', 'uid, username', "uid IN ({$uid_sql})");
|
Zeile 1087 | Zeile 1089 |
---|
{ // User is a BCC recipient if($show_bcc && in_array($recipient['uid'], $pm['recipients']['bcc']))
|
{ // User is a BCC recipient if($show_bcc && in_array($recipient['uid'], $pm['recipients']['bcc']))
|
{
| {
|
$bcc_recipients[] = build_profile_link($recipient['username'], $recipient['uid']); } // User is a normal recipient
| $bcc_recipients[] = build_profile_link($recipient['username'], $recipient['uid']); } // User is a normal recipient
|
Zeile 1101 | Zeile 1103 |
---|
{ $bcc_recipients = implode(', ', $bcc_recipients); eval("\$bcc = \"".$templates->get("private_read_bcc")."\";");
|
{ $bcc_recipients = implode(', ', $bcc_recipients); eval("\$bcc = \"".$templates->get("private_read_bcc")."\";");
|
}
| }
|
$replyall = false; if(count($to_recipients) > 1)
|
$replyall = false; if(count($to_recipients) > 1)
|
{
| {
|
$replyall = true;
|
$replyall = true;
|
}
| }
|
if(count($to_recipients) > 0) { $to_recipients = implode(", ", $to_recipients);
|
if(count($to_recipients) > 0) { $to_recipients = implode(", ", $to_recipients);
|
}
| }
|
else { $to_recipients = $lang->nobody;
|
else { $to_recipients = $lang->nobody;
|
}
| }
eval("\$pm['subject_extra'] = \"".$templates->get("private_read_to")."\";");
|
|
|
eval("\$pm['subject_extra'] = \"".$templates->get("private_read_to")."\";");
| |
add_breadcrumb($pm['subject']); $message = build_postbit($pm, 2);
|
add_breadcrumb($pm['subject']); $message = build_postbit($pm, 2);
|
|
|
$plugins->run_hooks("private_read_end");
|
$plugins->run_hooks("private_read_end");
|
|
|
eval("\$read = \"".$templates->get("private_read")."\";"); output_page($read); }
| eval("\$read = \"".$templates->get("private_read")."\";"); output_page($read); }
|
Zeile 1134 | Zeile 1136 |
---|
if(!$mybb->usergroup['cantrackpms']) { error_no_permission();
|
if(!$mybb->usergroup['cantrackpms']) { error_no_permission();
|
}
| }
|
$plugins->run_hooks("private_tracking_start"); $readmessages = ''; $unreadmessages = '';
|
$plugins->run_hooks("private_tracking_start"); $readmessages = ''; $unreadmessages = '';
|
| if(!$mybb->settings['postsperpage'] || (int)$mybb->settings['postsperpage'] < 1) { $mybb->settings['postsperpage'] = 20; }
|
// Figure out if we need to display multiple pages. $perpage = $mybb->settings['postsperpage'];
|
// Figure out if we need to display multiple pages. $perpage = $mybb->settings['postsperpage'];
|
|
|
$query = $db->simple_select("privatemessages", "COUNT(pmid) as readpms", "receipt='2' AND folder!='3' AND status!='0' AND fromid='".$mybb->user['uid']."'"); $postcount = $db->fetch_field($query, "readpms");
|
$query = $db->simple_select("privatemessages", "COUNT(pmid) as readpms", "receipt='2' AND folder!='3' AND status!='0' AND fromid='".$mybb->user['uid']."'"); $postcount = $db->fetch_field($query, "readpms");
|
|
|
$page = intval($mybb->input['read_page']);
|
$page = intval($mybb->input['read_page']);
|
$pages = $postcount / $perpage; $pages = ceil($pages);
if($mybb->input['page'] == "last") { $page = $pages; }
if($page > $pages || $page <= 0) {
| $pages = $postcount / $perpage; $pages = ceil($pages);
if($mybb->input['page'] == "last") { $page = $pages; }
if($page > $pages || $page <= 0) {
|
$page = 1; }
if($page) { $start = ($page-1) * $perpage;
|
$page = 1; }
if($page) { $start = ($page-1) * $perpage;
|
} else
| } 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 FROM ".TABLE_PREFIX."privatemessages pm
| $query = $db->query(" SELECT pm.pmid, pm.subject, pm.toid, pm.readtime, u.username as tousername FROM ".TABLE_PREFIX."privatemessages pm
|
Zeile 1187 | Zeile 1194 |
---|
$readdate = my_date($mybb->settings['dateformat'], $readmessage['readtime']); $readtime = my_date($mybb->settings['timeformat'], $readmessage['readtime']); eval("\$readmessages .= \"".$templates->get("private_tracking_readmessage")."\";");
|
$readdate = my_date($mybb->settings['dateformat'], $readmessage['readtime']); $readtime = my_date($mybb->settings['timeformat'], $readmessage['readtime']); eval("\$readmessages .= \"".$templates->get("private_tracking_readmessage")."\";");
|
}
| }
|
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");
|
|
|
$page = intval($mybb->input['unread_page']); $pages = $postcount / $perpage; $pages = ceil($pages);
| $page = intval($mybb->input['unread_page']); $pages = $postcount / $perpage; $pages = ceil($pages);
|
Zeile 1220 | Zeile 1227 |
---|
$start = 0; $page = 1; }
|
$start = 0; $page = 1; }
|
|
|
$unread_multipage = multipage($postcount, $perpage, $page, "private.php?action=tracking&unread_page={page}");
|
$unread_multipage = multipage($postcount, $perpage, $page, "private.php?action=tracking&unread_page={page}");
|
|
|
$query = $db->query(" SELECT pm.pmid, pm.subject, pm.toid, pm.dateline, u.username as tousername FROM ".TABLE_PREFIX."privatemessages pm
| $query = $db->query(" SELECT pm.pmid, pm.subject, pm.toid, pm.dateline, u.username as tousername FROM ".TABLE_PREFIX."privatemessages pm
|
Zeile 1234 | Zeile 1241 |
---|
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['profilelink'] = build_profile_link($unreadmessage['tousername'], $unreadmessage['toid']);
| $unreadmessage['profilelink'] = build_profile_link($unreadmessage['tousername'], $unreadmessage['toid']);
|
$senddate = my_date($mybb->settings['dateformat'], $unreadmessage['dateline']); $sendtime = my_date($mybb->settings['timeformat'], $unreadmessage['dateline']); eval("\$unreadmessages .= \"".$templates->get("private_tracking_unreadmessage")."\";");
|
$senddate = my_date($mybb->settings['dateformat'], $unreadmessage['dateline']); $sendtime = my_date($mybb->settings['timeformat'], $unreadmessage['dateline']); eval("\$unreadmessages .= \"".$templates->get("private_tracking_unreadmessage")."\";");
|
}
| }
|
if(!$unreadmessages) { $lang->no_readmessages = $lang->no_unreadmessages; eval("\$unreadmessages = \"".$templates->get("private_tracking_nomessage")."\";"); }
|
if(!$unreadmessages) { $lang->no_readmessages = $lang->no_unreadmessages; eval("\$unreadmessages = \"".$templates->get("private_tracking_nomessage")."\";"); }
|
|
|
$plugins->run_hooks("private_tracking_end");
|
$plugins->run_hooks("private_tracking_end");
|
|
|
eval("\$tracking = \"".$templates->get("private_tracking")."\";"); output_page($tracking);
|
eval("\$tracking = \"".$templates->get("private_tracking")."\";"); output_page($tracking);
|
}
| }
|
if($mybb->input['action'] == "do_tracking" && $mybb->request_method == "post") { // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
if($mybb->input['action'] == "do_tracking" && $mybb->request_method == "post") { // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
|
|
$plugins->run_hooks("private_do_tracking_start");
|
$plugins->run_hooks("private_do_tracking_start");
|
|
|
if($mybb->input['stoptracking']) { if(is_array($mybb->input['readcheck']))
| if($mybb->input['stoptracking']) { if(is_array($mybb->input['readcheck']))
|
Zeile 1296 | Zeile 1303 |
---|
{ $pmids[$pmid] = intval($pmid); }
|
{ $pmids[$pmid] = intval($pmid); }
|
|
|
$pmids = implode(",", $pmids); $query = $db->simple_select("privatemessages", "uid", "pmid IN ($pmids) AND fromid='".$mybb->user['uid']."'"); while($pm = $db->fetch_array($query)) { $pmuids[$pm['uid']] = $pm['uid']; }
|
$pmids = implode(",", $pmids); $query = $db->simple_select("privatemessages", "uid", "pmid IN ($pmids) AND fromid='".$mybb->user['uid']."'"); while($pm = $db->fetch_array($query)) { $pmuids[$pm['uid']] = $pm['uid']; }
|
|
|
$db->delete_query("privatemessages", "pmid IN ($pmids) AND receipt='1' AND status='0' AND fromid='".$mybb->user['uid']."'"); foreach($pmuids as $uid) {
| $db->delete_query("privatemessages", "pmid IN ($pmids) AND receipt='1' AND status='0' AND fromid='".$mybb->user['uid']."'"); foreach($pmuids as $uid) {
|
Zeile 1313 | Zeile 1320 |
---|
} $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'] == "folders") { $plugins->run_hooks("private_folders_start");
|
if($mybb->input['action'] == "folders") { $plugins->run_hooks("private_folders_start");
|
$folderlist = '';
| $folderlist = '';
|
$foldersexploded = explode("$%%$", $mybb->user['pmfolders']); foreach($foldersexploded as $key => $folders) {
| $foldersexploded = explode("$%%$", $mybb->user['pmfolders']); foreach($foldersexploded as $key => $folders) {
|
Zeile 1328 | Zeile 1335 |
---|
$foldername = $folderinfo[1]; $fid = $folderinfo[0]; $foldername = get_pm_folder_name($fid, $foldername);
|
$foldername = $folderinfo[1]; $fid = $folderinfo[0]; $foldername = get_pm_folder_name($fid, $foldername);
|
|
|
if($folderinfo[0] == "1" || $folderinfo[0] == "2" || $folderinfo[0] == "3" || $folderinfo[0] == "4") { $foldername2 = get_pm_folder_name($fid); eval("\$folderlist .= \"".$templates->get("private_folders_folder_unremovable")."\";"); unset($name);
|
if($folderinfo[0] == "1" || $folderinfo[0] == "2" || $folderinfo[0] == "3" || $folderinfo[0] == "4") { $foldername2 = get_pm_folder_name($fid); eval("\$folderlist .= \"".$templates->get("private_folders_folder_unremovable")."\";"); unset($name);
|
}
| }
|
else { eval("\$folderlist .= \"".$templates->get("private_folders_folder")."\";"); } }
|
else { eval("\$folderlist .= \"".$templates->get("private_folders_folder")."\";"); } }
|
|
|
$newfolders = ''; for($i = 1; $i <= 5; ++$i) {
| $newfolders = ''; for($i = 1; $i <= 5; ++$i) {
|
Zeile 1348 | Zeile 1355 |
---|
$foldername = ''; eval("\$newfolders .= \"".$templates->get("private_folders_folder")."\";"); }
|
$foldername = ''; eval("\$newfolders .= \"".$templates->get("private_folders_folder")."\";"); }
|
|
|
$plugins->run_hooks("private_folders_end");
|
$plugins->run_hooks("private_folders_end");
|
|
|
eval("\$folders = \"".$templates->get("private_folders")."\";"); output_page($folders); }
| eval("\$folders = \"".$templates->get("private_folders")."\";"); output_page($folders); }
|
Zeile 1361 | Zeile 1368 |
---|
verify_post_check($mybb->input['my_post_key']);
$plugins->run_hooks("private_do_folders_start");
|
verify_post_check($mybb->input['my_post_key']);
$plugins->run_hooks("private_do_folders_start");
|
|
|
$highestid = 2; $folders = ''; @reset($mybb->input['folder']); foreach($mybb->input['folder'] as $key => $val) {
|
$highestid = 2; $folders = ''; @reset($mybb->input['folder']); foreach($mybb->input['folder'] as $key => $val) {
|
if(!$donefolders[$val]) // Probably was a check for duplicate folder names, but doesn't seem to be used now
| if(!$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(my_substr($key, 0, 3) == "new") // Create a new folder {
|
Zeile 1379 | Zeile 1386 |
---|
if($key > $highestid) { $highestid = $key;
|
if($key > $highestid) { $highestid = $key;
|
}
| }
|
$fid = intval($key); // Use default language strings if empty or value is language string switch($fid) { case 1: if($val == $lang->folder_inbox || trim($val) == '')
|
$fid = intval($key); // Use default language strings if empty or value is language string switch($fid) { case 1: if($val == $lang->folder_inbox || trim($val) == '')
|
{ $val = '';
| { $val = '';
|
} break; case 2: if($val == $lang->folder_sent_items || trim($val) == '')
|
} break; case 2: if($val == $lang->folder_sent_items || trim($val) == '')
|
{ $val = ''; }
| { $val = ''; }
|
break; case 3: if($val == $lang->folder_drafts || trim($val) == '')
|
break; case 3: if($val == $lang->folder_drafts || trim($val) == '')
|
{
| {
|
$val = ''; } break;
| $val = ''; } break;
|
Zeile 1411 | Zeile 1418 |
---|
break; } }
|
break; } }
|
|
|
if($val != '' && trim($val) == '' && !($key >= 1 && $key <= 4)) { // If the name only contains whitespace and it's not a default folder, print an error error($lang->error_emptypmfoldername); }
|
if($val != '' && trim($val) == '' && !($key >= 1 && $key <= 4)) { // 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 != '' || ($key >= 1 && $key <= 4)) {
|
// If there is a name or if this is a default folder, save it $foldername = $val; $foldername = $db->escape_string(htmlspecialchars_uni($foldername));
| // If there is a name or if this is a default folder, save it $foldername = $db->escape_string(htmlspecialchars_uni($val));
|
if(my_strpos($foldername, "$%%$") === false)
|
if(my_strpos($foldername, "$%%$") === false)
|
{
| {
|
if($folders != '') { $folders .= "$%%$";
| if($folders != '') { $folders .= "$%%$";
|
Zeile 1437 | Zeile 1443 |
---|
{ error($lang->error_invalidpmfoldername); }
|
{ error($lang->error_invalidpmfoldername); }
|
}
| }
|
else { // Delete PMs from the folder
| else { // Delete PMs from the folder
|
Zeile 1448 | Zeile 1454 |
---|
$sql_array = array( "pmfolders" => $folders
|
$sql_array = array( "pmfolders" => $folders
|
);
| );
|
$db->update_query("users", $sql_array, "uid='".$mybb->user['uid']."'");
|
$db->update_query("users", $sql_array, "uid='".$mybb->user['uid']."'");
|
// Update PM count update_pm_count();
| // Update PM count update_pm_count();
|
$plugins->run_hooks("private_do_folders_end");
|
$plugins->run_hooks("private_do_folders_end");
|
|
|
redirect("private.php", $lang->redirect_pmfoldersupdated);
|
redirect("private.php", $lang->redirect_pmfoldersupdated);
|
}
| }
|
if($mybb->input['action'] == "empty") { $plugins->run_hooks("private_empty_start");
|
if($mybb->input['action'] == "empty") { $plugins->run_hooks("private_empty_start");
|
|
|
$foldersexploded = explode("$%%$", $mybb->user['pmfolders']); $folderlist = ''; foreach($foldersexploded as $key => $folders)
| $foldersexploded = explode("$%%$", $mybb->user['pmfolders']); $folderlist = ''; foreach($foldersexploded as $key => $folders)
|
Zeile 1475 | Zeile 1481 |
---|
$foldercount = my_number_format($thing['pmsinfolder']); eval("\$folderlist .= \"".$templates->get("private_empty_folder")."\";"); }
|
$foldercount = my_number_format($thing['pmsinfolder']); eval("\$folderlist .= \"".$templates->get("private_empty_folder")."\";"); }
|
|
|
$plugins->run_hooks("private_empty_end");
|
$plugins->run_hooks("private_empty_end");
|
|
|
eval("\$folders = \"".$templates->get("private_empty")."\";"); output_page($folders); }
if($mybb->input['action'] == "do_empty" && $mybb->request_method == "post")
|
eval("\$folders = \"".$templates->get("private_empty")."\";"); output_page($folders); }
if($mybb->input['action'] == "do_empty" && $mybb->request_method == "post")
|
{
| {
|
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
$plugins->run_hooks("private_do_empty_start");
|
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
$plugins->run_hooks("private_do_empty_start");
|
|
|
$emptyq = ''; if(is_array($mybb->input['empty'])) { foreach($mybb->input['empty'] as $key => $val)
|
$emptyq = ''; if(is_array($mybb->input['empty'])) { foreach($mybb->input['empty'] as $key => $val)
|
{
| {
|
if($val == 1) { $key = intval($key);
| if($val == 1) { $key = intval($key);
|
Zeile 1502 | Zeile 1508 |
---|
$emptyq .= " OR "; } $emptyq .= "folder='$key'";
|
$emptyq .= " OR "; } $emptyq .= "folder='$key'";
|
} }
| } }
|
if($emptyq != '') { if($mybb->input['keepunread'] == 1)
| if($emptyq != '') { if($mybb->input['keepunread'] == 1)
|
Zeile 1512 | Zeile 1518 |
---|
$keepunreadq = " AND status!='0'"; } $db->delete_query("privatemessages", "($emptyq) AND uid='".$mybb->user['uid']."' $keepunreadq");
|
$keepunreadq = " AND status!='0'"; } $db->delete_query("privatemessages", "($emptyq) AND uid='".$mybb->user['uid']."' $keepunreadq");
|
} }
| } }
|
// Update PM count update_pm_count();
| // Update PM count update_pm_count();
|
Zeile 1526 | Zeile 1532 |
---|
{ // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
{ // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
|
|
$plugins->run_hooks("private_do_stuff");
|
$plugins->run_hooks("private_do_stuff");
|
|
|
if($mybb->input['hop']) { header("Location: private.php?fid=".intval($mybb->input['jumpto']));
| if($mybb->input['hop']) { header("Location: private.php?fid=".intval($mybb->input['jumpto']));
|
Zeile 1543 | Zeile 1549 |
---|
"folder" => intval($mybb->input['fid']) ); $db->update_query("privatemessages", $sql_array, "pmid='".intval($key)."' AND uid='".$mybb->user['uid']."'");
|
"folder" => intval($mybb->input['fid']) ); $db->update_query("privatemessages", $sql_array, "pmid='".intval($key)."' AND uid='".$mybb->user['uid']."'");
|
} }
| } }
|
// Update PM count update_pm_count();
| // Update PM count update_pm_count();
|
Zeile 1563 | Zeile 1569 |
---|
{ $pmssql = ''; foreach($mybb->input['check'] as $key => $val)
|
{ $pmssql = ''; foreach($mybb->input['check'] as $key => $val)
|
{
| {
|
if($pmssql) { $pmssql .= ","; } $pmssql .= "'".intval($key)."'"; }
|
if($pmssql) { $pmssql .= ","; } $pmssql .= "'".intval($key)."'"; }
|
|
|
$query = $db->simple_select("privatemessages", "pmid, folder", "pmid IN ($pmssql) AND uid='".$mybb->user['uid']."' AND folder='4'", array('order_by' => 'pmid')); while($delpm = $db->fetch_array($query)) { $deletepms[$delpm['pmid']] = 1;
|
$query = $db->simple_select("privatemessages", "pmid, folder", "pmid IN ($pmssql) AND uid='".$mybb->user['uid']."' AND folder='4'", array('order_by' => 'pmid')); while($delpm = $db->fetch_array($query)) { $deletepms[$delpm['pmid']] = 1;
|
}
| }
|
reset($mybb->input['check']); foreach($mybb->input['check'] as $key => $val) {
| reset($mybb->input['check']); foreach($mybb->input['check'] as $key => $val) {
|
Zeile 1584 | Zeile 1590 |
---|
if($deletepms[$key]) { $db->delete_query("privatemessages", "pmid='$key' AND uid='".$mybb->user['uid']."'");
|
if($deletepms[$key]) { $db->delete_query("privatemessages", "pmid='$key' AND uid='".$mybb->user['uid']."'");
|
}
| }
|
else { $sql_array = array(
| else { $sql_array = array(
|
Zeile 1599 | Zeile 1605 |
---|
update_pm_count();
if(!empty($mybb->input['fromfid']))
|
update_pm_count();
if(!empty($mybb->input['fromfid']))
|
{
| {
|
redirect("private.php?fid=".intval($mybb->input['fromfid']), $lang->redirect_pmsdeleted); } else { redirect("private.php", $lang->redirect_pmsdeleted); }
|
redirect("private.php?fid=".intval($mybb->input['fromfid']), $lang->redirect_pmsdeleted); } else { redirect("private.php", $lang->redirect_pmsdeleted); }
|
}
| }
|
}
if($mybb->input['action'] == "delete")
| }
if($mybb->input['action'] == "delete")
|
Zeile 1614 | Zeile 1620 |
---|
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
$plugins->run_hooks("private_delete_start");
| $plugins->run_hooks("private_delete_start");
|
$query = $db->simple_select("privatemessages", "*", "pmid='".intval($mybb->input['pmid'])."' AND uid='".$mybb->user['uid']."' AND folder='4'", array('order_by' => 'pmid')); if($db->num_rows($query) == 1) { $db->delete_query("privatemessages", "pmid='".intval($mybb->input['pmid'])."'");
|
$query = $db->simple_select("privatemessages", "*", "pmid='".intval($mybb->input['pmid'])."' AND uid='".$mybb->user['uid']."' AND folder='4'", array('order_by' => 'pmid')); if($db->num_rows($query) == 1) { $db->delete_query("privatemessages", "pmid='".intval($mybb->input['pmid'])."'");
|
}
| }
|
else { $sql_array = array(
| else { $sql_array = array(
|
Zeile 1635 | Zeile 1641 |
---|
$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") { $plugins->run_hooks("private_export_start");
|
if($mybb->input['action'] == "export") { $plugins->run_hooks("private_export_start");
|
|
|
$folderlist = "<select name=\"exportfolders[]\" multiple=\"multiple\">\n"; $folderlist .= "<option value=\"all\" selected=\"selected\">$lang->all_folders</option>"; $foldersexploded = explode("$%%$", $mybb->user['pmfolders']);
| $folderlist = "<select name=\"exportfolders[]\" multiple=\"multiple\">\n"; $folderlist .= "<option value=\"all\" selected=\"selected\">$lang->all_folders</option>"; $foldersexploded = explode("$%%$", $mybb->user['pmfolders']);
|
Zeile 1651 | Zeile 1657 |
---|
$folderlist .= "<option value=\"$folderinfo[0]\">$folderinfo[1]</option>\n"; } $folderlist .= "</select>\n";
|
$folderlist .= "<option value=\"$folderinfo[0]\">$folderinfo[1]</option>\n"; } $folderlist .= "</select>\n";
|
|
|
$plugins->run_hooks("private_export_end");
|
$plugins->run_hooks("private_export_end");
|
|
|
eval("\$archive = \"".$templates->get("private_archive")."\";");
|
eval("\$archive = \"".$templates->get("private_archive")."\";");
|
|
|
output_page($archive); }
|
output_page($archive); }
|
|
|
if($mybb->input['action'] == "do_export" && $mybb->request_method == "post") { // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
$plugins->run_hooks("private_do_export_start");
|
if($mybb->input['action'] == "do_export" && $mybb->request_method == "post") { // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
$plugins->run_hooks("private_do_export_start");
|
|
|
$lang->private_messages_for = $lang->sprintf($lang->private_messages_for, $mybb->user['username']); $exdate = my_date($mybb->settings['dateformat'], TIME_NOW, 0, 0); $extime = my_date($mybb->settings['timeformat'], TIME_NOW, 0, 0);
| $lang->private_messages_for = $lang->sprintf($lang->private_messages_for, $mybb->user['username']); $exdate = my_date($mybb->settings['dateformat'], TIME_NOW, 0, 0); $extime = my_date($mybb->settings['timeformat'], TIME_NOW, 0, 0);
|
Zeile 1677 | Zeile 1683 |
---|
$folderinfo[1] = get_pm_folder_name($folderinfo[0], $folderinfo[1]); $foldersexploded[$key] = implode("**", $folderinfo); }
|
$folderinfo[1] = get_pm_folder_name($folderinfo[0], $folderinfo[1]); $foldersexploded[$key] = implode("**", $folderinfo); }
|
|
|
if($mybb->input['pmid']) { $wsql = "pmid='".intval($mybb->input['pmid'])."' AND uid='".$mybb->user['uid']."'";
| if($mybb->input['pmid']) { $wsql = "pmid='".intval($mybb->input['pmid'])."' AND uid='".$mybb->user['uid']."'";
|
Zeile 1689 | Zeile 1695 |
---|
$datecut = TIME_NOW-($mybb->input['daycut'] * 86400); $wsql = "pm.dateline"; if($mybb->input['dayway'] == "older")
|
$datecut = TIME_NOW-($mybb->input['daycut'] * 86400); $wsql = "pm.dateline"; if($mybb->input['dayway'] == "older")
|
{
| {
|
$wsql .= "<="; } else
| $wsql .= "<="; } else
|
Zeile 1702 | Zeile 1708 |
---|
{ $wsql = "1=1"; }
|
{ $wsql = "1=1"; }
|
|
|
if(is_array($mybb->input['exportfolders'])) { $folderlst = '';
| if(is_array($mybb->input['exportfolders'])) { $folderlst = '';
|
Zeile 1737 | Zeile 1743 |
---|
{ error($lang->error_pmnoarchivefolders); }
|
{ error($lang->error_pmnoarchivefolders); }
|
|
|
if($mybb->input['exportunread'] != 1) { $wsql .= " AND pm.status!='0'";
|
if($mybb->input['exportunread'] != 1) { $wsql .= " AND pm.status!='0'";
|
}
| }
|
} $query = $db->query(" SELECT pm.*, fu.username AS fromusername, tu.username AS tousername
| } $query = $db->query(" SELECT pm.*, fu.username AS fromusername, tu.username AS tousername
|
Zeile 1753 | Zeile 1759 |
---|
"); $numpms = $db->num_rows($query); if(!$numpms)
|
"); $numpms = $db->num_rows($query); if(!$numpms)
|
{
| {
|
error($lang->error_nopmsarchive); }
|
error($lang->error_nopmsarchive); }
|
|
|
$pmsdownload = ''; while($message = $db->fetch_array($query)) {
| $pmsdownload = ''; while($message = $db->fetch_array($query)) {
|
Zeile 1772 | Zeile 1778 |
---|
else { $tofromusername = build_profile_link($message['tousername'], $tofromuid);
|
else { $tofromusername = build_profile_link($message['tousername'], $tofromuid);
|
}
| }
|
} else { $tofromusername = $lang->not_sent; } $tofrom = $lang->to;
|
} else { $tofromusername = $lang->not_sent; } $tofrom = $lang->to;
|
}
| }
|
else { $tofromuid = $message['fromid']; if($mybb->input['exporttype'] == "txt") { $tofromusername = $message['fromusername'];
|
else { $tofromuid = $message['fromid']; 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; } $tofrom = $lang->from; }
|
if($tofromuid == 0) { $tofromusername = $lang->mybb_engine; } $tofrom = $lang->from; }
|
|
|
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;
|
Zeile 1820 | Zeile 1826 |
---|
{ $senddate = $lang->not_sent; }
|
{ $senddate = $lang->not_sent; }
|
|
|
if($mybb->input['exporttype'] == "html") { $parser_options = array(
| if($mybb->input['exporttype'] == "html") { $parser_options = array(
|
Zeile 1832 | Zeile 1838 |
---|
"me_username" => $mybb->user['username'], "filter_badwords" => 1 );
|
"me_username" => $mybb->user['username'], "filter_badwords" => 1 );
|
|
|
$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']); $message['message'] = str_replace("\n", "\r\n", $message['message']); }
|
if($mybb->input['exporttype'] == "txt" || $mybb->input['exporttype'] == "csv") { $message['message'] = str_replace("\r\n", "\n", $message['message']); $message['message'] = str_replace("\n", "\r\n", $message['message']); }
|
|
|
if($mybb->input['exporttype'] == "csv") { $message['message'] = addslashes($message['message']);
| if($mybb->input['exporttype'] == "csv") { $message['message'] = addslashes($message['message']);
|
Zeile 1850 | Zeile 1856 |
---|
$message['tousername'] = addslashes($message['tousername']); $message['fromusername'] = addslashes($message['fromusername']); }
|
$message['tousername'] = addslashes($message['tousername']); $message['fromusername'] = addslashes($message['fromusername']); }
|
|
|
if(!$donefolder[$message['folder']]) { reset($foldersexploded);
| if(!$donefolder[$message['folder']]) { reset($foldersexploded);
|
Zeile 1877 | Zeile 1883 |
---|
} } }
|
} } }
|
|
|
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") { // Gather global stylesheet for HTML $query = $db->simple_select("themestylesheets", "stylesheet", "sid = '1'", array('limit' => 1)); $css = $db->fetch_field($query, "stylesheet");
|
if($mybb->input['exporttype'] == "html") { // Gather global stylesheet for HTML $query = $db->simple_select("themestylesheets", "stylesheet", "sid = '1'", array('limit' => 1)); $css = $db->fetch_field($query, "stylesheet");
|
}
| }
|
$plugins->run_hooks("private_do_export_end");
eval("\$archived = \"".$templates->get("private_archive_".$mybb->input['exporttype'], 1, 0)."\";");
| $plugins->run_hooks("private_do_export_end");
eval("\$archived = \"".$templates->get("private_archive_".$mybb->input['exporttype'], 1, 0)."\";");
|
Zeile 1898 | Zeile 1904 |
---|
// Update PM count update_pm_count(); }
|
// Update PM count update_pm_count(); }
|
|
|
if($mybb->input['exporttype'] == "html") { $filename = "pm-archive.html";
| if($mybb->input['exporttype'] == "html") { $filename = "pm-archive.html";
|
Zeile 1914 | Zeile 1920 |
---|
$filename = "pm-archive.txt"; $contenttype = "text/plain"; }
|
$filename = "pm-archive.txt"; $contenttype = "text/plain"; }
|
|
|
$archived = str_replace("\\\'","'",$archived); header("Content-disposition: filename=$filename"); header("Content-type: ".$contenttype);
|
$archived = str_replace("\\\'","'",$archived); header("Content-disposition: filename=$filename"); header("Content-type: ".$contenttype);
|
|
|
if($mybb->input['exporttype'] == "html") { output_page($archived);
|
if($mybb->input['exporttype'] == "html") { output_page($archived);
|
}
| }
|
else
|
else
|
{
| {
|
echo $archived; } }
| echo $archived; } }
|
Zeile 1932 | Zeile 1938 |
---|
if(!$mybb->input['action']) { $plugins->run_hooks("private_start");
|
if(!$mybb->input['action']) { $plugins->run_hooks("private_start");
|
|
|
if(!$mybb->input['fid'] || !array_key_exists($mybb->input['fid'], $foldernames)) { $mybb->input['fid'] = 1;
|
if(!$mybb->input['fid'] || !array_key_exists($mybb->input['fid'], $foldernames)) { $mybb->input['fid'] = 1;
|
}
| }
|
$folder = $mybb->input['fid']; $foldername = $foldernames[$folder];
| $folder = $mybb->input['fid']; $foldername = $foldernames[$folder];
|
Zeile 1947 | Zeile 1953 |
---|
$sender = $lang->sentto; } else
|
$sender = $lang->sentto; } else
|
{
| {
|
$sender = $lang->sender;
|
$sender = $lang->sender;
|
}
| }
|
// Do Multi Pages $query = $db->simple_select("privatemessages", "COUNT(*) AS total", "uid='".$mybb->user['uid']."' AND folder='$folder'"); $pmscount = $db->fetch_array($query);
| // Do Multi Pages $query = $db->simple_select("privatemessages", "COUNT(*) AS total", "uid='".$mybb->user['uid']."' AND folder='$folder'"); $pmscount = $db->fetch_array($query);
|
Zeile 1959 | Zeile 1965 |
---|
{ $mybb->settings['threadsperpage'] = 20; }
|
{ $mybb->settings['threadsperpage'] = 20; }
|
|
|
$perpage = $mybb->settings['threadsperpage']; $page = intval($mybb->input['page']);
|
$perpage = $mybb->settings['threadsperpage']; $page = intval($mybb->input['page']);
|
|
|
if(intval($mybb->input['page']) > 0) { $start = ($page-1) *$perpage;
| if(intval($mybb->input['page']) > 0) { $start = ($page-1) *$perpage;
|
Zeile 1972 | Zeile 1978 |
---|
$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 > $threadcount)
|
if($upper > $threadcount)
|
{
| {
|
$upper = $threadcount; } $multipage = multipage($pmscount['total'], $perpage, $page, "private.php?fid=$folder"); $messagelist = '';
|
$upper = $threadcount; } $multipage = multipage($pmscount['total'], $perpage, $page, "private.php?fid=$folder"); $messagelist = '';
|
|
|
$icon_cache = $cache->read("posticons");
|
$icon_cache = $cache->read("posticons");
|
|
|
// Cache users in multiple recipients for sent & drafts folder if($folder == 2 || $folder == 3)
|
// Cache users in multiple recipients for sent & drafts folder if($folder == 2 || $folder == 3)
|
{
| {
|
// Get all recipients into an array $cached_users = $get_users = array(); $users_query = $db->simple_select("privatemessages", "recipients", "folder='$folder' AND uid='{$mybb->user['uid']}'", array('limit_start' => $start, 'limit' => $perpage, 'order_by' => 'dateline', 'order_dir' => 'DESC'));
| // Get all recipients into an array $cached_users = $get_users = array(); $users_query = $db->simple_select("privatemessages", "recipients", "folder='$folder' AND uid='{$mybb->user['uid']}'", array('limit_start' => $start, 'limit' => $perpage, 'order_by' => 'dateline', 'order_dir' => 'DESC'));
|
Zeile 1999 | Zeile 2005 |
---|
{ $get_users = array_merge($get_users, $recipients['to']); }
|
{ $get_users = array_merge($get_users, $recipients['to']); }
|
|
|
if(is_array($recipients['bcc']) && count($recipients['bcc'])) { $get_users = array_merge($get_users, $recipients['bcc']); } }
|
if(is_array($recipients['bcc']) && count($recipients['bcc'])) { $get_users = array_merge($get_users, $recipients['bcc']); } }
|
|
|
$get_users = implode(',', array_unique($get_users));
|
$get_users = implode(',', array_unique($get_users));
|
|
|
// Grab info if($get_users)
|
// Grab info if($get_users)
|
{
| {
|
$users_query = $db->simple_select("users", "uid, username, usergroup, displaygroup", "uid IN ({$get_users})"); while($user = $db->fetch_array($users_query)) {
| $users_query = $db->simple_select("users", "uid, username, usergroup, displaygroup", "uid IN ({$get_users})"); while($user = $db->fetch_array($users_query)) {
|
Zeile 2018 | Zeile 2024 |
---|
} } }
|
} } }
|
|
|
$query = $db->query(" SELECT pm.*, fu.username AS fromusername, tu.username as tousername FROM ".TABLE_PREFIX."privatemessages pm
| $query = $db->query(" SELECT pm.*, fu.username AS fromusername, tu.username as tousername FROM ".TABLE_PREFIX."privatemessages pm
|
Zeile 2028 | Zeile 2034 |
---|
ORDER BY pm.dateline DESC LIMIT $start, $perpage ");
|
ORDER BY pm.dateline DESC LIMIT $start, $perpage ");
|
|
|
if($db->num_rows($query) > 0) { while($message = $db->fetch_array($query))
| if($db->num_rows($query) > 0) { while($message = $db->fetch_array($query))
|
Zeile 2036 | Zeile 2042 |
---|
$msgalt = $msgsuffix = $msgprefix = ''; // Determine Folder Icon if($message['status'] == 0)
|
$msgalt = $msgsuffix = $msgprefix = ''; // Determine Folder Icon if($message['status'] == 0)
|
{
| {
|
$msgfolder = 'new_pm.gif'; $msgalt = $lang->new_pm; $msgprefix = "<strong>"; $msgsuffix = "</strong>";
|
$msgfolder = 'new_pm.gif'; $msgalt = $lang->new_pm; $msgprefix = "<strong>"; $msgsuffix = "</strong>";
|
}
| }
|
elseif($message['status'] == 1) { $msgfolder = 'old_pm.gif'; $msgalt = $lang->old_pm;
|
elseif($message['status'] == 1) { $msgfolder = 'old_pm.gif'; $msgalt = $lang->old_pm;
|
}
| }
|
elseif($message['status'] == 3) { $msgfolder = 're_pm.gif'; $msgalt = $lang->reply_pm;
|
elseif($message['status'] == 3) { $msgfolder = 're_pm.gif'; $msgalt = $lang->reply_pm;
|
}
| }
|
elseif($message['status'] == 4) { $msgfolder = 'fw_pm.gif'; $msgalt = $lang->fwd_pm; }
|
elseif($message['status'] == 4) { $msgfolder = 'fw_pm.gif'; $msgalt = $lang->fwd_pm; }
|
|
|
if($folder == 2 || $folder == 3) { // Sent Items or Drafts Folder Check $recipients = unserialize($message['recipients']);
| if($folder == 2 || $folder == 3) { // Sent Items or Drafts Folder Check $recipients = unserialize($message['recipients']);
|
Zeile 2073 | Zeile 2079 |
---|
{ $username = $lang->na; }
|
{ $username = $lang->na; }
|
eval("\$to_users .= \"".$templates->get("private_multiple_recipients_user")."\";");
| eval("\$to_users .= \"".$templates->get("private_multiple_recipients_user")."\";");
|
} if(is_array($recipients['bcc']) && count($recipients['bcc'])) {
| } if(is_array($recipients['bcc']) && count($recipients['bcc'])) {
|
Zeile 2087 | Zeile 2093 |
---|
{ $username = $lang->na; }
|
{ $username = $lang->na; }
|
eval("\$bcc_users .= \"".$templates->get("private_multiple_recipients_user")."\";");
| eval("\$bcc_users .= \"".$templates->get("private_multiple_recipients_user")."\";");
|
} }
|
} }
|
|
|
eval("\$tofromusername = \"".$templates->get("private_multiple_recipients")."\";");
|
eval("\$tofromusername = \"".$templates->get("private_multiple_recipients")."\";");
|
}
| }
|
else if($message['toid'])
|
else if($message['toid'])
|
{
| {
|
$tofromusername = $message['tousername']; $tofromuid = $message['toid']; } else { $tofromusername = $lang->not_sent;
|
$tofromusername = $message['tousername']; $tofromuid = $message['toid']; } else { $tofromusername = $lang->not_sent;
|
} } else
| } } else
|
{ $tofromusername = $message['fromusername']; $tofromuid = $message['fromid'];
| { $tofromusername = $message['fromusername']; $tofromuid = $message['fromid'];
|
Zeile 2111 | Zeile 2117 |
---|
{ $tofromusername = $lang->mybb_engine; }
|
{ $tofromusername = $lang->mybb_engine; }
|
|
|
if(!$tofromusername) { $tofromuid = 0; $tofromusername = $lang->na; } }
|
if(!$tofromusername) { $tofromuid = 0; $tofromusername = $lang->na; } }
|
|
|
$tofromusername = build_profile_link($tofromusername, $tofromuid);
|
$tofromusername = build_profile_link($tofromusername, $tofromuid);
|
if($mybb->usergroup['cantrackpms'] == 1 && $mybb->usergroup['candenypmreceipts'] == 1 && $message['receipt'] == '1' && $message['folder'] != '3' && $message['folder'] != 2) {
| if($mybb->usergroup['candenypmreceipts'] == 1 && $message['receipt'] == '1' && $message['folder'] != '3' && $message['folder'] != 2) {
|
eval("\$denyreceipt = \"".$templates->get("private_messagebit_denyreceipt")."\";");
|
eval("\$denyreceipt = \"".$templates->get("private_messagebit_denyreceipt")."\";");
|
} else {
| } else {
|
$denyreceipt = ''; }
|
$denyreceipt = ''; }
|
|
|
if($message['icon'] > 0 && $icon_cache[$message['icon']])
|
if($message['icon'] > 0 && $icon_cache[$message['icon']])
|
{
| {
|
$icon = $icon_cache[$message['icon']];
|
$icon = $icon_cache[$message['icon']];
|
| $icon['path'] = htmlspecialchars_uni($icon['path']); $icon['name'] = htmlspecialchars_uni($icon['name']);
|
$icon = "<img src=\"{$icon['path']}\" alt=\"{$icon['name']}\" align=\"center\" valign=\"middle\" />"; } else { $icon = '	'; }
|
$icon = "<img src=\"{$icon['path']}\" alt=\"{$icon['name']}\" align=\"center\" valign=\"middle\" />"; } else { $icon = '	'; }
|
|
|
if(!trim($message['subject'])) { $message['subject'] = $lang->pm_no_subject;
| if(!trim($message['subject'])) { $message['subject'] = $lang->pm_no_subject;
|
Zeile 2171 | Zeile 2179 |
---|
if($pmscount['total'] == 0) { $spaceused = 0;
|
if($pmscount['total'] == 0) { $spaceused = 0;
|
}
| }
|
else { $spaceused = $pmscount['total'] / $mybb->usergroup['pmquota'] * 100;
|
else { $spaceused = $pmscount['total'] / $mybb->usergroup['pmquota'] * 100;
|
}
| }
|
$spaceused2 = 100 - $spaceused; if($spaceused <= "50") {
| $spaceused2 = 100 - $spaceused; if($spaceused <= "50") {
|
Zeile 2183 | Zeile 2191 |
---|
if(intval($belowhalf) > 100) { $belowhalf = "100%";
|
if(intval($belowhalf) > 100) { $belowhalf = "100%";
|
}
| }
|
} else {
| } else {
|
Zeile 2193 | Zeile 2201 |
---|
$overhalf = "100%"; } }
|
$overhalf = "100%"; } }
|
|
|
eval("\$pmspacebar = \"".$templates->get("private_pmspace")."\";");
|
eval("\$pmspacebar = \"".$templates->get("private_pmspace")."\";");
|
}
| }
|
if($mybb->usergroup['pmquota'] != "0" && $pmscount['total'] >= $mybb->usergroup['pmquota'] && $mybb->usergroup['cancp'] != 1) { eval("\$limitwarning = \"".$templates->get("private_limitwarning")."\";"); }
|
if($mybb->usergroup['pmquota'] != "0" && $pmscount['total'] >= $mybb->usergroup['pmquota'] && $mybb->usergroup['cancp'] != 1) { eval("\$limitwarning = \"".$templates->get("private_limitwarning")."\";"); }
|
|
|
$plugins->run_hooks("private_end");
|
$plugins->run_hooks("private_end");
|
|
|
eval("\$folder = \"".$templates->get("private")."\";"); output_page($folder); }
| eval("\$folder = \"".$templates->get("private")."\";"); output_page($folder); }
|