Daryl: Not sure what is actually happening. This is the code I am using:
At the top of the file:
<?php include 'common/includes/php_header.inc'; ?>
<?php
// error checking
if (!@$GLOBALS['NEWSLETTER_BUILDER_PLUGIN']) { die("You must activate the newsletter plugin to see this page."); }
// load newsletters settings and archives
global $newsletterSettings;
$newsletterSettings = mysql_get('_nlb_settings', 1);
$archivedNewsletters = mysql_select('_nlb_messages', "send IN ('all','archive') ORDER BY sent_date DESC");
// load newsletter
$whereMessageNumIs = 'TRUE';
if (@$_REQUEST['message_num']){
$whereMessageNumIs = " num = '".mysql_escape($_REQUEST['message_num'])."'";
}
list($_nlb_messages, $_nlb_messagesMetaData) = getRecords(array(
'tableName' => '_nlb_messages',
'loadUploads' => true,
'allowSearch' => false,
'where' => "to_list = '" . coalesce(mysql_escape(@$_REQUEST['to_list'], '2')) . "' AND " . $whereMessageNumIs,
));
// replace placeholders
$archivedNewsletters = nlb_viewers_replacePlaceholders($archivedNewsletters);
?>
The dropdown & newsletter display:
<table cellspacing="2" cellpadding="4">
<tr>
<td valign="top">
<b><?php echo htmlencode($message['subject']) ?></b><br/>
<?php echo $message['html']; ?><br/>
</td>
<td valign="top">
<h2>Weekly Message</h2>
<?php if ($_nlb_messages): ?>
<select name="message_num">
<option value="">--</option>
<?php foreach($_nlb_messages as $message): ?>
<option value="<?php echo htmlencode($message['num']); ?>" <?php selectedIf($message['num'], @$_REQUEST['message_num']); ?>
<?php echo htmlencode($message['subject']); ?>
</option>
<?php endforeach; ?>
</select>
<?php endif; ?>
</td>
</tr>
</table>
results: a blank webpage (see attached).
I am trying o debug, but no clue so far.
--
northernpenguin
Northern Penguin Technologies
"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke