更新到 5.2 正式版后第一次 SVN 提交。
[email protected] git-svn-id: https://svn.code.sf.net/p/hawebs/svn@599 a2543c7e-f6e9-4f8a-8bff-1ffc34733512
This commit is contained in:
@@ -1,66 +0,0 @@
|
||||
<?php
|
||||
/*+********************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
require_once('Smarty_setup.php');
|
||||
require_once('include/utils/utils.php');
|
||||
|
||||
$currentmodule = vtlib_purify($_REQUEST['module']);
|
||||
$focus = CRMEntity::getInstance($currentmodule);
|
||||
$RECORD = vtlib_purify($_REQUEST['record']);
|
||||
if(isset($_REQUEST['record']) && isset($_REQUEST['record'])) {
|
||||
$focus->retrieve_entity_info($RECORD,$currentmodule);
|
||||
$focus->id = $RECORD;
|
||||
$focus->name=$focus->column_fields['subject'];
|
||||
$log->debug("id is ".$focus->id);
|
||||
$log->debug("name is ".$focus->name);
|
||||
}
|
||||
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $currentModule;
|
||||
global $theme;
|
||||
$theme_path="themes/".$theme."/";
|
||||
$image_path=$theme_path."images/";
|
||||
|
||||
$smarty = new vtigerCRM_Smarty;
|
||||
|
||||
if (isset($focus->name)) $smarty->assign("NAME", $focus->name);
|
||||
$related_array=getRelatedLists($currentModule,$focus);
|
||||
$category = getParentTab();
|
||||
$smarty->assign("CATEGORY",$category);
|
||||
if(isset($_REQUEST['mode']) && $_REQUEST['mode'] != ' ') {
|
||||
$smarty->assign("OP_MODE",vtlib_purify($_REQUEST['mode']));
|
||||
}
|
||||
$smarty->assign("id",$focus->id);
|
||||
$smarty->assign("RELATEDLISTS", $related_array);
|
||||
|
||||
require_once('include/ListView/RelatedListViewSession.php');
|
||||
if(!empty($_REQUEST['selected_header']) && !empty($_REQUEST['relation_id'])) {
|
||||
$relationId = vtlib_purify($_REQUEST['relation_id']);
|
||||
RelatedListViewSession::addRelatedModuleToSession($relationId,
|
||||
vtlib_purify($_REQUEST['selected_header']));
|
||||
}
|
||||
$open_related_modules = RelatedListViewSession::getRelatedModulesFromSession();
|
||||
$smarty->assign("SELECTEDHEADERS", $open_related_modules);
|
||||
|
||||
$smarty->assign("ID",$RECORD );
|
||||
$smarty->assign("MODULE",$currentmodule);
|
||||
$smarty->assign("SINGLE_MOD",$app_strings['Email']);
|
||||
$smarty->assign("UPDATEINFO",updateInfo($focus->id));
|
||||
$smarty->assign("MOD",$mod_strings);
|
||||
$smarty->assign("APP",$app_strings);
|
||||
$smarty->assign("THEME", $theme);
|
||||
$smarty->assign("IMAGE_PATH", $image_path);
|
||||
|
||||
$check_button = Button_Check($module);
|
||||
$smarty->assign("CHECK", $check_button);
|
||||
|
||||
$smarty->display("RelatedLists.tpl");
|
||||
?>
|
||||
@@ -1,82 +0,0 @@
|
||||
<?php
|
||||
/*+********************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/database/PearDatabase.php');
|
||||
$idlist = vtlib_purify($_POST['idlist']);
|
||||
$pmodule=vtlib_purify($_REQUEST['return_module']);
|
||||
$ids=explode(';',$idlist);
|
||||
|
||||
if ($pmodule=='Accounts')
|
||||
{
|
||||
$querystr="select fieldid,fieldlabel,columnname,tablename from vtiger_field where tabid=6 and uitype='13' and vtiger_field.presence in (0,2)";
|
||||
}
|
||||
elseif ($pmodule=='Contacts')
|
||||
{
|
||||
$querystr="select fieldid,fieldlabel,columnname from vtiger_field where tabid=4 and uitype='13' and vtiger_field.presence in (0,2)";
|
||||
}
|
||||
elseif ($pmodule=='Leads')
|
||||
{
|
||||
$querystr="select fieldid,fieldlabel,columnname from vtiger_field where tabid=7 and uitype='13' and vtiger_field.presence in (0,2)";
|
||||
}
|
||||
|
||||
$result=$adb->pquery($querystr, array());
|
||||
$numrows = $adb->num_rows($result);
|
||||
|
||||
?>
|
||||
<form name="choosemails" action="post" onsubmit="VtigerJS_DialogBox.block();">
|
||||
<input type="hidden" name="emailids" value="">
|
||||
<h4>The following emails are available for the selected record. Please choose the ones you would like to use.</h4>
|
||||
<div align="center">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<?php
|
||||
for ($i=0;$i<$numrows;$i++)
|
||||
{
|
||||
$temp=$adb->query_result($result,$i,'columnname');
|
||||
$temp1=br2nl($myfocus->column_fields[$temp]);
|
||||
echo '<tr><td>'.$adb->query_result($result,$i,'fieldlabel').' </td><td> <input name="emails'.$i.'" type="checkbox" title="Raju"></td><td>'.$temp1.'</tr>';
|
||||
}
|
||||
?>
|
||||
|
||||
<script language="javascript">
|
||||
function passemail()
|
||||
{
|
||||
y=new Array();
|
||||
<?php
|
||||
foreach ($ids as $id_num => $id)
|
||||
{
|
||||
print "y.push(\"$id\" );";
|
||||
}
|
||||
$cnt=count($ids);
|
||||
print "idcount=$cnt;";
|
||||
?>
|
||||
<?php
|
||||
for ($x=0;$x<$numrows;$x++)
|
||||
{
|
||||
?>
|
||||
if (document.choosemails.emails<?php echo $x;?>.checked)
|
||||
{
|
||||
for (m=0;m<idcount;m++)
|
||||
{
|
||||
y[m]=y[m]+"@<?php echo $adb->query_result($result,$x,'fieldid');?>";
|
||||
}
|
||||
}
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
stry = y.join("");
|
||||
document.choosemails.emailids.value=stry;
|
||||
document.choosemails.submit();
|
||||
}
|
||||
</script>
|
||||
|
||||
</table>
|
||||
<input type="button" name="OK" onClick="passemail()" value="OK">
|
||||
</div>
|
||||
</form>
|
||||
@@ -1,106 +0,0 @@
|
||||
<?php
|
||||
/*+********************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
$pmodule=vtlib_purify($_REQUEST['pmodule']);
|
||||
$entityid=vtlib_purify($_REQUEST['entityid']);
|
||||
|
||||
if ($pmodule=='Accounts')
|
||||
{
|
||||
$querystr="select fieldid,fieldlabel,columnname,tablename from vtiger_field where tabid=6 and uitype='13' and vtiger_field.presence in (0,2)";
|
||||
}
|
||||
elseif ($pmodule=='Contacts')
|
||||
{
|
||||
$querystr="select fieldid,fieldlabel,columnname from vtiger_field where tabid=4 and uitype='13' and vtiger_field.presence in (0,2)";
|
||||
}
|
||||
elseif ($pmodule=='Leads')
|
||||
{
|
||||
$querystr="select fieldid,fieldlabel,columnname from vtiger_field where tabid=7 and uitype='13' and vtiger_field.presence in (0,2)";
|
||||
}
|
||||
$result=$adb->pquery($querystr, array());
|
||||
$numrows = $adb->num_rows($result);
|
||||
|
||||
if ($pmodule=='Accounts')
|
||||
{
|
||||
require_once('modules/Accounts/Accounts.php');
|
||||
$myfocus = new Accounts();
|
||||
$myfocus->retrieve_entity_info($entityid,"Accounts");
|
||||
}
|
||||
elseif ($pmodule=='Contacts')
|
||||
{
|
||||
require_once('modules/Contacts/Contacts.php');
|
||||
$myfocus = new Contacts();
|
||||
$myfocus->retrieve_entity_info($entityid,"Contacts");
|
||||
}
|
||||
elseif ($pmodule=='Leads')
|
||||
{
|
||||
require_once('modules/Leads/Leads.php');
|
||||
$myfocus = new Leads();
|
||||
$myfocus->retrieve_entity_info($entityid,"Leads");
|
||||
}
|
||||
?>
|
||||
<script language="javascript">
|
||||
function passemail()
|
||||
{
|
||||
y=window.opener.document.EditView.parent_id.value+"<?php echo $entityid;?>";
|
||||
z=window.opener.document.EditView.parent_name.value;
|
||||
<?php
|
||||
for ($x=0;$x<$numrows;$x++)
|
||||
{
|
||||
$temp=$adb->query_result($result,$x,'columnname');
|
||||
$temp1=br2nl($myfocus->column_fields[$temp]);
|
||||
if ($pmodule=='Accounts')
|
||||
{
|
||||
$fullname=br2nl($myfocus->column_fields['accountname']);
|
||||
}
|
||||
elseif ($pmodule=='Contacts')
|
||||
{
|
||||
$fname=br2nl($myfocus->column_fields['firstname']);
|
||||
$lname=br2nl($myfocus->column_fields['lastname']);
|
||||
$fullname=$lname.' '.$fname;
|
||||
}
|
||||
elseif ($pmodule=='Leads')
|
||||
{
|
||||
$fname=br2nl($myfocus->column_fields['firstname']);
|
||||
$lname=br2nl($myfocus->column_fields['lastname']);
|
||||
$fullname=$lname.' '.$fname;
|
||||
}
|
||||
?>
|
||||
if (document.choosemails.emails<?php echo $x;?>.checked)
|
||||
{
|
||||
y=y+"@<?php echo $adb->query_result($result,$x,'fieldid');?>";
|
||||
z=z+"<?php echo $fullname.'<'.$temp1.'> ;';?>";
|
||||
}
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
window.opener.document.EditView.parent_id.value=y+"|";
|
||||
window.opener.document.EditView.parent_name.value=z;
|
||||
window.close();
|
||||
}
|
||||
</script>
|
||||
|
||||
<form name="choosemails" method="post" onsubmit="VtigerJS_DialogBox.block();">
|
||||
<h4>The following emails are available for the selected record. Please choose the ones you would like to use.</h4>
|
||||
<div align="center">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<?php
|
||||
for ($i=0;$i<$numrows;$i++)
|
||||
{
|
||||
$temp=$adb->query_result($result,$i,'columnname');
|
||||
$temp1=br2nl($myfocus->column_fields[$temp]);
|
||||
echo '<tr><td>'.$adb->query_result($result,$i,'fieldlabel').' </td><td> <input name="emails'.$i.'" type="checkbox" title="Raju"></td><td>'.$temp1.'</tr>';
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
||||
<input type="button" name="OK" onClick="passemail()" value="OK">
|
||||
</div>
|
||||
</form>
|
||||
@@ -1,14 +0,0 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
********************************************************************************/
|
||||
|
||||
include('modules/CustomView/index.php');
|
||||
|
||||
?>
|
||||
@@ -1,36 +0,0 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Public License Version 1.1.2
|
||||
* ("License"); You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at http://www.mozilla.org/MPL
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
|
||||
* the specific language governing rights and limitations under the License.
|
||||
* The Original Code is: SugarCRM Open Source
|
||||
* The Initial Developer of the Original Code is SugarCRM, Inc.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
* $Header: /advent/projects/wesat/vtiger_crm/sugarcrm/modules/Emails/Delete.php,v 1.6 2005/03/10 09:29:42 shaw Exp $
|
||||
* Description: TODO: To be written.
|
||||
********************************************************************************/
|
||||
|
||||
global $currentModule;
|
||||
$focus = CRMEntity::getInstance($currentModule);
|
||||
|
||||
require_once('include/logging.php');
|
||||
$log = LoggerManager::getLogger('email_delete');
|
||||
|
||||
if(!isset($_REQUEST['record']))
|
||||
die("A record number must be specified to delete the email.");
|
||||
|
||||
DeleteEntity($_REQUEST['module'],$_REQUEST['return_module'],$focus,$_REQUEST['record'],$_REQUEST['return_id']);
|
||||
|
||||
//code added for returning back to the current view after delete from list view
|
||||
if($_REQUEST['return_viewname'] == '') $return_viewname='0';
|
||||
if($_REQUEST['return_viewname'] != '')$return_viewname=vtlib_purify($_REQUEST['return_viewname']);
|
||||
|
||||
header("Location: index.php?module=".vtlib_purify($_REQUEST['return_module'])."&action=".vtlib_purify($_REQUEST['return_action'])."&record=".vtlib_purify($_REQUEST['return_id'])."&viewname=".$return_viewname."&relmodule=".vtlib_purify($_REQUEST['module'])."&parenttab=".getParentTab());
|
||||
?>
|
||||
@@ -1,159 +0,0 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Public License Version 1.1.2
|
||||
* ("License"); You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
|
||||
* the specific language governing rights and limitations under the License.
|
||||
* The Original Code is: SugarCRM Open Source
|
||||
* The Initial Developer of the Original Code is SugarCRM, Inc.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
* $Header: /advent/projects/wesat/vtiger_crm/sugarcrm/modules/Emails/DetailView.php,v 1.22 2005/03/24 19:09:21 rank Exp $
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
require_once('Smarty_setup.php');
|
||||
require_once('data/Tracker.php');
|
||||
require_once('include/upload_file.php');
|
||||
require_once('include/utils/utils.php');
|
||||
require_once("include/Zend/Json.php");
|
||||
|
||||
global $log;
|
||||
global $app_strings;
|
||||
global $mod_strings;
|
||||
global $currentModule;
|
||||
|
||||
$focus = CRMEntity::getInstance($currentModule);
|
||||
$json = new Zend_Json();
|
||||
|
||||
$smarty = new vtigerCRM_Smarty;
|
||||
if(isset($_REQUEST['record']))
|
||||
{
|
||||
global $adb,$default_charset;
|
||||
$focus->retrieve_entity_info($_REQUEST['record'],"Emails");
|
||||
$log->info("Entity info successfully retrieved for DetailView.");
|
||||
$focus->id = $_REQUEST['record'];
|
||||
$query = 'select email_flag,from_email,to_email,cc_email,bcc_email from vtiger_emaildetails where emailid = ?';
|
||||
$result = $adb->pquery($query, array($focus->id));
|
||||
$smarty->assign('FROM_MAIL',$adb->query_result($result,0,'from_email'));
|
||||
$to_email = $json->decode($adb->query_result($result,0,'to_email'));
|
||||
$cc_email = $json->decode($adb->query_result($result,0,'cc_email'));
|
||||
$smarty->assign('TO_MAIL',vt_suppressHTMLTags(@implode(',',$to_email)));
|
||||
$smarty->assign('CC_MAIL',vt_suppressHTMLTags(@implode(',',$cc_email)));
|
||||
$bcc_email = $json->decode($adb->query_result($result,0,'bcc_email'));
|
||||
$smarty->assign('BCC_MAIL',vt_suppressHTMLTags(@implode(',',$bcc_email)));
|
||||
$smarty->assign('EMAIL_FLAG',$adb->query_result($result,0,'email_flag'));
|
||||
if($focus->column_fields['name'] != '')
|
||||
$focus->name = $focus->column_fields['name'];
|
||||
else
|
||||
$focus->name = $focus->column_fields['subject'];
|
||||
}
|
||||
if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true')
|
||||
{
|
||||
$focus->id = "";
|
||||
}
|
||||
|
||||
//needed when creating a new email with default values passed in
|
||||
if (isset($_REQUEST['contact_name']) && is_null($focus->contact_name))
|
||||
{
|
||||
$focus->contact_name = $_REQUEST['contact_name'];
|
||||
}
|
||||
if (isset($_REQUEST['contact_id']) && is_null($focus->contact_id))
|
||||
{
|
||||
$focus->contact_id = $_REQUEST['contact_id'];
|
||||
}
|
||||
if (isset($_REQUEST['opportunity_name']) && is_null($focus->parent_name))
|
||||
{
|
||||
$focus->parent_name = $_REQUEST['opportunity_name'];
|
||||
}
|
||||
if (isset($_REQUEST['opportunity_id']) && is_null($focus->parent_id))
|
||||
{
|
||||
$focus->parent_id = $_REQUEST['opportunity_id'];
|
||||
}
|
||||
if (isset($_REQUEST['account_name']) && is_null($focus->parent_name))
|
||||
{
|
||||
$focus->parent_name = $_REQUEST['account_name'];
|
||||
}
|
||||
if (isset($_REQUEST['account_id']) && is_null($focus->parent_id))
|
||||
{
|
||||
$focus->parent_id = $_REQUEST['account_id'];
|
||||
}
|
||||
if (isset($_REQUEST['parent_name']))
|
||||
{
|
||||
$focus->parent_name = $_REQUEST['parent_name'];
|
||||
}
|
||||
if (isset($_REQUEST['parent_id']))
|
||||
{
|
||||
$focus->parent_id = $_REQUEST['parent_id'];
|
||||
}
|
||||
if (isset($_REQUEST['parent_type']))
|
||||
{
|
||||
$focus->parent_type = $_REQUEST['parent_type'];
|
||||
}
|
||||
if (isset($_REQUEST['filename']) && is_null($focus->filename))
|
||||
{
|
||||
$focus->filename = $_REQUEST['filename'];
|
||||
}
|
||||
elseif (is_null($focus->parent_type))
|
||||
{
|
||||
$focus->parent_type = $app_list_strings['record_type_default_key'];
|
||||
}
|
||||
|
||||
global $theme;
|
||||
$theme_path="themes/".$theme."/";
|
||||
$image_path=$theme_path."images/";
|
||||
|
||||
$log->info("Email detail view");
|
||||
|
||||
$submenu = array('LBL_EMAILS_TITLE'=>'index.php?module=Emails&action=index','LBL_WEBMAILS_TITLE'=>'index.php?module=squirrelmail-1.4.4&action=redirect');
|
||||
$sec_arr = array('index.php?module=Emails&action=index'=>'Emails','index.php?module=squirrelmail-1.4.4&action=redirect'=>'Emails');
|
||||
|
||||
$smarty->assign("MOD", $mod_strings);
|
||||
$smarty->assign("APP", $app_strings);
|
||||
|
||||
$smarty->assign("UPDATEINFO",updateInfo($focus->id));
|
||||
if (isset($_REQUEST['return_module'])) $smarty->assign("RETURN_MODULE", vtlib_purify($_REQUEST['return_module']));
|
||||
if (isset($_REQUEST['return_action'])) $smarty->assign("RETURN_ACTION", vtlib_purify($_REQUEST['return_action']));
|
||||
if (isset($_REQUEST['return_id'])) $smarty->assign("RETURN_ID", vtlib_purify($_REQUEST['return_id']));
|
||||
$smarty->assign("THEME", $theme);
|
||||
$smarty->assign("IMAGE_PATH", $image_path);
|
||||
$category = getParentTab();
|
||||
$smarty->assign("CATEGORY",$category);
|
||||
|
||||
if (isset($focus->name)) $smarty->assign("NAME", $focus->name);
|
||||
else $smarty->assign("NAME", "");
|
||||
|
||||
$entries = getBlocks($currentModule,"detail_view",'',$focus->column_fields);
|
||||
$entries[$mod_strings['LBL_EMAIL_INFORMATION']]['5'][$mod_strings['Description']]['value'] = from_html($entries[$mod_strings['LBL_EMAIL_INFORMATION']]['5'][$mod_strings['Description']]['value']);
|
||||
//changed this to view description in all langauge - bharath
|
||||
$smarty->assign("BLOCKS",$entries[$mod_strings['LBL_EMAIL_INFORMATION']]);
|
||||
$smarty->assign("SINGLE_MOD", 'Email');
|
||||
|
||||
$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']);
|
||||
|
||||
if(isPermitted("Emails","EditView",$_REQUEST['record']) == 'yes')
|
||||
$smarty->assign("EDIT_DUPLICATE","permitted");
|
||||
|
||||
if(isPermitted("Emails","Delete",$_REQUEST['record']) == 'yes')
|
||||
$smarty->assign("DELETE","permitted");
|
||||
$smarty->assign("ID",$focus->id);
|
||||
|
||||
$check_button = Button_Check($module);
|
||||
$smarty->assign("CHECK", $check_button);
|
||||
|
||||
//Constructing the Related Lists from here
|
||||
$smarty->assign("MODULE",$currentModule);
|
||||
$smarty->assign("SENDER",$email_id);
|
||||
if($_REQUEST['mode'] != 'ajax')
|
||||
$smarty->display("EmailDetailView.tpl");
|
||||
else
|
||||
$smarty->display("EmailDetails.tpl")
|
||||
?>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,196 +0,0 @@
|
||||
/*********************************************************************************
|
||||
|
||||
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
var gFolderid = 1;
|
||||
var gselectedrowid = 0;
|
||||
function gotoWebmail()
|
||||
{
|
||||
new Ajax.Request(
|
||||
'index.php',
|
||||
{queue: {position: 'end', scope: 'command'},
|
||||
method: 'post',
|
||||
postBody: "module=Webmails&action=WebmailsAjax&config_chk=true",
|
||||
onComplete: function(response) {
|
||||
if(response.responseText.indexOf('SUCCESS') > -1)
|
||||
window.location.href = "index.php?module=Webmails&action=index&parenttab=My Home Page";
|
||||
else
|
||||
$('mailconfchk').style.display = 'block';
|
||||
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
function getEmailContents(id)
|
||||
{
|
||||
$("status").style.display="inline";
|
||||
var rowid = 'row_'+id;
|
||||
getObj(rowid).className = 'emailSelected';
|
||||
if(gselectedrowid != 0 && gselectedrowid != id)
|
||||
{
|
||||
var prev_selected_rowid = 'row_'+gselectedrowid;
|
||||
getObj(prev_selected_rowid).className = 'prvPrfHoverOff';
|
||||
}
|
||||
gselectedrowid = id;
|
||||
new Ajax.Request(
|
||||
'index.php',
|
||||
{queue: {position: 'end', scope: 'command'},
|
||||
method: 'post',
|
||||
postBody: 'module=Emails&action=EmailsAjax&file=DetailView&mode=ajax&record='+id,
|
||||
onComplete: function(response) {
|
||||
$("status").style.display="none";
|
||||
$("EmailDetails").innerHTML = response.responseText;
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function getListViewEntries_js(module,url)
|
||||
{
|
||||
$("status").style.display="inline";
|
||||
new Ajax.Request(
|
||||
'index.php',
|
||||
{queue: {position: 'end', scope: 'command'},
|
||||
method: 'post',
|
||||
postBody: "module="+module+"&action="+module+"Ajax&file=ListView&ajax=true&"+url,
|
||||
onComplete: function(response) {
|
||||
$("status").style.display="none";
|
||||
$("email_con").innerHTML=response.responseText;
|
||||
execJS(document.getElementById('email_con'));
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
function massDelete()
|
||||
{
|
||||
var delete_selected_row = false;
|
||||
//added to fix the issue 4295
|
||||
var select_options = document.getElementsByName('selected_id');
|
||||
var x = select_options.length;
|
||||
|
||||
idstring = "";
|
||||
xx = 0;
|
||||
for(i = 0; i < x ; i++)
|
||||
{
|
||||
if(select_options[i].checked)
|
||||
{
|
||||
idstring = select_options[i].value +";"+idstring
|
||||
if(select_options[i].value == gselectedrowid)
|
||||
{
|
||||
gselectedrowid = 0;
|
||||
delete_selected_row = true;
|
||||
}
|
||||
xx++
|
||||
}
|
||||
}
|
||||
if (xx > 0)
|
||||
{
|
||||
document.massdelete.idlist.value=idstring;
|
||||
}
|
||||
else
|
||||
{
|
||||
alert(alert_arr.SELECT);
|
||||
return false;
|
||||
}
|
||||
if(confirm(alert_arr.DELETE + xx + alert_arr.RECORDS))
|
||||
{
|
||||
getObj('search_text').value = '';
|
||||
show("status");
|
||||
if(!delete_selected_row)
|
||||
{
|
||||
new Ajax.Request(
|
||||
'index.php',
|
||||
{queue: {position: 'end', scope: 'command'},
|
||||
method: 'post',
|
||||
postBody: "module=Users&action=massdelete&folderid="+gFolderid+"&return_module=Emails&idlist="+idstring,
|
||||
onComplete: function(response) {
|
||||
$("status").style.display="none";
|
||||
$("email_con").innerHTML=response.responseText;
|
||||
execJS(document.getElementById('email_con'));
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
new Ajax.Request(
|
||||
'index.php',
|
||||
{queue: {position: 'end', scope: 'command'},
|
||||
method: 'post',
|
||||
postBody: "module=Users&action=massdelete&folderid="+gFolderid+"&return_module=Emails&idlist="+idstring,
|
||||
onComplete: function(response) {
|
||||
$("status").style.display="none";
|
||||
$("email_con").innerHTML=response.responseText;
|
||||
execJS($('email_con'));
|
||||
$('EmailDetails').innerHTML = '<table valign="top" border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="forwardBg"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td colspan="2"> </td></tr></tbody></table></td></tr><tr><td style="padding-top: 10px;" bgcolor="#ffffff" height="300" valign="top"></td></tr></tbody></table>';
|
||||
$("subjectsetter").innerHTML='';
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function DeleteEmail(id)
|
||||
{
|
||||
if(confirm(alert_arr.SURE_TO_DELETE))
|
||||
{
|
||||
getObj('search_text').value = '';
|
||||
gselectedrowid = 0;
|
||||
$("status").style.display="inline";
|
||||
new Ajax.Request(
|
||||
'index.php',
|
||||
{queue: {position: 'end', scope: 'command'},
|
||||
method: 'post',
|
||||
postBody: "module=Users&action=massdelete&return_module=Emails&folderid="+gFolderid+"&idlist="+id,
|
||||
onComplete: function(response) {
|
||||
$("status").style.display="none";
|
||||
$("email_con").innerHTML=response.responseText;
|
||||
execJS($('email_con'));
|
||||
$('EmailDetails').innerHTML = '<table valign="top" border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="forwardBg"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td colspan="2"> </td></tr></tbody></table></td></tr><tr><td style="padding-top: 10px;" bgcolor="#ffffff" height="300" valign="top"></td></tr></tbody></table>';
|
||||
$("subjectsetter").innerHTML='';
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
function Searchfn()
|
||||
{
|
||||
gselectedrowid = 0;
|
||||
var osearch_field = document.getElementById('search_field');
|
||||
var search_field = osearch_field.options[osearch_field.options.selectedIndex].value;
|
||||
var search_text = document.getElementById('search_text').value;
|
||||
new Ajax.Request(
|
||||
'index.php',
|
||||
{queue: {position: 'end', scope: 'command'},
|
||||
method: 'post',
|
||||
postBody: "module=Emails&action=EmailsAjax&ajax=true&file=ListView&folderid="+gFolderid+"&search=true&search_field="+search_field+"&search_text="+search_text,
|
||||
onComplete: function(response) {
|
||||
$("email_con").innerHTML=response.responseText;
|
||||
$("status").style.display="none";
|
||||
$('EmailDetails').innerHTML = '<table valign="top" border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="forwardBg"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td colspan="2"> </td></tr></tbody></table></td></tr><tr><td style="padding-top: 10px;" bgcolor="#ffffff" height="300" valign="top"></td></tr></tbody></table>';
|
||||
$("subjectsetter").innerHTML='';
|
||||
execJS($('email_con'));
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,55 +0,0 @@
|
||||
<?php
|
||||
/*+********************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
*********************************************************************************/
|
||||
|
||||
require_once('include/logging.php');
|
||||
require_once('include/database/PearDatabase.php');
|
||||
global $adb;
|
||||
|
||||
$local_log =& LoggerManager::getLogger('EmailsAjax');
|
||||
global $currentModule;
|
||||
$modObj = CRMEntity::getInstance($currentModule);
|
||||
|
||||
$ajaxaction = $_REQUEST["ajxaction"];
|
||||
if($ajaxaction == "DETAILVIEW")
|
||||
{
|
||||
$crmid = $_REQUEST["recordid"];
|
||||
$tablename = $_REQUEST["tableName"];
|
||||
$fieldname = $_REQUEST["fldName"];
|
||||
$fieldvalue = $_REQUEST["fieldValue"];
|
||||
if($crmid != "")
|
||||
{
|
||||
$modObj->retrieve_entity_info($crmid,"Emails");
|
||||
$modObj->column_fields[$fieldname] = $fieldvalue;
|
||||
$modObj->id = $crmid;
|
||||
$modObj->mode = "edit";
|
||||
$modObj->save("Emails");
|
||||
if($modObj->id != "")
|
||||
{
|
||||
echo ":#:SUCCESS";
|
||||
}else
|
||||
{
|
||||
echo ":#:FAILURE";
|
||||
}
|
||||
}else
|
||||
{
|
||||
echo ":#:FAILURE";
|
||||
}
|
||||
} elseif($ajaxaction == "LOADRELATEDLIST" || $ajaxaction == "DISABLEMODULE") {
|
||||
require_once 'include/ListView/RelatedListViewContents.php';
|
||||
}
|
||||
elseif($_REQUEST['ajaxmode'] == 'qcreate')
|
||||
{
|
||||
require_once('quickcreate.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
require_once('include/Ajax/CommonAjax.php');
|
||||
}
|
||||
?>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,99 +0,0 @@
|
||||
javascript:(function(){var doc = top.document;
|
||||
var elementId="__vtigerBookMarkletDivWrap__";
|
||||
if(navigator.userAgent.toLowerCase().indexOf("msie") == -1){
|
||||
var bookMarkletDiv = doc.getElementById(elementId);
|
||||
if(bookMarkletDiv == null){
|
||||
bookMarkletDiv = doc.createElement("div");
|
||||
bookMarkletDiv.style.border = "2px solid #73ABFA";
|
||||
bookMarkletDiv.style.backgroundColor = "white";
|
||||
bookMarkletDiv.innerHTML = "";
|
||||
bookMarkletDiv.id = elementId;
|
||||
bookMarkletDiv.style.position="absolute";
|
||||
bookMarkletDiv.style.top="5px";
|
||||
bookMarkletDiv.style.right="35px";
|
||||
bookMarkletDiv.style.width="562px";
|
||||
bookMarkletDiv.style.height="450px";
|
||||
bookMarkletDiv.style.zIndex="100000";
|
||||
bookMarkletDiv.innerHTML=" ";
|
||||
bookMarkletDiv.style.overflow = 'hidden';
|
||||
bookMarkletDiv.style.fontSize = '11px';
|
||||
bookMarkletDiv.style.fontFamily = 'Arial, sans-serif';
|
||||
|
||||
var closeMe = doc.createElement("span");
|
||||
closeMe.style.position="absolute";
|
||||
closeMe.style.top="5px";
|
||||
closeMe.style.right="5px";
|
||||
closeMe.style.color="#0070BA";
|
||||
closeMe.style.textDecoration="underline";
|
||||
closeMe.style.width="100%";
|
||||
closeMe.style.textAlign="right";
|
||||
closeMe.style.cursor="pointer";
|
||||
closeMe.innerHTML = "<img src='"+ doc.vtigerURL + "themes/images/close.gif' title='Close Window' " +
|
||||
"alt='Close Window' border=0>";
|
||||
closeMe.onclick = function(){
|
||||
window.removeMe();
|
||||
}
|
||||
bookMarkletDiv.appendChild(closeMe);
|
||||
|
||||
var popUp = doc.createElement("iframe");
|
||||
popUp.id="__vtigerBookmarkletFrame__";
|
||||
popUp.name="__vtigerBookmarkletFrame__";
|
||||
popUp.style.border="0px";
|
||||
popUp.frameBorder="0px";
|
||||
popUp.marginHeight="0px";
|
||||
popUp.marginWidth="0px";
|
||||
popUp.style.width="100%";
|
||||
popUp.style.height="100%";
|
||||
popUp.src = getTargetURL();
|
||||
bookMarkletDiv.appendChild(popUp);
|
||||
doc.body.appendChild(bookMarkletDiv);
|
||||
}else{
|
||||
bookMarkletDiv.style.display="block";
|
||||
}
|
||||
}else{
|
||||
var vtigerGmailBookmarkletWindow = window.open(getTargetURL(),elementId,
|
||||
"scrollbars=1,top=40,left=40,resizable=1,height=450,width=562");
|
||||
}
|
||||
|
||||
function getTargetURL(){
|
||||
var threadid = top.location.hash.split("/");
|
||||
var mailId = threadid[threadid.length-1];
|
||||
var description = encodeURIComponent(getGmailURL()+"?fs=1&tf=1&source=atom&view=cv&search=all&shva=1&th="+mailId);
|
||||
return doc.vtigerURL+"index.php?module=Emails&action=SaveBookmarklet&subject="+
|
||||
encodeURIComponent(getGmailSubject())+"&description="+description+
|
||||
"&location="+encodeURIComponent(getGmailURL());
|
||||
}
|
||||
|
||||
function trim(str) {
|
||||
var s = str.replace(/\s+$/, "");
|
||||
s = s.replace(/^\s+/, "");
|
||||
return s;
|
||||
}
|
||||
|
||||
function getGmailSubject() {
|
||||
var subject = top.document.title;
|
||||
var firstIndexOf = subject.indexOf("-");
|
||||
var lastIndexOf = subject.lastIndexOf("-");
|
||||
subject = subject.substring(firstIndexOf+1, lastIndexOf-1);
|
||||
return trim(subject);
|
||||
}
|
||||
|
||||
function getGmailURL() {
|
||||
var locationhref = location.href;
|
||||
if(locationhref.indexOf("?")!==-1) {
|
||||
var lsplits = locationhref.split("?");
|
||||
locationhref = lsplits[0];
|
||||
} else if(locationhref.indexOf("#")!==-1) {
|
||||
var lsplits = locationhref.split("#");
|
||||
locationhref = lsplits[0];
|
||||
}
|
||||
return locationhref;
|
||||
}
|
||||
window.top.removeMe = function(){
|
||||
if(navigator.userAgent.toLowerCase().indexOf("msie") == -1){
|
||||
doc.body.removeChild(bookMarkletDiv);
|
||||
}else{
|
||||
vtigerGmailBookmarkletWindow.close();
|
||||
}
|
||||
}
|
||||
})();
|
||||
@@ -1,202 +0,0 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Public License Version 1.1.2
|
||||
* ("License"); You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
|
||||
* the specific language governing rights and limitations under the License.
|
||||
* The Original Code is: SugarCRM Open Source
|
||||
* The Initial Developer of the Original Code is SugarCRM, Inc.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
* $Header: /advent/projects/wesat/vtiger_crm/sugarcrm/modules/Emails/ListView.php,v 1.12 2005/04/18 10:37:49 samk Exp $
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
require_once('Smarty_setup.php');
|
||||
require_once("data/Tracker.php");
|
||||
require_once('modules/Emails/Emails.php');
|
||||
require_once('include/logging.php');
|
||||
require_once('include/utils/utils.php');
|
||||
require_once('modules/CustomView/CustomView.php');
|
||||
global $current_user;
|
||||
global $app_strings;
|
||||
global $mod_strings;
|
||||
|
||||
global $list_max_entries_per_page, $adb;
|
||||
|
||||
$log = LoggerManager::getLogger('email_list');
|
||||
|
||||
global $currentModule;
|
||||
|
||||
global $image_path;
|
||||
global $theme;
|
||||
|
||||
$url_string = ''; // assigning http url string
|
||||
|
||||
$focus = new Emails();
|
||||
// Initialize sort by fields
|
||||
$focus->initSortbyField('Emails');
|
||||
// END
|
||||
$smarty = new vtigerCRM_Smarty;
|
||||
$other_text = Array();
|
||||
|
||||
//<<<<<<<<<<<<<<<<<<< sorting - stored in session >>>>>>>>>>>>>>>>>>>>
|
||||
if($_REQUEST['order_by'] != '')
|
||||
$order_by = $adb->sql_escape_string($_REQUEST['order_by']);
|
||||
else
|
||||
$order_by = (($_SESSION['EMAILS_ORDER_BY'] != '')?($_SESSION['EMAILS_ORDER_BY']):($focus->default_order_by));
|
||||
|
||||
if($_REQUEST['sorder'] != '')
|
||||
$sorder = $adb->sql_escape_string($_REQUEST['sorder']);
|
||||
else
|
||||
$sorder = (($_SESSION['EMAILS_SORT_ORDER'] != '')?($_SESSION['EMAILS_SORT_ORDER']):($focus->default_sort_order));
|
||||
|
||||
$_SESSION['EMAILS_ORDER_BY'] = $order_by;
|
||||
$_SESSION['EMAILS_SORT_ORDER'] = $sorder;
|
||||
//<<<<<<<<<<<<<<<<<<< sorting - stored in session >>>>>>>>>>>>>>>>>>>>
|
||||
|
||||
|
||||
// focus_list is the means of passing data to a ListView.
|
||||
global $focus_list;
|
||||
|
||||
//<<<<cutomview>>>>>>>
|
||||
$oCustomView = new CustomView("Emails");
|
||||
$viewid = $oCustomView->getViewId($currentModule);
|
||||
$customviewcombo_html = $oCustomView->getCustomViewCombo($viewid);
|
||||
$viewnamedesc = $oCustomView->getCustomViewByCvid($viewid);
|
||||
|
||||
//<<<<<customview>>>>>
|
||||
|
||||
// Buttons and View options
|
||||
if(isPermitted('Emails','Delete','') == 'yes')
|
||||
{
|
||||
$other_text['del'] = $app_strings[LBL_MASS_DELETE];
|
||||
}
|
||||
|
||||
if($viewnamedesc['viewname'] == 'All')
|
||||
{
|
||||
$smarty->assign("ALL", 'All');
|
||||
}
|
||||
|
||||
global $email_title;
|
||||
$display_title = $mod_strings['LBL_LIST_FORM_TITLE'];
|
||||
if($email_title)$display_title = $email_title;
|
||||
|
||||
//to get the search vtiger_field if exists
|
||||
if(isset($_REQUEST['search']) && $_REQUEST['search'] != '' && $_REQUEST['search_text'] != '')
|
||||
{
|
||||
$url_string .= "&search=".vtlib_purify($_REQUEST['search'])."&search_field=".vtlib_purify($_REQUEST['search_field'])."&search_text=".vtlib_purify($_REQUEST['search_text']);
|
||||
if($_REQUEST['search_field'] != 'join')
|
||||
$where = $adb->sql_escape_string($_REQUEST['search_field'])." like '". formatForSqlLike($_REQUEST['search_text']) ."'";
|
||||
else
|
||||
$where = "(subject like '". formatForSqlLike($_REQUEST['search_text']) ."' OR vtiger_users.user_name like '". formatForSqlLike($_REQUEST['search_text']) ."')";
|
||||
}
|
||||
|
||||
|
||||
//Retreive the list from Database
|
||||
//<<<<<<<<<customview>>>>>>>>>
|
||||
if($viewid != "0")
|
||||
{
|
||||
$listquery = getListQuery("Emails");
|
||||
$list_query = $oCustomView->getModifiedCvListQuery($viewid,$listquery,"Emails");
|
||||
}
|
||||
else
|
||||
{
|
||||
$list_query = getListQuery("Emails");
|
||||
}
|
||||
//<<<<<<<<customview>>>>>>>>>
|
||||
|
||||
if(isset($where) && $where != '')
|
||||
{
|
||||
$list_query .= " AND " .$where;
|
||||
}
|
||||
if($_REQUEST['folderid'] =='2')
|
||||
{
|
||||
$list_query .= " AND vtiger_seactivityrel.crmid in (select contactid from vtiger_contactdetails) AND vtiger_emaildetails.email_flag !='WEBMAIL'";
|
||||
}
|
||||
if($_REQUEST['folderid'] =='3')
|
||||
{
|
||||
$list_query .= " AND vtiger_seactivityrel.crmid in (select accountid from vtiger_account)";
|
||||
}
|
||||
if($_REQUEST['folderid'] =='4')
|
||||
{
|
||||
$list_query .= " AND vtiger_seactivityrel.crmid in (select leadid from vtiger_leaddetails)";
|
||||
}
|
||||
if($_REQUEST['folderid'] =='5')
|
||||
{
|
||||
$list_query .= " AND vtiger_salesmanactivityrel.smid in (select id from vtiger_users)";
|
||||
}
|
||||
if($_REQUEST['folderid'] =='6')
|
||||
{
|
||||
$list_query .= " AND vtiger_emaildetails.email_flag ='WEBMAIL'";
|
||||
}
|
||||
if(isset($order_by) && $order_by != '')
|
||||
{
|
||||
$tablename = getTableNameForField('Emails',$order_by);
|
||||
$tablename = (($tablename != '')?($tablename."."):'');
|
||||
$list_query .= ' ORDER BY '.$tablename.$order_by.' '.$sorder;
|
||||
}
|
||||
|
||||
$list_result = $adb->query($list_query);
|
||||
|
||||
//Constructing the list view
|
||||
$smarty->assign("CUSTOMVIEW_OPTION",$customviewcombo_html);
|
||||
$smarty->assign("VIEWID", $viewid);
|
||||
$smarty->assign("MOD", $mod_strings);
|
||||
$smarty->assign("APP", $app_strings);
|
||||
$smarty->assign("THEME", $theme);
|
||||
$smarty->assign("IMAGE_PATH",$image_path);
|
||||
$smarty->assign("MODULE",$currentModule);
|
||||
$smarty->assign("SINGLE_MOD",'Email');
|
||||
$smarty->assign("BUTTONS",$other_text);
|
||||
$category = getParentTab();
|
||||
$smarty->assign("CATEGORY",$category);
|
||||
|
||||
//Retreiving the no of rows
|
||||
$noofrows = $adb->num_rows($list_result);
|
||||
|
||||
//Retreive the Navigation array
|
||||
$_REQUEST['allflag'] = 'All';
|
||||
$navigation_array = getNavigationValues(1, $noofrows, $noofrows);
|
||||
|
||||
//Retreive the List View Table Header
|
||||
if($viewid !='')
|
||||
$url_string .="&viewname=".$viewid;
|
||||
if(isset($_REQUEST['folderid']) && $_REQUEST['folderid'] != '')
|
||||
$url_string .= "&folderid=".vtlib_purify($_REQUEST['folderid']);
|
||||
$listview_header = getListViewHeader($focus,"Emails",$url_string,$sorder,$order_by,"",$oCustomView);
|
||||
$smarty->assign("LISTHEADER", $listview_header);
|
||||
|
||||
$listview_entries = getListViewEntries($focus,"Emails",$list_result,$navigation_array,"","","EditView","Delete",$oCustomView);
|
||||
//--------------------------added to fix the ticket(4386)------------------------START
|
||||
foreach($listview_entries as $key=>$value)
|
||||
{
|
||||
$sql="select email_flag from vtiger_emaildetails where emailid=?";
|
||||
$result=$adb->pquery($sql, array($key));
|
||||
$email_flag=$adb->query_result($result,0,"email_flag");
|
||||
$emailid[$key] = $email_flag;
|
||||
}
|
||||
$smarty->assign("EMAILFALG",$emailid);
|
||||
//--------------------------added to fix the ticket(4386)------------------------END
|
||||
|
||||
$smarty->assign("LISTENTITY", $listview_entries);
|
||||
$smarty->assign("SELECT_SCRIPT", $view_script);
|
||||
|
||||
$smarty->assign("USERID", $current_user->id);
|
||||
|
||||
$check_button = Button_Check($module);
|
||||
$smarty->assign("CHECK", $check_button);
|
||||
$smarty->assign("theme", $theme);
|
||||
if($_REQUEST['ajax'] != '')
|
||||
$smarty->display("EmailContents.tpl");
|
||||
else
|
||||
$smarty->display("Emails.tpl");
|
||||
?>
|
||||
@@ -1,11 +0,0 @@
|
||||
<?php
|
||||
/*+*******************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
*********************************************************************************/
|
||||
require_once 'include/ListView/ListViewPagging.php';
|
||||
?>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,89 +0,0 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
********************************************************************************/
|
||||
require_once('Smarty_setup.php');
|
||||
require_once('data/Tracker.php');
|
||||
require_once('modules/Emails/Emails.php');
|
||||
require_once('include/utils/utils.php');
|
||||
require_once('include/utils/UserInfoUtil.php');
|
||||
require_once('modules/Webmails/MailBox.php');
|
||||
require_once('modules/Webmails/Webmails.php');
|
||||
require_once("include/Zend/Json.php");
|
||||
|
||||
global $mod_strings;
|
||||
global $app_strings, $theme;
|
||||
|
||||
$focus = new Emails();
|
||||
$smarty = new vtigerCRM_Smarty();
|
||||
$json = new Zend_Json();
|
||||
$smarty->assign('MOD',$mod_strings);
|
||||
$smarty->assign('THEME',$theme);
|
||||
|
||||
if(isset($_REQUEST['record']) && $_REQUEST['record'] !='' && $_REQUEST['mailbox'] == '')
|
||||
{
|
||||
$focus->id = $_REQUEST['record'];
|
||||
$focus->mode = 'edit';
|
||||
$focus->retrieve_entity_info($_REQUEST['record'],"Emails");
|
||||
|
||||
$focus->name=$focus->column_fields['name'];
|
||||
if(isset($_REQUEST['print']) && $_REQUEST['print'] !='')
|
||||
{
|
||||
$query = 'select idlists,from_email,to_email,cc_email,bcc_email from vtiger_emaildetails where emailid =?';
|
||||
$result = $adb->pquery($query, array($focus->id));
|
||||
$smarty->assign('FROM_MAIL',$adb->query_result($result,0,'from_email'));
|
||||
$to_email = vt_suppressHTMLTags(implode(',',$json->decode($adb->query_result($result,0,'to_email'))));
|
||||
$smarty->assign('TO_MAIL',$to_email);
|
||||
$cc_add = vt_suppressHTMLTags(implode(',',$json->decode($adb->query_result($result,0,'cc_email'))));
|
||||
$smarty->assign('CC_MAIL',$cc_add);
|
||||
$bcc_add = vt_suppressHTMLTags(implode(',',$json->decode($adb->query_result($result,0,'bcc_email'))));
|
||||
$smarty->assign('BCC_MAIL',$bcc_add);
|
||||
$smarty->assign('SUBJECT',$focus->column_fields['subject']);
|
||||
$smarty->assign('DESCRIPTION',$focus->column_fields['description']);
|
||||
}
|
||||
$smarty->display('PrintEmail.tpl');
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['record']) && isset($_REQUEST['mailbox']) && $_REQUEST['print'])
|
||||
{
|
||||
if(isset($_REQUEST["mailbox"]) && $_REQUEST["mailbox"] != "")
|
||||
{
|
||||
$mailbox=$_REQUEST["mailbox"];
|
||||
}
|
||||
else
|
||||
{
|
||||
$mailbox="INBOX";
|
||||
}
|
||||
$mailid = $_REQUEST['record'];
|
||||
$MailBox = new MailBox($mailbox);
|
||||
$mail = $MailBox->mbox;
|
||||
$email = new Webmails($MailBox->mbox,$mailid);
|
||||
$status=imap_setflag_full($MailBox->mbox,$mailid,"\\Seen");
|
||||
$attach_tab=array();
|
||||
$email->loadMail($attach_tab);
|
||||
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=".$email->charsets."\">\n";
|
||||
$subject = utf8_decode(utf8_encode(imap_utf8($email->subject)));
|
||||
$from = decode_header($email->from);
|
||||
$to = decode_header($email->to[0]);
|
||||
$cc = decode_header($email->cc_header);
|
||||
$date = decode_header($email->date);
|
||||
for($i=0;$i<count($email->attname);$i++){
|
||||
$attachment_links .= $email->anchor_arr[$i].decode_header($email->attname[$i])."</a></br> ";
|
||||
}
|
||||
$content['body'] = $email->body;
|
||||
$content['attachtab'] = $email->attachtab;
|
||||
|
||||
$smarty->assign('FROM_MAIL',$from);
|
||||
$smarty->assign('TO_MAIL',trim($to,",").",");
|
||||
$smarty->assign('SUBJECT',$subject);
|
||||
$smarty->assign('DESCRIPTION',$content['body']);
|
||||
$smarty->display('PrintEmail.tpl');
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,254 +0,0 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Public License Version 1.1.2
|
||||
* ("License"); You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
|
||||
* the specific language governing rights and limitations under the License.
|
||||
* The Original Code is: SugarCRM Open Source
|
||||
* The Initial Developer of the Original Code is SugarCRM, Inc.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
* $Header: /advent/projects/wesat/vtiger_crm/sugarcrm/modules/Emails/Save.php,v 1.27 2005/04/29 08:54:38 rank Exp $
|
||||
* Description: Saves an Account record and then redirects the browser to the
|
||||
* defined return URL.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
require_once("include/Zend/Json.php");
|
||||
|
||||
//check for mail server configuration thro ajax
|
||||
if(isset($_REQUEST['server_check']) && $_REQUEST['server_check'] == 'true')
|
||||
{
|
||||
$sql="select * from vtiger_systems where server_type = ?";
|
||||
$records=$adb->num_rows($adb->pquery($sql, array('email')),0,"id");
|
||||
if($records != '')
|
||||
echo 'SUCCESS';
|
||||
else
|
||||
echo 'FAILURE';
|
||||
die;
|
||||
}
|
||||
|
||||
//Added on 09-11-2005 to avoid loading the webmail vtiger_files in Email process
|
||||
if($_REQUEST['smodule'] != '')
|
||||
{
|
||||
define('SM_PATH','modules/squirrelmail-1.4.4/');
|
||||
/* SquirrelMail required vtiger_files. */
|
||||
require_once(SM_PATH . 'functions/strings.php');
|
||||
require_once(SM_PATH . 'functions/imap_general.php');
|
||||
require_once(SM_PATH . 'functions/imap_messages.php');
|
||||
require_once(SM_PATH . 'functions/i18n.php');
|
||||
require_once(SM_PATH . 'functions/mime.php');
|
||||
require_once(SM_PATH .'include/load_prefs.php');
|
||||
//require_once(SM_PATH . 'class/mime/Message.class.php');
|
||||
require_once(SM_PATH . 'class/mime.class.php');
|
||||
sqgetGlobalVar('key', $key, SQ_COOKIE);
|
||||
sqgetGlobalVar('username', $username, SQ_SESSION);
|
||||
sqgetGlobalVar('onetimepad',$onetimepad, SQ_SESSION);
|
||||
$mailbox = 'INBOX';
|
||||
}
|
||||
|
||||
require_once('modules/Emails/Emails.php');
|
||||
require_once('include/logging.php');
|
||||
require_once('include/database/PearDatabase.php');
|
||||
|
||||
$local_log =& LoggerManager::getLogger('index');
|
||||
|
||||
$focus = new Emails();
|
||||
|
||||
global $current_user,$mod_strings,$app_strings;
|
||||
if(isset($_REQUEST['description']) && $_REQUEST['description'] !='')
|
||||
$_REQUEST['description'] = fck_from_html($_REQUEST['description']);
|
||||
|
||||
$all_to_ids = $_REQUEST["hidden_toid"];
|
||||
$all_to_ids .= $_REQUEST["saved_toid"];
|
||||
$_REQUEST["saved_toid"] = $all_to_ids;
|
||||
//we always save the email with "save" status and when it is sent it is marked as SENT
|
||||
$_REQUEST['email_flag'] = 'SAVED';
|
||||
setObjectValuesFromRequest($focus);
|
||||
//Check if the file is exist or not.
|
||||
//$file_name = '';
|
||||
if(isset($_REQUEST['filename_hidden'])) {
|
||||
$file_name = $_REQUEST['filename_hidden'];
|
||||
} else {
|
||||
$file_name = $_FILES['filename']['name'];
|
||||
}
|
||||
$errorCode = $_FILES['filename']['error'];
|
||||
$errormessage = "";
|
||||
if($file_name != '' && $_FILES['filename']['size'] == 0)
|
||||
{
|
||||
if($errorCode == 4 || $errorCode == 0)
|
||||
{
|
||||
if($_FILES['filename']['size'] == 0)
|
||||
$errormessage = "<B><font color='red'>".$mod_strings['LBL_PLEASE_ATTACH']."</font></B> <br>";
|
||||
}
|
||||
else if($errorCode == 2)
|
||||
{
|
||||
$errormessage = "<B><font color='red'>".$mod_strings['LBL_EXCEED_MAX'].$upload_maxsize.$mod_strings['LBL_BYTES']." </font></B> <br>";
|
||||
}
|
||||
else if($errorCode == 6)
|
||||
{
|
||||
$errormessage = "<B>".$mod_strings['LBL_KINDLY_UPLOAD']."</B> <br>" ;
|
||||
}
|
||||
else if($errorCode == 3 )
|
||||
{
|
||||
if($_FILES['filename']['size'] == 0)
|
||||
$errormessage = "<b><font color='red'>".$mod_strings['LBL_PLEASE_ATTACH']."</font></b><br>";
|
||||
}
|
||||
else{}
|
||||
if($errormessage != ""){
|
||||
$ret_error = 1;
|
||||
$ret_parentid = $_REQUEST['parent_id'];
|
||||
$ret_toadd = $_REQUEST['parent_name'];
|
||||
$ret_subject = $_REQUEST['subject'];
|
||||
$ret_ccaddress = $_REQUEST['ccmail'];
|
||||
$ret_bccaddress = $_REQUEST['bccmail'];
|
||||
$ret_description = $_REQUEST['description'];
|
||||
echo $errormessage;
|
||||
include("EditView.php");
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($_FILES["filename"]["size"] == 0 && $_FILES["filename"]["name"] != '')
|
||||
{
|
||||
$file_upload_error = true;
|
||||
$_FILES = '';
|
||||
}
|
||||
|
||||
if((isset($_REQUEST['deletebox']) && $_REQUEST['deletebox'] != null) && $_REQUEST['addbox'] == null)
|
||||
{
|
||||
imap_delete($mbox,$_REQUEST['deletebox']);
|
||||
imap_expunge($mbox);
|
||||
header("Location: index.php?module=Emails&action=index");
|
||||
exit();
|
||||
}
|
||||
|
||||
function checkIfContactExists($mailid)
|
||||
{
|
||||
global $log;
|
||||
$log->debug("Entering checkIfContactExists(".$mailid.") method ...");
|
||||
global $adb;
|
||||
$sql = "select contactid from vtiger_contactdetails inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_contactdetails.contactid where vtiger_crmentity.deleted=0 and email= ?";
|
||||
$result = $adb->pquery($sql, array($mailid));
|
||||
$numRows = $adb->num_rows($result);
|
||||
if($numRows > 0)
|
||||
{
|
||||
$log->debug("Exiting checkIfContactExists method ...");
|
||||
return $adb->query_result($result,0,"contactid");
|
||||
}
|
||||
else
|
||||
{
|
||||
$log->debug("Exiting checkIfContactExists method ...");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
//assign the focus values
|
||||
$focus->filename = $_REQUEST['file_name'];
|
||||
$focus->parent_id = $_REQUEST['parent_id'];
|
||||
$focus->parent_type = $_REQUEST['parent_type'];
|
||||
$focus->column_fields["assigned_user_id"]=$current_user->id;
|
||||
$focus->column_fields["activitytype"]="Emails";
|
||||
$focus->column_fields["date_start"]= date(getNewDisplayDate());//This will be converted to db date format in save
|
||||
$focus->save("Emails");
|
||||
$return_id = $focus->id;
|
||||
|
||||
require_once("modules/Emails/mail.php");
|
||||
if(isset($_REQUEST['send_mail']) && $_REQUEST['send_mail'] && $_REQUEST['parent_id'] != '')
|
||||
{
|
||||
$user_mail_status = send_mail('Emails',$current_user->column_fields['email1'],$current_user->user_name,'',$_REQUEST['subject'],$_REQUEST['description'],$_REQUEST['ccmail'],$_REQUEST['bccmail'],'all',$focus->id);
|
||||
|
||||
//if block added to fix the issue #3759
|
||||
if($user_mail_status != 1){
|
||||
$query = "select crmid,attachmentsid from vtiger_seattachmentsrel where crmid=?";
|
||||
$result = $adb->pquery($query, array($email_id));
|
||||
$numOfRows = $adb->num_rows($result);
|
||||
for($i=0; $i<$numOfRows; $i++)
|
||||
{
|
||||
$attachmentsid = $adb->query_result($result,0,"attachmentsid");
|
||||
if($attachmentsid > 0)
|
||||
{
|
||||
$query1="delete from vtiger_crmentity where crmid=?";
|
||||
$adb->pquery($query1, array($attachmentsid));
|
||||
}
|
||||
|
||||
$crmid=$adb->query_result($result,0,"crmid");
|
||||
$query2="delete from vtiger_crmentity where crmid=?";
|
||||
$adb->pquery($query2, array($crmid));
|
||||
}
|
||||
|
||||
$query = "delete from vtiger_emaildetails where emailid=?";
|
||||
$adb->pquery($query, array($focus->id));
|
||||
|
||||
$error_msg = "<font color=red><strong>".$mod_strings['LBL_CHECK_USER_MAILID']."</strong></font>";
|
||||
$ret_error = 1;
|
||||
$ret_parentid = $_REQUEST['parent_id'];
|
||||
$ret_toadd = $_REQUEST['parent_name'];
|
||||
$ret_subject = $_REQUEST['subject'];
|
||||
$ret_ccaddress = $_REQUEST['ccmail'];
|
||||
$ret_bccaddress = $_REQUEST['bccmail'];
|
||||
$ret_description = $_REQUEST['description'];
|
||||
echo $error_msg;
|
||||
include("EditView.php");
|
||||
exit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$focus->retrieve_entity_info($return_id,"Emails");
|
||||
|
||||
//this is to receive the data from the Select Users button
|
||||
if($_REQUEST['source_module'] == null)
|
||||
{
|
||||
$module = 'users';
|
||||
}
|
||||
//this will be the case if the Select Contact button is chosen
|
||||
else
|
||||
{
|
||||
$module = $_REQUEST['source_module'];
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['return_module']) && $_REQUEST['return_module'] != "")
|
||||
$return_module = vtlib_purify($_REQUEST['return_module']);
|
||||
else
|
||||
$return_module = "Emails";
|
||||
|
||||
if(isset($_REQUEST['return_action']) && $_REQUEST['return_action'] != "")
|
||||
$return_action = vtlib_purify($_REQUEST['return_action']);
|
||||
else
|
||||
$return_action = "DetailView";
|
||||
|
||||
if(isset($_REQUEST['return_id']) && $_REQUEST['return_id'] != "")
|
||||
$return_id = vtlib_purify($_REQUEST['return_id']);
|
||||
|
||||
if(isset($_REQUEST['filename']) && $_REQUEST['filename'] != "")
|
||||
$filename = vtlib_purify($_REQUEST['filename']);
|
||||
|
||||
$local_log->debug("Saved record with id of ".$return_id);
|
||||
|
||||
if(isset($_REQUEST['send_mail']) && $_REQUEST['send_mail'] && $_REQUEST['parent_id'] == ''){
|
||||
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");
|
||||
|
||||
|
||||
|
||||
if(isset($_REQUEST['return_action']) && $_REQUEST['return_action'] == 'mailbox')
|
||||
header("Location: index.php?module=$return_module&action=index");
|
||||
else {
|
||||
if($_REQUEST['return_viewname'] == '') $return_viewname='0';
|
||||
if($_REQUEST['return_viewname'] != '')$return_viewname=vtlib_purify($_REQUEST['return_viewname']);
|
||||
//Added for 4600
|
||||
$inputs="<script>window.opener.location.href=window.opener.location.href;window.self.close();</script>";
|
||||
echo $inputs;
|
||||
}
|
||||
?>
|
||||
@@ -1,81 +0,0 @@
|
||||
<?php
|
||||
/*+**********************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
************************************************************************************/
|
||||
require_once 'include/Webservices/Utils.php';
|
||||
require_once("include/Zend/Json.php");
|
||||
require_once 'include/Webservices/WebserviceField.php';
|
||||
require_once 'include/Webservices/EntityMeta.php';
|
||||
require_once 'include/Webservices/VtigerWebserviceObject.php';
|
||||
require_once("include/Webservices/VtigerCRMObject.php");
|
||||
require_once("include/Webservices/VtigerCRMObjectMeta.php");
|
||||
require_once("include/Webservices/WebServiceError.php");
|
||||
require_once 'include/Webservices/ModuleTypes.php';
|
||||
require_once("include/Webservices/DescribeObject.php");
|
||||
|
||||
global $app_strings;
|
||||
|
||||
global $currentModule;
|
||||
global $theme;
|
||||
|
||||
require_once('Smarty_setup.php');
|
||||
|
||||
// focus_list is the means of passing data to a ListView.
|
||||
global $focus_list;
|
||||
|
||||
if (!isset($where)) $where = "";
|
||||
|
||||
$url_string = '';
|
||||
|
||||
$smarty = new vtigerCRM_Smarty;
|
||||
$smarty->assign("subject",$_REQUEST['subject']);
|
||||
$smarty->assign("description",$_REQUEST['description']);
|
||||
|
||||
Zend_Json::$useBuiltinEncoderDecoder = true;
|
||||
$json = new Zend_Json();
|
||||
|
||||
$elementType = $_REQUEST['module'];
|
||||
|
||||
global $log,$adb;
|
||||
$webserviceObject = VtigerWebserviceObject::fromName($adb,$elementType);
|
||||
$handlerPath = $webserviceObject->getHandlerPath();
|
||||
$handlerClass = $webserviceObject->getHandlerClass();
|
||||
|
||||
require_once $handlerPath;
|
||||
|
||||
$handler = new $handlerClass($webserviceObject,$current_user,$adb,$log);
|
||||
$meta = $handler->getMeta();
|
||||
$meta->retrieveMeta();
|
||||
|
||||
$types = vtws_listtypes($current_user);
|
||||
if(!in_array($elementType,$types['types'])){
|
||||
throw new WebServiceException(WebServiceErrorCode::$ACCESSDENIED,"Permission to perform the operation is denied");
|
||||
}
|
||||
|
||||
$wsFieldDetails = $handler->getField('parent_id');
|
||||
|
||||
$moduleEntityNameDetails = array();
|
||||
$moduleEmailFieldDetails = array();
|
||||
foreach ($wsFieldDetails['type']['refersTo'] as $type) {
|
||||
$referenceModuleHandler = vtws_getModuleHandlerFromName($type, $current_user);
|
||||
$referenceModuleMeta = $referenceModuleHandler->getMeta();
|
||||
$nameFields = explode(',',$referenceModuleMeta->getNameFields());
|
||||
$moduleFields = $referenceModuleMeta->getModuleFields();
|
||||
$accessibleFields = array_keys($moduleFields);
|
||||
$accessibleNameFields = array_intersect($nameFields, $accessibleFields);
|
||||
$moduleEntityNameDetails[$type] = $accessibleNameFields;
|
||||
$moduleEmailFieldDetails[$type] = $referenceModuleMeta->getEmailFields();
|
||||
}
|
||||
|
||||
$smarty->assign("types",$wsFieldDetails['type']['refersTo']);
|
||||
$smarty->assign("entityNameFields",$json->encode($moduleEntityNameDetails));
|
||||
$smarty->assign("emailFields",$json->encode($moduleEmailFieldDetails));
|
||||
$smarty->assign("userEmail",$current_user->column_fields['email1']);
|
||||
|
||||
$smarty->display("modules/Bookmarklet/Bookmarklet.tpl");
|
||||
?>
|
||||
@@ -1,40 +0,0 @@
|
||||
<?php
|
||||
/*+********************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
*********************************************************************************/
|
||||
echo header('Pragma: public');
|
||||
echo header('Expires: 0');
|
||||
echo header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
|
||||
echo header('Cache-Control: private', false);
|
||||
ini_set("include_path","../../");
|
||||
|
||||
require_once 'include/utils/utils.php';
|
||||
|
||||
include_once('../../config.inc.php');
|
||||
global $application_unique_key;
|
||||
if($_REQUEST['app_key'] != $application_unique_key) {
|
||||
exit;
|
||||
}
|
||||
|
||||
global $adb;
|
||||
|
||||
$crmid = $_REQUEST['record'];
|
||||
$mailid = $_REQUEST['mailid'];
|
||||
$adb->pquery("INSERT INTO vtiger_email_access(crmid, mailid, accessdate, accesstime) VALUES(?,?,?,?)", array($crmid, $mailid, date('Y-m-d'), date('H:i:s')));
|
||||
|
||||
$result = $adb->pquery("select count(*) as count from vtiger_email_access where crmid=? and mailid=?",array($crmid, $mailid));
|
||||
$count = $adb->query_result($result,0,'count');
|
||||
|
||||
$result = $adb->pquery("select * from vtiger_email_track where crmid=? and mailid=?", array($crmid, $mailid));
|
||||
if($adb->num_rows($result)>0){
|
||||
$adb->pquery("update vtiger_email_track set access_count=? where crmid=? and mailid=?", array($count, $crmid, $mailid));
|
||||
} else {
|
||||
$adb->pquery("insert into vtiger_email_track(crmid,mailid,access_count) values(?,?,?)", array($crmid, $mailid, 1));
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,11 +0,0 @@
|
||||
<?php
|
||||
/*+*******************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
*********************************************************************************/
|
||||
require_once 'modules/Home/UnifiedSearch.php';
|
||||
?>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,82 +0,0 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
$msgno = $_REQUEST['msgno'];
|
||||
$download = $_REQUEST['download'];
|
||||
$file = $_REQUEST['file'];
|
||||
|
||||
$ServerName = "{localhost/imap:143/notls}INBOX"; // For a IMAP connection (PORT 143)
|
||||
$UserName = "user";
|
||||
$PassWord = "password";
|
||||
$mbox = imap_open($ServerName, $UserName,$PassWord) or die("Could not open Mailbox - try again later!");
|
||||
|
||||
if ($download == "1")
|
||||
{
|
||||
echo "attribute=";
|
||||
print_r($att);
|
||||
$strFileName = $att[$file]->parameters[0]->value;
|
||||
$strFileType = strrev(substr(strrev($strFileName),0,4));
|
||||
$fileContent = imap_fetchbody($mbox,$msgno,$file+2);
|
||||
}
|
||||
|
||||
/** Function to download the File
|
||||
* @param string $strFileType - File Type
|
||||
* @param string $strFileName - File Name
|
||||
* @param string $fileContents- File contents
|
||||
**/
|
||||
function downloadFile($strFileType,$strFileName,$fileContent)
|
||||
{
|
||||
$ContentType = "application/octet-stream";
|
||||
|
||||
if ($strFileType == ".asf")
|
||||
$ContentType = "video/x-ms-asf";
|
||||
if ($strFileType == ".avi")
|
||||
$ContentType = "video/avi";
|
||||
if ($strFileType == ".doc")
|
||||
$ContentType = "application/msword";
|
||||
if ($strFileType == ".zip")
|
||||
$ContentType = "application/zip";
|
||||
if ($strFileType == ".xls")
|
||||
$ContentType = "application/vnd.ms-excel";
|
||||
if ($strFileType == ".gif")
|
||||
$ContentType = "image/gif";
|
||||
if ($strFileType == ".jpg" || $strFileType == "jpeg")
|
||||
$ContentType = "image/jpeg";
|
||||
if ($strFileType == ".wav")
|
||||
$ContentType = "audio/wav";
|
||||
if ($strFileType == ".mp3")
|
||||
$ContentType = "audio/mpeg3";
|
||||
if ($strFileType == ".mpg" || $strFileType == "mpeg")
|
||||
$ContentType = "video/mpeg";
|
||||
if ($strFileType == ".rtf")
|
||||
$ContentType = "application/rtf";
|
||||
if ($strFileType == ".htm" || $strFileType == "html")
|
||||
$ContentType = "text/html";
|
||||
if ($strFileType == ".xml")
|
||||
$ContentType = "text/xml";
|
||||
if ($strFileType == ".xsl")
|
||||
$ContentType = "text/xsl";
|
||||
if ($strFileType == ".css")
|
||||
$ContentType = "text/css";
|
||||
if ($strFileType == ".php")
|
||||
$ContentType = "text/php";
|
||||
if ($strFileType == ".asp")
|
||||
$ContentType = "text/asp";
|
||||
if ($strFileType == ".pdf")
|
||||
$ContentType = "application/pdf";
|
||||
|
||||
header ("Content-Type: $ContentType");
|
||||
header("Cache-Control: private");
|
||||
header("Content-Description: PHP Generated Data");
|
||||
header ("Content-Disposition: attachment; filename=$strFileName");
|
||||
echo imap_base64($fileContent);
|
||||
#echo base64_decode($fileContent);
|
||||
}
|
||||
?>
|
||||
@@ -1,31 +0,0 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Public License Version 1.1.2
|
||||
* ("License"); You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
|
||||
* the specific language governing rights and limitations under the License.
|
||||
* The Original Code is: SugarCRM Open Source
|
||||
* The Initial Developer of the Original Code is SugarCRM, Inc.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
* $Header: /advent/projects/wesat/vtiger_crm/sugarcrm/modules/Emails/index.php,v 1.3 2005/03/17 20:01:10 samk Exp $
|
||||
* Description: TODO: To be written.
|
||||
********************************************************************************/
|
||||
|
||||
global $theme;
|
||||
$theme_path="themes/".$theme."/";
|
||||
$image_path=$theme_path."images/";
|
||||
|
||||
if(isset($_REQUEST['mailconnect']))
|
||||
{
|
||||
echo '<center><font color=red><b>'.$mod_strings['LBL_MAIL_CONNECT_ERROR_INFO'].'</b></color></center><br>';
|
||||
}
|
||||
|
||||
include ('modules/Emails/ListView.php');
|
||||
|
||||
?>
|
||||
@@ -1,183 +0,0 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Public License Version 1.1.2
|
||||
* ("License"); You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
|
||||
* the specific language governing rights and limitations under the License.
|
||||
* The Original Code is: SugarCRM Open Source
|
||||
* The Initial Developer of the Original Code is SugarCRM, Inc.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
* $Header: /advent/projects/wesat/vtiger_crm/sugarcrm/modules/Emails/language/en_us.lang.php,v 1.17 2005/03/28 06:31:38 rank Exp $
|
||||
* Description: Defines the English language pack for the Account module.
|
||||
********************************************************************************/
|
||||
|
||||
$mod_strings = Array(
|
||||
// Mike Crowe Mod --------------------------------------------------------added for general search
|
||||
'LBL_GENERAL_INFORMATION'=>'General Information',
|
||||
|
||||
'LBL_MODULE_NAME'=>'Email',
|
||||
'LBL_MODULE_TITLE'=>'Email: Home',
|
||||
'LBL_SEARCH_FORM_TITLE'=>'Email Search',
|
||||
'LBL_LIST_FORM_TITLE'=>'Email List',
|
||||
'LBL_NEW_FORM_TITLE'=>'Track Email',
|
||||
|
||||
'LBL_LIST_SUBJECT'=>'Subject',
|
||||
'LBL_LIST_CONTACT'=>'Contact',
|
||||
'LBL_LIST_RELATED_TO'=>'Related to',
|
||||
'LBL_LIST_DATE'=>'Date Sent',
|
||||
'LBL_LIST_TIME'=>'Time Sent',
|
||||
|
||||
'ERR_DELETE_RECORD'=>"A record number must be specified to delete the vtiger_account.",
|
||||
'LBL_DATE_SENT'=>'Date Sent:',
|
||||
'LBL_DATE_AND_TIME'=>'Date & Time Sent:',
|
||||
'LBL_DATE'=>'Date Sent:',
|
||||
'LBL_TIME'=>'Time Sent:',
|
||||
'LBL_SUBJECT'=>'Subject:',
|
||||
'LBL_BODY'=>'Body:',
|
||||
'LBL_CONTACT_NAME'=>' Contact Name: ',
|
||||
'LBL_EMAIL'=>'Email:',
|
||||
'LBL_DETAILVIEW_EMAIL'=>'E-Mail',
|
||||
'LBL_COLON'=>':',
|
||||
'LBL_CHK_MAIL'=>'Check Mail',
|
||||
'LBL_COMPOSE'=>'Compose',
|
||||
//Single change for 5.0.3
|
||||
'LBL_SETTINGS'=>'Incoming Mail Server Settings',
|
||||
'LBL_EMAIL_FOLDERS'=>'Email Folders',
|
||||
'LBL_INBOX'=>'Inbox',
|
||||
'LBL_SENT_MAILS'=>'Sent Mails',
|
||||
'LBL_TRASH'=>'Trash',
|
||||
'LBL_JUNK_MAILS'=>'Junk Mails',
|
||||
'LBL_TO_LEADS'=>'To Leads',
|
||||
'LBL_TO_CONTACTS'=>'To Contacts',
|
||||
'LBL_TO_ACCOUNTS'=>'To Accounts',
|
||||
'LBL_MY_MAILS'=>'My Mails',
|
||||
'LBL_QUAL_CONTACT'=>'Qualified Mails (As Contacts)',
|
||||
'LBL_MAILS'=>'Mails',
|
||||
'LBL_QUALIFY_BUTTON'=>'Qualify',
|
||||
'LBL_REPLY_BUTTON'=>'Reply',
|
||||
'LBL_FORWARD_BUTTON'=>'Forward',
|
||||
'LBL_DOWNLOAD_ATTCH_BUTTON'=>'Download Attachments',
|
||||
'LBL_FROM'=>'From :',
|
||||
'LBL_CC'=>'Cc :',
|
||||
'LBL_BCC'=>'Bcc :',
|
||||
|
||||
'NTC_REMOVE_INVITEE'=>'Are you sure you want to remove this recipient from the email?',
|
||||
'LBL_INVITEE'=>'Recipients',
|
||||
|
||||
// Added Fields
|
||||
// Contacts-SubPanelViewContactsAndUsers.php
|
||||
'LBL_BULK_MAILS'=>'Bulk Mails',
|
||||
'LBL_ATTACHMENT'=>'Attachment',
|
||||
'LBL_UPLOAD'=>'Upload',
|
||||
'LBL_FILE_NAME'=>'File Name',
|
||||
'LBL_SEND'=>'Send',
|
||||
|
||||
'LBL_EMAIL_TEMPLATES'=>'Email Templates',
|
||||
'LBL_TEMPLATE_NAME'=>'Template Name',
|
||||
'LBL_DESCRIPTION'=>'Description',
|
||||
'LBL_EMAIL_TEMPLATES_LIST'=>'Email Templates List',
|
||||
'LBL_EMAIL_INFORMATION'=>'Email Information',
|
||||
|
||||
|
||||
|
||||
|
||||
//for v4 release added
|
||||
'LBL_NEW_LEAD'=>'New Lead',
|
||||
'LBL_LEAD_TITLE'=>'Leads',
|
||||
|
||||
'LBL_NEW_PRODUCT'=>'New Product',
|
||||
'LBL_PRODUCT_TITLE'=>'Products',
|
||||
'LBL_NEW_CONTACT'=>'New Contact',
|
||||
'LBL_CONTACT_TITLE'=>'Contacts',
|
||||
'LBL_NEW_ACCOUNT'=>'New Account',
|
||||
'LBL_ACCOUNT_TITLE'=>'Accounts',
|
||||
|
||||
// Added vtiger_fields after vtiger4 - Beta
|
||||
'LBL_USER_TITLE'=>'Users',
|
||||
'LBL_NEW_USER'=>'New User',
|
||||
|
||||
// Added for 4 GA
|
||||
'LBL_TOOL_FORM_TITLE'=>'Email Tools',
|
||||
//Added for 4GA
|
||||
'Date & Time Sent'=>'Date & Time Sent',
|
||||
'Sales Enity Module'=>'Sales Enity Module',
|
||||
'Related To'=>'Related To',
|
||||
'Assigned To'=>'Assigned To',
|
||||
'Subject'=>'Subject',
|
||||
'Attachment'=>'Attachment',
|
||||
'Description'=>'Description',
|
||||
'Time Start'=>'Time Start',
|
||||
'Created Time'=>'Created Time',
|
||||
'Modified Time'=>'Modified Time',
|
||||
|
||||
'MESSAGE_CHECK_MAIL_SERVER_NAME'=>'Please Check the Mail Server Name...',
|
||||
'MESSAGE_CHECK_MAIL_ID'=>'Please Check the Email Id of "Assigned To" User...',
|
||||
'MESSAGE_MAIL_HAS_SENT_TO_USERS'=>'Mail has been sent to the following User(s) :',
|
||||
'MESSAGE_MAIL_HAS_SENT_TO_CONTACTS'=>'Mail has been sent to the following Contact(s) :',
|
||||
'MESSAGE_MAIL_ID_IS_INCORRECT'=>'Mail Id is incorrect. Please Check this Mail Id...',
|
||||
'MESSAGE_ADD_USER_OR_CONTACT'=>'Please Add any User(s) or Contact(s)...',
|
||||
'MESSAGE_MAIL_SENT_SUCCESSFULLY'=>' Mail(s) sent successfully!',
|
||||
|
||||
// Added for web mail post 4.0.1 release
|
||||
'LBL_FETCH_WEBMAIL'=>'Fetch Web Mail',
|
||||
//Added for 4.2 Release -- CustomView
|
||||
'LBL_ALL'=>'All',
|
||||
'MESSAGE_CONTACT_NOT_WANT_MAIL'=>'This Contact does not want to receive mails.',
|
||||
'LBL_WEBMAILS_TITLE'=>'WebMails',
|
||||
'LBL_EMAILS_TITLE'=>'Email',
|
||||
'LBL_MAIL_CONNECT_ERROR_INFO'=>'Error connecting mail server!<br> Check in My Accounts->List Mail Server -> List Mail Account',
|
||||
'LBL_ALLMAILS'=>'All Mails',
|
||||
'LBL_TO_USERS'=>'To Users',
|
||||
'LBL_TO'=>'To:',
|
||||
'LBL_IN_SUBJECT'=>'in Subject',
|
||||
'LBL_IN_SENDER'=>'in Sender',
|
||||
'LBL_IN_SUBJECT_OR_SENDER'=>'in Subject or Sender',
|
||||
'SELECT_EMAIL'=>'Select Email IDs',
|
||||
'Sender'=>'Sender',
|
||||
'LBL_CONFIGURE_MAIL_SETTINGS'=>'Your Incoming Mail Server is not configured',
|
||||
'LBL_MAILSELECT_INFO1'=>'The following Email ID types are associated to the selected',
|
||||
'LBL_MAILSELECT_INFO2'=>'Select the Email ID types to which,the email should be sent',
|
||||
'LBL_MULTIPLE'=>'Multiple',
|
||||
'LBL_COMPOSE_EMAIL'=>'Compose E-Mail',
|
||||
'LBL_VTIGER_EMAIL_CLIENT'=>'vtiger Webmail Client',
|
||||
|
||||
//Added for 5.0.3
|
||||
'TITLE_VTIGERCRM_MAIL'=>'vtigerCRM Mail',
|
||||
'TITLE_COMPOSE_MAIL'=>'Compose Mail',
|
||||
|
||||
'MESSAGE_MAIL_COULD_NOT_BE_SEND'=>'Mail could not be sent to the assigned to user.',
|
||||
'MESSAGE_PLEASE_CHECK_ASSIGNED_USER_EMAILID'=>'Please check the assigned to user email id...',
|
||||
'MESSAGE_PLEASE_CHECK_THE_FROM_MAILID'=>'Please check the from email id',
|
||||
'MESSAGE_MAIL_COULD_NOT_BE_SEND_TO_THIS_EMAILID'=>'Mail could not be sent to this email id',
|
||||
'PLEASE_CHECK_THIS_EMAILID'=>'Please check this mail id...',
|
||||
'LBL_CC_EMAIL_ERROR'=>'Your cc mailid is not proper',
|
||||
'LBL_BCC_EMAIL_ERROR'=>'Your bcc mailid is not proper',
|
||||
'LBL_NO_RCPTS_EMAIL_ERROR'=>'No recepients specified',
|
||||
'LBL_CONF_MAILSERVER_ERROR'=>'Please configure your outgoing mailserver under Settings ---> Outgoing Server link',
|
||||
'LBL_VTIGER_EMAIL_CLIENT'=>'vtiger Webmail Client',
|
||||
'LBL_MAILSELECT_INFO3'=>'You don\'t have permission to view email id(s) of the selected Record(s).',
|
||||
//Added for script alerts
|
||||
'FEATURE_AVAILABLE_INFO' => 'This feature is currently only available for Microsoft Internet Explorer 5.5+ users\n\nWait f
|
||||
or an update!',
|
||||
'DOWNLOAD_CONFIRAMATION' => 'Do you want to download the file ?',
|
||||
'LBL_PLEASE_ATTACH' => 'Please give a valid file to attach and try again!',
|
||||
'LBL_KINDLY_UPLOAD' => 'Please configure <font color="red">upload_tmp_dir</font> variable in php.ini file.',
|
||||
'LBL_EXCEED_MAX' => 'Sorry, the uploaded file exceeds the maximum filesize limit. Please try a file smaller than ',
|
||||
'LBL_BYTES' => ' bytes',
|
||||
'LBL_CHECK_USER_MAILID' => 'Please check the current user mailid.It should be a valid mailid to send Emails',
|
||||
|
||||
// Added/Updated for vtiger CRM 5.0.4
|
||||
'Activity Type'=>'Activity Type',
|
||||
'LBL_MAILSELECT_INFO'=>'has the following Email IDs associated.Please Select the Email IDs to which,the mail should be sent',
|
||||
'LBL_NO_RECORDS' => 'No Records Found',
|
||||
'LBL_PRINT_EMAIL'=> 'Print',
|
||||
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -1,31 +0,0 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
********************************************************************************/
|
||||
|
||||
/**
|
||||
* PHPMailer language file.
|
||||
* English Version
|
||||
*/
|
||||
$PHPMAILER_LANG = array();
|
||||
$PHPMAILER_LANG["provide_address"] = 'You must provide at least one ' .
|
||||
'recipient email address.';
|
||||
$PHPMAILER_LANG["mailer_not_supported"] = ' mailer is not supported.';
|
||||
$PHPMAILER_LANG["execute"] = 'Could not execute: ';
|
||||
$PHPMAILER_LANG["instantiate"] = 'Could not instantiate mail function.';
|
||||
$PHPMAILER_LANG["authenticate"] = 'SMTP Error: Could not authenticate.';
|
||||
$PHPMAILER_LANG["from_failed"] = 'The following From address failed: ';
|
||||
$PHPMAILER_LANG["recipients_failed"] = 'SMTP Error: The following ' .
|
||||
'recipients failed: ';
|
||||
$PHPMAILER_LANG["data_not_accepted"] = 'SMTP Error: Data not accepted.';
|
||||
$PHPMAILER_LANG["connect_host"] = 'SMTP Error: Could not connect to SMTP host1111111111=======>.';
|
||||
$PHPMAILER_LANG["file_access"] = 'Could not access file: ';
|
||||
$PHPMAILER_LANG["file_open"] = 'File Error: Could not open file: ';
|
||||
$PHPMAILER_LANG["encoding"] = 'Unknown encoding: ';
|
||||
?>
|
||||
@@ -1,31 +0,0 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
********************************************************************************/
|
||||
|
||||
/**
|
||||
* PHPMailer language file.
|
||||
* English Version
|
||||
*/
|
||||
$PHPMAILER_LANG = array();
|
||||
$PHPMAILER_LANG["provide_address"] = 'You must provide at least one ' .
|
||||
'recipient email address.';
|
||||
$PHPMAILER_LANG["mailer_not_supported"] = ' mailer is not supported.';
|
||||
$PHPMAILER_LANG["execute"] = 'Could not execute: ';
|
||||
$PHPMAILER_LANG["instantiate"] = 'Could not instantiate mail function.';
|
||||
$PHPMAILER_LANG["authenticate"] = 'SMTP Error: Could not authenticate.';
|
||||
$PHPMAILER_LANG["from_failed"] = 'The following From address failed: ';
|
||||
$PHPMAILER_LANG["recipients_failed"] = 'SMTP Error: The following ' .
|
||||
'recipients failed: ';
|
||||
$PHPMAILER_LANG["data_not_accepted"] = 'SMTP Error: Data not accepted.';
|
||||
$PHPMAILER_LANG["connect_host"] = 'SMTP Error: Could not connect to SMTP host1111111111=======>.';
|
||||
$PHPMAILER_LANG["file_access"] = 'Could not access file: ';
|
||||
$PHPMAILER_LANG["file_open"] = 'File Error: Could not open file: ';
|
||||
$PHPMAILER_LANG["encoding"] = 'Unknown encoding: ';
|
||||
?>
|
||||
@@ -1,184 +0,0 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Public License Version 1.1.2
|
||||
* ("License"); You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
|
||||
* the specific language governing rights and limitations under the License.
|
||||
* The Original Code is: SugarCRM Open Source
|
||||
* The Initial Developer of the Original Code is SugarCRM, Inc.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
* $Header: /advent/projects/wesat/vtiger_crm/sugarcrm/modules/Emails/language/en_us.lang.php,v 1.17 2005/03/28 06:31:38 rank Exp $
|
||||
* Description: Defines the English language pack for the Account module.
|
||||
********************************************************************************/
|
||||
|
||||
$mod_strings = Array(
|
||||
// Mike Crowe Mod --------------------------------------------------------added for general search
|
||||
'LBL_GENERAL_INFORMATION' => '一般信息',
|
||||
|
||||
'LBL_MODULE_NAME' => '邮件',
|
||||
'LBL_MODULE_TITLE' => '邮件: 首页',
|
||||
'LBL_SEARCH_FORM_TITLE' => '搜寻邮件',
|
||||
'LBL_LIST_FORM_TITLE' => '邮件列表',
|
||||
'LBL_NEW_FORM_TITLE' => '追踪邮件',
|
||||
|
||||
'LBL_LIST_SUBJECT' => '标题',
|
||||
'LBL_LIST_CONTACT' => '联系人',
|
||||
'LBL_LIST_RELATED_TO' => '相关人事',
|
||||
'LBL_LIST_DATE' => '寄出日期',
|
||||
'LBL_LIST_TIME' => '寄出时间',
|
||||
|
||||
'ERR_DELETE_RECORD' => '必须有记录编号才能删除该笔账号.',
|
||||
'LBL_DATE_SENT' => '寄出日期:',
|
||||
'LBL_DATE_AND_TIME' => '寄出日期 & 时间:',
|
||||
'LBL_DATE' => '寄出日期:',
|
||||
'LBL_TIME' => '寄出时间:',
|
||||
'LBL_SUBJECT' => '标题:',
|
||||
'LBL_BODY' => '邮件内容:',
|
||||
'LBL_CONTACT_NAME' => '联系人名称: ',
|
||||
'LBL_EMAIL' => '邮件:',
|
||||
'LBL_DETAILVIEW_EMAIL'=>'邮件',
|
||||
'LBL_COLON'=>':',
|
||||
'LBL_CHK_MAIL'=>'检查邮件',
|
||||
'LBL_COMPOSE'=>'新邮件',
|
||||
//Single change for 5.0.3
|
||||
'LBL_SETTINGS'=>'邮件服务器设置',
|
||||
'LBL_EMAIL_FOLDERS'=>'邮件数据夹',
|
||||
'LBL_INBOX' => '收件夹',
|
||||
'LBL_SENT_MAILS'=>'邮件备份',
|
||||
'LBL_TRASH' => '垃圾桶',
|
||||
'LBL_JUNK_MAILS' => '广告邮件',
|
||||
'LBL_TO_LEADS' => '转为准客户',
|
||||
'LBL_TO_CONTACTS' => '转为联系人',
|
||||
'LBL_TO_ACCOUNTS' => '转为客户',
|
||||
'LBL_MY_MAILS' => '我的邮件',
|
||||
'LBL_QUAL_CONTACT' => '已转换邮件(转为联系人)',
|
||||
'LBL_MAILS' => '邮件',
|
||||
'LBL_QUALIFY_BUTTON' => '转换',
|
||||
'LBL_REPLY_BUTTON' => '回应',
|
||||
'LBL_FORWARD_BUTTON' => '转寄',
|
||||
'LBL_DOWNLOAD_ATTCH_BUTTON' => '下载附加档案',
|
||||
'LBL_FROM' => '寄件人:',
|
||||
'LBL_CC' => '副本:',
|
||||
'LBL_BCC' => '密件副本:',
|
||||
|
||||
'NTC_REMOVE_INVITEE' => '您确定要移除这封来信?',
|
||||
'LBL_INVITEE'=>'接收者',
|
||||
|
||||
// Added Fields
|
||||
// Contacts-SubPanelViewContactsAndUsers.php
|
||||
'LBL_BULK_MAILS' => '大量寄信',
|
||||
'LBL_ATTACHMENT' => '附件',
|
||||
'LBL_UPLOAD' => '上传',
|
||||
'LBL_FILE_NAME' => '文件名称',
|
||||
'LBL_SEND' => '寄出',
|
||||
|
||||
'LBL_EMAIL_TEMPLATES' => '邮件样版',
|
||||
'LBL_TEMPLATE_NAME' => '样版名称',
|
||||
'LBL_DESCRIPTION' => '描述',
|
||||
'LBL_EMAIL_TEMPLATES_LIST' => '邮件样版列表',
|
||||
'LBL_EMAIL_INFORMATION' => '邮件信息',
|
||||
|
||||
|
||||
|
||||
|
||||
//for v4 release added
|
||||
'LBL_NEW_LEAD' => '新增潜在客户',
|
||||
'LBL_LEAD_TITLE' => '潜在客户',
|
||||
|
||||
'LBL_NEW_PRODUCT' => '新增商品',
|
||||
'LBL_PRODUCT_TITLE' => '商品',
|
||||
'LBL_NEW_CONTACT' => '新增联系人',
|
||||
'LBL_CONTACT_TITLE' => '联系人',
|
||||
'LBL_NEW_ACCOUNT' => '新增公司',
|
||||
'LBL_ACCOUNT_TITLE' => '公司',
|
||||
|
||||
// Added vtiger_fields after vtiger4 - Beta
|
||||
'LBL_USER_TITLE' => '使用者',
|
||||
'LBL_NEW_USER' => '新增使用者',
|
||||
|
||||
// Added for 4 GA
|
||||
'LBL_TOOL_FORM_TITLE' => '邮件编辑器',
|
||||
//Added for 4GA
|
||||
'Date & Time Sent' => '寄出日期 & 时间',
|
||||
'Sales Enity Module' => '客服模块',
|
||||
|
||||
'Related To' => '相关人事',
|
||||
'Assigned To' => '负责人',
|
||||
'Subject' => '标题',
|
||||
'Attachment' => '附件',
|
||||
'Description' => '描述',
|
||||
'Time Start' => '开始时间',
|
||||
'Created Time' => '建立时间',
|
||||
'Modified Time' => '修改时间',
|
||||
|
||||
'MESSAGE_CHECK_MAIL_SERVER_NAME' => '请检查电子邮件服务器名称...',
|
||||
'MESSAGE_CHECK_MAIL_ID' => '请检查负责人的信箱编号...',
|
||||
'MESSAGE_MAIL_HAS_SENT_TO_USERS' => '邮件将会寄出给指定的使用者:',
|
||||
'MESSAGE_MAIL_HAS_SENT_TO_CONTACTS' => '邮件将会寄出给指定的联系人:',
|
||||
'MESSAGE_MAIL_ID_IS_INCORRECT' => '邮件格式不正确. 请检查这封邮件的Id...',
|
||||
'MESSAGE_ADD_USER_OR_CONTACT' => '请新增其它位使用者或联系人...',
|
||||
'MESSAGE_MAIL_SENT_SUCCESSFULLY' => ' 邮件已顺利寄出!',
|
||||
|
||||
// Added for web mail post 4.0.1 release
|
||||
'LBL_FETCH_WEBMAIL' => '取得网页邮件',
|
||||
//Added for 4.2 Release -- CustomView
|
||||
'LBL_ALL' => '全部',
|
||||
'MESSAGE_CONTACT_NOT_WANT_MAIL' => '这个联系人不想要收到电子邮件',
|
||||
'LBL_WEBMAILS_TITLE' => '网页邮件',
|
||||
'LBL_EMAILS_TITLE' => '电子邮件',
|
||||
'LBL_MAIL_CONNECT_ERROR_INFO' => '联机到邮件服务器时发生错误,检查我的账号=>邮件服务器列表=>邮件账号',
|
||||
'LBL_ALLMAILS' => '所有邮件',
|
||||
'LBL_TO_USERS' => '给使用者',
|
||||
'LBL_TO' => '收件人:',
|
||||
'LBL_IN_SUBJECT' => '主旨',
|
||||
'LBL_IN_SENDER' => '寄件人',
|
||||
'LBL_IN_SUBJECT_OR_SENDER' => '主旨或寄件人',
|
||||
'SELECT_EMAIL' => '选择邮件编号',
|
||||
'Sender' => '寄件人',
|
||||
'LBL_CONFIGURE_MAIL_SETTINGS' => '您的收件邮件服务器还没设定',
|
||||
'LBL_MAILSELECT_INFO' => '有下面相关邮件编号,请选择要寄送的邮件编号',
|
||||
'LBL_MAILSELECT_INFO1' => '下面的邮件编号与选择的项目有关',
|
||||
'LBL_MAILSELECT_INFO2' => '选择要寄送的邮件编号类型',
|
||||
'LBL_MULTIPLE' => '多选',
|
||||
'LBL_COMPOSE_EMAIL' => '发送邮件',
|
||||
'LBL_VTIGER_EMAIL_CLIENT'=>'vtiger Webmail 客户',
|
||||
|
||||
//Added for 5.0.3
|
||||
'TITLE_VTIGERCRM_MAIL'=>'vtigerCRM 邮件',
|
||||
'TITLE_COMPOSE_MAIL'=>'组成邮件',
|
||||
|
||||
'MESSAGE_MAIL_COULD_NOT_BE_SEND'=>'邮件不能寄发到被分配的用户.',
|
||||
'MESSAGE_PLEASE_CHECK_ASSIGNED_USER_EMAILID'=>'请检查被分配的用户电子邮件id...',
|
||||
'MESSAGE_PLEASE_CHECK_THE_FROM_MAILID'=>'请检查电子邮件id',
|
||||
'MESSAGE_MAIL_COULD_NOT_BE_SEND_TO_THIS_EMAILID'=>'邮件不能寄发到这电子邮件id',
|
||||
'PLEASE_CHECK_THIS_EMAILID'=>'请检查这邮件id...',
|
||||
'LBL_CC_EMAIL_ERROR'=>'您的CC邮件ID不是适当的',
|
||||
'LBL_BCC_EMAIL_ERROR'=>'您的BCC邮件ID不是适当的',
|
||||
'LBL_NO_RCPTS_EMAIL_ERROR'=>'没有指定移植对象',
|
||||
'LBL_CONF_MAILSERVER_ERROR'=>'请设置您外部的邮件服务器 ---> 外出的服务器链接',
|
||||
'LBL_VTIGER_EMAIL_CLIENT'=>'vtiger Webmail 客户',
|
||||
'LBL_MAILSELECT_INFO3'=>'您不能查看选择记录的邮件ID.',
|
||||
'LBL_NO_RECORDS' => '这个文件夹没有记录',
|
||||
//Added for script alerts
|
||||
'FEATURE_AVAILABLE_INFO' => '这个特点只支持Microsoft Internet Explorer 5.5+或更高!',
|
||||
'DOWNLOAD_CONFIRAMATION' => '您想要下载文件 ?',
|
||||
'LBL_PLEASE_ATTACH' => '请再尝试附上一个合法的文件',
|
||||
'LBL_KINDLY_UPLOAD' => '请配置 <font color="red">upload_tmp_dir</font> variable in php.ini file.',
|
||||
'LBL_EXCEED_MAX' => '抱歉, 上传的文件超出最大值极限。请尝试一个小文件 ',
|
||||
'LBL_BYTES' => ' 字节',
|
||||
'LBL_CHECK_USER_MAILID' => '请检查当前用户的电邮ID是否正确',
|
||||
|
||||
// Added/Updated for vtiger CRM 5.0.4
|
||||
'Activity Type'=>'任务类型',
|
||||
'LBL_MAILSELECT_INFO'=>'has the following Email IDs associated.Please Select the Email IDs to which,the mail should be sent',
|
||||
'LBL_NO_RECORDS' => 'No Records Found',
|
||||
'LBL_PRINT_EMAIL'=> 'Print',
|
||||
);
|
||||
|
||||
?>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,109 +0,0 @@
|
||||
<?php
|
||||
/*+********************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
require_once('Smarty_setup.php');
|
||||
require_once('include/database/PearDatabase.php');
|
||||
|
||||
|
||||
global $app_strings,$mod_strings,$current_user,$theme,$adb;
|
||||
$image_path = 'themes/'.$theme.'/images/';
|
||||
$idlist = vtlib_purify($_REQUEST['idlist']);
|
||||
$pmodule=vtlib_purify($_REQUEST['return_module']);
|
||||
$ids=explode(';',$idlist);
|
||||
$single_record = false;
|
||||
if(!strpos($idlist,':'))
|
||||
{
|
||||
$single_record = true;
|
||||
}
|
||||
$smarty = new vtigerCRM_Smarty;
|
||||
|
||||
$userid = $current_user->id;
|
||||
|
||||
$querystr = "select fieldid, fieldname, fieldlabel, columnname from vtiger_field where tabid=? and uitype=13 and vtiger_field.presence in (0,2)";
|
||||
$res=$adb->pquery($querystr, array(getTabid($pmodule)));
|
||||
$numrows = $adb->num_rows($res);
|
||||
$returnvalue = Array();
|
||||
for($i = 0; $i < $numrows; $i++)
|
||||
{
|
||||
$value = Array();
|
||||
$fieldname = $adb->query_result($res,$i,"fieldname");
|
||||
$permit = getFieldVisibilityPermission($pmodule, $userid, $fieldname);
|
||||
if($permit == '0')
|
||||
{
|
||||
$temp=$adb->query_result($res,$i,'columnname');
|
||||
$columnlists [] = $temp;
|
||||
$fieldid=$adb->query_result($res,$i,'fieldid');
|
||||
$fieldlabel =$adb->query_result($res,$i,'fieldlabel');
|
||||
$value[] = getTranslatedString($fieldlabel);
|
||||
$returnvalue [$fieldid]= $value;
|
||||
}
|
||||
}
|
||||
|
||||
if($single_record && count($columnlists) > 0)
|
||||
{
|
||||
$count = 0;
|
||||
$val_cnt = 0;
|
||||
switch($pmodule)
|
||||
{
|
||||
case 'Accounts':
|
||||
$query = 'select accountname,'.implode(",",$columnlists).' from vtiger_account left join vtiger_accountscf on vtiger_accountscf.accountid = vtiger_account.accountid where vtiger_account.accountid = ?';
|
||||
$result=$adb->pquery($query, array($idlist));
|
||||
foreach($columnlists as $columnname)
|
||||
{
|
||||
$acc_eval = $adb->query_result($result,0,$columnname);
|
||||
$field_value[$count++] = $acc_eval;
|
||||
if($acc_eval != "") $val_cnt++;
|
||||
|
||||
}
|
||||
$entity_name = $adb->query_result($result,0,'accountname');
|
||||
break;
|
||||
case 'Leads':
|
||||
$query = 'select concat(firstname," ",lastname) as leadname,'.implode(",",$columnlists).' from vtiger_leaddetails left join vtiger_leadscf on vtiger_leadscf.leadid = vtiger_leaddetails.leadid where vtiger_leaddetails.leadid = ?';
|
||||
$result=$adb->pquery($query, array($idlist));
|
||||
foreach($columnlists as $columnname)
|
||||
{
|
||||
$lead_eval = $adb->query_result($result,0,$columnname);
|
||||
$field_value[$count++] = $lead_eval;
|
||||
if($lead_eval != "") $val_cnt++;
|
||||
}
|
||||
$entity_name = $adb->query_result($result,0,'leadname');
|
||||
break;
|
||||
case 'Contacts':
|
||||
$query = 'select concat(firstname," ",lastname) as contactname,'.implode(",",$columnlists).' from vtiger_contactdetails left join vtiger_contactscf on vtiger_contactscf.contactid = vtiger_contactdetails.contactid where vtiger_contactdetails.contactid = ?';
|
||||
$result=$adb->pquery($query, array($idlist));
|
||||
foreach($columnlists as $columnname)
|
||||
{
|
||||
$con_eval = $adb->query_result($result,0,$columnname);
|
||||
$field_value[$count++] = $con_eval;
|
||||
if($con_eval != "") $val_cnt++;
|
||||
}
|
||||
$entity_name = $adb->query_result($result,0,'contactname');
|
||||
break;
|
||||
}
|
||||
}
|
||||
$smarty->assign('PERMIT',$permit);
|
||||
$smarty->assign('ENTITY_NAME',$entity_name);
|
||||
$smarty->assign('ONE_RECORD',$single_record);
|
||||
$smarty->assign('MAILDATA',$field_value);
|
||||
$smarty->assign('MAILINFO',$returnvalue);
|
||||
$smarty->assign("MOD", $mod_strings);
|
||||
$smarty->assign("IDLIST", $idlist);
|
||||
$smarty->assign("APP", $app_strings);
|
||||
$smarty->assign("FROM_MODULE", $pmodule);
|
||||
$smarty->assign("THEME", $theme);
|
||||
$smarty->assign("IMAGE_PATH",$image_path);
|
||||
if($single_record && count($columnlists) > 0 && $val_cnt > 0)
|
||||
$smarty->display("SelectEmail.tpl");
|
||||
else if(!$single_record && count($columnlists) > 0)
|
||||
$smarty->display("SelectEmail.tpl");
|
||||
else if($single_record && $val_cnt == 0)
|
||||
echo "No Mail Ids";
|
||||
else
|
||||
echo "Mail Ids not permitted";
|
||||
?>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user