[Vtigercrm-commits] [vtiger-commits] r6519 - /vtigercrm/trunk/modules/Webmails/body.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Sat May 27 02:39:47 EDT 2006
Author: mmbrich
Date: Sat May 27 00:39:46 2006
New Revision: 6519
Log:
display inline PLAIN attachments
Modified:
vtigercrm/trunk/modules/Webmails/body.php
Modified: vtigercrm/trunk/modules/Webmails/body.php
==============================================================================
--- vtigercrm/trunk/modules/Webmails/body.php (original)
+++ vtigercrm/trunk/modules/Webmails/body.php Sat May 27 00:39:46 2006
@@ -45,7 +45,30 @@
if($command == "clear_flag")
$email->delFlag();
} else {
+?>
+<script type="text/javascript">
+function show_inline(num) {
+ var el = document.getElementById("block_"+num);
+ if(el.style.visibility == 'visible')
+ el.style.visibility='hidden';
+ else
+ el.style.visibility='visible';
+}
+</script>
+<?
echo $email->body;
+ echo "<br><br>";
+ if(getInlineAttachments($mailid,$mbox)) {
+ $inline = getInlineAttachments($mailid,$mbox);
+ $num=sizeof($inline);
+ echo "<b>Inline Attachments</b>:<br>";
+ for($i=0;$i<$num;$i++) {
+ if($inline[$i]["ID"]->subtype == "PLAIN") {
+ echo "<a href='javascript:show_inline(".$i.");'>".$inline[$i]["filename"]."</a><blockquote id='block_".$i."' style='border:1px solid gray;padding:6px;background-color:#FFFFCC;visibility:hidden'>".nl2br($inline[$i]["filedata"])."</blockquote>";
+ } else
+ echo "<br>".($i+1).") <a href='index.php?module=Webmails&action=dlAttachments&inline=true&num=".$i."&mailid=".$mailid."'>".$inline[$i]["filename"];
+ }
+ }
}
imap_close($mbox);
More information about the vtigercrm-commits
mailing list