function simplenews_scheduler_node_page in Simplenews Scheduler 5
Same name and namespace in other branches
- 6.2 simplenews_scheduler.module \simplenews_scheduler_node_page()
- 6 simplenews_scheduler.module \simplenews_scheduler_node_page()
- 7 simplenews_scheduler.module \simplenews_scheduler_node_page()
1 string reference to 'simplenews_scheduler_node_page'
File
- ./
simplenews_scheduler.module, line 219
Code
function simplenews_scheduler_node_page($nid) {
drupal_set_title('Scheduled Newsletter Editions');
$output .= '<p>' . t('This is part of a scheduled newsletter configuration') . "<BR>";
$output .= l(t('View the original newsletter here'), 'node/' . $nid) . '</p>';
$output .= "<div>";
$result = pager_query("SELECT * FROM {simplenews_scheduler_editions} s LEFT JOIN {node} n ON n.nid = s.snid where s.snid=%d", 20, 0, NULL, $nid);
$rows = array();
while ($history = db_fetch_object($result)) {
$newsletter_node = node_load(array(
'nid' => $history->edition_snid,
));
$rows[] = array(
format_date($history->date_issued),
l(check_plain($newsletter_node->title), 'node/' . $history->edition_snid),
);
}
$output .= '<p>';
$output .= theme('table', array(
t('Date sent'),
t('Node'),
), $rows, array(
'class' => 'scheduled_history',
), '<strong>' . t('Scheduled Newsletter History') . '</strong>');
$output .= theme('pager', 20) . "<p>";
$output .= '</p>';
$output .= "</div>";
return $output;
}