Vergleich contact.php - 1.8.5 - 1.8.36

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 11Zeile 11
define("IN_MYBB", 1);
define('THIS_SCRIPT', 'contact.php');


define("IN_MYBB", 1);
define('THIS_SCRIPT', 'contact.php');


$templatelist = "contact,post_captcha,post_captcha_recaptcha,post_captcha_nocaptcha,post_captcha_ayah";

$templatelist = "contact,post_captcha,post_captcha_recaptcha_invisible,post_captcha_nocaptcha,post_captcha_hcaptcha_invisible,post_captcha_hcaptcha";


require_once "./global.php";
require_once MYBB_ROOT.'inc/class_captcha.php';


require_once "./global.php";
require_once MYBB_ROOT.'inc/class_captcha.php';

Zeile 77Zeile 77
	$last_email = $db->fetch_array($query);

// Users last email was within the flood time, show the error

	$last_email = $db->fetch_array($query);

// Users last email was within the flood time, show the error

	if($last_email['mid'])

	if(!empty($last_email['mid']))

	{
$remaining_time = ($mybb->usergroup['emailfloodtime']*60)-(TIME_NOW-$last_email['dateline']);


	{
$remaining_time = ($mybb->usergroup['emailfloodtime']*60)-(TIME_NOW-$last_email['dateline']);


Zeile 209Zeile 209
			require_once MYBB_ROOT."inc/class_parser.php";
$parser = new postParser;


			require_once MYBB_ROOT."inc/class_parser.php";
$parser = new postParser;


			$parser_options = array(
'filter_badwords' => 1
);

$mybb->input['subject'] = $parser->parse_message($mybb->input['subject'], $parser_options);
$mybb->input['message'] = $parser->parse_message($mybb->input['message'], $parser_options);

			$mybb->input['subject'] = $parser->parse_badwords($mybb->input['subject']);
$mybb->input['message'] = $parser->parse_badwords($mybb->input['message']);





		}


		}


		$user = $lang->na;

		$user = $lang->guest;

		if($mybb->user['uid'])
{

		if($mybb->user['uid'])
{

			$user = $mybb->user['username'].' - '.$mybb->settings['bburl'].'/'.get_profile_link($mybb->user['uid']);

			$user = htmlspecialchars_uni($mybb->user['username']).' - '.$mybb->settings['bburl'].'/'.get_profile_link($mybb->user['uid']);

		}

$subject = $lang->sprintf($lang->email_contact_subject, $mybb->input['subject']);
$message = $lang->sprintf($lang->email_contact, $mybb->input['email'], $user, $session->ipaddress, $mybb->input['message']);

// Email the administrator

		}

$subject = $lang->sprintf($lang->email_contact_subject, $mybb->input['subject']);
$message = $lang->sprintf($lang->email_contact, $mybb->input['email'], $user, $session->ipaddress, $mybb->input['message']);

// Email the administrator

		my_mail($contactemail, $subject, $message, $mybb->input['email']);

		my_mail($contactemail, $subject, $message, '', '', '', false, 'text', '', $mybb->get_input('email', MyBB::INPUT_STRING));


$plugins->run_hooks('contact_do_end');

if($mybb->settings['mail_logging'] > 0)


$plugins->run_hooks('contact_do_end');

if($mybb->settings['mail_logging'] > 0)

		{

		{

			// Log the message
$log_entry = array(
"subject" => $db->escape_string($subject),

			// Log the message
$log_entry = array(
"subject" => $db->escape_string($subject),

Zeile 247Zeile 243
				"type" => 3
);
$db->insert_query("maillogs", $log_entry);

				"type" => 3
);
$db->insert_query("maillogs", $log_entry);

		}

if($mybb->usergroup['emailfloodtime'] > 0 || (isset($sent_count) && $sent_count + 1 >= $mybb->usergroup['maxemails']))






		}

$mybb->input['from'] = $mybb->get_input('from');
if(!empty($mybb->input['from']))
{
redirect($mybb->input['from'], $lang->contact_success_message, '', true);
}
else

		{
redirect('index.php', $lang->contact_success_message, '', true);

		{
redirect('index.php', $lang->contact_success_message, '', true);

		}
else
{
redirect('contact.php', $lang->contact_success_message, '', true);

 
		}
}
else

		}
}
else

	{

	{

		$errors = inline_error($errors);
}
}

		$errors = inline_error($errors);
}
}

Zeile 267Zeile 264
if(empty($errors))
{
$errors = '';

if(empty($errors))
{
$errors = '';

}


}


// Generate CAPTCHA?
$captcha = '';

if($mybb->settings['captchaimage'] && !$mybb->user['uid'])
{
$post_captcha = new captcha(true, "post_captcha");

// Generate CAPTCHA?
$captcha = '';

if($mybb->settings['captchaimage'] && !$mybb->user['uid'])
{
$post_captcha = new captcha(true, "post_captcha");





	if($post_captcha->html)
{
$captcha = $post_captcha->html;
}

	if($post_captcha->html)
{
$captcha = $post_captcha->html;
}

}

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

}

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


if($mybb->user['uid'] && !$mybb->get_input('email'))
{


if($mybb->user['uid'] && !$mybb->get_input('email'))
{

	$mybb->input['email'] = htmlspecialchars_uni($mybb->user['email']);














	$user_email = htmlspecialchars_uni($mybb->user['email']);
}
else
{
$user_email = htmlspecialchars_uni($mybb->get_input('email'));
}

if(isset($mybb->input['from']))
{
$redirect_url = htmlspecialchars_uni($mybb->get_input('from'));
}
else if(isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], $mybb->settings['bburl']) !== false && strpos($_SERVER['HTTP_REFERER'], "contact.php") === false)
{
$redirect_url = htmlentities($_SERVER['HTTP_REFERER']);

}
else
{

}
else
{

	$mybb->input['email'] = htmlspecialchars_uni($mybb->get_input('email'));

	$redirect_url = '';

}

$plugins->run_hooks('contact_end');

}

$plugins->run_hooks('contact_end');