Zeile 3 | Zeile 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 2265 2006-09-26 14:49:36Z Tikitiki $
| * $Id: private.php 3171 2007-06-29 04:57:39Z chris $
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 189 | Zeile 189 |
---|
if($mybb->settings['bbcodeinserter'] != "off" && $mybb->settings['pmsallowmycode'] != "no" && $mybb->user['showcodebuttons'] != 0) { $codebuttons = build_mycode_inserter();
|
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(); }
| 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) { 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 213 | Zeile 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'] = $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 235 | Zeile 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 264 | Zeile 269 |
---|
if($mybb->usergroup['cantrackpms'] == "yes") { $optionschecked['readreceipt'] = "checked";
|
if($mybb->usergroup['cantrackpms'] == "yes") { $optionschecked['readreceipt'] = "checked";
|
}
| }
|
$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 288 | Zeile 294 |
---|
$optionschecked['signature'] = "checked"; } if($pm['smilieoff'] == "yes")
|
$optionschecked['signature'] = "checked"; } if($pm['smilieoff'] == "yes")
|
{
| {
|
$optionschecked['disablesmilies'] = "checked";
|
$optionschecked['disablesmilies'] = "checked";
|
}
| }
|
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']); $message = "[quote=$pm[quotename]]\n$message\n[/quote]"; $quoted['message'] = preg_replace('#^/me (.*)$#im', "* ".$pm['quotename']." \\1", $quoted['message']);
|
$subject = preg_replace("#(FW|RE):( *)#is", "", $subject); $postdate = my_date($mybb->settings['dateformat'], $pm['dateline']); $posttime = my_date($mybb->settings['timeformat'], $pm['dateline']); $message = "[quote=$pm[quotename]]\n$message\n[/quote]"; $quoted['message'] = preg_replace('#^/me (.*)$#im', "* ".$pm['quotename']." \\1", $quoted['message']);
|
|
|
if($mybb->input['do'] == "forward") { $subject = "Fw: $subject";
| if($mybb->input['do'] == "forward") { $subject = "Fw: $subject";
|
Zeile 314 | Zeile 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'])
|
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']; }
| { $query = $db->simple_select(TABLE_PREFIX."users", "username", "uid='".intval($mybb->input['uid'])."'"); $user = $db->fetch_array($query); $to = htmlspecialchars_uni($user['username']); }
|
// Load the auto complete javascript if it is enabled. eval("\$autocompletejs = \"".$templates->get("private_send_autocomplete")."\";");
$pmid = $mybb->input['pmid']; $do = $mybb->input['do'];
|
// Load the auto complete javascript if it is enabled. eval("\$autocompletejs = \"".$templates->get("private_send_autocomplete")."\";");
$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 674 | Zeile 685 |
---|
$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=".$mybb->input['jumpto']);
| header("Location: private.php?fid=".intval($mybb->input['jumpto']));
|
} elseif($mybb->input['moveto']) {
| } elseif($mybb->input['moveto']) {
|
Zeile 685 | Zeile 696 |
---|
$sql_array = array( "folder" => intval($mybb->input['fid']) );
|
$sql_array = array( "folder" => intval($mybb->input['fid']) );
|
$db->update_query(TABLE_PREFIX."privatemessages", $sql_array, "pmid=".intval($key)." AND uid=".$mybb->user['uid']);
| $db->update_query(TABLE_PREFIX."privatemessages", $sql_array, "pmid='".intval($key)."' AND uid='".$mybb->user['uid']."'");
|
} } // Update PM count
| } } // Update PM count
|
Zeile 698 | Zeile 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 708 | Zeile 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 762 | Zeile 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 771 | Zeile 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);
|
Zeile 1156 | Zeile 1171 |
---|
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);
|