Vergleich private.php - 1.2.5 - 1.2.12

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 3Zeile 3
 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/eula.html

 *

 *

 * $Id: private.php 2684 2007-01-29 01:33:17Z Tikitiki $

 * $Id: private.php 3596 2008-01-20 08:27:39Z Tikitiki $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 48Zeile 48
	$db->update_query(TABLE_PREFIX."users", $sql_array, "uid = ".$mybb->user['uid']);
}


	$db->update_query(TABLE_PREFIX."users", $sql_array, "uid = ".$mybb->user['uid']);
}


// On a random occassion, recount the users pm's just to make sure everything is in sync.
if($rand == 5)
{
update_pm_count();
}

$timecut = time()-(60*60*24*7); 
$db->delete_query(TABLE_PREFIX."privatemessages", "dateline <= $timecut AND folder='4' AND uid='".$mybb->user['uid']."'");








$timecut = time()-(60*60*24*7);
$db->delete_query(TABLE_PREFIX."privatemessages", "dateline <= $timecut AND folder='4' AND uid='".$mybb->user['uid']."'");




// On a random occassion, recount the users pm's just to make sure everything is in sync. 
if($rand == 5 || $db->affected_rows() > 0)
{
update_pm_count();
}


$folderjump = "<select name=\"jumpto\">\n";
$folderoplist = "<select name=\"fid\">\n";


$folderjump = "<select name=\"jumpto\">\n";
$folderoplist = "<select name=\"fid\">\n";

Zeile 68Zeile 68
	if($fid == $folderinfo[0])
{
$sel = "selected";

	if($fid == $folderinfo[0])
{
$sel = "selected";

	}

	}

	else
{
$sel = "";

	else
{
$sel = "";

Zeile 84Zeile 84
$folderoplist .= "</select>\n";

usercp_menu();

$folderoplist .= "</select>\n";

usercp_menu();







// Make navigation
add_breadcrumb($lang->nav_pms, "private.php");


// Make navigation
add_breadcrumb($lang->nav_pms, "private.php");


Zeile 96Zeile 96
		break;
case "tracking":
add_breadcrumb($lang->nav_tracking);

		break;
case "tracking":
add_breadcrumb($lang->nav_tracking);

		break;

		break;

	case "folders":
add_breadcrumb($lang->nav_folders);
break;
case "empty":
add_breadcrumb($lang->nav_empty);

	case "folders":
add_breadcrumb($lang->nav_folders);
break;
case "empty":
add_breadcrumb($lang->nav_empty);

		break;

		break;

	case "export":
add_breadcrumb($lang->nav_export);
break;

	case "export":
add_breadcrumb($lang->nav_export);
break;

}

}

if($mybb->input['preview'])
{
$mybb->input['action'] = "send";
}

if($mybb->input['preview'])
{
$mybb->input['action'] = "send";
}





$send_errors = '';

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

$send_errors = '';

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

 
	if($mybb->usergroup['cansendpms'] == "no")
{
error_no_permission();
}

// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);


	$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

Zeile 170Zeile 178
		$plugins->run_hooks("private_do_send_end");

if(isset($pminfo['draftsaved']))

		$plugins->run_hooks("private_do_send_end");

if(isset($pminfo['draftsaved']))

		{

		{

			redirect("private.php", $lang->redirect_pmsaved);
}
else
{
redirect("private.php", $lang->redirect_pmsent);
}

			redirect("private.php", $lang->redirect_pmsaved);
}
else
{
redirect("private.php", $lang->redirect_pmsent);
}





	}
}

if($mybb->input['action'] == "send")
{

	}
}

if($mybb->input['action'] == "send")
{







	if($mybb->usergroup['cansendpms'] == "no")
{
error_no_permission();
}


	$plugins->run_hooks("private_send_start");

if($mybb->settings['bbcodeinserter'] != "off" && $mybb->settings['pmsallowmycode'] != "no" && $mybb->user['showcodebuttons'] != 0)

	$plugins->run_hooks("private_send_start");

if($mybb->settings['bbcodeinserter'] != "off" && $mybb->settings['pmsallowmycode'] != "no" && $mybb->user['showcodebuttons'] != 0)

	{

	{

		$codebuttons = build_mycode_inserter();
if($mybb->settings['pmsallowsmilies'] != "no")
{
$smilieinserter = build_clickable_smilies();

		$codebuttons = build_mycode_inserter();
if($mybb->settings['pmsallowsmilies'] != "no")
{
$smilieinserter = build_clickable_smilies();

		}
}


		}
}


	$posticons = get_post_icons();
$previewmessage = $mybb->input['message'];
$message = htmlspecialchars_uni($mybb->input['message']);

	$posticons = get_post_icons();
$previewmessage = $mybb->input['message'];
$message = htmlspecialchars_uni($mybb->input['message']);

 
	$subject = $previewsubject = htmlspecialchars_uni($mybb->input['subject']);





 
	if($mybb->input['preview'] || $send_errors)
{
$options = $mybb->input['options'];
if($options['signature'] == "yes")
{
$optionschecked['signature'] = "checked=\"checked\"";
}
if($options['disablesmilies'] == "yes")
{
$optionschecked['disablesmilies'] = "checked=\"checked\"";
}
if($options['savecopy'] != "no")
{
$optionschecked['savecopy'] = "checked=\"checked\"";
}
if($options['readreceipt'] != "no")
{
$optionschecked['readreceipt'] = "checked=\"checked\"";
}
$to = htmlspecialchars_uni($mybb->input['to']);
}

// Preview

	if($mybb->input['preview'])
{

	if($mybb->input['preview'])
{

		$options = $mybb->input['options'];

 
		$query = $db->query("
SELECT u.username AS userusername, u.*, f.*, g.title AS grouptitle, g.usertitle AS groupusertitle, g.namestyle, g.stars AS groupstars, g.starimage AS groupstarimage, g.image AS groupimage, g.usereputationsystem
FROM ".TABLE_PREFIX."users u

		$query = $db->query("
SELECT u.username AS userusername, u.*, f.*, g.title AS grouptitle, g.usertitle AS groupusertitle, g.namestyle, g.stars AS groupstars, g.starimage AS groupstarimage, g.image AS groupimage, g.usereputationsystem
FROM ".TABLE_PREFIX."users u

Zeile 213Zeile 248
		$post['userusername'] = $mybb->user['username'];
$post['postusername'] = $mybb->user['username'];
$post['message'] = $previewmessage;

		$post['userusername'] = $mybb->user['username'];
$post['postusername'] = $mybb->user['username'];
$post['message'] = $previewmessage;

		$post['subject'] = htmlspecialchars_uni($mybb->input['subject']);

		$post['subject'] = $previewsubject;

		$post['icon'] = $mybb->input['icon'];
$post['smilieoff'] = $options['disablesmilies'];
$post['dateline'] = time();

		$post['icon'] = $mybb->input['icon'];
$post['smilieoff'] = $options['disablesmilies'];
$post['dateline'] = time();

Zeile 235Zeile 270
		}
$postbit = build_postbit($post, 2);
eval("\$preview = \"".$templates->get("previewpost")."\";");

		}
$postbit = build_postbit($post, 2);
eval("\$preview = \"".$templates->get("previewpost")."\";");


if($options['signature'] == "yes")
{
$optionschecked['signature'] = "checked";
}
if($options['disablesmilies'] == "yes")
{
$optionschecked['disablesmilies'] = "checked";
}
if($options['savecopy'] != "no")
{
$optionschecked['savecopy'] = "checked";
}
if($options['readreceipt'] != "no")
{
$optionschecked['readreceipt'] = "checked";
}
$to = htmlspecialchars_uni($mybb->input['to']);
$subject = htmlspecialchars_uni($mybb->input['subject']);

 
	}

	}

	else

	else if(!$send_errors)

	{

	{

 
		// New PM, so load default settings

		if($mybb->user['signature'] != "")

		if($mybb->user['signature'] != "")

		{
$optionschecked['signature'] = "checked";

		{
$optionschecked['signature'] = "checked";

		}
if($mybb->usergroup['cantrackpms'] == "yes")
{

		}
if($mybb->usergroup['cantrackpms'] == "yes")
{

Zeile 267Zeile 284
		}
$optionschecked['savecopy'] = "checked";
}

		}
$optionschecked['savecopy'] = "checked";
}

	if($mybb->input['pmid'] && !$mybb->input['preview'])


	// Draft, reply, forward
if($mybb->input['pmid'] > 0 && !$mybb->input['preview'])

	{
$query = $db->query("
SELECT pm.*, u.username AS quotename

	{
$query = $db->query("
SELECT pm.*, u.username AS quotename

Zeile 294Zeile 312
			if($pm['receipt'])
{
$optionschecked['readreceipt'] = "checked";

			if($pm['receipt'])
{
$optionschecked['readreceipt'] = "checked";

			}

			}

		}
else

		}
else

		{

		{ // forward/reply

			$subject = preg_replace("#(FW|RE):( *)#is", "", $subject);
$postdate = my_date($mybb->settings['dateformat'], $pm['dateline']);
$posttime = my_date($mybb->settings['timeformat'], $pm['dateline']);

			$subject = preg_replace("#(FW|RE):( *)#is", "", $subject);
$postdate = my_date($mybb->settings['dateformat'], $pm['dateline']);
$posttime = my_date($mybb->settings['timeformat'], $pm['dateline']);

Zeile 314Zeile 332
				$uid = $pm['fromid'];
$query = $db->simple_select(TABLE_PREFIX."users", "username", "uid='".$uid."'");
$user = $db->fetch_array($query);

				$uid = $pm['fromid'];
$query = $db->simple_select(TABLE_PREFIX."users", "username", "uid='".$uid."'");
$user = $db->fetch_array($query);

				$to = $user['username'];

				$to = htmlspecialchars_uni($user['username']);

			}
}
}

			}
}
}

 
	// New PM with recipient preset

	if($mybb->input['uid'] && !$mybb->input['preview'])
{
$query = $db->simple_select(TABLE_PREFIX."users", "username", "uid='".intval($mybb->input['uid'])."'");
$user = $db->fetch_array($query);

	if($mybb->input['uid'] && !$mybb->input['preview'])
{
$query = $db->simple_select(TABLE_PREFIX."users", "username", "uid='".intval($mybb->input['uid'])."'");
$user = $db->fetch_array($query);

		$to = $user['username'];

		$to = htmlspecialchars_uni($user['username']);

	}

// Load the auto complete javascript if it is enabled.

	}

// Load the auto complete javascript if it is enabled.

Zeile 330Zeile 349

$pmid = $mybb->input['pmid'];
$do = $mybb->input['do'];


$pmid = $mybb->input['pmid'];
$do = $mybb->input['do'];

 
	if($do != "forward" && $do != "reply")
{
$do = "";
}

	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);

Zeile 391Zeile 414
	}
$pm['userusername'] = $pm['username'];
$pm['subject'] = htmlspecialchars_uni($parser->parse_badwords($pm['subject']));

	}
$pm['userusername'] = $pm['username'];
$pm['subject'] = htmlspecialchars_uni($parser->parse_badwords($pm['subject']));

	if($pm['fromid'] == -2)

	if($pm['fromid'] == 0)

	{
$pm['username'] = "MyBB Engine";
}

	{
$pm['username'] = "MyBB Engine";
}

Zeile 442Zeile 465
}
if($mybb->input['action'] == "do_tracking" && $mybb->request_method == "post")
{

}
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");
if($mybb->input['stoptracking'])
{

	$plugins->run_hooks("private_do_tracking_start");
if($mybb->input['stoptracking'])
{

Zeile 535Zeile 561

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


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

 
	// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);


	$plugins->run_hooks("private_do_folders_start");
$highestid = 2;
$folders = '';

	$plugins->run_hooks("private_do_folders_start");
$highestid = 2;
$folders = '';

Zeile 559Zeile 588
				{
case 1:
if($val == $lang->folder_inbox)

				{
case 1:
if($val == $lang->folder_inbox)

						{
$val = '';

						{
$val = '';

						}
break;
case 2:

						}
break;
case 2:

Zeile 603Zeile 632
			else
{
$db->delete_query(TABLE_PREFIX."privatemessages", "folder='$fid' AND uid='".$mybb->user['uid']."'");

			else
{
$db->delete_query(TABLE_PREFIX."privatemessages", "folder='$fid' AND uid='".$mybb->user['uid']."'");

			}

			}

		}
}


		}
}


Zeile 611Zeile 640
		"pmfolders" => $folders
);
$db->update_query(TABLE_PREFIX."users", $sql_array, "uid='".$mybb->user['uid']."'");

		"pmfolders" => $folders
);
$db->update_query(TABLE_PREFIX."users", $sql_array, "uid='".$mybb->user['uid']."'");

 
	// Update PM count
update_pm_count();

	$plugins->run_hooks("private_do_folders_end");
redirect("private.php", $lang->redirect_pmfoldersupdated);
}

	$plugins->run_hooks("private_do_folders_end");
redirect("private.php", $lang->redirect_pmfoldersupdated);
}

Zeile 637Zeile 668

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


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");
$emptyq = '';
if(is_array($mybb->input['empty']))

	$plugins->run_hooks("private_do_empty_start");
$emptyq = '';
if(is_array($mybb->input['empty']))

Zeile 670Zeile 704
}

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

}

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

{




{
// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);


	$plugins->run_hooks("private_do_stuff");
if($mybb->input['hop'])

	$plugins->run_hooks("private_do_stuff");
if($mybb->input['hop'])

	{

	{

		header("Location: private.php?fid=".intval($mybb->input['jumpto']));
}
elseif($mybb->input['moveto'])

		header("Location: private.php?fid=".intval($mybb->input['jumpto']));
}
elseif($mybb->input['moveto'])

Zeile 686Zeile 723
					"folder" => intval($mybb->input['fid'])
);
$db->update_query(TABLE_PREFIX."privatemessages", $sql_array, "pmid='".intval($key)."' AND uid='".$mybb->user['uid']."'");

					"folder" => intval($mybb->input['fid'])
);
$db->update_query(TABLE_PREFIX."privatemessages", $sql_array, "pmid='".intval($key)."' AND uid='".$mybb->user['uid']."'");

			}
}

			}
}

		// Update PM count
update_pm_count();


		// Update PM count
update_pm_count();


Zeile 703Zeile 740
				if($pmssql)
{
$pmssql .= ",";

				if($pmssql)
{
$pmssql .= ",";

				}

				}

				$pmssql .= "'".intval($key)."'";
}
$query = $db->simple_select(TABLE_PREFIX."privatemessages", "pmid, folder", "pmid IN ($pmssql) AND uid='".$mybb->user['uid']."' AND folder='4'", array('order_by' => 'pmid'));

				$pmssql .= "'".intval($key)."'";
}
$query = $db->simple_select(TABLE_PREFIX."privatemessages", "pmid, folder", "pmid IN ($pmssql) AND uid='".$mybb->user['uid']."' AND folder='4'", array('order_by' => 'pmid'));

Zeile 737Zeile 774

if($mybb->input['action'] == "delete")
{


if($mybb->input['action'] == "delete")
{

 
	// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);


	$plugins->run_hooks("private_delete_start");

$sql_array = array(

	$plugins->run_hooks("private_delete_start");

$sql_array = array(

Zeile 771Zeile 811

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


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

 
	if($mybb->input['exporttype'] != "csv" && $mybb->input['exporttype'] != "txt" && $mybb->input['exporttype'] != "html")
{
exit;
}

// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);


	$plugins->run_hooks("private_do_export_start");
$lang->private_messages_for = sprintf($lang->private_messages_for, $mybb->user['username']);
$exdate = my_date($mybb->settings['dateformat'], time(), 0, 0);

	$plugins->run_hooks("private_do_export_start");
$lang->private_messages_for = sprintf($lang->private_messages_for, $mybb->user['username']);
$exdate = my_date($mybb->settings['dateformat'], time(), 0, 0);

Zeile 784Zeile 832
	else
{
if($mybb->input['daycut'] && ($mybb->input['dayway'] != "disregard"))

	else
{
if($mybb->input['daycut'] && ($mybb->input['dayway'] != "disregard"))

		{

		{

			$datecut = time()-($mybb->input['daycut'] * 86400);
$wsql = "pm.dateline";
if($mybb->input['dayway'] == "older")

			$datecut = time()-($mybb->input['daycut'] * 86400);
$wsql = "pm.dateline";
if($mybb->input['dayway'] == "older")

			{

			{

				$wsql .= "<=";
}
elseif($mybb->input['dayway'] == "newer")

				$wsql .= "<=";
}
elseif($mybb->input['dayway'] == "newer")

Zeile 796Zeile 844
				$wsql .= ">=";
}
$wsql .= "'$datecut'";

				$wsql .= ">=";
}
$wsql .= "'$datecut'";

		}
else

		}
else

		{
$wsql = "1=1";
}

		{
$wsql = "1=1";
}

Zeile 823Zeile 871
					{
$folderlst .= ",'$val'";
}

					{
$folderlst .= ",'$val'";
}

				}

				}

			}
if($folderlst)
{

			}
if($folderlst)
{

Zeile 862Zeile 910
			{
$tofromuid = $message['toid'];
if($mybb->input['exporttype'] == "txt")

			{
$tofromuid = $message['toid'];
if($mybb->input['exporttype'] == "txt")

				{

				{

					$tofromusername = $message['tousername'];

					$tofromusername = $message['tousername'];

				}

				}

				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")

		else
{
$tofromuid = $message['fromid'];
if($mybb->input['exporttype'] == "txt")

			{

			{

				$tofromusername = $message['fromusername'];

				$tofromusername = $message['fromusername'];

			}

			}

			else

			else

			{

			{

				$tofromusername = build_profile_link($message['fromusername'], $tofromuid);

				$tofromusername = build_profile_link($message['fromusername'], $tofromuid);

			}
if($tofromuid == -2)


			}

if($tofromuid == 0)

			{
$tofromusername = "MyBB Engine";
}
$tofrom = $lang->from;

			{
$tofromusername = "MyBB Engine";
}
$tofrom = $lang->from;

		}
if($tofromuid == -2)
{

		}
if($tofromuid == 0)
{

			$message['fromusername'] = "MyBB Engine";
}
if(!$message['toid'])

			$message['fromusername'] = "MyBB Engine";
}
if(!$message['toid'])

Zeile 995Zeile 1044
	if(!$mybb->input['fid'])
{
$mybb->input['fid'] = 1;

	if(!$mybb->input['fid'])
{
$mybb->input['fid'] = 1;

	}


	}


	$foldersexploded = explode("$%%$", $mybb->user['pmfolders']);
foreach($foldersexploded as $key => $folders)
{

	$foldersexploded = explode("$%%$", $mybb->user['pmfolders']);
foreach($foldersexploded as $key => $folders)
{

Zeile 1012Zeile 1061
	if($folder == 2 || $folder == 3)
{ // Sent Items Folder
$sender = $lang->sentto;

	if($folder == 2 || $folder == 3)
{ // Sent Items Folder
$sender = $lang->sentto;

	}
else

	}
else

	{
$sender = $lang->sender;

	{
$sender = $lang->sender;

	}

	}

	$doneunread = 0;
$doneread = 0;
// get total messages

	$doneunread = 0;
$doneread = 0;
// get total messages

Zeile 1030Zeile 1079
	// Do Multi Pages
$query = $db->simple_select(TABLE_PREFIX."privatemessages", "COUNT(*) AS total", "uid='".$mybb->user['uid']."' AND folder='$folder'");
$pmscount = $db->fetch_array($query);

	// Do Multi Pages
$query = $db->simple_select(TABLE_PREFIX."privatemessages", "COUNT(*) AS total", "uid='".$mybb->user['uid']."' AND folder='$folder'");
$pmscount = $db->fetch_array($query);





	$perpage = $mybb->settings['threadsperpage'];
$page = intval($mybb->input['page']);
if(intval($mybb->input['page']) > 0)

	$perpage = $mybb->settings['threadsperpage'];
$page = intval($mybb->input['page']);
if(intval($mybb->input['page']) > 0)

Zeile 1064Zeile 1113
		LIMIT $start, $perpage
");
if($db->num_rows($query) > 0)

		LIMIT $start, $perpage
");
if($db->num_rows($query) > 0)

	{

	{

		while($message = $db->fetch_array($query))
{

		while($message = $db->fetch_array($query))
{

			$msgalt = '';

			$msgalt = $msgsuffix = $msgprefix = '';

			// Determine Folder Icon
if($message['status'] == 0)
{
$msgfolder = 'new_pm.gif';
$msgalt = $lang->new_pm;

			// Determine Folder Icon
if($message['status'] == 0)
{
$msgfolder = 'new_pm.gif';
$msgalt = $lang->new_pm;

				$doneunread = 1;


				$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;

				$doneread = 1;

 
			}
elseif($message['status'] == 3)
{
$msgfolder = 're_pm.gif';
$msgalt = $lang->reply_pm;

			}
elseif($message['status'] == 3)
{
$msgfolder = 're_pm.gif';
$msgalt = $lang->reply_pm;

				$doneread = 1;

 
			}
elseif($message['status'] == 4)
{
$msgfolder = 'fw_pm.gif';
$msgalt = $lang->fwd_pm;

			}
elseif($message['status'] == 4)
{
$msgfolder = 'fw_pm.gif';
$msgalt = $lang->fwd_pm;

				$doneread = 1;

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

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

Zeile 1103Zeile 1150
				else
{
$tofromusername = $lang->not_sent;

				else
{
$tofromusername = $lang->not_sent;

				}
}
else
{

				}
}
else
{

				$tofromusername = $message['fromusername'];
$tofromuid = $message['fromid'];

				$tofromusername = $message['fromusername'];
$tofromuid = $message['fromid'];

				if($tofromuid == -2)

				if($tofromuid == 0)

				{
$tofromusername = 'MyBB Engine';
}

				{
$tofromusername = 'MyBB Engine';
}

			}

			}

			if($mybb->usergroup['cantrackpms'] == 'yes' && $mybb->usergroup['candenypmreceipts'] == 'yes' && $message['receipt'] == '1' && $message['folder'] != '3' && $message['folder'] != 2)

			if($mybb->usergroup['cantrackpms'] == 'yes' && $mybb->usergroup['candenypmreceipts'] == 'yes' && $message['receipt'] == '1' && $message['folder'] != '3' && $message['folder'] != 2)

			{

			{

				eval("\$denyreceipt = \"".$templates->get("private_messagebit_denyreceipt")."\";");
}
else
{
$denyreceipt = '';

				eval("\$denyreceipt = \"".$templates->get("private_messagebit_denyreceipt")."\";");
}
else
{
$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']];

Zeile 1141Zeile 1188
			else
{
$senddate = $lang->not_sent;

			else
{
$senddate = $lang->not_sent;

			}
if($doneunread && $doneread)
{
eval("\$messagelist .= \"".$templates->get("private_messagebit_sep")."\";");
$doneunread = 0;
$doneread = 0;

 
			}
eval("\$messagelist .= \"".$templates->get("private_messagebit")."\";");

			}
eval("\$messagelist .= \"".$templates->get("private_messagebit")."\";");

		}
}

		}
}

	else

	else

	{

	{

		eval("\$messagelist .= \"".$templates->get("private_nomessages")."\";");
}


		eval("\$messagelist .= \"".$templates->get("private_nomessages")."\";");
}


	if($mybb->usergroup['pmquota'] != '0')

	if($mybb->usergroup['pmquota'] > 0)

	{
$query = $db->simple_select(TABLE_PREFIX."privatemessages", "COUNT(*) AS total", "uid='".$mybb->user['uid']."'");
$pmscount = $db->fetch_array($query);

	{
$query = $db->simple_select(TABLE_PREFIX."privatemessages", "COUNT(*) AS total", "uid='".$mybb->user['uid']."'");
$pmscount = $db->fetch_array($query);

		$spaceused = $pmscount['total'] / $mybb->usergroup['pmquota'] * 100;








		if($pmscount['total'] == 0)
{
$spaceused = 0;
}
else
{
$spaceused = $pmscount['total'] / $mybb->usergroup['pmquota'] * 100;
}

		$spaceused2 = 100 - $spaceused;
if($spaceused <= "50")
{

		$spaceused2 = 100 - $spaceused;
if($spaceused <= "50")
{