addHidden('passed_id', $passed_id).
addHidden('ent_id', '0').
addHidden('absolute_dl', 'true').
+ ($javascript_on ?
'<input type="button" value="' . _("Print") . '" onclick="printPopup()" /> '.
- '<input type="button" value="' . _("Close Window") . '" onclick="window.parent.close()" /> '.
+ '<input type="button" value="' . _("Close Window") . '" onclick="window.parent.close()" /> ' :'').
addSubmit(_("Save Message")).
'</form></div>'.
'</body>'.
"</html>\n";
-?>
\ No newline at end of file
+?>
* Add message details link in message view
* @access private
*/
-function show_message_details() {
+function show_message_details($links) {
global $passed_id, $mailbox, $ent_num,
$javascript_on;
-
+
if (strlen(trim($mailbox)) < 1) {
$mailbox = 'INBOX';
}
'&mailbox=' . urlencode($mailbox) .
'&passed_id=' . $passed_id;
- $print_text = _("View Message details");
+ $url = $javascript_on ? 'javascript:MessageSource();' :
+ '../plugins/message_details/message_details_main.php' .
+ $params;
- $result = '';
/* Output the link. */
+ $links[] = array('URL' => $url,
+ 'Text' => _("View Message details") );
+
if ($javascript_on) {
- $result = '<script type="text/javascript">' . "\n" .
+ echo '<script type="text/javascript">' . "\n" .
'<!--' . "\n" .
" function MessageSource() {\n" .
' window.open("../plugins/message_details/message_details_main.php' .
$params . '","MessageDetails","width=800,height=600");' . "\n".
" }\n" .
"// -->\n" .
- "</script>\n" .
- " | <a href=\"javascript:MessageSource();\">$print_text</a>\n";
+ "</script>\n\n";
}
- echo $result;
}
+