Vergleich private.php - 1.2.7 - 1.2.8

  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 3171 2007-06-29 04:57:39Z chris $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 198Zeile 198
	$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)
{
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']);
}

// Preview

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

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

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

		$post['icon'] = $mybb->input['icon'];
$post['smilieoff'] = $options['disablesmilies'];
$post['dateline'] = time();
if(!$options['signature'])
{
$post['includesig'] = 'no';

 		} 

 		} 

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

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

Zeile 235Zeile 258
		}
$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 272
		}
$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 303
			}
}
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 320
				$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 337

$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 418Zeile 425
		LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=pm.toid)
WHERE receipt='2' AND status!='0' AND fromid='".$mybb->user['uid']."'
ORDER BY pm.readtime DESC

		LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=pm.toid)
WHERE receipt='2' AND status!='0' AND fromid='".$mybb->user['uid']."'
ORDER BY pm.readtime DESC

	");

	");

	while($readmessage = $db->fetch_array($query))
{
$readmessage['subject'] = htmlspecialchars_uni($parser->parse_badwords($readmessage['subject']));

	while($readmessage = $db->fetch_array($query))
{
$readmessage['subject'] = htmlspecialchars_uni($parser->parse_badwords($readmessage['subject']));

Zeile 702Zeile 709
		if(is_array($mybb->input['check']))
{
$pmssql = '';

		if(is_array($mybb->input['check']))
{
$pmssql = '';

			foreach($mybb->input['check'] as $key => $val)
{

			foreach($mybb->input['check'] as $key => $val)
{

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

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

Zeile 712Zeile 719
			}
$query = $db->simple_select(TABLE_PREFIX."privatemessages", "pmid, folder", "pmid IN ($pmssql) AND uid='".$mybb->user['uid']."' AND folder='4'", array('order_by' => 'pmid'));
while($delpm = $db->fetch_array($query))

			}
$query = $db->simple_select(TABLE_PREFIX."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']);

				$deletepms[$delpm['pmid']] = 1;
}
reset($mybb->input['check']);

Zeile 766Zeile 773
		$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 782

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'] != "text" && $mybb->input['exporttype'] != "html")
{
exit;
}

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