Vergleich newthread.php - 1.2.0 - 1.2.9

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 3Zeile 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: newthread.php 2192 2006-09-03 12:27:37Z chris $

 * $Id: newthread.php 3055 2007-05-13 15:01:15Z Tikitiki $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 154Zeile 154

$thread_errors = "";
$hide_captcha = false;


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


// Performing the posting of a new thread.
if($mybb->input['action'] == "do_newthread" && $mybb->request_method == "post")
{

// Performing the posting of a new thread.
if($mybb->input['action'] == "do_newthread" && $mybb->request_method == "post")
{

Zeile 192Zeile 206
			// 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 236Zeile 250
	}
else
{

	}
else
{

		$user_check = "p.ipaddress='{$session->ipaddress}'";

		$user_check = "p.ipaddress='".$db->escape_string($session->ipaddress)."'";

	}
if(!$mybb->input['savedraft'] && !$pid)
{

	}
if(!$mybb->input['savedraft'] && !$pid)
{

Zeile 401Zeile 415
			$postoptionschecked['signature'] = "checked=\"checked\"";
}
if($postoptions['emailnotify'] == "yes")

			$postoptionschecked['signature'] = "checked=\"checked\"";
}
if($postoptions['emailnotify'] == "yes")

		{

		{

			$postoptionschecked['emailnotify'] = "checked=\"checked\"";
}
if($postoptions['disablesmilies'] == "yes")

			$postoptionschecked['emailnotify'] = "checked=\"checked\"";
}
if($postoptions['disablesmilies'] == "yes")

Zeile 525Zeile 539
			{
$post['includesig'] = "no";
}

			{
$post['includesig'] = "no";
}

	





			// Fetch attachments assigned to this post
if($mybb->input['pid'])
{

			// Fetch attachments assigned to this post
if($mybb->input['pid'])
{

				$attachwhere = "pid='".intval($mybb->input['pid'])."'";

				$attachwhere = "pid='".intval($mybb->input['pid'])."'";				

			}
else
{
$attachwhere = "posthash='".$db->escape_string($mybb->input['posthash'])."'";

			}
else
{
$attachwhere = "posthash='".$db->escape_string($mybb->input['posthash'])."'";

			}

			}

	
$query = $db->simple_select(TABLE_PREFIX."attachments", "*", $attachwhere);
while($attachment = $db->fetch_array($query))

	
$query = $db->simple_select(TABLE_PREFIX."attachments", "*", $attachwhere);
while($attachment = $db->fetch_array($query))

Zeile 549Zeile 562
		$message = htmlspecialchars_uni($mybb->input['message']);
$subject = htmlspecialchars_uni($mybb->input['subject']);
}

		$message = htmlspecialchars_uni($mybb->input['message']);
$subject = htmlspecialchars_uni($mybb->input['subject']);
}

	



	// Removing an attachment or adding a new one, or showting thread errors.
else if($mybb->input['attachmentaid'] || $mybb->input['newattachment'] || $thread_errors)
{

	// Removing an attachment or adding a new one, or showting thread errors.
else if($mybb->input['attachmentaid'] || $mybb->input['newattachment'] || $thread_errors)
{

Zeile 611Zeile 624
	if($forumpermissions['canpostattachments'] != "no")
{ // Get a listing of the current attachments, if there are any
$attachcount = 0;

	if($forumpermissions['canpostattachments'] != "no")
{ // Get a listing of the current attachments, if there are any
$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 642Zeile 655
		}
$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 652Zeile 665
		}
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);