Vergleich private.php - 1.8.4 - 1.8.15

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 12Zeile 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 49Zeile 50
		 "pmfolders" => $mybb->user['pmfolders']
);
$db->update_query("users", $sql_array, "uid = ".$mybb->user['uid']);

		 "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 360Zeile 354
	");
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 400Zeile 392
				{
$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 410Zeile 403
					{
$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 419Zeile 413
			}
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 429Zeile 423
		}
else
{

		}
else
{

			$tofromusername = $message['fromusername'];

			$tofromusername = htmlspecialchars_uni($message['fromusername']);

			$tofromuid = $message['fromid'];
if($tofromuid == 0)
{

			$tofromuid = $message['fromid'];
if($tofromuid == 0)
{

Zeile 561Zeile 555
	$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_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 588Zeile 585
	);

// 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 906Zeile 902
				{
$to .= $comma.htmlspecialchars_uni($user['username']);
$comma = $lang->comma;

				{
$to .= $comma.htmlspecialchars_uni($user['username']);
$comma = $lang->comma;

				}
}
}
}


				}
}
}
}


	// New PM with recipient preset
if($mybb->get_input('uid', MyBB::INPUT_INT) && empty($mybb->input['preview']))
{

	// New PM with recipient preset
if($mybb->get_input('uid', MyBB::INPUT_INT) && empty($mybb->input['preview']))
{

Zeile 1009Zeile 1005
		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

		}
else

		{
$receiptadd = 2;
}

		{
$receiptadd = 2;
}

Zeile 1079Zeile 1075
	if($pm['fromid'] == 0)
{
$pm['username'] = $lang->mybb_engine;

	if($pm['fromid'] == 0)
{
$pm['username'] = $lang->mybb_engine;

	}


	}


	if(!$pm['username'])
{
$pm['username'] = $lang->na;

	if(!$pm['username'])
{
$pm['username'] = $lang->na;

Zeile 1109Zeile 1105
	}

// Fetch recipient names from the database

	}

// 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 1129Zeile 1127
	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;

	}

$replyall = false;

Zeile 1140Zeile 1143

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 1187Zeile 1190
		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
{

		}
else
{

			$query = $db->simple_select('users', 'username', "uid='{$pm['fromid']}'");
$to = htmlspecialchars_uni($db->fetch_field($query, 'username'));
}

			$query = $db->simple_select('users', 'username', "uid='{$pm['fromid']}'");
$to = htmlspecialchars_uni($db->fetch_field($query, 'username'));
}

Zeile 1238Zeile 1241
	$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 = 1;
}

if($page)
{
$start = ($page-1) * $perpage;
}
else
{
$start = 0;
$page = 1;
}

$read_multipage = multipage($postcount, $perpage, $page, "private.php?action=tracking&amp;read_page={page}");

$query = $db->query("

	{
$page = $pages;
}

if($page > $pages || $page <= 0)
{
$page = 1;
}

if($page)
{
$start = ($page-1) * $perpage;
}
else
{
$start = 0;
$page = 1;
}

$read_multipage = multipage($postcount, $perpage, $page, "private.php?action=tracking&amp;read_page={page}");

$query = $db->query("

		SELECT pm.pmid, pm.subject, pm.toid, pm.readtime, u.username as tousername
FROM ".TABLE_PREFIX."privatemessages pm
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=pm.toid)

		SELECT pm.pmid, pm.subject, pm.toid, pm.readtime, u.username as tousername
FROM ".TABLE_PREFIX."privatemessages pm
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=pm.toid)

Zeile 1268Zeile 1271
		LIMIT {$start}, {$perpage}
");
while($readmessage = $db->fetch_array($query))

		LIMIT {$start}, {$perpage}
");
while($readmessage = $db->fetch_array($query))

	{

	{

		$readmessage['subject'] = htmlspecialchars_uni($parser->parse_badwords($readmessage['subject']));

		$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")."\";");

	}

	}


$stoptrackingread = '';
if(!empty($readmessages))


$stoptrackingread = '';
if(!empty($readmessages))

	{

	{

		eval("\$stoptrackingread = \"".$templates->get("private_tracking_readmessage_stop")."\";");
}


		eval("\$stoptrackingread = \"".$templates->get("private_tracking_readmessage_stop")."\";");
}


Zeile 1294Zeile 1298
	$pages = ceil($pages);

if($mybb->get_input('unread_page') == "last")

	$pages = ceil($pages);

if($mybb->get_input('unread_page') == "last")

	{

	{

		$page = $pages;
}

if($page > $pages || $page <= 0)

		$page = $pages;
}

if($page > $pages || $page <= 0)

	{
$page = 1;
}


	{
$page = 1;
}


	if($page)
{
$start = ($page-1) * $perpage;

	if($page)
{
$start = ($page-1) * $perpage;

Zeile 1311Zeile 1315
	{
$start = 0;
$page = 1;

	{
$start = 0;
$page = 1;

	}

	}


$unread_multipage = multipage($postcount, $perpage, $page, "private.php?action=tracking&amp;unread_page={page}");



$unread_multipage = multipage($postcount, $perpage, $page, "private.php?action=tracking&amp;unread_page={page}");


Zeile 1326Zeile 1330
	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")."\";");

	}

	}


$stoptrackingunread = '';
if(!empty($unreadmessages))


$stoptrackingunread = '';
if(!empty($unreadmessages))

	{

	{

		eval("\$stoptrackingunread = \"".$templates->get("private_tracking_unreadmessage_stop")."\";");
}


		eval("\$stoptrackingunread = \"".$templates->get("private_tracking_unreadmessage_stop")."\";");
}


Zeile 1353Zeile 1358
{
// 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_tracking_start");

if(!empty($mybb->input['stoptracking']))

	$plugins->run_hooks("private_do_tracking_start");

if(!empty($mybb->input['stoptracking']))

Zeile 1362Zeile 1367
		if(!empty($mybb->input['readcheck']))
{
foreach($mybb->input['readcheck'] as $key => $val)

		if(!empty($mybb->input['readcheck']))
{
foreach($mybb->input['readcheck'] as $key => $val)

			{
$sql_array = array(
"receipt" => 0

			{
$sql_array = array(
"receipt" => 0

				);
$db->update_query("privatemessages", $sql_array, "pmid=".(int)$key." AND fromid=".$mybb->user['uid']);
}

				);
$db->update_query("privatemessages", $sql_array, "pmid=".(int)$key." AND fromid=".$mybb->user['uid']);
}

Zeile 1469Zeile 1474
	$plugins->run_hooks("private_folders_end");

eval("\$folders = \"".$templates->get("private_folders")."\";");

	$plugins->run_hooks("private_folders_end");

eval("\$folders = \"".$templates->get("private_folders")."\";");

	output_page($folders);

	output_page($folders);

}

if($mybb->input['action'] == "do_folders" && $mybb->request_method == "post")

}

if($mybb->input['action'] == "do_folders" && $mybb->request_method == "post")

Zeile 1800Zeile 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 1948Zeile 1953
		$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 1981Zeile 1986

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 2006Zeile 2011
					}
else
{

					}
else
{

						$foldername = addslashes($folderinfo[1]);

						$foldername = my_escape_csv($folderinfo[1]);

					}
$donefolder[$message['folder']] = 1;
}

					}
$donefolder[$message['folder']] = 1;
}

Zeile 2060Zeile 2065
	}
else
{

	}
else
{

 
		echo "\xEF\xBB\xBF"; // UTF-8 BOM

		echo $archived;
}
}

		echo $archived;
}
}

Zeile 2157Zeile 2163

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={$folder}&sortby={$sortby}&order={$sortordernow}";

	}
else
{

	}
else
{

Zeile 2188Zeile 2194
			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 2255Zeile 2261
	{
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;

			}


			}


			$tofromuid = 0;
if($folder == 2 || $folder == 3)
{ // Sent Items or Drafts Folder Check

			$tofromuid = 0;
if($folder == 2 || $folder == 3)
{ // Sent Items or Drafts Folder Check

Zeile 2291Zeile 2296
					{
$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 = $lang->na;

						$username = format_name($user['username'], $user['usergroup'], $user['displaygroup']);
if(!$user['username'])
{
$username = $lang->na;

						}

						}

						eval("\$to_users .= \"".$templates->get("private_multiple_recipients_user")."\";");
}
if(isset($recipients['bcc']) && is_array($recipients['bcc']) && count($recipients['bcc']))

						eval("\$to_users .= \"".$templates->get("private_multiple_recipients_user")."\";");
}
if(isset($recipients['bcc']) && is_array($recipients['bcc']) && count($recipients['bcc']))

Zeile 2305Zeile 2311
						{
$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 2318Zeile 2325
				}
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 2328Zeile 2335
			}
else
{

			}
else
{

				$tofromusername = $message['fromusername'];

				$tofromusername = htmlspecialchars_uni($message['fromusername']);

				$tofromuid = $message['fromid'];
if($tofromuid == 0)
{

				$tofromuid = $message['fromid'];
if($tofromuid == 0)
{

Zeile 2392Zeile 2399
	}

$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 2456Zeile 2463
	}

$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")."\";");
}