Zeile 6 | Zeile 6 |
---|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* $Id: private.php 4117 2008-08-15 15:38:41Z Tikitiki $
| * $Id: private.php 4267 2008-11-10 21:28:36Z Tikitiki $
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 347 | Zeile 347 |
---|
// Get list of recipients $recipients = unserialize($pm['recipients']); $comma = '';
|
// Get list of recipients $recipients = unserialize($pm['recipients']); $comma = '';
|
$recipientids = $pm['fromid'];
| |
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)
|
Zeile 357 | Zeile 356 |
---|
$comma = ','; } }
|
$comma = ','; } }
|
|
|
if(isset($recipients['bcc']) && is_array($recipients['bcc']))
|
if(isset($recipients['bcc']) && is_array($recipients['bcc']))
|
{
| {
|
foreach($recipients['bcc'] as $recipient)
|
foreach($recipients['bcc'] as $recipient)
|
{
| {
|
$recipient_list['bcc'][] = $recipient; $recipientids .= $comma.$recipient; $comma = ',';
| $recipient_list['bcc'][] = $recipient; $recipientids .= $comma.$recipient; $comma = ',';
|
Zeile 374 | Zeile 373 |
---|
if(isset($recipients['bcc']) && is_array($recipients['bcc']) && in_array($user['uid'], $recipient_list['bcc'])) { $bcc .= htmlspecialchars_uni($user['username']).', ';
|
if(isset($recipients['bcc']) && is_array($recipients['bcc']) && in_array($user['uid'], $recipient_list['bcc'])) { $bcc .= htmlspecialchars_uni($user['username']).', ';
|
} else
| } else
|
{ $to .= htmlspecialchars_uni($user['username']).', '; }
| { $to .= htmlspecialchars_uni($user['username']).', '; }
|
Zeile 414 | Zeile 413 |
---|
// Get list of recipients $recipients = unserialize($pm['recipients']);
|
// Get list of recipients $recipients = unserialize($pm['recipients']);
|
$recipientids = $pm['fromid'];
| |
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)
|
Zeile 448 | Zeile 446 |
---|
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']); $bcc = htmlspecialchars_uni($mybb->input['bcc']);
|
if($send_errors) { $to = htmlspecialchars_uni($mybb->input['to']); $bcc = htmlspecialchars_uni($mybb->input['bcc']);
|
}
| }
|
// Load the auto complete javascript if it is enabled. eval("\$autocompletejs = \"".$templates->get("private_send_autocomplete")."\";");
| // Load the auto complete javascript if it is enabled. eval("\$autocompletejs = \"".$templates->get("private_send_autocomplete")."\";");
|
Zeile 468 | Zeile 466 |
---|
// See if it's actually worth showing the buddylist icon. if($mybb->user['buddylist'] != '')
|
// See if it's actually worth showing the buddylist icon. if($mybb->user['buddylist'] != '')
|
{
| {
|
$buddy_select = 'to'; eval("\$buddy_select_to = \"".$templates->get("private_send_buddyselect")."\";"); $buddy_select = 'bcc'; eval("\$buddy_select_bcc = \"".$templates->get("private_send_buddyselect")."\";"); }
|
$buddy_select = 'to'; eval("\$buddy_select_to = \"".$templates->get("private_send_buddyselect")."\";"); $buddy_select = 'bcc'; eval("\$buddy_select_bcc = \"".$templates->get("private_send_buddyselect")."\";"); }
|
|
|
eval("\$send = \"".$templates->get("private_send")."\";"); $plugins->run_hooks("private_send_end"); output_page($send); }
|
eval("\$send = \"".$templates->get("private_send")."\";"); $plugins->run_hooks("private_send_end"); output_page($send); }
|
|
|
if($mybb->input['action'] == "read") { $plugins->run_hooks("private_read");
$pmid = intval($mybb->input['pmid']);
|
if($mybb->input['action'] == "read") { $plugins->run_hooks("private_read");
$pmid = intval($mybb->input['pmid']);
|
|
|
$query = $db->query(" SELECT pm.*, u.*, f.*, g.title AS grouptitle, g.usertitle AS groupusertitle, g.stars AS groupstars, g.starimage AS groupstarimage, g.image AS groupimage, g.namestyle FROM ".TABLE_PREFIX."privatemessages pm
| $query = $db->query(" SELECT pm.*, u.*, f.*, g.title AS grouptitle, g.usertitle AS groupusertitle, g.stars AS groupstars, g.starimage AS groupstarimage, g.image AS groupimage, g.namestyle FROM ".TABLE_PREFIX."privatemessages pm
|
Zeile 500 | Zeile 498 |
---|
{ header("Location: private.php?action=send&pmid={$pm['pmid']}"); exit;
|
{ header("Location: private.php?action=send&pmid={$pm['pmid']}"); exit;
|
}
| }
|
if(!$pm['pmid']) { error($lang->error_invalidpm);
|
if(!$pm['pmid']) { error($lang->error_invalidpm);
|
}
| }
|
if($pm['receipt'] == 1) { if($mybb->usergroup['cantrackpms'] == 1 && $mybb->usergroup['candenypmreceipts'] == 1 && $mybb->input['denyreceipt'] == 1)
| if($pm['receipt'] == 1) { if($mybb->usergroup['cantrackpms'] == 1 && $mybb->usergroup['candenypmreceipts'] == 1 && $mybb->input['denyreceipt'] == 1)
|
Zeile 764 | Zeile 762 |
---|
$pmuids[$pm['uid']] = $pm['uid']; }
|
$pmuids[$pm['uid']] = $pm['uid']; }
|
$db->delete_query("privatemessages", "pmid IN ($pmids) AND fromid='".$mybb->user['uid']."'");
| $db->delete_query("privatemessages", "pmid IN ($pmids) AND receipt='1' AND status='0' AND fromid='".$mybb->user['uid']."'");
|
foreach($pmuids as $uid) { // Message is canceled, update PM count for this user
|
foreach($pmuids as $uid) { // Message is canceled, update PM count for this user
|
update_pm_count($pm['uid']);
| update_pm_count($uid);
|
} } $plugins->run_hooks("private_do_tracking_end");
| } } $plugins->run_hooks("private_do_tracking_end");
|
Zeile 1134 | Zeile 1132 |
---|
{ $wsql .= "<="; }
|
{ $wsql .= "<="; }
|
elseif($mybb->input['dayway'] == "newer")
| else
|
{ $wsql .= ">="; }
| { $wsql .= ">="; }
|
Zeile 1162 | Zeile 1160 |
---|
if(!$folderlst) { $folderlst = " AND pm.folder IN ('$val'";
|
if(!$folderlst) { $folderlst = " AND pm.folder IN ('$val'";
|
}
| }
|
else { $folderlst .= ",'$val'";
| else { $folderlst .= ",'$val'";
|
Zeile 1205 | Zeile 1203 |
---|
if($message['folder'] == 2 || $message['folder'] == 3) { // Sent Items or Drafts Folder Check if($message['toid'])
|
if($message['folder'] == 2 || $message['folder'] == 3) { // Sent Items or Drafts Folder Check if($message['toid'])
|
{
| {
|
$tofromuid = $message['toid']; if($mybb->input['exporttype'] == "txt") {
| $tofromuid = $message['toid']; if($mybb->input['exporttype'] == "txt") {
|
Zeile 1249 | Zeile 1247 |
---|
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") {
|
Zeile 1275 | Zeile 1273 |
---|
);
$message['message'] = $parser->parse_message($message['message'], $parser_options);
|
);
$message['message'] = $parser->parse_message($message['message'], $parser_options);
|
| $message['subject'] = htmlspecialchars_uni($message['subject']);
|
} if($mybb->input['exporttype'] == "txt" || $mybb->input['exporttype'] == "csv")
| } if($mybb->input['exporttype'] == "txt" || $mybb->input['exporttype'] == "csv")
|
Zeile 1303 | Zeile 1302 |
---|
$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"; }
|
eval("\$pmsdownload .= \"".$templates->get("private_archive_".$mybb->input['exporttype']."_folderhead", 1, 0)."\";"); } else
| eval("\$pmsdownload .= \"".$templates->get("private_archive_".$mybb->input['exporttype']."_folderhead", 1, 0)."\";"); } else
|
Zeile 1343 | Zeile 1346 |
---|
{ $filename = "pm-archive.txt"; $contenttype = "text/plain";
|
{ $filename = "pm-archive.txt"; $contenttype = "text/plain";
|
}
| }
|
$archived = str_replace("\\\'","'",$archived); header("Content-disposition: filename=$filename");
| $archived = str_replace("\\\'","'",$archived); header("Content-disposition: filename=$filename");
|
Zeile 1379 | Zeile 1382 |
---|
$folder = $folderinfo[0]; $foldername = get_pm_folder_name($folder, $folderinfo[1]); }
|
$folder = $folderinfo[0]; $foldername = get_pm_folder_name($folder, $folderinfo[1]); }
|
}
| }
|
$lang->pms_in_folder = $lang->sprintf($lang->pms_in_folder, $foldername); if($folder == 2 || $folder == 3) { // Sent Items Folder $sender = $lang->sentto;
|
$lang->pms_in_folder = $lang->sprintf($lang->pms_in_folder, $foldername); if($folder == 2 || $folder == 3) { // Sent Items Folder $sender = $lang->sentto;
|
}
| }
|
else
|
else
|
{
| {
|
$sender = $lang->sender; }
| $sender = $lang->sender; }
|
Zeile 1398 | Zeile 1401 |
---|
if(!$mybb->settings['threadsperpage']) { $mybb->settings['threadsperpage'] = 20;
|
if(!$mybb->settings['threadsperpage']) { $mybb->settings['threadsperpage'] = 20;
|
}
| }
|
$perpage = $mybb->settings['threadsperpage']; $page = intval($mybb->input['page']);
| $perpage = $mybb->settings['threadsperpage']; $page = intval($mybb->input['page']);
|
Zeile 1416 | Zeile 1419 |
---|
$end = $start + $perpage; $lower = $start+1; $upper = $end;
|
$end = $start + $perpage; $lower = $start+1; $upper = $end;
|
|
|
if($upper > $threadcount) { $upper = $threadcount;
| if($upper > $threadcount) { $upper = $threadcount;
|
Zeile 1453 | Zeile 1456 |
---|
{ $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))
|
{
| {
|
$cached_users[$user['uid']] = $user; } }
| $cached_users[$user['uid']] = $user; } }
|
Zeile 1526 | Zeile 1529 |
---|
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'];
|
$tofromusername = $message['tousername']; $tofromuid = $message['toid'];
|
}
| }
|
else
|
else
|
{
| {
|
$tofromusername = $lang->not_sent;
|
$tofromusername = $lang->not_sent;
|
}
| }
|
} else {
| } else {
|
Zeile 1545 | Zeile 1548 |
---|
} }
|
} }
|
if($tofromuid != 0) { $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['cantrackpms'] == 1 && $mybb->usergroup['candenypmreceipts'] == 1 && $message['receipt'] == '1' && $message['folder'] != '3' && $message['folder'] != 2) {
|