[Vtigercrm-commits] [vtiger-commits] r10824 - in /vtigercrm/branches/5.0.3: index.php modules/Emails/Save.php modules/Webmails/dlAttachments.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Fri May 4 08:14:42 EDT 2007
Author: richie
Date: Fri May 4 06:14:27 2007
New Revision: 10824
Log:
* Changes made for handle the attachments
Modified:
vtigercrm/branches/5.0.3/index.php
vtigercrm/branches/5.0.3/modules/Emails/Save.php
vtigercrm/branches/5.0.3/modules/Webmails/dlAttachments.php
Modified: vtigercrm/branches/5.0.3/index.php
==============================================================================
--- vtigercrm/branches/5.0.3/index.php (original)
+++ vtigercrm/branches/5.0.3/index.php Fri May 4 06:14:27 2007
@@ -75,7 +75,8 @@
{
$charset = $app_strings['LBL_CHARSET'];
}
- header('Content-Type: text/html; charset='. $charset);
+ if($_REQUEST['module'] != "Webmails")
+ header('Content-Type: text/html; charset='. $charset);
}
insert_charset_header();
Modified: vtigercrm/branches/5.0.3/modules/Emails/Save.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Emails/Save.php (original)
+++ vtigercrm/branches/5.0.3/modules/Emails/Save.php Fri May 4 06:14:27 2007
@@ -88,7 +88,7 @@
else{}
if($errormessage != ""){
$ret_error = 1;
- $ret_toadd = $_REQUEST['to_add'];
+ $ret_toadd = $_REQUEST['parent_name'];
$ret_subject = $_REQUEST['subject'];
$ret_ccaddress = $_REQUEST['ccmail'];
$ret_bccaddress = $_REQUEST['bccmail'];
@@ -248,9 +248,11 @@
if(isset($_REQUEST['filename']) && $_REQUEST['filename'] != "") $filename = $_REQUEST['filename'];
$local_log->debug("Saved record with id of ".$return_id);
-
-if($_REQUEST["parent_name"] != '' && isset($_REQUEST["parent_name"])) {
- include("modules/Emails/webmailsend.php");
+$str = $_REQUEST['parent_id'];
+if($_REQUEST['parent_id'] == '' || substr($str,strlen($str)-4) == '@-1|'){
+ if($_REQUEST["parent_name"] != '' && isset($_REQUEST["parent_name"])) {
+ include("modules/Emails/webmailsend.php");
+ }
} elseif( isset($_REQUEST['send_mail']) && $_REQUEST['send_mail'])
include("modules/Emails/mailsend.php");
Modified: vtigercrm/branches/5.0.3/modules/Webmails/dlAttachments.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Webmails/dlAttachments.php (original)
+++ vtigercrm/branches/5.0.3/modules/Webmails/dlAttachments.php Fri May 4 06:14:27 2007
@@ -23,9 +23,26 @@
$num=$_REQUEST["num"];
$email = new Webmails($MailBox->mbox,$mailid);
-$attachments=$email->downloadAttachments();
-$inline=$email->downloadInlineAttachments();
+$attach_tab = Array();
+$email->loadMail($attach_tab);
+echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=".$email->charsets."\">\n";
+echo '<script src="modules/Webmails/Webmails.js" type="text/javascript"></script>';
+echo "<table class='small' width='100%' cellspacing='1' cellpadding='0' border='0' style='font-size:18px'>";
+if(count($email->attname) <= 0)
+ echo "<tr align='center'><td nowrap>No files to download</td></tr>";
+else{
+ for($i=0;$i<count($email->attname);$i++){
+ $attachment_links .= " ".$email->anchor_arr[$i].$email->attname[$i]."</a></br>";
+ }
+ echo "<tr><td><table class='small' width='100%' cellspacing='1' cellpadding='0' border='0' style='font-size:13px'><tr><td width='90%'>There are ".count($email->attname)." attachment(s) to choose from:</td></tr>";
+ echo "<tr><td width='100%'>".$attachment_links."</div></td></tr>";
+ echo "</td></tr></table>";
+}
+echo "</table>";
+//$attachments=$email->downloadAttachments();
+//$inline=$email->downloadInlineAttachments();
+/*
if($num == "" || !isset($num) && count($attachments) >0 )
{
echo "<table class='small' width='100%' cellspacing='1' cellpadding='0' border='0'><tr><td width='10%'> </td><td width='90%'>There are ".count($attachments)." attachment(s) to choose from:</td></tr>";
@@ -82,8 +99,8 @@
<META HTTP-EQUIV="Refresh"
CONTENT="0; URL=<?php echo $filename;?>"
]"
- <?php
-}
+ /*<?php
+}*/
?>
More information about the vtigercrm-commits
mailing list