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: newreply.php 2175 2006-08-31 04:27:16Z Tikitiki $
| * $Id: newreply.php 3478 2007-11-15 04:11:36Z Tikitiki $
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 22 | Zeile 22 |
---|
// Load global language phrases $lang->load("newreply");
|
// Load global language phrases $lang->load("newreply");
|
// Get the pid and tid from the input. $pid = $mybb->input['pid'];
| // Get the pid and tid and replyto from the input. $pid = $replyto = $mybb->input['pid'];
|
$tid = $mybb->input['tid'];
|
$tid = $mybb->input['tid'];
|
| if(isset($mybb->input['replyto'])) { $replyto = intval($mybb->input['replyto']); }
|
// Edit a draft post. $draft_pid = 0;
| // Edit a draft post. $draft_pid = 0;
|
Zeile 43 | Zeile 47 |
---|
$draft_pid = $post['pid']; $tid = $post['tid']; $editdraftpid = "<input type=\"hidden\" name=\"pid\" value=\"$draft_pid\" />";
|
$draft_pid = $post['pid']; $tid = $post['tid']; $editdraftpid = "<input type=\"hidden\" name=\"pid\" value=\"$draft_pid\" />";
|
}
| }
|
// Set up $thread and $forum for later use. $options = array(
| // Set up $thread and $forum for later use. $options = array(
|
Zeile 80 | Zeile 84 |
---|
if($forum['open'] == "no" || $forum['type'] != "f") { error($lang->error_closedinvalidforum);
|
if($forum['open'] == "no" || $forum['type'] != "f") { error($lang->error_closedinvalidforum);
|
}
| }
|
if($forumpermissions['canview'] == "no" || $forumpermissions['canpostreplys'] == "no") { error_no_permission();
|
if($forumpermissions['canview'] == "no" || $forumpermissions['canpostreplys'] == "no") { error_no_permission();
|
}
// Password protected forums ......... yhummmmy! check_forum_password($fid, $forum['password']);
| }
// Check if this forum is password protected and we have a valid password check_forum_password($forum['fid']);
|
if($mybb->settings['bbcodeinserter'] != "off" && $forum['allowmycode'] != "no" && (!$mybb->user['uid'] || $mybb->user['showcodebuttons'] != 0)) {
| if($mybb->settings['bbcodeinserter'] != "off" && $forum['allowmycode'] != "no" && (!$mybb->user['uid'] || $mybb->user['showcodebuttons'] != 0)) {
|
Zeile 100 | Zeile 104 |
---|
// Display a login box or change user box? if($mybb->user['uid'] != 0)
|
// Display a login box or change user box? if($mybb->user['uid'] != 0)
|
{
| {
|
eval("\$loginbox = \"".$templates->get("changeuserbox")."\";"); } else
| eval("\$loginbox = \"".$templates->get("changeuserbox")."\";"); } else
|
Zeile 121 | Zeile 125 |
---|
{ if($thread['closed'] == "yes") {
|
{ if($thread['closed'] == "yes") {
|
redirect("showthread.php?tid=$tid", $lang->redirect_threadclosed);
| error($lang->redirect_threadclosed);
|
} }
| } }
|
Zeile 138 | Zeile 142 |
---|
}
if(!$mybb->input['attachmentaid'] && ($mybb->input['newattachment'] || ($mybb->input['action'] == "do_newreply" && $mybb->input['submit'] && $_FILES['attachment'])))
|
}
if(!$mybb->input['attachmentaid'] && ($mybb->input['newattachment'] || ($mybb->input['action'] == "do_newreply" && $mybb->input['submit'] && $_FILES['attachment'])))
|
{
| {
|
// If there's an attachment, check it and upload it. if($_FILES['attachment']['size'] > 0 && $forumpermissions['canpostattachments'] != "no") {
| // If there's an attachment, check it and upload it. if($_FILES['attachment']['size'] > 0 && $forumpermissions['canpostattachments'] != "no") {
|
Zeile 176 | Zeile 180 |
---|
$reply_errors = ""; $hide_captcha = false;
|
$reply_errors = ""; $hide_captcha = false;
|
| // Check the maximum posts per day for this user if($mybb->settings['maxposts'] > 0 && $mybb->usergroup['cancp'] != "yes") { $daycut = time()-60*60*24; $query = $db->simple_select(TABLE_PREFIX."posts", "COUNT(*) AS posts_today", "uid='{$mybb->user['uid']}' AND visible='1' AND dateline>{$daycut}"); $post_count = $db->fetch_field($query, "posts_today"); if($post_count >= $mybb->settings['maxposts']) { $lang->error_maxposts = sprintf($lang->error_maxposts, $mybb->settings['maxposts']); error($lang->error_maxposts); } }
|
if($mybb->input['action'] == "do_newreply" && $mybb->request_method == "post") { $plugins->run_hooks("newreply_do_newreply_start");
| if($mybb->input['action'] == "do_newreply" && $mybb->request_method == "post") { $plugins->run_hooks("newreply_do_newreply_start");
|
Zeile 213 | Zeile 231 |
---|
// Otherwise they've logged in successfully.
$mybb->input['username'] = $username = $mybb->user['username'];
|
// Otherwise they've logged in successfully.
$mybb->input['username'] = $username = $mybb->user['username'];
|
my_setcookie("mybbuser", $mybb->user['uid']."_".$mybb->user['loginkey']);
| my_setcookie("mybbuser", $mybb->user['uid']."_".$mybb->user['loginkey'], null, true);
|
my_setcookie('loginattempts', 1); // Update the session to contain their user ID
| my_setcookie('loginattempts', 1); // Update the session to contain their user ID
|
Zeile 257 | Zeile 275 |
---|
} else {
|
} else {
|
$user_check = "p.ipaddress='{$session->ipaddress}'";
| $user_check = "p.ipaddress='".$db->escape_string($session->ipaddress)."'";
|
} if(!$mybb->input['savedraft']) {
| } if(!$mybb->input['savedraft']) {
|
Zeile 455 | Zeile 473 |
---|
{ $unviewable_forums = "AND t.fid NOT IN ({$unviewable_forums})"; }
|
{ $unviewable_forums = "AND t.fid NOT IN ({$unviewable_forums})"; }
|
if(is_moderator($fid))
| if(is_moderator($fid) == "yes")
|
{ $visible_where = "AND p.visible != 2"; }
| { $visible_where = "AND p.visible != 2"; }
|
Zeile 485 | Zeile 503 |
---|
{ $quoted_post['username'] = $quoted_post['userusername']; }
|
{ $quoted_post['username'] = $quoted_post['userusername']; }
|
$quoted_post['message'] = preg_replace('#(^|\r|\n)/me ([^\r\n<]*)#i', "\\1* {$quoted_post['username']} \\2</span>", $quoted_post['message']); $quoted_post['message'] = preg_replace('#(^|\r|\n)/slap ([^\r\n<]*)#i', "\\1* {$quoted_post['username']} {$lang->slaps} \\2 {$lang->with_trout}</span>", $quoted_post['message']);
| $quoted_post['message'] = preg_replace('#(^|\r|\n)/me ([^\r\n<]*)#i', "\\1* {$quoted_post['username']} \\2", $quoted_post['message']); $quoted_post['message'] = preg_replace('#(^|\r|\n)/slap ([^\r\n<]*)#i', "\\1* {$quoted_post['username']} {$lang->slaps} \\2 {$lang->with_trout}", $quoted_post['message']);
|
$quoted_post['message'] = preg_replace("#\[attachment=([0-9]+?)\]#i", '', $quoted_post['message']);
|
$quoted_post['message'] = preg_replace("#\[attachment=([0-9]+?)\]#i", '', $quoted_post['message']);
|
| $quoted_post['message'] = $parser->parse_badwords($quoted_post['message']);
|
$message .= "[quote={$quoted_post['username']}]\n{$quoted_post['message']}\n[/quote]\n\n"; $quoted_ids[] = $quoted_post['pid']; }
| $message .= "[quote={$quoted_post['username']}]\n{$quoted_post['message']}\n[/quote]\n\n"; $quoted_ids[] = $quoted_post['pid']; }
|
Zeile 709 | Zeile 728 |
---|
if($forumpermissions['canpostattachments'] != "no") { $attachcount = 0;
|
if($forumpermissions['canpostattachments'] != "no") { $attachcount = 0;
|
if($mybb->input['action'] == "editdraft")
| if($mybb->input['action'] == "editdraft" || ($mybb->input['tid'] && $mybb->input['pid']))
|
{ $attachwhere = "pid='$pid'"; }
| { $attachwhere = "pid='$pid'"; }
|
Zeile 740 | Zeile 759 |
---|
} $query = $db->simple_select(TABLE_PREFIX."attachments", "SUM(filesize) AS ausage", "uid='".$mybb->user['uid']."'"); $usage = $db->fetch_array($query);
|
} $query = $db->simple_select(TABLE_PREFIX."attachments", "SUM(filesize) AS ausage", "uid='".$mybb->user['uid']."'"); $usage = $db->fetch_array($query);
|
if($usage['ausage'] > ($mybb->usergroup['attachquota']*1000) && $mybb->usergroup['attachquota'] != 0)
| if($usage['ausage'] > ($mybb->usergroup['attachquota']*1024) && $mybb->usergroup['attachquota'] != 0)
|
{ $noshowattach = 1; }
| { $noshowattach = 1; }
|
Zeile 750 | Zeile 769 |
---|
} else {
|
} else {
|
$friendlyquota = get_friendly_size($mybb->usergroup['attachquota']*1000);
| $friendlyquota = get_friendly_size($mybb->usergroup['attachquota']*1024);
|
} $friendlyusage = get_friendly_size($usage['ausage']); $lang->attach_quota = sprintf($lang->attach_quota, $friendlyusage, $friendlyquota);
| } $friendlyusage = get_friendly_size($usage['ausage']); $lang->attach_quota = sprintf($lang->attach_quota, $friendlyusage, $friendlyquota);
|