From ba9d851c42ceee0aabc192b5241f0e1d82e83bc8 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Thu, 17 Feb 2005 11:58:29 +0000 Subject: [PATCH] Define template.hfields for e-mail messages (or all messages, if sysop) to be optionally displayed later by double-clicking on "Subject". --- web/root/msgs/msg.ssjs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/web/root/msgs/msg.ssjs b/web/root/msgs/msg.ssjs index 5ec7a1b601..527e97d8fc 100644 --- a/web/root/msgs/msg.ssjs +++ b/web/root/msgs/msg.ssjs @@ -62,6 +62,25 @@ if(msg.attachments!=undefined) { if(template.hdr != null) { template.title="Message: "+template.hdr.subject; + + if(sub=='mail' || user.security.level>=90) { /* Sysops can dump all message headers */ + template.hfields="<html><head><title>Message Header Fields</title></head>"; + template.hfields+="<body>"; + template.hfields+="<h2>Message Header Fields</h2>"; + template.hfields+="<table>"; + var f; + for(f in template.hdr) + if(typeof(template.hdr[f])!="object") + template.hfields+=('<tr valign=top><td>'+ f + ':<td>' + template.hdr[f]); + for(f in template.hdr.field_list) + template.hfields+=('<tr valign=top><td>type-0x' + + format("%02X",template.hdr.field_list[f].type) + ':<td>' + + strip_ctrl(template.hdr.field_list[f].data)); + + template.hfields+="</table>"; + template.hfields+="</body>"; + template.hfields+="</html>"; + } } var tmp=find_np_message(template.idx.offset,true); -- GitLab