Vergleich private.php - 1.2.7 - 1.2.13

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/eula.html
*

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

 * $Id: private.php 3030 2007-04-26 00:19:47Z 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 85Zeile 85

usercp_menu();



usercp_menu();






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


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


Zeile 116Zeile 116

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


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

	$plugins->run_hooks("private_send_do_send");









	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
$time_cutoff = time() - (5 * 60 * 60);


// Attempt to see if this PM is a duplicate or not
$time_cutoff = time() - (5 * 60 * 60);

Zeile 133Zeile 141

require_once MYBB_ROOT."inc/datahandlers/pm.php";
$pmhandler = new PMDataHandler();


require_once MYBB_ROOT."inc/datahandlers/pm.php";
$pmhandler = new PMDataHandler();





	$pm = array(
"subject" => $mybb->input['subject'],
"message" => $mybb->input['message'],

	$pm = array(
"subject" => $mybb->input['subject'],
"message" => $mybb->input['message'],

Zeile 142Zeile 150
		"username" => $mybb->input['to'],
"do" => $mybb->input['do'],
"pmid" => $mybb->input['pmid']

		"username" => $mybb->input['to'],
"do" => $mybb->input['do'],
"pmid" => $mybb->input['pmid']

	);

	);


$pm['options'] = array(
"signature" => $mybb->input['options']['signature'],


$pm['options'] = array(
"signature" => $mybb->input['options']['signature'],

Zeile 150Zeile 158
		"savecopy" => $mybb->input['options']['savecopy'],
"readreceipt" => $mybb->input['options']['readreceipt']
);

		"savecopy" => $mybb->input['options']['savecopy'],
"readreceipt" => $mybb->input['options']['readreceipt']
);





	if($mybb->input['saveasdraft'])
{
$pm['saveasdraft'] = 1;

	if($mybb->input['saveasdraft'])
{
$pm['saveasdraft'] = 1;

Zeile 183Zeile 191

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


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

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


$plugins->run_hooks("private_send_start");



$plugins->run_hooks("private_send_start");


Zeile 198Zeile 210
	$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 228Zeile 263
		if(!$options['signature'])
{
$post['includesig'] = 'no';

		if(!$options['signature'])
{
$post['includesig'] = 'no';

		}
else
{

		}
else
{

			$post['includesig'] = 'yes';

			$post['includesig'] = 'yes';

		}

		}

		$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'] != "")
{
$optionschecked['signature'] = "checked";

		if($mybb->user['signature'] != "")
{
$optionschecked['signature'] = "checked";

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 297Zeile 315
			}
}
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")

	if($do != "forward" && $do != "reply")

	{
$do = "";
}

	{
$do = "";
}

Zeile 395Zeile 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 446Zeile 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 539Zeile 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 551Zeile 576
			{
$highestid++;
$fid = intval($highestid);

			{
$highestid++;
$fid = intval($highestid);

			}
else
{

			}
else
{

				if($key > $highestid)
{
$highestid = $key;

				if($key > $highestid)
{
$highestid = $key;

Zeile 569Zeile 594
						break;
case 2:
if($val == $lang->folder_sent_items)

						break;
case 2:
if($val == $lang->folder_sent_items)

						{
$val = '';
}

						{
$val = '';
}

						break;
case 3:
if($val == $lang->folder_drafts)

						break;
case 3:
if($val == $lang->folder_drafts)

						{
$val = '';
}
break;

						{
$val = '';
}
break;

					case 4:
if($val == $lang->folder_trash)
{
$val = '';
}
break;

					case 4:
if($val == $lang->folder_trash)
{
$val = '';
}
break;

				}

				}

			}
if($val != '' || ($key >= 1 && $key <= 4))
{

			}
if($val != '' || ($key >= 1 && $key <= 4))
{

Zeile 602Zeile 627
				else
{
error($lang->error_invalidpmfoldername);

				else
{
error($lang->error_invalidpmfoldername);

				}
}
else
{

				}
}
else
{

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

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

Zeile 615Zeile 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 640Zeile 667
}

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 674Zeile 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 690Zeile 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 741Zeile 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");

	$plugins->run_hooks("private_delete_start");





	$sql_array = array(
"folder" => 4
);

	$sql_array = array(
"folder" => 4
);

Zeile 750Zeile 786

// Update PM count
update_pm_count();


// Update PM count
update_pm_count();





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

Zeile 762Zeile 798
	$folderlist .= "<option value=\"all\" selected>$lang->all_folders</option>";
$foldersexploded = explode("$%%$", $mybb->user['pmfolders']);
foreach($foldersexploded as $key => $folders)

	$folderlist .= "<option value=\"all\" selected>$lang->all_folders</option>";
$foldersexploded = explode("$%%$", $mybb->user['pmfolders']);
foreach($foldersexploded as $key => $folders)

	{

	{

		$folderinfo = explode("**", $folders, 2);
$folderinfo[1] = get_pm_folder_name($folderinfo[0], $folderinfo[1]);
$folderlist .= "<option value=\"$folderinfo[0]\">$folderinfo[1]</option>\n";

		$folderinfo = explode("**", $folders, 2);
$folderinfo[1] = get_pm_folder_name($folderinfo[0], $folderinfo[1]);
$folderlist .= "<option value=\"$folderinfo[0]\">$folderinfo[1]</option>\n";

	}

	}

	$folderlist .= "</select>\n";
eval("\$archive = \"".$templates->get("private_archive")."\";");
$plugins->run_hooks("private_export_end");

	$folderlist .= "</select>\n";
eval("\$archive = \"".$templates->get("private_archive")."\";");
$plugins->run_hooks("private_export_end");

Zeile 775Zeile 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 891Zeile 935
			{
$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)
{
$message['fromusername'] = "MyBB Engine";
}

		if($tofromuid == 0)
{
$message['fromusername'] = "MyBB Engine";
}

		if(!$message['toid'])
{
$message['tousername'] = $lang->not_sent;

		if(!$message['toid'])
{
$message['tousername'] = $lang->not_sent;

Zeile 908Zeile 953

$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'], 0, 0);
$sendtime = my_date($mybb->settings['timeformat'], $message['dateline'], 0, 0);
$senddate .= " $lang->at $sendtime";

			$senddate = my_date($mybb->settings['dateformat'], $message['dateline'], 0, 0);
$sendtime = my_date($mybb->settings['timeformat'], $message['dateline'], 0, 0);
$senddate .= " $lang->at $sendtime";

Zeile 970Zeile 1015
		$contenttype = "text/html";
}
elseif($mybb->input['exporttype'] == "csv")

		$contenttype = "text/html";
}
elseif($mybb->input['exporttype'] == "csv")

	{

	{

		$filename = "pm-archive.csv";
$contenttype = "application/octet-stream";
}

		$filename = "pm-archive.csv";
$contenttype = "application/octet-stream";
}

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

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

	}

	}

	else
{
$sender = $lang->sender;

	else
{
$sender = $lang->sender;

Zeile 1050Zeile 1095
	$lower = $start+1;
$upper = $end;
if($upper > $threadcount)

	$lower = $start+1;
$upper = $end;
if($upper > $threadcount)

	{

	{

		$upper = $threadcount;
}
$multipage = multipage($pmscount['total'], $perpage, $page, "private.php?fid=$folder");

		$upper = $threadcount;
}
$multipage = multipage($pmscount['total'], $perpage, $page, "private.php?fid=$folder");

Zeile 1071Zeile 1116
	{
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 1113Zeile 1156
			{
$tofromusername = $message['fromusername'];
$tofromuid = $message['fromid'];

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

				if($tofromuid == -2)

				if($tofromuid == 0)

				{
$tofromusername = 'MyBB Engine';
}

				{
$tofromusername = 'MyBB Engine';
}

Zeile 1141Zeile 1184
				$sendpmdate = my_date($mybb->settings['dateformat'], $message['dateline']);
$sendpmtime = my_date($mybb->settings['timeformat'], $message['dateline']);
$senddate = $sendpmdate.", ".$sendpmtime;

				$sendpmdate = my_date($mybb->settings['dateformat'], $message['dateline']);
$sendpmtime = my_date($mybb->settings['timeformat'], $message['dateline']);
$senddate = $sendpmdate.", ".$sendpmtime;

			}

			}

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