Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[F] Mass mail preview [C-Michael83]
#1
The HTML code of the mass mail preview is incomplete:
	<html xmlns="http://www.w3.org/1999/xhtml">
	<head profile="http://gmpg.org/xfn/1">
		<title>Mass Email Preview</title>
		<link rel="stylesheet" href="styles/default/main.css" type="text/css" />
		<link rel="stylesheet" href="styles/default/popup.css" type="text/css" />
	</head>
	<body id="popup">
		<div id="popup_container">
		<div class="popup_title"><a href="#" onClick="window.close();" class="close_link"></a> Mass Email Preview</div>

		<div id="content">	
	rdhrtjrjzrjsdgv kzufgku6fzk
Greets,
Michael
-------------
[Image: donation_drive_sig.png]
#2
admin/modules/user/mass_mail.php

if($mybb->input['action'] == "preview")
{
	$query = $db->simple_select("massemails", "*", "mid='".intval($mybb->input['mid'])."'");
	$mass_email = $db->fetch_array($query);
	
	if(!$mass_email['mid'])
	{
		flash_message($lang->error_invalid_mid, 'error');
		admin_redirect("index.php?module=user/mass_mail");
	}
	
	?>
	<html xmlns="http://www.w3.org/1999/xhtml">
	<head profile="http://gmpg.org/xfn/1">
		<title>Mass Email Preview</title>
		<link rel="stylesheet" href="styles/<?php echo $page->style; ?>/main.css" type="text/css" />
		<link rel="stylesheet" href="styles/<?php echo $page->style; ?>/popup.css" type="text/css" />
	</head>
	<body id="popup">
		<div id="popup_container">
		<div class="popup_title"><a href="#" onClick="window.close();" class="close_link"><?php echo $lang->close_window; ?></a> Mass Email Preview</div>

		<div id="content">	
	<?php
	
	if($mybb->input['format'] == 'text' || !$mass_email['message'])
	{
		// Show preview of the text version
		echo nl2br($mass_email['message']);
		exit;
	}
	else
	{
		// Preview the HTML version
		echo $mass_email['htmlmessage'];
		exit;
	}
	
		?>
		</div>
	</div>
	</body>
	</html>
	<?php
}

The exit; needs to be placed right before the end bracket for the action
#3
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.

With regards,
MyBB Group


Forum Jump:


Users browsing this thread: 1 Guest(s)