Zeile 36 | Zeile 36 |
---|
{ $thread = get_thread($mybb->input['tid']);
|
{ $thread = get_thread($mybb->input['tid']);
|
$query = $db->simple_select("posts", "*", "tid='".$mybb->get_input('tid', MyBB::INPUT_INT)."' AND visible='-2'", array('order_by' => 'dateline, pid', 'limit' => 1));
| $query = $db->simple_select("posts", "*", "tid='".$mybb->input['tid']."' AND visible='-2'", array('order_by' => 'dateline, pid', 'limit' => 1));
|
$post = $db->fetch_array($query);
|
$post = $db->fetch_array($query);
|
if(!$thread['tid'] || !$post['pid'] || $thread['visible'] != -2 || $thread['uid'] != $mybb->user['uid'])
| if(!$thread || !$post || $thread['visible'] != -2 || $thread['uid'] != $mybb->user['uid'])
|
{ error($lang->invalidthread); }
| { error($lang->invalidthread); }
|
Zeile 95 | Zeile 95 |
---|
check_forum_password($forum['fid']);
// If MyCode is on for this forum and the MyCode editor is enabled in the Admin CP, draw the code buttons and smilie inserter.
|
check_forum_password($forum['fid']);
// If MyCode is on for this forum and the MyCode editor is enabled in the Admin CP, draw the code buttons and smilie inserter.
|
| $codebuttons = ''; $smilieinserter = '';
|
if($mybb->settings['bbcodeinserter'] != 0 && $forum['allowmycode'] != 0 && (!$mybb->user['uid'] || $mybb->user['showcodebuttons'] != 0)) { $codebuttons = build_mycode_inserter("message", $forum['allowsmilies']);
| if($mybb->settings['bbcodeinserter'] != 0 && $forum['allowmycode'] != 0 && (!$mybb->user['uid'] || $mybb->user['showcodebuttons'] != 0)) { $codebuttons = build_mycode_inserter("message", $forum['allowsmilies']);
|
Zeile 103 | Zeile 105 |
---|
$smilieinserter = build_clickable_smilies(); } }
|
$smilieinserter = build_clickable_smilies(); } }
|
| $posticons = '';
|
// Does this forum allow post icons? If so, fetch the post icons. if($forum['allowpicons'] != 0) { $posticons = get_post_icons();
|
// Does this forum allow post icons? If so, fetch the post icons. if($forum['allowpicons'] != 0) { $posticons = get_post_icons();
|
}
| }
|
// If we have a currently logged in user then fetch the change user box. if($mybb->user['uid'] != 0) {
| // If we have a currently logged in user then fetch the change user box. if($mybb->user['uid'] != 0) {
|
Zeile 119 | Zeile 123 |
---|
// Otherwise we have a guest, determine the "username" and get the login box. else
|
// Otherwise we have a guest, determine the "username" and get the login box. else
|
{
| {
|
if(!isset($mybb->input['previewpost']) && $mybb->input['action'] != "do_newthread") { $username = '';
| if(!isset($mybb->input['previewpost']) && $mybb->input['action'] != "do_newthread") { $username = '';
|
Zeile 133 | Zeile 137 |
---|
// If we're not performing a new thread insert and not editing a draft then we're posting a new thread. if($mybb->input['action'] != "do_newthread" && $mybb->input['action'] != "editdraft")
|
// If we're not performing a new thread insert and not editing a draft then we're posting a new thread. if($mybb->input['action'] != "do_newthread" && $mybb->input['action'] != "editdraft")
|
{ $mybb->input['action'] = "newthread";
| { $mybb->input['action'] = "newthread";
|
}
// Previewing a post, overwrite the action to the new thread action.
| }
// Previewing a post, overwrite the action to the new thread action.
|
Zeile 158 | Zeile 162 |
---|
$maximageserror = $attacherror = '';
// Handle attachments if we've got any.
|
$maximageserror = $attacherror = '';
// Handle attachments if we've got any.
|
if($mybb->settings['enableattachments'] == 1 && ($mybb->get_input('newattachment') || $mybb->get_input('updateattachment') || ((($mybb->input['action'] == "do_newthread" && $mybb->get_input('submit')) || ($mybb->input['action'] == "newthread" && isset($mybb->input['previewpost'])) || isset($mybb->input['savedraft'])) && $_FILES['attachments'])))
| if($mybb->settings['enableattachments'] == 1 && ($mybb->get_input('newattachment') || $mybb->get_input('updateattachment') || ((($mybb->input['action'] == "do_newthread" && $mybb->get_input('submit')) || ($mybb->input['action'] == "newthread" && isset($mybb->input['previewpost'])) || isset($mybb->input['savedraft'])) && isset($_FILES['attachments']))))
|
{ // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
| { // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
Zeile 184 | Zeile 192 |
---|
eval("\$postinsert = \"".$templates->get("post_attachments_attachment_postinsert")."\";"); } eval("\$attach_rem_options = \"".$templates->get("post_attachments_attachment_remove")."\";");
|
eval("\$postinsert = \"".$templates->get("post_attachments_attachment_postinsert")."\";"); } eval("\$attach_rem_options = \"".$templates->get("post_attachments_attachment_remove")."\";");
|
| $attach_mod_options = '';
|
eval("\$attemplate = \"".$templates->get("post_attachments_attachment")."\";"); $ret['template'] = $attemplate;
| eval("\$attemplate = \"".$templates->get("post_attachments_attachment")."\";"); $ret['template'] = $attemplate;
|
Zeile 195 | Zeile 204 |
---|
header("Content-type: application/json; charset={$lang->settings['charset']}"); echo json_encode($ret); exit();
|
header("Content-type: application/json; charset={$lang->settings['charset']}"); echo json_encode($ret); exit();
|
}
| }
|
if(!empty($ret['errors'])) { $errors = $ret['errors'];
| if(!empty($ret['errors'])) { $errors = $ret['errors'];
|
Zeile 225 | Zeile 234 |
---|
}
if($mybb->get_input('ajax', MyBB::INPUT_INT) == 1)
|
}
if($mybb->get_input('ajax', MyBB::INPUT_INT) == 1)
|
{ $query = $db->simple_select("attachments", "SUM(filesize) AS ausage", "uid='".$mybb->user['uid']."'");
| { $query = $db->simple_select("attachments", "SUM(filesize) AS ausage", "uid='".$mybb->user['uid']."'");
|
$usage = $db->fetch_array($query);
header("Content-type: application/json; charset={$lang->settings['charset']}");
| $usage = $db->fetch_array($query);
header("Content-type: application/json; charset={$lang->settings['charset']}");
|
Zeile 347 | Zeile 356 |
---|
"message" => $mybb->get_input('message'), "ipaddress" => $session->packedip, "posthash" => $mybb->get_input('posthash')
|
"message" => $mybb->get_input('message'), "ipaddress" => $session->packedip, "posthash" => $mybb->get_input('posthash')
|
);
| );
|
if($pid != '') { $new_thread['pid'] = $pid;
| if($pid != '') { $new_thread['pid'] = $pid;
|
Zeile 423 | Zeile 432 |
---|
else { $hide_captcha = true;
|
else { $hide_captcha = true;
|
} }
| } }
|
// One or more errors returned, fetch error list and throw to newthread page if(count($post_errors) > 0) {
| // One or more errors returned, fetch error list and throw to newthread page if(count($post_errors) > 0) {
|
Zeile 470 | Zeile 479 |
---|
{ // Moderated thread $lang->redirect_newthread .= $lang->redirect_newthread_moderation;
|
{ // Moderated thread $lang->redirect_newthread .= $lang->redirect_newthread_moderation;
|
$url = get_forum_link($fid);
| $url = get_forum_link($fid);
|
// User must see moderation notice, regardless of redirect settings $force_redirect = true;
| // User must see moderation notice, regardless of redirect settings $force_redirect = true;
|
Zeile 501 | Zeile 510 |
---|
if($mybb->get_input('quoted_ids') == "all") { my_unsetcookie("multiquote");
|
if($mybb->get_input('quoted_ids') == "all") { my_unsetcookie("multiquote");
|
}
| }
|
}
$plugins->run_hooks("newthread_do_newthread_end");
| }
$plugins->run_hooks("newthread_do_newthread_end");
|
Zeile 577 | Zeile 586 |
---|
{ $onlyusfids[] = $gpfid; }
|
{ $onlyusfids[] = $gpfid; }
|
}
| }
|
if(!empty($onlyusfids))
|
if(!empty($onlyusfids))
|
{
| {
|
$onlyusforums = "AND ((t.fid IN(".implode(',', $onlyusfids).") AND t.uid='{$mybb->user['uid']}') OR t.fid NOT IN(".implode(',', $onlyusfids)."))"; }
| $onlyusforums = "AND ((t.fid IN(".implode(',', $onlyusfids).") AND t.uid='{$mybb->user['uid']}') OR t.fid NOT IN(".implode(',', $onlyusfids)."))"; }
|
Zeile 592 | Zeile 601 |
---|
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid) WHERE p.pid IN ({$quoted_posts}) {$unviewable_forums} {$inactiveforums} {$onlyusforums} {$visible_where} ORDER BY p.dateline, p.pid
|
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid) WHERE p.pid IN ({$quoted_posts}) {$unviewable_forums} {$inactiveforums} {$onlyusforums} {$visible_where} ORDER BY p.dateline, p.pid
|
");
| ");
|
while($quoted_post = $db->fetch_array($query)) { if($quoted_post['userusername'])
| while($quoted_post = $db->fetch_array($query)) { if($quoted_post['userusername'])
|
Zeile 640 | Zeile 649 |
---|
if(isset($mybb->input['quoted_ids'])) { $quoted_ids = htmlspecialchars_uni($mybb->get_input('quoted_ids'));
|
if(isset($mybb->input['quoted_ids'])) { $quoted_ids = htmlspecialchars_uni($mybb->get_input('quoted_ids'));
|
}
| }
|
$postoptionschecked = array('signature' => '', 'disablesmilies' => ''); $subscribe = $nonesubscribe = $emailsubscribe = $pmsubscribe = ''; $postpollchecked = '';
| $postoptionschecked = array('signature' => '', 'disablesmilies' => ''); $subscribe = $nonesubscribe = $emailsubscribe = $pmsubscribe = ''; $postpollchecked = '';
|
Zeile 666 | Zeile 675 |
---|
if($mybb->get_input('postpoll', MyBB::INPUT_INT) == 1) { $postpollchecked = "checked=\"checked\"";
|
if($mybb->get_input('postpoll', MyBB::INPUT_INT) == 1) { $postpollchecked = "checked=\"checked\"";
|
}
| }
|
$subscription_method = get_subscription_method($tid, $postoptions); $numpolloptions = $mybb->get_input('numpolloptions', MyBB::INPUT_INT); }
| $subscription_method = get_subscription_method($tid, $postoptions); $numpolloptions = $mybb->get_input('numpolloptions', MyBB::INPUT_INT); }
|
Zeile 678 | Zeile 687 |
---|
$message = htmlspecialchars_uni($post['message']); $subject = htmlspecialchars_uni($post['subject']); if($post['includesig'] != 0)
|
$message = htmlspecialchars_uni($post['message']); $subject = htmlspecialchars_uni($post['subject']); if($post['includesig'] != 0)
|
{
| {
|
$postoptionschecked['signature'] = " checked=\"checked\"";
|
$postoptionschecked['signature'] = " checked=\"checked\"";
|
}
| }
|
if($post['smilieoff'] == 1) { $postoptionschecked['disablesmilies'] = " checked=\"checked\"";
|
if($post['smilieoff'] == 1) { $postoptionschecked['disablesmilies'] = " checked=\"checked\"";
|
}
| }
|
$icon = $post['icon']; if($forum['allowpicons'] != 0) { $posticons = get_post_icons(); } $subscription_method = get_subscription_method($tid); // Subscription method doesn't get saved in drafts
|
$icon = $post['icon']; if($forum['allowpicons'] != 0) { $posticons = get_post_icons(); } $subscription_method = get_subscription_method($tid); // Subscription method doesn't get saved in drafts
|
| $numpolloptions = "2";
|
}
// Otherwise, this is our initial visit to this page.
| }
// Otherwise, this is our initial visit to this page.
|
Zeile 834 | Zeile 844 |
---|
$postbit = build_postbit($post, 1); eval("\$preview = \"".$templates->get("previewpost")."\";");
|
$postbit = build_postbit($post, 1); eval("\$preview = \"".$templates->get("previewpost")."\";");
|
} $message = htmlspecialchars_uni($mybb->get_input('message')); $subject = htmlspecialchars_uni($mybb->get_input('subject')); }
| } $message = htmlspecialchars_uni($mybb->get_input('message')); $subject = htmlspecialchars_uni($mybb->get_input('subject')); }
|
// Removing an attachment or adding a new one, or showing thread errors. else if($mybb->get_input('attachmentaid', MyBB::INPUT_INT) || $mybb->get_input('newattachment') || $mybb->get_input('updateattachment') || $thread_errors) {
| // Removing an attachment or adding a new one, or showing thread errors. else if($mybb->get_input('attachmentaid', MyBB::INPUT_INT) || $mybb->get_input('newattachment') || $mybb->get_input('updateattachment') || $thread_errors) {
|
Zeile 850 | Zeile 860 |
---|
if(!$mybb->get_input('threadprefix', MyBB::INPUT_INT)) { $mybb->input['threadprefix'] = 0;
|
if(!$mybb->get_input('threadprefix', MyBB::INPUT_INT)) { $mybb->input['threadprefix'] = 0;
|
}
$prefixselect = build_prefix_select($forum['fid'], $mybb->get_input('threadprefix', MyBB::INPUT_INT));
| }
$prefixselect = build_prefix_select($forum['fid'], $mybb->get_input('threadprefix', MyBB::INPUT_INT));
|
$posthash = htmlspecialchars_uni($mybb->get_input('posthash'));
| $posthash = htmlspecialchars_uni($mybb->get_input('posthash'));
|
Zeile 880 | Zeile 890 |
---|
else { $bgcolor = "trow1";
|
else { $bgcolor = "trow1";
|
$bgcolor2 = "trow2"; }
| $bgcolor2 = "trow2"; }
|
$modoptions = ''; // Show the moderator options if(is_moderator($fid))
| $modoptions = ''; // Show the moderator options if(is_moderator($fid))
|
Zeile 897 | Zeile 907 |
---|
$closecheck = ''; } if(isset($modoptions['stickthread']) && $modoptions['stickthread'] == 1)
|
$closecheck = ''; } if(isset($modoptions['stickthread']) && $modoptions['stickthread'] == 1)
|
{
| {
|
$stickycheck = "checked=\"checked\"";
|
$stickycheck = "checked=\"checked\"";
|
}
| }
|
else
|
else
|
{
| {
|
$stickycheck = '';
|
$stickycheck = '';
|
}
| }
|
$closeoption = ''; if(is_moderator($fid, "canopenclosethreads"))
| $closeoption = ''; if(is_moderator($fid, "canopenclosethreads"))
|
Zeile 913 | Zeile 923 |
---|
$stickoption = ''; if(is_moderator($fid, "canstickunstickthreads"))
|
$stickoption = ''; if(is_moderator($fid, "canstickunstickthreads"))
|
{
| {
|
eval("\$stickoption = \"".$templates->get("newreply_modoptions_stick")."\";"); }
if(!empty($closeoption) || !empty($stickoption))
|
eval("\$stickoption = \"".$templates->get("newreply_modoptions_stick")."\";"); }
if(!empty($closeoption) || !empty($stickoption))
|
{
| {
|
eval("\$modoptions = \"".$templates->get("newreply_modoptions")."\";"); $bgcolor = "trow1"; $bgcolor2 = "trow2";
| eval("\$modoptions = \"".$templates->get("newreply_modoptions")."\";"); $bgcolor = "trow1"; $bgcolor2 = "trow2";
|
Zeile 927 | Zeile 937 |
---|
{ $bgcolor = "trow2"; $bgcolor2 = "trow1";
|
{ $bgcolor = "trow2"; $bgcolor2 = "trow1";
|
} }
| } }
|
else { $bgcolor = "trow2";
| else { $bgcolor = "trow2";
|
Zeile 958 | Zeile 968 |
---|
$attachment['filename'] = htmlspecialchars_uni($attachment['filename']);
if($mybb->settings['bbcodeinserter'] != 0 && $forum['allowmycode'] != 0 && (!$mybb->user['uid'] || $mybb->user['showcodebuttons'] != 0))
|
$attachment['filename'] = htmlspecialchars_uni($attachment['filename']);
if($mybb->settings['bbcodeinserter'] != 0 && $forum['allowmycode'] != 0 && (!$mybb->user['uid'] || $mybb->user['showcodebuttons'] != 0))
|
{
| {
|
eval("\$postinsert = \"".$templates->get("post_attachments_attachment_postinsert")."\";");
|
eval("\$postinsert = \"".$templates->get("post_attachments_attachment_postinsert")."\";");
|
}
| }
|
eval("\$attach_rem_options = \"".$templates->get("post_attachments_attachment_remove")."\";");
$attach_mod_options = ''; if($attachment['visible'] != 1)
|
eval("\$attach_rem_options = \"".$templates->get("post_attachments_attachment_remove")."\";");
$attach_mod_options = ''; if($attachment['visible'] != 1)
|
{
| {
|
eval("\$attachments .= \"".$templates->get("post_attachments_attachment_unapproved")."\";");
|
eval("\$attachments .= \"".$templates->get("post_attachments_attachment_unapproved")."\";");
|
}
| }
|
else { eval("\$attachments .= \"".$templates->get("post_attachments_attachment")."\";"); } $attachcount++;
|
else { eval("\$attachments .= \"".$templates->get("post_attachments_attachment")."\";"); } $attachcount++;
|
}
| }
|
$query = $db->simple_select("attachments", "SUM(filesize) AS ausage", "uid='".$mybb->user['uid']."'"); $usage = $db->fetch_array($query); if($usage['ausage'] > ($mybb->usergroup['attachquota']*1024) && $mybb->usergroup['attachquota'] != 0)
| $query = $db->simple_select("attachments", "SUM(filesize) AS ausage", "uid='".$mybb->user['uid']."'"); $usage = $db->fetch_array($query); if($usage['ausage'] > ($mybb->usergroup['attachquota']*1024) && $mybb->usergroup['attachquota'] != 0)
|
Zeile 1022 | Zeile 1032 |
---|
eval("\$attachbox = \"".$templates->get("post_attachments")."\";");
$bgcolor = alt_trow();
|
eval("\$attachbox = \"".$templates->get("post_attachments")."\";");
$bgcolor = alt_trow();
|
| } else { $attachbox = '';
|
}
|
}
|
| $savedraftbutton = '';
|
if($mybb->user['uid']) { eval("\$savedraftbutton = \"".$templates->get("post_savedraftbutton", 1, 0)."\";");
| if($mybb->user['uid']) { eval("\$savedraftbutton = \"".$templates->get("post_savedraftbutton", 1, 0)."\";");
|
Zeile 1048 | Zeile 1063 |
---|
// Generate a hidden list of items for our captcha $captcha = $post_captcha->build_hidden_captcha();
|
// Generate a hidden list of items for our captcha $captcha = $post_captcha->build_hidden_captcha();
|
} }
| } }
|
if(!$correct) {
| if(!$correct) {
|
Zeile 1080 | Zeile 1095 |
---|
$captcha = $post_captcha->html; } }
|
$captcha = $post_captcha->html; } }
|
| $pollbox = '';
|
if($forumpermissions['canpostpolls'] != 0) {
| if($forumpermissions['canpostpolls'] != 0) {
|
Zeile 1096 | Zeile 1113 |
---|
$forum['rulestitle'] = $lang->sprintf($lang->forum_rules, $forum['name']); }
|
$forum['rulestitle'] = $lang->sprintf($lang->forum_rules, $forum['name']); }
|
if(!$parser)
| if(empty($parser))
|
{ require_once MYBB_ROOT.'inc/class_parser.php'; $parser = new postParser;
| { require_once MYBB_ROOT.'inc/class_parser.php'; $parser = new postParser;
|