function plugin_listcommands_menu() {
global $imapConnection, $passed_id, $color, $mailbox,
- $subject, $ent_num, $priority_level, $compose_new_win;
+ $message, $ent_num, $priority_level, $compose_new_win, $uid_support;
+
+ $subject = trim($message->header->subject);
/**
* Array of commands we can deal with from the header. The Reply option
$lfields = 'List-' . implode (' List-', $fields);
- $sid = sqimap_session_id();
+ $sid = sqimap_session_id($uid_support);
fputs ($imapConnection, "$sid FETCH $passed_id BODY.PEEK[HEADER.FIELDS ($lfields)]\r\n");
$read = sqimap_read_data($imapConnection, $sid, true, $response, $emessage);
$url = 'compose.php?';
} else {
$url = "../plugins/listcommands/mailout.php?action=$cmd&";
+
}
-
- $url .= 'mailbox=' . urlencode($mailbox)
- . '&send_to=' . $purl['path'];
+ $url .= '&send_to=' . $purl['path'];
if (isset($purl['query'])) {
$url .= '&' . $purl['query'];
}
if ($compose_new_win == '1') {
- $output[] = '<A HREF="' . $url . '" target="compose_window" onClick="comp_in_new()">' . $fieldsdescr[$cmd] . '</A>';
+ $output[] = "<a href=\"javascript:void(0)\" onclick=\"comp_in_new('$url')\">" . $fieldsdescr[$cmd] . '</A>';
}
else {
$output[] = '<A HREF="' . $url . '">' . $fieldsdescr[$cmd] . '</A>';
}
if ($cmd == 'Post') {
- $url .= '&reply_subj=' . urlencode($subject)
- . '&reply_id=' . $passed_id
- . '&ent_num=' . $ent_num
- . '&mailprio=' . $priority_level;
- if ($compose_new_win == '1') {
- $output[] = '<A HREF="' . $url . '" target="compose_window" onClick="comp_in_new()">' . $fieldsdescr['Reply'] . '</A>';
- }
- else {
- $output[] = '<A HREF="' . $url . '">' . $fieldsdescr['Reply'] . '</A>';
- }
+ $url .= '&passed_id='.$passed_id.
+ '&mailbox='.urlencode($mailbox).
+ (isset($passed_ent_id)?'&passed_ent_id='.$passed_ent_id:'');
+ $url .= '&action=reply';
+ if ($compose_new_win == '1') {
+ $output[] = "<A HREF=\"javascript:void(0)\" onClick=\"comp_in_new('$url')\">" . $fieldsdescr['Reply'] . '</A>';
+ }
+ else {
+ $output[] = '<A HREF="' . $url . '">' . $fieldsdescr['Reply'] . '</A>';
+ }
}
} else if (eregi('^(http|ftp)', $url)) {
$output[] = '<A HREF="' . $url . '" TARGET="_blank">'
}
if (count($output) > 0) {
- echo "<tr>";
- echo "<td ALIGN=RIGHT BGCOLOR=\"$color[0]\">"
- . str_replace(' ', ' ', _("Mailing List:"))
- . '</td>';
- echo "<td BGCOLOR=\"$color[0]\" WIDTH=\"100%\" colspan=\"2\">"
- . '<SMALL>' . implode(' | ', $output) . '</SMALL>'
- . '</td>';
- echo '</tr>';
+ echo '<table width="100%" cellpadding="3" cellspacing="0" align="center"'.
+ ' border="0" bgcolor="'.$color[0].'">'. "\n";
+ echo '<tr>';
+ echo html_tag( 'td', '<b>'._("Mailing List").': </b>', 'right', $color[0], 'valign="top" width="20%"') . "\n";
+ echo html_tag( 'td',
+ '<small>' . implode(' | ', $output) . '</small>', 'left', $color[0], 'valign="top" width="80%"');
+ echo "\n</tr>";
+ echo '</table>'."\n";
}
}