Add php files
This commit is contained in:
110
modules/Emails/Check.php
Executable file
110
modules/Emails/Check.php
Executable file
@@ -0,0 +1,110 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
global $current_user;
|
||||
|
||||
if(isset($_REQUEST['type']) && $_REQUEST['type'] == 'personal') {
|
||||
if($current_user->hasPersonalEmail()) {
|
||||
|
||||
$ie = new InboundEmail();
|
||||
$beans = $ie->retrieveByGroupId($current_user->id);
|
||||
if(!empty($beans)) {
|
||||
foreach($beans as $bean) {
|
||||
$bean->connectMailserver();
|
||||
$newMsgs = array();
|
||||
if ($bean->isPop3Protocol()) {
|
||||
$newMsgs = $bean->getPop3NewMessagesToDownload();
|
||||
} else {
|
||||
$newMsgs = $bean->getNewMessageIds();
|
||||
}
|
||||
//$newMsgs = $bean->getNewMessageIds();
|
||||
if(is_array($newMsgs)) {
|
||||
foreach($newMsgs as $k => $msgNo) {
|
||||
$uid = $msgNo;
|
||||
if ($bean->isPop3Protocol()) {
|
||||
$uid = $bean->getUIDLForMessage($msgNo);
|
||||
} else {
|
||||
$uid = imap_uid($bean->conn, $msgNo);
|
||||
} // else
|
||||
$bean->importOneEmail($msgNo, $uid);
|
||||
}
|
||||
}
|
||||
imap_expunge($bean->conn);
|
||||
imap_close($bean->conn);
|
||||
}
|
||||
}
|
||||
}
|
||||
header('Location: index.php?module=Emails&action=ListView&type=inbound&assigned_user_id='.$current_user->id);
|
||||
} elseif(isset($_REQUEST['type']) && $_REQUEST['type'] == 'group') {
|
||||
$ie = new InboundEmail();
|
||||
// this query only polls Group Inboxes
|
||||
$r = $ie->db->query('SELECT inbound_email.id FROM inbound_email JOIN users ON inbound_email.group_id = users.id WHERE inbound_email.deleted=0 AND inbound_email.status = \'Active\' AND mailbox_type != \'bounce\' AND users.deleted = 0 AND users.is_group = 1');
|
||||
|
||||
while($a = $ie->db->fetchByAssoc($r)) {
|
||||
$ieX = new InboundEmail();
|
||||
$ieX->retrieve($a['id']);
|
||||
$ieX->connectMailserver();
|
||||
//$newMsgs = $ieX->getNewMessageIds();
|
||||
$newMsgs = array();
|
||||
if ($ieX->isPop3Protocol()) {
|
||||
$newMsgs = $ieX->getPop3NewMessagesToDownload();
|
||||
} else {
|
||||
$newMsgs = $ieX->getNewMessageIds();
|
||||
}
|
||||
|
||||
if(is_array($newMsgs)) {
|
||||
foreach($newMsgs as $k => $msgNo) {
|
||||
$uid = $msgNo;
|
||||
if ($ieX->isPop3Protocol()) {
|
||||
$uid = $ieX->getUIDLForMessage($msgNo);
|
||||
} else {
|
||||
$uid = imap_uid($ieX->conn, $msgNo);
|
||||
} // else
|
||||
$ieX->importOneEmail($msgNo, $uid);
|
||||
}
|
||||
}
|
||||
imap_expunge($ieX->conn);
|
||||
imap_close($ieX->conn);
|
||||
}
|
||||
|
||||
header('Location: index.php?module=Emails&action=ListViewGroup');
|
||||
} else { // fail gracefully
|
||||
header('Location: index.php?module=Emails&action=index');
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
261
modules/Emails/Compose.php
Executable file
261
modules/Emails/Compose.php
Executable file
@@ -0,0 +1,261 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
//Shorten name.
|
||||
$data = $_REQUEST;
|
||||
|
||||
//For the full compose/email screen, the compose package is generated and script execution
|
||||
//continues to the Emails/index.php page.
|
||||
|
||||
if(!isset($data['forQuickCreate']))
|
||||
$ret = generateComposeDataPackage($data);
|
||||
|
||||
/**
|
||||
* Initialize the full compose window by creating the compose package
|
||||
* and then including Emails index.php file.
|
||||
*
|
||||
* @param Array $ret
|
||||
*/
|
||||
function initFullCompose($ret)
|
||||
{
|
||||
global $current_user;
|
||||
$json = getJSONobj();
|
||||
$composeOut = $json->encode($ret);
|
||||
|
||||
//For listview 'Email' call initiated by subpanels, just returned the composePackage data, do not
|
||||
//include the entire Emails page
|
||||
if ( isset($_REQUEST['ajaxCall']) && $_REQUEST['ajaxCall'])
|
||||
{
|
||||
echo $composeOut;
|
||||
}
|
||||
else
|
||||
{
|
||||
//For normal full compose screen
|
||||
include('modules/Emails/index.php');
|
||||
echo "<script type='text/javascript' language='javascript'>\ncomposePackage = {$composeOut};\n</script>";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate the compose data package consumed by the full and quick compose screens.
|
||||
*
|
||||
* @param Array $data
|
||||
* @param Bool $forFullCompose If full compose is set to TRUE, then continue execution and include the full Emails UI. Otherwise
|
||||
* the data generated is returned.
|
||||
*/
|
||||
function generateComposeDataPackage($data,$forFullCompose = TRUE)
|
||||
{
|
||||
// we will need the following:
|
||||
if( isset($data['parent_type']) && !empty($data['parent_type']) &&
|
||||
isset($data['parent_id']) && !empty($data['parent_id']) &&
|
||||
!isset($data['ListView']) && !isset($data['replyForward'])) {
|
||||
global $beanList;
|
||||
global $beanFiles;
|
||||
global $mod_strings;
|
||||
|
||||
$parentName = '';
|
||||
$class = $beanList[$data['parent_type']];
|
||||
require_once($beanFiles[$class]);
|
||||
|
||||
$bean = new $class();
|
||||
$bean->retrieve($data['parent_id']);
|
||||
if (isset($bean->full_name)) {
|
||||
$parentName = $bean->full_name;
|
||||
} elseif(isset($bean->name)) {
|
||||
$parentName = $bean->name;
|
||||
}else{
|
||||
$parentName = '';
|
||||
}
|
||||
$parentName = from_html($parentName);
|
||||
$namePlusEmail = '';
|
||||
if (isset($data['to_email_addrs'])) {
|
||||
$namePlusEmail = $data['to_email_addrs'];
|
||||
$namePlusEmail = from_html(str_replace(" ", " ", $namePlusEmail));
|
||||
} else {
|
||||
if (isset($bean->full_name)) {
|
||||
$namePlusEmail = from_html($bean->full_name) . " <". from_html($bean->emailAddress->getPrimaryAddress($bean)).">";
|
||||
} else if(isset($bean->emailAddress)){
|
||||
$namePlusEmail = "<".from_html($bean->emailAddress->getPrimaryAddress($bean)).">";
|
||||
}
|
||||
}
|
||||
|
||||
$subject = "";
|
||||
$body = "";
|
||||
$email_id = "";
|
||||
$attachments = array();
|
||||
if ($bean->module_dir == 'Cases') {
|
||||
$subject = str_replace('%1', $bean->case_number, $bean->getEmailSubjectMacro() . " ". $bean->name) ;
|
||||
$bean->load_relationship("contacts");
|
||||
$contact_ids = $bean->contacts->get();
|
||||
$contact = new Contact();
|
||||
foreach($contact_ids as $cid)
|
||||
{
|
||||
$contact->retrieve($cid);
|
||||
$namePlusEmail .= empty($namePlusEmail) ? "" : ", ";
|
||||
$namePlusEmail .= from_html($contact->full_name) . " <".from_html($contact->emailAddress->getPrimaryAddress($contact)).">";
|
||||
}
|
||||
}
|
||||
if ($bean->module_dir == 'KBDocuments') {
|
||||
|
||||
require_once("modules/Emails/EmailUI.php");
|
||||
$subject = $bean->kbdocument_name;
|
||||
$article_body = str_replace('/'.$GLOBALS['sugar_config']['cache_dir'].'images/',$GLOBALS['sugar_config']['site_url'].'/'.$GLOBALS['sugar_config']['cache_dir'].'images/',KBDocument::get_kbdoc_body_without_incrementing_count($bean->id));
|
||||
$body = from_html($article_body);
|
||||
$attachments = KBDocument::get_kbdoc_attachments_for_newemail($bean->id);
|
||||
$attachments = $attachments['attachments'];
|
||||
} // if
|
||||
if ($bean->module_dir == 'Quotes' && isset($data['recordId'])) {
|
||||
$quotesData = getQuotesRelatedData($bean,$data);
|
||||
global $current_language;
|
||||
$namePlusEmail = $quotesData['toAddress'];
|
||||
$subject = $quotesData['subject'];
|
||||
$body = $quotesData['body'];
|
||||
$attachments = $quotesData['attachments'];
|
||||
$email_id = $quotesData['email_id'];
|
||||
} // if
|
||||
$ret = array(
|
||||
'to_email_addrs' => $namePlusEmail,
|
||||
'parent_type' => $data['parent_type'],
|
||||
'parent_id' => $data['parent_id'],
|
||||
'parent_name' => $parentName,
|
||||
'subject' => $subject,
|
||||
'body' => $body,
|
||||
'attachments' => $attachments,
|
||||
'email_id' => $email_id,
|
||||
|
||||
);
|
||||
} else if(isset($_REQUEST['ListView'])) {
|
||||
|
||||
$email = new Email();
|
||||
$namePlusEmail = $email->getNamePlusEmailAddressesForCompose($_REQUEST['action_module'], (explode(",", $_REQUEST['uid'])));
|
||||
$ret = array(
|
||||
'to_email_addrs' => $namePlusEmail,
|
||||
);
|
||||
} else if (isset($data['replyForward'])) {
|
||||
|
||||
require_once("modules/Emails/EmailUI.php");
|
||||
|
||||
$ret = array();
|
||||
$ie = new InboundEmail();
|
||||
$ie->email = new Email();
|
||||
$ie->email->email2init();
|
||||
$replyType = $data['reply'];
|
||||
$email_id = $data['record'];
|
||||
$ie->email->retrieve($email_id);
|
||||
$emailType = "";
|
||||
if ($ie->email->type == 'draft') {
|
||||
$emailType = $ie->email->type;
|
||||
}
|
||||
$ie->email->from_addr = $ie->email->from_addr_name;
|
||||
$ie->email->to_addrs = to_html($ie->email->to_addrs_names);
|
||||
$ie->email->cc_addrs = to_html($ie->email->cc_addrs_names);
|
||||
$ie->email->bcc_addrs = $ie->email->bcc_addrs_names;
|
||||
$ie->email->from_name = $ie->email->from_addr;
|
||||
$preBodyHTML = " <div><hr></div>";
|
||||
if ($ie->email->type != 'draft') {
|
||||
$email = $ie->email->et->handleReplyType($ie->email, $replyType);
|
||||
} else {
|
||||
$email = $ie->email;
|
||||
$preBodyHTML = "";
|
||||
} // else
|
||||
if ($ie->email->type != 'draft') {
|
||||
$emailHeader = $email->description;
|
||||
}
|
||||
$ret = $ie->email->et->displayComposeEmail($email);
|
||||
if ($ie->email->type != 'draft') {
|
||||
$ret['description'] = $emailHeader;
|
||||
}
|
||||
if ($replyType == 'forward' || $emailType == 'draft') {
|
||||
$ret = $ie->email->et->getDraftAttachments($ret);
|
||||
}
|
||||
$return = $ie->email->et->getFromAllAccountsArray($ie, $ret);
|
||||
|
||||
if ($replyType == "forward") {
|
||||
$return['to'] = '';
|
||||
} else {
|
||||
if ($email->type != 'draft') {
|
||||
$return['to'] = from_html($ie->email->from_addr);
|
||||
}
|
||||
} // else
|
||||
$ret = array(
|
||||
'to_email_addrs' => $return['to'],
|
||||
'parent_type' => $return['parent_type'],
|
||||
'parent_id' => $return['parent_id'],
|
||||
'parent_name' => $return['parent_name'],
|
||||
'subject' => $return['name'],
|
||||
'body' => $preBodyHTML . $return['description'],
|
||||
'attachments' => (isset($return['attachments']) ? $return['attachments'] : array()),
|
||||
'email_id' => $email_id,
|
||||
'fromAccounts' => $return['fromAccounts'],
|
||||
);
|
||||
|
||||
} else {
|
||||
$ret = array(
|
||||
'to_email_addrs' => '',
|
||||
);
|
||||
}
|
||||
|
||||
if($forFullCompose)
|
||||
initFullCompose($ret);
|
||||
else
|
||||
return $ret;
|
||||
}
|
||||
|
||||
function getQuotesRelatedData($bean,$data) {
|
||||
$return = array();
|
||||
$emailId = $data['recordId'];
|
||||
|
||||
require_once("modules/Emails/EmailUI.php");
|
||||
$email = new Email();
|
||||
$email->retrieve($emailId);
|
||||
$return['subject'] = $email->name;
|
||||
$return['body'] = from_html($email->description_html);
|
||||
$return['toAddress'] = $email->to_addrs;
|
||||
$ret = array();
|
||||
$ret['uid'] = $emailId;
|
||||
$ret = EmailUI::getDraftAttachments($ret);
|
||||
$return['attachments'] = $ret['attachments'];
|
||||
$return['email_id'] = $emailId;
|
||||
return $return;
|
||||
} // fn
|
||||
82
modules/Emails/Dashlets/MyEmailsDashlet/MyEmailsDashlet.data.php
Executable file
82
modules/Emails/Dashlets/MyEmailsDashlet/MyEmailsDashlet.data.php
Executable file
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
global $current_user, $app_strings;
|
||||
|
||||
$dashletData['MyEmailsDashlet']['searchFields'] = array(
|
||||
'date_sent' => array('default' => ''),
|
||||
'name' => array('default' => ''),
|
||||
//'from_addr_name' => array('default' => ''),
|
||||
'assigned_user_id' => array('default' => ''),
|
||||
);
|
||||
$dashletData['MyEmailsDashlet']['columns'] = array(
|
||||
'from_addr' => array('width' => '15',
|
||||
'label' => 'LBL_FROM',
|
||||
'default' => true),
|
||||
'name' => array('width' => '40',
|
||||
'label' => 'LBL_SUBJECT',
|
||||
'link' => true,
|
||||
'default' => true),
|
||||
'to_addrs' => array('width' => '15',
|
||||
'label' => 'LBL_TO_ADDRS',
|
||||
'default' => false),
|
||||
'assigned_user_name' => array('width' => '15',
|
||||
'label' => 'LBL_LIST_ASSIGNED',
|
||||
'default' => false),
|
||||
|
||||
'date_sent' => array('width' => '15',
|
||||
'label' => 'LBL_DATE_SENT',
|
||||
'default' => true,
|
||||
'defaultOrderColumn' => array('sortOrder' => 'ASC')
|
||||
),
|
||||
'date_entered' => array('width' => '15',
|
||||
'label' => 'LBL_DATE_ENTERED'),
|
||||
'date_modified' => array('width' => '15',
|
||||
'label' => 'LBL_DATE_MODIFIED'),
|
||||
'quick_reply' => array('width' => '15',
|
||||
'label' => '',
|
||||
'sortable' => false,
|
||||
'default' => true),
|
||||
'create_related' => array('width' => '25',
|
||||
'label' => '',
|
||||
'sortable' => false,
|
||||
'default' => true),
|
||||
);
|
||||
|
||||
?>
|
||||
46
modules/Emails/Dashlets/MyEmailsDashlet/MyEmailsDashlet.meta.php
Executable file
46
modules/Emails/Dashlets/MyEmailsDashlet/MyEmailsDashlet.meta.php
Executable file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
global $app_strings;
|
||||
|
||||
$dashletMeta['MyEmailsDashlet'] = array('module' => 'Emails',
|
||||
'title' => translate('LBL_MY_EMAILS', 'Emails'),
|
||||
'description' => translate('A customizable view into Emails'),
|
||||
'category' => 'Module Views');
|
||||
?>
|
||||
123
modules/Emails/Dashlets/MyEmailsDashlet/MyEmailsDashlet.php
Executable file
123
modules/Emails/Dashlets/MyEmailsDashlet/MyEmailsDashlet.php
Executable file
@@ -0,0 +1,123 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
require_once('include/Dashlets/DashletGeneric.php');
|
||||
|
||||
|
||||
class MyEmailsDashlet extends DashletGeneric {
|
||||
function MyEmailsDashlet($id, $def = null) {
|
||||
global $current_user, $app_strings, $dashletData;
|
||||
require('modules/Emails/Dashlets/MyEmailsDashlet/MyEmailsDashlet.data.php');
|
||||
|
||||
parent::DashletGeneric($id, $def);
|
||||
|
||||
if(empty($def['title']))
|
||||
$this->title = translate('LBL_MY_EMAILS', 'Emails');
|
||||
|
||||
$this->searchFields = $dashletData['MyEmailsDashlet']['searchFields'];
|
||||
$this->hasScript = true; // dashlet has javascript attached to it
|
||||
|
||||
$this->columns = $dashletData['MyEmailsDashlet']['columns'];
|
||||
|
||||
$this->seedBean = new Email();
|
||||
}
|
||||
|
||||
function process() {
|
||||
global $current_language, $app_list_strings, $image_path, $current_user;
|
||||
//$where = 'emails.deleted = 0 AND emails.assigned_user_id = \''.$current_user->id.'\' AND emails.type = \'inbound\' AND emails.status = \'unread\'';
|
||||
$mod_strings = return_module_language($current_language, 'Emails');
|
||||
|
||||
if ($this->myItemsOnly) {
|
||||
$this->filters['assigned_user_id'] = $current_user->id;
|
||||
}
|
||||
$this->filters['type'] = array("inbound");
|
||||
$this->filters['status'] = array("unread");
|
||||
|
||||
$lvsParams = array();
|
||||
$lvsParams['custom_select'] = " ,emails_text.from_addr as from_addr ";
|
||||
$lvsParams['custom_from'] = " join emails_text on emails.id = emails_text.email_id ";
|
||||
parent::process($lvsParams);
|
||||
}
|
||||
|
||||
function displayScript() {
|
||||
global $current_language;
|
||||
|
||||
$mod_strings = return_module_language($current_language, 'Emails');
|
||||
$casesImageURL = "\"" . SugarThemeRegistry::current()->getImageURL('Cases.gif') . "\"";
|
||||
|
||||
$leadsImageURL = "\"" . SugarThemeRegistry::current()->getImageURL('Leads.gif') . "\"";
|
||||
|
||||
$contactsImageURL = "\"" . SugarThemeRegistry::current()->getImageURL('Contacts.gif') . "\"";
|
||||
|
||||
$bugsImageURL = "\"" . SugarThemeRegistry::current()->getImageURL('Bugs.gif') . "\"";
|
||||
|
||||
$tasksURL = "\"" . SugarThemeRegistry::current()->getImageURL('Tasks.gif') . "\"";
|
||||
$script = <<<EOQ
|
||||
<script>
|
||||
function quick_create_overlib(id, theme) {
|
||||
return overlib('<a style=\'width: 150px\' class=\'menuItem\' onmouseover=\'hiliteItem(this,"yes");\' onmouseout=\'unhiliteItem(this);\' href=\'index.php?module=Cases&action=EditView&inbound_email_id=' + id + '\'>' +
|
||||
"<img border='0' src='" + {$casesImageURL} + "' style='margin-right:5px'>" + '{$mod_strings['LBL_LIST_CASE']}' + '</a>' +
|
||||
|
||||
"<a style='width: 150px' class='menuItem' onmouseover='hiliteItem(this,\"yes\");' onmouseout='unhiliteItem(this);' href='index.php?module=Leads&action=EditView&inbound_email_id=" + id + "'>" +
|
||||
"<img border='0' src='" + {$leadsImageURL} + "' style='margin-right:5px'>"
|
||||
+ '{$mod_strings['LBL_LIST_LEAD']}' + "</a>" +
|
||||
|
||||
"<a style='width: 150px' class='menuItem' onmouseover='hiliteItem(this,\"yes\");' onmouseout='unhiliteItem(this);' href='index.php?module=Contacts&action=EditView&inbound_email_id=" + id + "'>" +
|
||||
"<img border='0' src='" + {$contactsImageURL} + "' style='margin-right:5px'>"
|
||||
+ '{$mod_strings['LBL_LIST_CONTACT']}' + "</a>" +
|
||||
|
||||
"<a style='width: 150px' class='menuItem' onmouseover='hiliteItem(this,\"yes\");' onmouseout='unhiliteItem(this);' href='index.php?module=Bugs&action=EditView&inbound_email_id=" + id + "'>"+
|
||||
"<img border='0' src='" + {$bugsImageURL} + "' style='margin-right:5px'>"
|
||||
+ '{$mod_strings['LBL_LIST_BUG']}' + "</a>" +
|
||||
|
||||
"<a style='width: 150px' class='menuItem' onmouseover='hiliteItem(this,\"yes\");' onmouseout='unhiliteItem(this);' href='index.php?module=Tasks&action=EditView&inbound_email_id=" + id + "'>" +
|
||||
"<img border='0' src='" + {$tasksURL} + "' style='margin-right:5px'>"
|
||||
+ '{$mod_strings['LBL_LIST_TASK']}' + "</a>"
|
||||
, CAPTION, '{$mod_strings['LBL_QUICK_CREATE']}'
|
||||
, STICKY, MOUSEOFF, 3000, CLOSETEXT, '<div style="float:right"><img border=0 src="themes/default/images/close_inline.gif"></div>', WIDTH, 150, CLOSETITLE, SUGAR.language.get('app_strings', 'LBL_ADDITIONAL_DETAILS_CLOSE_TITLE'), CLOSECLICK, FGCLASS, 'olOptionsFgClass',
|
||||
CGCLASS, 'olOptionsCgClass', BGCLASS, 'olBgClass', TEXTFONTCLASS, 'olFontClass', CAPTIONFONTCLASS, 'olOptionsCapFontClass', CLOSEFONTCLASS, 'olOptionsCloseFontClass');
|
||||
}
|
||||
</script>
|
||||
EOQ;
|
||||
return $script;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
71
modules/Emails/Delete.php
Executable file
71
modules/Emails/Delete.php
Executable file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
$focus = new Email();
|
||||
|
||||
if(!isset($_REQUEST['record']))
|
||||
sugar_die("A record number must be specified to delete the email.");
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
$email_type = $focus->type;
|
||||
if(!$focus->ACLAccess('Delete')){
|
||||
ACLController::displayNoAccess(true);
|
||||
sugar_cleanup(true);
|
||||
}
|
||||
$focus->mark_deleted($_REQUEST['record']);
|
||||
|
||||
// make sure assigned_user_id is set - during testing this isn't always set
|
||||
if (!isset($_REQUEST['assigned_user_id'])) {
|
||||
$_REQUEST['assigned_user_id'] = '';
|
||||
}
|
||||
|
||||
if ($email_type == 'archived') {
|
||||
global $current_user;
|
||||
$loc = 'Location: index.php?module=Emails&action=ListView&all=true';
|
||||
} else {
|
||||
$loc = 'Location: index.php?module='.$_REQUEST['return_module'].'&action='.$_REQUEST['return_action'].'&record='.$_REQUEST['return_id'].'&type='.$_REQUEST['type'].'&assigned_user_id='.$_REQUEST['assigned_user_id'];
|
||||
}
|
||||
|
||||
header($loc);
|
||||
?>
|
||||
387
modules/Emails/DetailView.php
Executable file
387
modules/Emails/DetailView.php
Executable file
@@ -0,0 +1,387 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
function extract_email_addresses($sString)
|
||||
{
|
||||
$aRet = array();
|
||||
$aCsvs = explode(',', $sString);
|
||||
foreach($aCsvs as $sCsv)
|
||||
{
|
||||
$aWords = explode(' ', $sCsv);
|
||||
foreach($aWords as $sWord)
|
||||
{
|
||||
$sEmail = filter_var(filter_var($sWord, FILTER_SANITIZE_EMAIL), FILTER_VALIDATE_EMAIL);
|
||||
if($sEmail !== false)
|
||||
$aRet[] = $sEmail;
|
||||
}
|
||||
}
|
||||
return $aRet;
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// CANCEL HANDLING
|
||||
if(!isset($_REQUEST['record']) || empty($_REQUEST['record'])) {
|
||||
header("Location: index.php?module=Emails&action=index");
|
||||
}
|
||||
//// CANCEL HANDLING
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
require_once('include/DetailView/DetailView.php');
|
||||
global $gridline;
|
||||
global $app_strings;
|
||||
|
||||
// SETTING DEFAULTS
|
||||
$focus = new Email();
|
||||
$detailView = new DetailView();
|
||||
$offset = 0;
|
||||
$email_type = 'archived';
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// TO HANDLE 'NEXT FREE'
|
||||
if(!empty($_REQUEST['next_free']) && $_REQUEST['next_free'] == true) {
|
||||
$_REQUEST['record'] = $focus->getNextFree();
|
||||
}
|
||||
//// END 'NEXT FREE'
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
if (isset($_REQUEST['offset']) or isset($_REQUEST['record'])) {
|
||||
$result = $detailView->processSugarBean("EMAIL", $focus, $offset);
|
||||
|
||||
if($result == null) {
|
||||
sugar_die($app_strings['ERROR_NO_RECORD']);
|
||||
}
|
||||
$focus=$result;
|
||||
|
||||
} else {
|
||||
header("Location: index.php?module=Emails&action=index");
|
||||
die();
|
||||
}
|
||||
|
||||
/* if the Email status is draft, say as a saved draft to a Lead/Case/etc.,
|
||||
* don't show detail view. go directly to EditView */
|
||||
if($focus->status == 'draft') {
|
||||
//header('Location: index.php?module=Emails&action=EditView&record='.$_REQUEST['record']);
|
||||
//die();
|
||||
}
|
||||
|
||||
|
||||
//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'];
|
||||
}
|
||||
|
||||
// un/READ flags
|
||||
if (!empty($focus->status)) {
|
||||
// "Read" flag for InboundEmail
|
||||
if($focus->status == 'unread') {
|
||||
// creating a new instance here to avoid data corruption below
|
||||
$e = new Email();
|
||||
$e->retrieve($focus->id);
|
||||
$e->status = 'read';
|
||||
$e->save();
|
||||
$email_type = $e->status;
|
||||
} else {
|
||||
$email_type = $focus->status;
|
||||
}
|
||||
|
||||
} elseif (!empty($_REQUEST['type'])) {
|
||||
$email_type = $_REQUEST['type'];
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// OUTPUT
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
echo "\n<p>\n";
|
||||
$GLOBALS['log']->info("Email detail view");
|
||||
if ($email_type == 'archived') {
|
||||
echo get_module_title('Emails', $mod_strings['LBL_ARCHIVED_EMAIL'].": ".$focus->name, true);
|
||||
$xtpl=new XTemplate ('modules/Emails/DetailView.html');
|
||||
} else {
|
||||
$xtpl=new XTemplate ('modules/Emails/DetailViewSent.html');
|
||||
if($focus->type == 'out') {
|
||||
echo get_module_title('Emails', $mod_strings['LBL_SENT_MODULE_NAME'].": ".$focus->name, true);
|
||||
//$xtpl->assign('DISABLE_REPLY_BUTTON', 'NONE');
|
||||
} elseif ($focus->type == 'draft') {
|
||||
$xtpl->assign('DISABLE_FORWARD_BUTTON', 'NONE');
|
||||
echo get_module_title('Emails', $mod_strings['LBL_LIST_FORM_DRAFTS_TITLE'].": ".$focus->name, true);
|
||||
} elseif($focus->type == 'inbound') {
|
||||
echo get_module_title('Emails', $mod_strings['LBL_INBOUND_TITLE'].": ".$focus->name, true);
|
||||
}
|
||||
}
|
||||
echo "\n</p>\n";
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// RETURN NAVIGATION
|
||||
$uri = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : 'index.php';
|
||||
$start = $focus->getStartPage($uri);
|
||||
if (isset($_REQUEST['return_id'])) { // coming from a subpanel, return_module|action is not set
|
||||
$xtpl->assign('RETURN_ID', $_REQUEST['return_id']);
|
||||
if (isset($_REQUEST['return_module'])) $xtpl->assign('RETURN_MODULE', $_REQUEST['return_module']);
|
||||
else $xtpl->assign('RETURN_MODULE', 'Emails');
|
||||
if (isset($_REQUEST['return_action'])) $xtpl->assign('RETURN_ACTION', $_REQUEST['return_action']);
|
||||
else $xtpl->assign('RETURN_ACTION', 'DetailView');
|
||||
}
|
||||
|
||||
if(isset($start['action']) && !empty($start['action'])) {
|
||||
$xtpl->assign('DELETE_RETURN_ACTION', $start['action']);
|
||||
}
|
||||
if(isset($start['module']) && !empty($start['module'])) {
|
||||
$xtpl->assign('DELETE_RETURN_MODULE', $start['module']);
|
||||
}
|
||||
if(isset($start['record']) && !empty($start['record'])) {
|
||||
$xtpl->assign('DELETE_RETURN_ID', $start['record']);
|
||||
}
|
||||
// this is to support returning to My Inbox
|
||||
if(isset($start['type']) && !empty($start['type'])) {
|
||||
$xtpl->assign('DELETE_RETURN_TYPE', $start['type']);
|
||||
}
|
||||
if(isset($start['assigned_user_id']) && !empty($start['assigned_user_id'])) {
|
||||
$xtpl->assign('DELETE_RETURN_ASSIGNED_USER_ID', $start['assigned_user_id']);
|
||||
}
|
||||
|
||||
if($focus->parent_name==''){
|
||||
|
||||
$ar=extract_email_addresses($focus->from_addr);
|
||||
$focus->from_addr=$ar[0];
|
||||
$query="select COUNT(id) from email_addresses where
|
||||
email_address=LOWER('$focus->from_addr')
|
||||
and email_address_caps=('$focus->from_addr') and deleted=0;" ;
|
||||
$ar=extract_email_addresses($focus->to_addrs);
|
||||
$focus->to_addrs=$ar[0];
|
||||
$res=$focus->db->query($query);
|
||||
$query2="select COUNT(id) from email_addresses where
|
||||
email_address=LOWER('$focus->to_addrs')
|
||||
and email_address_caps=('$focus->to_addrs') and deleted=0;" ;
|
||||
|
||||
$res2=$focus->db->query($query2);
|
||||
if($res->num_rows<1){
|
||||
$email_address=$focus->to_addrs;
|
||||
} else {
|
||||
$email_address=$focus->from_addr;
|
||||
}
|
||||
|
||||
|
||||
$button='<input title="Utwórz kontakt" accessKey="Utwórz kontakt" class="button"
|
||||
|
||||
onclick="window.open(\'index.php?module=Contacts&action=EditView&email_id2='.$focus->id.'&email_address='.$email_address.'\')"
|
||||
type="button" name="create" value="Utwórz kontakt">';
|
||||
}
|
||||
$xtpl->assign('BUTTON', $button);
|
||||
//// END RETURN NAVIGATION
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// DEFAULT TO TEXT IF NO HTML CONTENT:
|
||||
$html = trim(from_html($focus->description_html));
|
||||
if(empty($html)) {
|
||||
$xtpl->assign('SHOW_PLAINTEXT', 'true');
|
||||
$description = nl2br($focus->description);
|
||||
} else {
|
||||
$xtpl->assign('SHOW_PLAINTEXT', 'false');
|
||||
$description = from_html($focus->description_html);
|
||||
}
|
||||
$show_subpanels=true;
|
||||
//if the email is of type campaign, process the macros...using the values stored in the relationship table.
|
||||
//this is is part of the feature that adds support for one email per campaign.
|
||||
if ($focus->type=='campaign' and !empty($_REQUEST['parent_id']) and !empty($_REQUEST['parent_module'])) {
|
||||
$show_subpanels=false;
|
||||
$parent_id=$_REQUEST['parent_id'];
|
||||
|
||||
// cn: bug 14300 - emails_beans schema refactor - fixing query
|
||||
$query="SELECT * FROM emails_beans WHERE email_id='{$focus->id}' AND bean_id='{$parent_id}' AND bean_module = '{$_REQUEST['parent_module']}' " ;
|
||||
|
||||
$res=$focus->db->query($query);
|
||||
$row=$focus->db->fetchByAssoc($res);
|
||||
if (!empty($row)) {
|
||||
$campaign_data=$row['campaign_data'];
|
||||
$macro_values=array();
|
||||
if (!empty($campaign_data)) {
|
||||
$macro_values=unserialize(from_html($campaign_data));
|
||||
}
|
||||
|
||||
if (count($macro_values) > 0) {
|
||||
$m_keys=array_keys($macro_values);
|
||||
$m_values=array_values($macro_values);
|
||||
|
||||
$focus->name = str_replace($m_keys,$m_values,$focus->name);
|
||||
$focus->description = str_replace($m_keys,$m_values,$focus->description);
|
||||
$focus->description_html = str_replace($m_keys,$m_values,$focus->description_html);
|
||||
if (!empty($macro_values['sugar_to_email_address'])) {
|
||||
$focus->to_addrs=$macro_values['sugar_to_email_address'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//if not empty or set to test (from test campaigns)
|
||||
if (!empty($focus->parent_type) && $focus->parent_type !='test') {
|
||||
$xtpl->assign('PARENT_MODULE', $focus->parent_type);
|
||||
$xtpl->assign('PARENT_TYPE_UNTRANSLATE', $focus->parent_type);
|
||||
$xtpl->assign('PARENT_TYPE', $app_list_strings['record_type_display'][$focus->parent_type] . ':');
|
||||
}
|
||||
|
||||
$xtpl->assign('MOD', $mod_strings);
|
||||
$xtpl->assign('APP', $app_strings);
|
||||
$xtpl->assign('GRIDLINE', $gridline);
|
||||
$xtpl->assign('PRINT_URL', 'index.php?'.$GLOBALS['request_string']);
|
||||
$xtpl->assign('ID', $focus->id);
|
||||
$xtpl->assign('TYPE', $email_type);
|
||||
$xtpl->assign('PARENT_NAME', $focus->parent_name);
|
||||
$xtpl->assign('PARENT_ID', $focus->parent_id);
|
||||
$xtpl->assign('NAME', $focus->name);
|
||||
$xtpl->assign('ASSIGNED_TO', $focus->assigned_user_name);
|
||||
$xtpl->assign('DATE_MODIFIED', $focus->date_modified);
|
||||
$xtpl->assign('DATE_ENTERED', $focus->date_entered);
|
||||
$xtpl->assign('DATE_START', $focus->date_start);
|
||||
$xtpl->assign('TIME_START', $focus->time_start);
|
||||
$xtpl->assign('FROM', $focus->from_addr);
|
||||
$xtpl->assign('TO', $focus->to_addrs);
|
||||
$xtpl->assign('CC', nl2br($focus->cc_addrs));
|
||||
$xtpl->assign('BCC', nl2br($focus->bcc_addrs));
|
||||
$xtpl->assign('CREATED_BY', $focus->created_by_name);
|
||||
$xtpl->assign('MODIFIED_BY', $focus->modified_by_name);
|
||||
$xtpl->assign('DESCRIPTION', nl2br($focus->description));
|
||||
$xtpl->assign('DESCRIPTION_HTML', from_html($focus->description_html));
|
||||
$xtpl->assign('DATE_SENT', $focus->date_entered);
|
||||
$xtpl->assign('EMAIL_NAME', 'RE: '.$focus->name);
|
||||
$xtpl->assign("TAG", $focus->listviewACLHelper());
|
||||
if(!empty($focus->raw_source)) {
|
||||
$xtpl->assign("RAW_METADATA", $focus->id);
|
||||
} else {
|
||||
$xtpl->assign("DISABLE_RAW_BUTTON", 'none');
|
||||
}
|
||||
|
||||
if(!empty($focus->reply_to_email)) {
|
||||
$replyTo = "
|
||||
<tr>
|
||||
<td class=\"tabDetailViewDL\"><slot>".$mod_strings['LBL_REPLY_TO_NAME']."</slot></td>
|
||||
<td colspan=3 class=\"tabDetailViewDF\"><slot>".$focus->reply_to_email."</slot></td>
|
||||
</tr>";
|
||||
$xtpl->assign("REPLY_TO", $replyTo);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// JAVASCRIPT VARS
|
||||
$jsVars = '';
|
||||
$jsVars .= "var showRaw = '{$mod_strings['LBL_BUTTON_RAW_LABEL']}';";
|
||||
$jsVars .= "var hideRaw = '{$mod_strings['LBL_BUTTON_RAW_LABEL_HIDE']}';";
|
||||
$xtpl->assign("JS_VARS", $jsVars);
|
||||
|
||||
|
||||
// ADMIN EDIT
|
||||
if(is_admin($GLOBALS['current_user']) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])){
|
||||
$xtpl->assign("ADMIN_EDIT","<a href='index.php?action=index&module=DynamicLayout&from_action=".$_REQUEST['action'] ."&from_module=".$_REQUEST['module'] ."&record=".$_REQUEST['record']. "'>".SugarThemeRegistry::current()->getImage("EditLayout","border='0' alt='Edit Layout' align='bottom'")."</a>");
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['offset']) && !empty($_REQUEST['offset'])) { $offset = $_REQUEST['offset']; }
|
||||
else $offset = 1;
|
||||
$detailView->processListNavigation($xtpl, "EMAIL", $offset, false);
|
||||
|
||||
|
||||
|
||||
// adding custom fields:
|
||||
require_once('modules/DynamicFields/templates/Files/DetailView.php');
|
||||
$do_open = true;
|
||||
if ($do_open) {
|
||||
$xtpl->parse("main.open_source");
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// NOTES (attachements, etc.)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
$note = new Note();
|
||||
$where = "notes.parent_id='{$focus->id}'";
|
||||
//take in account if this is from campaign and the template id is stored in the macros.
|
||||
|
||||
if(isset($macro_values) && isset($macro_values['email_template_id'])){
|
||||
$where = "notes.parent_id='{$macro_values['email_template_id']}'";
|
||||
}
|
||||
$notes_list = $note->get_full_list("notes.name", $where, true);
|
||||
|
||||
if(! isset($notes_list)) {
|
||||
$notes_list = array();
|
||||
}
|
||||
|
||||
$attachments = '';
|
||||
for($i=0; $i<count($notes_list); $i++) {
|
||||
$the_note = $notes_list[$i];
|
||||
if(!empty($the_note->filename))
|
||||
$attachments .= "<a href=\"index.php?entryPoint=download&id=".$the_note->id."&type=Notes\">".$the_note->name."</a><br />";
|
||||
}
|
||||
|
||||
$xtpl->assign("ATTACHMENTS", $attachments);
|
||||
$xtpl->parse("main");
|
||||
$xtpl->out("main");
|
||||
|
||||
$sub_xtpl = $xtpl;
|
||||
$old_contents = ob_get_contents();
|
||||
ob_end_clean();
|
||||
ob_start();
|
||||
echo $old_contents;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// SUBPANELS
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
if ($show_subpanels) {
|
||||
require_once('include/SubPanel/SubPanelTiles.php');
|
||||
$subpanel = new SubPanelTiles($focus, 'Emails');
|
||||
echo $subpanel->display();
|
||||
}
|
||||
?>
|
||||
113
modules/Emails/Distribute.php
Executable file
113
modules/Emails/Distribute.php
Executable file
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
if(!empty($_SESSION['distribute_where']) && !empty($_REQUEST['distribute_method']) && !empty($_REQUEST['users']) && !empty($_REQUEST['use'])) {
|
||||
require_once('modules/Emails/Email.php');
|
||||
$focus = new Email();
|
||||
|
||||
$emailIds = array();
|
||||
// CHECKED ONLY:
|
||||
if($_REQUEST['use'] == 'checked') {
|
||||
// clean up passed array
|
||||
$grabEx = explode('::',$_REQUEST['grabbed']);
|
||||
foreach($grabEx as $k => $emailId) {
|
||||
if($emailId != "undefined") {
|
||||
$emailIds[] = $emailId;
|
||||
}
|
||||
}
|
||||
|
||||
// we have users and the items to distribute
|
||||
if($_REQUEST['distribute_method'] == 'roundRobin') {
|
||||
if($focus->distRoundRobin($_REQUEST['users'], $emailIds)) {
|
||||
header('Location: index.php?module=Emails&action=ListViewGroup');
|
||||
}
|
||||
} elseif($_REQUEST['distribute_method'] == 'leastBusy') {
|
||||
if($focus->distLeastBusy($_REQUEST['users'], $emailIds)) {
|
||||
header('Location: index.php?module=Emails&action=ListViewGroup');
|
||||
}
|
||||
} elseif($_REQUEST['distribute_method'] == 'direct') {
|
||||
// direct assignment
|
||||
// _ppd('count:'.count($_REQUEST['users']));
|
||||
if(count($_REQUEST['users']) > 1) {
|
||||
// only 1 user allowed in direct assignment
|
||||
$error = 1;
|
||||
} else {
|
||||
$user = $_REQUEST['users'][0];
|
||||
if($focus->distDirect($user, $emailIds)) {
|
||||
header('Location: index.php?module=Emails&action=ListViewGroup');
|
||||
}
|
||||
}
|
||||
|
||||
header('Location: index.php?module=Emails&action=ListViewGroup&error='.$error);
|
||||
}
|
||||
} elseif($_REQUEST['use'] == 'all') {
|
||||
if($_REQUEST['distribute_method'] == 'direct') {
|
||||
// no ALL assignments to 1 user
|
||||
header('Location: index.php?module=Emails&action=ListViewGroup&error=2');
|
||||
}
|
||||
|
||||
// we have the where clause that generated the view above, so use it
|
||||
$q = 'SELECT emails.id FROM emails WHERE '.$_SESSION['distribute_where'];
|
||||
$q = str_replace(''', '"', $q);
|
||||
$r = $focus->db->query($q);
|
||||
$count = 0;
|
||||
while($a = $focus->db->fetchByAssoc($r)) {
|
||||
$emailIds[] = $a['id'];
|
||||
$count++;
|
||||
}
|
||||
// we have users and the items to distribute
|
||||
if($_REQUEST['distribute_method'] == 'roundRobin') {
|
||||
if($focus->distRoundRobin($_REQUEST['users'], $emailIds)) {
|
||||
header('Location: index.php?module=Emails&action=ListViewGroup');
|
||||
}
|
||||
} elseif($_REQUEST['distribute_method'] == 'leastBusy') {
|
||||
if($focus->distLeastBusy($_REQUEST['users'], $emailIds)) {
|
||||
header('Location: index.php?module=Emails&action=ListViewGroup');
|
||||
}
|
||||
}
|
||||
|
||||
if($count < 1) {
|
||||
$GLOBALS['log']->info('Emails distribute failed: query returned no results ('.$q.')');
|
||||
header('Location: index.php?module=Emails&action=ListViewGroup&error='.$error);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
// error
|
||||
header('Location: index.php?module=Emails&action=index');
|
||||
}
|
||||
|
||||
?>
|
||||
779
modules/Emails/EditView.php
Executable file
779
modules/Emails/EditView.php
Executable file
@@ -0,0 +1,779 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
$GLOBALS['log']->info("Email edit view");
|
||||
|
||||
require_once('include/SugarTinyMCE.php');
|
||||
|
||||
|
||||
|
||||
|
||||
global $theme;
|
||||
global $app_strings;
|
||||
global $app_list_strings;
|
||||
global $mod_strings;
|
||||
global $current_user;
|
||||
global $sugar_version, $sugar_config;
|
||||
global $timedate;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// PREPROCESS BEAN DATA FOR DISPLAY
|
||||
$focus = new Email();
|
||||
$email_type = 'archived';
|
||||
|
||||
if(isset($_REQUEST['record'])) {
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
}
|
||||
if(!empty($_REQUEST['type'])) {
|
||||
$email_type = $_REQUEST['type'];
|
||||
} elseif(!empty($focus->id)) {
|
||||
$email_type = $focus->type;
|
||||
}
|
||||
|
||||
$focus->type = $email_type;
|
||||
|
||||
//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(!empty($_REQUEST['load_id']) && !empty($beanList[$_REQUEST['load_module']])) {
|
||||
$class_name = $beanList[$_REQUEST['load_module']];
|
||||
require_once($beanFiles[$class_name]);
|
||||
$contact = new $class_name();
|
||||
if($contact->retrieve($_REQUEST['load_id'])) {
|
||||
$link_id = $class_name . '_id';
|
||||
$focus->$link_id = $_REQUEST['load_id'];
|
||||
$focus->contact_name = (isset($contact->full_name)) ? $contact->full_name : $contact->name;
|
||||
$focus->to_addrs_names = $focus->contact_name;
|
||||
$focus->to_addrs_ids = $_REQUEST['load_id'];
|
||||
//Retrieve the email address.
|
||||
//If Opportunity or Case then Oppurtinity/Case->Accounts->(email_addr_bean_rel->email_addresses)
|
||||
//If Contacts, Leads etc.. then Contact->(email_addr_bean_rel->email_addresses)
|
||||
$sugarEmailAddress = new SugarEmailAddress();
|
||||
if($class_name == 'Opportunity' || $class_name == 'aCase'){
|
||||
$account = new Account();
|
||||
if($contact->account_id != null && $account->retrieve($contact->account_id)){
|
||||
$sugarEmailAddress->handleLegacyRetrieve($account);
|
||||
if(isset($account->email1)){
|
||||
$focus->to_addrs_emails = $account->email1;
|
||||
$focus->to_addrs = "$focus->contact_name <$account->email1>";
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
$sugarEmailAddress->handleLegacyRetrieve($contact);
|
||||
if(isset($contact->email1)){
|
||||
$focus->to_addrs_emails = $contact->email1;
|
||||
$focus->to_addrs = "$focus->contact_name <$contact->email1>";
|
||||
}
|
||||
}
|
||||
if(!empty($_REQUEST['parent_type']) && empty($app_list_strings['record_type_display'][$_REQUEST['parent_type']])){
|
||||
if(!empty($app_list_strings['record_type_display'][$_REQUEST['load_module']])){
|
||||
$_REQUEST['parent_type'] = $_REQUEST['load_module'];
|
||||
$_REQUEST['parent_id'] = $focus->contact_id;
|
||||
$_REQUEST['parent_name'] = $focus->to_addrs_names;
|
||||
} else {
|
||||
unset($_REQUEST['parent_type']);
|
||||
unset($_REQUEST['parent_id']);
|
||||
unset($_REQUEST['parent_name']);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(isset($_REQUEST['contact_id']) && is_null($focus->contact_id)) {
|
||||
$focus->contact_id = $_REQUEST['contact_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'];
|
||||
}
|
||||
elseif(is_null($focus->parent_type)) {
|
||||
$focus->parent_type = $app_list_strings['record_type_default_key'];
|
||||
}
|
||||
if(isset($_REQUEST['to_email_addrs'])) {
|
||||
$focus->to_addrs = $_REQUEST['to_email_addrs'];
|
||||
}
|
||||
// needed when clicking through a Contacts detail view:
|
||||
if(isset($_REQUEST['to_addrs_ids'])) {
|
||||
$focus->to_addrs_ids = $_REQUEST['to_addrs_ids'];
|
||||
}
|
||||
if(isset($_REQUEST['to_addrs_emails'])) {
|
||||
$focus->to_addrs_emails = $_REQUEST['to_addrs_emails'];
|
||||
}
|
||||
if(isset($_REQUEST['to_addrs_names'])) {
|
||||
$focus->to_addrs_names = $_REQUEST['to_addrs_names'];
|
||||
}
|
||||
// user's email, go through 3 levels of precedence:
|
||||
$from = $current_user->getEmailInfo();
|
||||
//// END PREPROCESSING
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// XTEMPLATE ASSIGNMENT
|
||||
if($email_type == 'archived') {
|
||||
echo get_module_title('Emails', $mod_strings['LBL_ARCHIVED_MODULE_NAME'].":", true);
|
||||
$xtpl=new XTemplate('modules/Emails/EditViewArchive.html');
|
||||
} else {
|
||||
|
||||
if(empty($_REQUEST['parent_module'])) {
|
||||
$parent_module = "Emails";
|
||||
} else {
|
||||
$parent_module = $_REQUEST['parent_module'];
|
||||
}
|
||||
if(empty($_REQUEST['parent_id'])) {
|
||||
$parent_id = "";
|
||||
} else {
|
||||
$parent_id = $_REQUEST['parent_id'];
|
||||
}
|
||||
if(empty($_REQUEST['return_module'])) {
|
||||
$return_module = "Emails";
|
||||
} else {
|
||||
$return_module = $_REQUEST['return_module'];
|
||||
}
|
||||
if(empty($_REQUEST['return_module'])) {
|
||||
$return_id = "";
|
||||
} else {
|
||||
$return_id = $_REQUEST['return_module'];
|
||||
}
|
||||
$replyType = "reply";
|
||||
if ($_REQUEST['type'] == 'forward') {
|
||||
$replyType = 'forward';
|
||||
} // if
|
||||
header("Location: index.php?module=Emails&action=Compose&record=$focus->id&replyForward=true&reply=$replyType");
|
||||
return;
|
||||
|
||||
echo get_module_title('Emails', $mod_strings['LBL_COMPOSE_MODULE_NAME'].":", true);
|
||||
$xtpl=new XTemplate('modules/Emails/EditView.html');
|
||||
}
|
||||
echo "\n</p>\n";
|
||||
|
||||
// CHECK USER'S EMAIL SETTINGS TO ENABLE/DISABLE 'SEND' BUTTON
|
||||
if(!$focus->check_email_settings() &&($email_type == 'out' || $email_type == 'draft')) {
|
||||
print "<font color='red'>".$mod_strings['WARNING_SETTINGS_NOT_CONF']." <a href='index.php?module=Users&action=EditView&record=".$current_user->id."&return_module=Emails&type=out&return_action=EditView'>".$mod_strings['LBL_EDIT_MY_SETTINGS']."</a></font>";
|
||||
$xtpl->assign("DISABLE_SEND", 'DISABLED');
|
||||
}
|
||||
|
||||
// CHECK THAT SERVER HAS A PLACE TO PUT UPLOADED TEMP FILES SO THAT ATTACHMENTS WILL WORK
|
||||
// cn: Bug 5995
|
||||
$tmpUploadDir = ini_get('upload_tmp_dir');
|
||||
if(!empty($tmpUploadDir)) {
|
||||
if(!is_writable($tmpUploadDir)) {
|
||||
echo "<font color='red'>{$mod_strings['WARNING_UPLOAD_DIR_NOT_WRITABLE']}</font>";
|
||||
}
|
||||
} else {
|
||||
//echo "<font color='red'>{$mod_strings['WARNING_NO_UPLOAD_DIR']}</font>";
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// INBOUND EMAIL HANDLING
|
||||
if(isset($_REQUEST['email_name'])) {
|
||||
$name = str_replace('_',' ',$_REQUEST['email_name']);
|
||||
}
|
||||
if(isset($_REQUEST['inbound_email_id'])) {
|
||||
$ieMail = new Email();
|
||||
$ieMail->retrieve($_REQUEST['inbound_email_id']);
|
||||
|
||||
$quoted = '';
|
||||
// cn: bug 9725: replies/forwards lose real content
|
||||
$quotedHtml = $ieMail->quoteHtmlEmail($ieMail->description_html);
|
||||
|
||||
// plain-text
|
||||
$desc = nl2br(trim($ieMail->description));
|
||||
|
||||
$exDesc = explode('<br />', $desc);
|
||||
foreach($exDesc as $k => $line) {
|
||||
$quoted .= '> '.trim($line)."\r";
|
||||
}
|
||||
|
||||
// prefill empties with the other's contents
|
||||
if(empty($quotedHtml) && !empty($quoted)) {
|
||||
$quotedHtml = nl2br($quoted);
|
||||
}
|
||||
if(empty($quoted) && !empty($quotedHtml)) {
|
||||
$quoted = strip_tags(br2nl($quotedHtml));
|
||||
}
|
||||
|
||||
// forwards have special text
|
||||
if($_REQUEST['type'] == 'forward') {
|
||||
$header = $ieMail->getForwardHeader();
|
||||
// subject is handled in Subject line handling below
|
||||
} else {
|
||||
// we have a reply in focus
|
||||
$header = $ieMail->getReplyHeader();
|
||||
}
|
||||
|
||||
$quoted = br2nl($header.$quoted);
|
||||
$quotedHtml = $header.$quotedHtml;
|
||||
|
||||
|
||||
// if not a forward: it's a reply
|
||||
if($_REQUEST['type'] != 'forward') {
|
||||
$ieMailName = 'RE: '.$ieMail->name;
|
||||
} else {
|
||||
$ieMailName = $ieMail->name;
|
||||
}
|
||||
|
||||
$focus->id = null; // nulling this to prevent overwriting a replied email(we're basically doing a "Duplicate" function)
|
||||
$focus->to_addrs = $ieMail->from_addr;
|
||||
$focus->description = $quoted; // don't know what i was thinking: ''; // this will be filled on save/send
|
||||
$focus->description_html = $quotedHtml; // cn: bug 7357 - htmlentities() breaks FCKEditor
|
||||
$focus->parent_type = $ieMail->parent_type;
|
||||
$focus->parent_id = $ieMail->parent_id;
|
||||
$focus->parent_name = $ieMail->parent_name;
|
||||
$focus->name = $ieMailName;
|
||||
$xtpl->assign('INBOUND_EMAIL_ID',$_REQUEST['inbound_email_id']);
|
||||
// un/READ flags
|
||||
if(!empty($ieMail->status)) {
|
||||
// "Read" flag for InboundEmail
|
||||
if($ieMail->status == 'unread') {
|
||||
// creating a new instance here to avoid data corruption below
|
||||
$e = new Email();
|
||||
$e->retrieve($ieMail->id);
|
||||
$e->status = 'read';
|
||||
$e->save();
|
||||
$email_type = $e->status;
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//// PRIMARY PARENT LINKING
|
||||
if(empty($focus->parent_type) && empty($focus->parent_id)) {
|
||||
$focus->fillPrimaryParentFields();
|
||||
}
|
||||
//// END PRIMARY PARENT LINKING
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// setup for my/mailbox email switcher
|
||||
$mbox = $ieMail->getMailboxDefaultEmail();
|
||||
$user = $current_user->getPreferredEmail();
|
||||
$useGroup = ' <input id="use_mbox" name="use_mbox" type="checkbox" CHECKED onClick="switchEmail()" >
|
||||
<script type="text/javascript">
|
||||
function switchEmail() {
|
||||
var mboxName = "'.$mbox['name'].'";
|
||||
var mboxAddr = "'.$mbox['email'].'";
|
||||
var userName = "'.$user['name'].'";
|
||||
var userAddr = "'.$user['email'].'";
|
||||
|
||||
if(document.getElementById("use_mbox").checked) {
|
||||
document.getElementById("from_addr_field").value = mboxName + " <" + mboxAddr + ">";
|
||||
document.getElementById("from_addr_name").value = mboxName;
|
||||
document.getElementById("from_addr_email").value = mboxAddr;
|
||||
} else {
|
||||
document.getElementById("from_addr_field").value = userName + " <" + userAddr + ">";
|
||||
document.getElementById("from_addr_name").value = userName;
|
||||
document.getElementById("from_addr_email").value = userAddr;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>';
|
||||
$useGroup .= $mod_strings['LBL_USE_MAILBOX_INFO'];
|
||||
|
||||
$xtpl->assign('FROM_ADDR_GROUP', $useGroup);
|
||||
}
|
||||
//// END INBOUND EMAIL HANDLING
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// SUBJECT FIELD MANIPULATION
|
||||
$name = '';
|
||||
if(!empty($_REQUEST['parent_id']) && !empty($_REQUEST['parent_type'])) {
|
||||
$focus->parent_id = $_REQUEST['parent_id'];
|
||||
$focus->parent_type = $_REQUEST['parent_type'];
|
||||
}
|
||||
if(!empty($focus->parent_id) && !empty($focus->parent_type)) {
|
||||
if($focus->parent_type == 'Cases') {
|
||||
|
||||
$myCase = new aCase();
|
||||
$myCase->retrieve($focus->parent_id);
|
||||
$myCaseMacro = $myCase->getEmailSubjectMacro();
|
||||
if(isset($ieMail->name) && !empty($ieMail->name)) { // if replying directly to an InboundEmail
|
||||
$oldEmailSubj = $ieMail->name;
|
||||
} elseif(isset($_REQUEST['parent_name']) && !empty($_REQUEST['parent_name'])) {
|
||||
$oldEmailSubj = $_REQUEST['parent_name'];
|
||||
} else {
|
||||
$oldEmailSubj = $focus->name; // replying to an email using old subject
|
||||
}
|
||||
|
||||
if(!preg_match('/^re:/i', $oldEmailSubj)) {
|
||||
$oldEmailSubj = 'RE: '.$oldEmailSubj;
|
||||
}
|
||||
$focus->name = $oldEmailSubj;
|
||||
|
||||
if(strpos($focus->name, str_replace('%1',$myCase->case_number,$myCaseMacro))) {
|
||||
$name = $focus->name;
|
||||
} else {
|
||||
$name = $focus->name.' '.str_replace('%1',$myCase->case_number,$myCaseMacro);
|
||||
}
|
||||
} else {
|
||||
$name = $focus->name;
|
||||
}
|
||||
} else {
|
||||
if(empty($focus->name)) {
|
||||
$name = '';
|
||||
} else {
|
||||
$name = $focus->name;
|
||||
}
|
||||
}
|
||||
if($email_type == 'forward') {
|
||||
$name = 'FW: '.$name;
|
||||
}
|
||||
//// END SUBJECT FIELD MANIPULATION
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// GENERAL TEMPLATE ASSIGNMENTS
|
||||
$xtpl->assign('MOD', $mod_strings);
|
||||
$xtpl->assign('APP', $app_strings);
|
||||
$xtpl->assign('THEME', SugarThemeRegistry::current()->__toString());
|
||||
if(!isset($focus->id)) $xtpl->assign('USER_ID', $current_user->id);
|
||||
if(!isset($focus->id) && isset($_REQUEST['contact_id'])) $xtpl->assign('CONTACT_ID', $_REQUEST['contact_id']);
|
||||
|
||||
if(isset($_REQUEST['return_module']) && !empty($_REQUEST['return_module'])) {
|
||||
$xtpl->assign('RETURN_MODULE', $_REQUEST['return_module']);
|
||||
} else {
|
||||
$xtpl->assign('RETURN_MODULE', 'Emails');
|
||||
}
|
||||
if(isset($_REQUEST['return_action']) && !empty($_REQUEST['return_action']) && ($_REQUEST['return_action'] != 'SubPanelViewer')) {
|
||||
$xtpl->assign('RETURN_ACTION', $_REQUEST['return_action']);
|
||||
} else {
|
||||
$xtpl->assign('RETURN_ACTION', 'DetailView');
|
||||
}
|
||||
if(isset($_REQUEST['return_id']) && !empty($_REQUEST['return_id'])) {
|
||||
$xtpl->assign('RETURN_ID', $_REQUEST['return_id']);
|
||||
}
|
||||
// handle Create $module then Cancel
|
||||
if(empty($_REQUEST['return_id']) && !isset($_REQUEST['type'])) {
|
||||
$xtpl->assign('RETURN_ACTION', 'index');
|
||||
}
|
||||
|
||||
$xtpl->assign('PRINT_URL', 'index.php?'.$GLOBALS['request_string']);
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// QUICKSEARCH CODE
|
||||
require_once('include/QuickSearchDefaults.php');
|
||||
$qsd = new QuickSearchDefaults();
|
||||
$sqs_objects = array('EditView_parent_name' => $qsd->getQSParent(),
|
||||
'EditView_assigned_user_name' => $qsd->getQSUser(),
|
||||
);
|
||||
|
||||
|
||||
$json = getJSONobj();
|
||||
|
||||
$sqs_objects_encoded = $json->encode($sqs_objects);
|
||||
$quicksearch_js = <<<EOQ
|
||||
<script type="text/javascript" language="javascript">sqs_objects = $sqs_objects_encoded; var dialog_loaded;
|
||||
function parent_typechangeQS() {
|
||||
//new_module = document.getElementById('parent_type').value;
|
||||
new_module = document.EditView.parent_type.value;
|
||||
if(new_module == 'Contacts' || new_module == 'Leads' || typeof(disabledModules[new_module]) != 'undefined') {
|
||||
sqs_objects['EditView_parent_name']['disable'] = true;
|
||||
document.getElementById('parent_name').readOnly = true;
|
||||
}
|
||||
else {
|
||||
sqs_objects['EditView_parent_name']['disable'] = false;
|
||||
document.getElementById('parent_name').readOnly = false;
|
||||
}
|
||||
|
||||
sqs_objects['EditView_parent_name']['modules'] = new Array(new_module);
|
||||
enableQS(false);
|
||||
}
|
||||
parent_typechangeQS();
|
||||
</script>
|
||||
EOQ;
|
||||
$xtpl->assign('JAVASCRIPT', get_set_focus_js().$quicksearch_js);
|
||||
//// END QUICKSEARCH CODE
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// cn: bug 14191 - duping archive emails overwrites the original
|
||||
if(!isset($_REQUEST['isDuplicate']) || $_REQUEST['isDuplicate'] != 'true') {
|
||||
$xtpl->assign('ID', $focus->id);
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['parent_type']) && !empty($_REQUEST['parent_type']) && isset($_REQUEST['parent_id']) && !empty($_REQUEST['parent_id'])) {
|
||||
$xtpl->assign('OBJECT_ID', $_REQUEST['parent_id']);
|
||||
$xtpl->assign('OBJECT_TYPE', $_REQUEST['parent_type']);
|
||||
}
|
||||
$xtpl->assign('FROM_ADDR', $focus->from_addr);
|
||||
//// prevent TO: prefill when type is 'forward'
|
||||
if($email_type != 'forward') {
|
||||
$xtpl->assign('TO_ADDRS', $focus->to_addrs);
|
||||
$xtpl->assign('TO_ADDRS_IDS', $focus->to_addrs_ids);
|
||||
$xtpl->assign('TO_ADDRS_NAMES', $focus->to_addrs_names);
|
||||
$xtpl->assign('TO_ADDRS_EMAILS', $focus->to_addrs_emails);
|
||||
$xtpl->assign('CC_ADDRS', $focus->cc_addrs);
|
||||
$xtpl->assign('CC_ADDRS_IDS', $focus->cc_addrs_ids);
|
||||
$xtpl->assign('CC_ADDRS_NAMES', $focus->cc_addrs_names);
|
||||
$xtpl->assign('CC_ADDRS_EMAILS', $focus->cc_addrs_emails);
|
||||
$xtpl->assign('BCC_ADDRS', $focus->bcc_addrs);
|
||||
$xtpl->assign('BCC_ADDRS_IDS', $focus->bcc_addrs_ids);
|
||||
$xtpl->assign('BCC_ADDRS_NAMES', $focus->bcc_addrs_names);
|
||||
$xtpl->assign('BCC_ADDRS_EMAILS', $focus->bcc_addrs_emails);
|
||||
}
|
||||
|
||||
//$xtpl->assign('FROM_ADDR', $from['name'].' <'.$from['email'].'>');
|
||||
$xtpl->assign('FROM_ADDR_NAME', $from['name']);
|
||||
$xtpl->assign('FROM_ADDR_EMAIL', $from['email']);
|
||||
|
||||
$xtpl->assign('NAME', from_html($name));
|
||||
//$xtpl->assign('DESCRIPTION_HTML', from_html($focus->description_html));
|
||||
$xtpl->assign('DESCRIPTION', $focus->description);
|
||||
$xtpl->assign('TYPE',$email_type);
|
||||
|
||||
// Unimplemented until jscalendar language files are fixed
|
||||
// $xtpl->assign('CALENDAR_LANG',((empty($cal_codes[$current_language])) ? $cal_codes[$default_language] : $cal_codes[$current_language]));
|
||||
$xtpl->assign('CALENDAR_LANG', 'en');
|
||||
$xtpl->assign('CALENDAR_DATEFORMAT', $timedate->get_cal_date_format());
|
||||
$xtpl->assign('DATE_START', $focus->date_start);
|
||||
$xtpl->assign('TIME_FORMAT', '('. $timedate->get_user_time_format().')');
|
||||
$xtpl->assign('TIME_START', substr($focus->time_start,0,5));
|
||||
$xtpl->assign('TIME_MERIDIEM', $timedate->AMPMMenu('',$focus->time_start));
|
||||
|
||||
$parent_types = $app_list_strings['record_type_display'];
|
||||
$disabled_parent_types = ACLController::disabledModuleList($parent_types,false, 'list');
|
||||
|
||||
foreach($disabled_parent_types as $disabled_parent_type){
|
||||
if($disabled_parent_type != $focus->parent_type){
|
||||
unset($parent_types[$disabled_parent_type]);
|
||||
}
|
||||
}
|
||||
|
||||
$xtpl->assign('TYPE_OPTIONS', get_select_options_with_id($parent_types, $focus->parent_type));
|
||||
$xtpl->assign('USER_DATEFORMAT', '('. $timedate->get_user_date_format().')');
|
||||
$xtpl->assign('PARENT_NAME', $focus->parent_name);
|
||||
$xtpl->assign('PARENT_ID', $focus->parent_id);
|
||||
if(empty($focus->parent_type)) {
|
||||
$xtpl->assign('PARENT_RECORD_TYPE', '');
|
||||
} else {
|
||||
$xtpl->assign('PARENT_RECORD_TYPE', $focus->parent_type);
|
||||
}
|
||||
|
||||
if(is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])){
|
||||
$record = '';
|
||||
if(!empty($_REQUEST['record'])){
|
||||
$record = $_REQUEST['record'];
|
||||
}
|
||||
$xtpl->assign('ADMIN_EDIT',"<a href='index.php?action=index&module=DynamicLayout&from_action=".$_REQUEST['action'] ."&from_module=".$_REQUEST['module'] ."&record=".$record. "'>".SugarThemeRegistry::current()->getImage("EditLayout","border='0' alt='Edit Layout' align='bottom'")."</a>");
|
||||
}
|
||||
|
||||
//// END GENERAL TEMPLATE ASSIGNMENTS
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
///////////////////////////////////////
|
||||
///
|
||||
/// SETUP PARENT POPUP
|
||||
|
||||
$popup_request_data = array(
|
||||
'call_back_function' => 'set_return',
|
||||
'form_name' => 'EditView',
|
||||
'field_to_name_array' => array(
|
||||
'id' => 'parent_id',
|
||||
'name' => 'parent_name',
|
||||
),
|
||||
);
|
||||
|
||||
$encoded_popup_request_data = $json->encode($popup_request_data);
|
||||
|
||||
/// Users Popup
|
||||
$popup_request_data = array(
|
||||
'call_back_function' => 'set_return',
|
||||
'form_name' => 'EditView',
|
||||
'field_to_name_array' => array(
|
||||
'id' => 'assigned_user_id',
|
||||
'user_name' => 'assigned_user_name',
|
||||
),
|
||||
);
|
||||
$xtpl->assign('encoded_users_popup_request_data', $json->encode($popup_request_data));
|
||||
|
||||
|
||||
//
|
||||
///////////////////////////////////////
|
||||
|
||||
$change_parent_button = '<input type="button" name="button" tabindex="2" class="button" '
|
||||
. 'title="' . $app_strings['LBL_SELECT_BUTTON_TITLE'] . '" '
|
||||
. 'accesskey="' . $app_strings['LBL_SELECT_BUTTON_KEY'] . '" '
|
||||
. 'value="' . $app_strings['LBL_SELECT_BUTTON_LABEL'] . '" '
|
||||
. "onclick='ValidateParentType();' />\n"
|
||||
.'<script>function ValidateParentType() {
|
||||
var parentTypeValue = document.getElementById("parent_type").value;
|
||||
if (trim(parentTypeValue) == ""){
|
||||
alert("' . $mod_strings['LBL_ERROR_SELECT_MODULE'] .'");
|
||||
return false;
|
||||
}
|
||||
open_popup(document.EditView.parent_type.value,600,400,"&tree=ProductsProd",true,false,' .$encoded_popup_request_data.');
|
||||
}</script>';
|
||||
|
||||
$xtpl->assign("CHANGE_PARENT_BUTTON", $change_parent_button);
|
||||
|
||||
$button_attr = '';
|
||||
if(!ACLController::checkAccess('Contacts', 'list', true)){
|
||||
$button_attr = 'disabled="disabled"';
|
||||
}
|
||||
|
||||
$change_to_addrs_button = '<input type="button" name="to_button" tabindex="3" class="button" '
|
||||
. 'title="' . $app_strings['LBL_SELECT_BUTTON_TITLE'] . '" '
|
||||
. 'accesskey="' . $app_strings['LBL_SELECT_BUTTON_KEY'] . '" '
|
||||
. 'value="' . $mod_strings['LBL_EMAIL_SELECTOR'] . '" '
|
||||
. "onclick='button_change_onclick(this);' $button_attr />\n";
|
||||
$xtpl->assign("CHANGE_TO_ADDRS_BUTTON", $change_to_addrs_button);
|
||||
|
||||
$change_cc_addrs_button = '<input type="button" name="cc_button" tabindex="3" class="button" '
|
||||
. 'title="' . $app_strings['LBL_SELECT_BUTTON_TITLE'] . '" '
|
||||
. 'accesskey="' . $app_strings['LBL_SELECT_BUTTON_KEY'] . '" '
|
||||
. 'value="' . $mod_strings['LBL_EMAIL_SELECTOR'] . '" '
|
||||
. "onclick='button_change_onclick(this);' $button_attr />\n";
|
||||
$xtpl->assign("CHANGE_CC_ADDRS_BUTTON", $change_cc_addrs_button);
|
||||
|
||||
$change_bcc_addrs_button = '<input type="button" name="bcc_button" tabindex="3" class="button" '
|
||||
. 'title="' . $app_strings['LBL_SELECT_BUTTON_TITLE'] . '" '
|
||||
. 'accesskey="' . $app_strings['LBL_SELECT_BUTTON_KEY'] . '" '
|
||||
. 'value="' . $mod_strings['LBL_EMAIL_SELECTOR'] . '" '
|
||||
. "onclick='button_change_onclick(this);' $button_attr />\n";
|
||||
$xtpl->assign("CHANGE_BCC_ADDRS_BUTTON", $change_bcc_addrs_button);
|
||||
|
||||
|
||||
///////////////////////////////////////
|
||||
//// USER ASSIGNMENT
|
||||
global $current_user;
|
||||
if(is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) {
|
||||
$record = '';
|
||||
if(!empty($_REQUEST['record'])) {
|
||||
$record = $_REQUEST['record'];
|
||||
}
|
||||
$xtpl->assign('ADMIN_EDIT',"<a href='index.php?action=index&module=DynamicLayout&from_action=".$_REQUEST['action'] ."&from_module=".$_REQUEST['module'] ."&record=".$record. "'>".SugarThemeRegistry::current()->getImage("EditLayout","border='0' alt='Edit Layout' align='bottom'")."</a>");
|
||||
}
|
||||
|
||||
if(empty($focus->assigned_user_id) && empty($focus->id))
|
||||
$focus->assigned_user_id = $current_user->id;
|
||||
if(empty($focus->assigned_name) && empty($focus->id))
|
||||
$focus->assigned_user_name = $current_user->user_name;
|
||||
$xtpl->assign('ASSIGNED_USER_OPTIONS', get_select_options_with_id(get_user_array(TRUE, 'Active', $focus->assigned_user_id), $focus->assigned_user_id));
|
||||
$xtpl->assign('ASSIGNED_USER_NAME', $focus->assigned_user_name);
|
||||
$xtpl->assign('ASSIGNED_USER_ID', $focus->assigned_user_id);
|
||||
$xtpl->assign('DURATION_HOURS', $focus->duration_hours);
|
||||
$xtpl->assign('TYPE_OPTIONS', get_select_options_with_id($parent_types, $focus->parent_type));
|
||||
|
||||
if(isset($focus->duration_minutes)) {
|
||||
$xtpl->assign('DURATION_MINUTES_OPTIONS', get_select_options_with_id($focus->minutes_values,$focus->duration_minutes));
|
||||
}
|
||||
//// END USER ASSIGNMENT
|
||||
///////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
//Add Custom Fields
|
||||
require_once('modules/DynamicFields/templates/Files/EditView.php');
|
||||
|
||||
|
||||
///////////////////////////////////////
|
||||
//// ATTACHMENTS
|
||||
$attachments = '';
|
||||
if(!empty($focus->id) || (!empty($_REQUEST['record']) && $_REQUEST['type'] == 'forward')) {
|
||||
|
||||
$attachments = "<input type='hidden' name='removeAttachment' id='removeAttachment' value=''>\n";
|
||||
$ids = '';
|
||||
|
||||
$focusId = empty($focus->id) ? $_REQUEST['record'] : $focus->id;
|
||||
$note = new Note();
|
||||
$where = "notes.parent_id='{$focusId}' AND notes.filename IS NOT NULL";
|
||||
$notes_list = $note->get_full_list("", $where,true);
|
||||
|
||||
if(!isset($notes_list)) {
|
||||
$notes_list = array();
|
||||
}
|
||||
for($i = 0;$i < count($notes_list);$i++) {
|
||||
$the_note = $notes_list[$i];
|
||||
if(empty($the_note->filename)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// cn: bug 8034 - attachments from forwards/replies lost when saving drafts
|
||||
if(!empty($ids)) {
|
||||
$ids .= ",";
|
||||
}
|
||||
$ids .= $the_note->id;
|
||||
|
||||
$attachments .= "
|
||||
<div id='noteDiv{$the_note->id}'>
|
||||
<img onclick='deletePriorAttachment(\"{$the_note->id}\");' src='".SugarThemeRegistry::current()->getImageURL('delete_inline.gif')." value='{$the_note->id}'> ";
|
||||
$attachments .= "<a href=\"index.php?entryPoint=download&id=".$the_note->id."&type=Notes\">".$the_note->name."</a><div />";
|
||||
//$attachments .= '<a href="'.UploadFile::get_url($the_note->filename,$the_note->id).'&entryPoint=download&type=Notes' . '" target="_blank">'. $the_note->filename .'</a></div>';
|
||||
|
||||
}
|
||||
// cn: bug 8034 - attachments from forwards/replies lost when saving drafts
|
||||
$attachments .= "<input type='hidden' name='prior_attachments' value='{$ids}'>";
|
||||
|
||||
// workaround $mod_strings being overriden by Note object instantiation above.
|
||||
global $current_language, $mod_strings;
|
||||
$mod_strings = return_module_language($current_language, 'Emails');
|
||||
}
|
||||
|
||||
$attJs = '<script type="text/javascript">';
|
||||
$attJs .= 'var file_path = "'.$sugar_config['site_url'].'/'.$sugar_config['upload_dir'].'";';
|
||||
$attJs .= 'var lnk_remove = "'.$app_strings['LNK_REMOVE'].'";';
|
||||
$attJs .= '</script>';
|
||||
$xtpl->assign('ATTACHMENTS', $attachments);
|
||||
$xtpl->assign('ATTACHMENTS_JAVASCRIPT', $attJs);
|
||||
//// END ATTACHMENTS
|
||||
///////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// DOCUMENTS
|
||||
$popup_request_data = array(
|
||||
'call_back_function' => 'document_set_return',
|
||||
'form_name' => 'EditView',
|
||||
'field_to_name_array' => array(
|
||||
'id' => 'related_doc_id',
|
||||
'document_name' => 'related_document_name',
|
||||
),
|
||||
);
|
||||
$json = getJSONobj();
|
||||
$xtpl->assign('encoded_document_popup_request_data', $json->encode($popup_request_data));
|
||||
//// END DOCUMENTS
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
$parse_open = true;
|
||||
|
||||
if($parse_open) {
|
||||
$xtpl->parse('main.open_source_1');
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// EMAIL TEMPLATES
|
||||
if(ACLController::checkAccess('EmailTemplates', 'list', true) && ACLController::checkAccess('EmailTemplates', 'view', true)) {
|
||||
$et = new EmailTemplate();
|
||||
$etResult = $focus->db->query($et->create_new_list_query('','',array(),array(),''));
|
||||
$email_templates_arr[] = '';
|
||||
while($etA = $focus->db->fetchByAssoc($etResult)) {
|
||||
$email_templates_arr[$etA['id']] = $etA['name'];
|
||||
}
|
||||
} else {
|
||||
$email_templates_arr = array('' => $app_strings['LBL_NONE']);
|
||||
}
|
||||
|
||||
$xtpl->assign('EMAIL_TEMPLATE_OPTIONS', get_select_options_with_id($email_templates_arr, ''));
|
||||
//// END EMAIL TEMPLATES
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////
|
||||
//// TEXT EDITOR
|
||||
// cascade from User to Sys Default
|
||||
$editor = $focus->getUserEditorPreference();
|
||||
|
||||
if($editor != 'plain') {
|
||||
// this box is checked by Javascript on-load.
|
||||
$xtpl->assign('EMAIL_EDITOR_OPTION', 'CHECKED');
|
||||
}
|
||||
$description_html = from_html($focus->description_html);
|
||||
$description = $focus->description;
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
// signatures
|
||||
if($sig = $current_user->getDefaultSignature()) {
|
||||
if(!$focus->hasSignatureInBody($sig) && $focus->type != 'draft') {
|
||||
if($current_user->getPreference('signature_prepend')) {
|
||||
$description_html = '<br />'.from_html($sig['signature_html']).'<br /><br />'.$description_html;
|
||||
$description = "\n".$sig['signature']."\n\n".$description;
|
||||
} else {
|
||||
$description_html .= '<br /><br />'.from_html($sig['signature_html']);
|
||||
$description = $description."\n\n".$sig['signature'];
|
||||
}
|
||||
}
|
||||
}
|
||||
$xtpl->assign('DESCRIPTION', $description);
|
||||
// sigs
|
||||
/////////////////////////////////////////////////
|
||||
$tiny = new SugarTinyMCE();
|
||||
$ed = $tiny->getInstance("description_html");
|
||||
$xtpl->assign("TINY", $ed);
|
||||
$xtpl->assign("DESCRIPTION_HTML", $description_html);
|
||||
|
||||
$xtpl->parse('main.htmlarea');
|
||||
//// END TEXT EDITOR
|
||||
///////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////
|
||||
//// SPECIAL INBOUND LANDING SCREEN ASSIGNS
|
||||
if(!empty($_REQUEST['inbound_email_id'])) {
|
||||
if(!empty($_REQUEST['start'])) {
|
||||
$parts = $focus->getStartPage(base64_decode($_REQUEST['start']));
|
||||
$xtpl->assign('RETURN_ACTION', $parts['action']);
|
||||
$xtpl->assign('RETURN_MODULE', $parts['module']);
|
||||
$xtpl->assign('GROUP', $parts['group']);
|
||||
}
|
||||
$xtpl->assign('ASSIGNED_USER_ID', $current_user->id);
|
||||
$xtpl->assign('MYINBOX', 'this.form.type.value=\'inbound\';');
|
||||
}
|
||||
//// END SPECIAL INBOUND LANDING SCREEN ASSIGNS
|
||||
///////////////////////////////////////
|
||||
|
||||
echo '<script>var disabledModules='. $json->encode($disabled_parent_types) . ';</script>';
|
||||
$jsVars = 'var lbl_send_anyways = "'.$mod_strings['LBL_SEND_ANYWAYS'].'";';
|
||||
$xtpl->assign('JS_VARS', $jsVars);
|
||||
$xtpl->parse("main");
|
||||
$xtpl->out("main");
|
||||
echo '<script>checkParentType(document.EditView.parent_type.value, document.EditView.change_parent);</script>';
|
||||
//// END XTEMPLATE ASSIGNMENT
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
$javascript = new javascript();
|
||||
$javascript->setFormName('EditView');
|
||||
$javascript->setSugarBean($focus);
|
||||
$skip_fields = array();
|
||||
if($email_type == 'out') {
|
||||
$skip_fields['name'] = 1;
|
||||
$skip_fields['date_start'] = 1;
|
||||
}
|
||||
$javascript->addAllFields('',$skip_fields);
|
||||
$javascript->addToValidateBinaryDependency('parent_name', 'alpha', $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $mod_strings['LBL_MEMBER_OF'], 'false', '', 'parent_id');
|
||||
$javascript->addToValidateBinaryDependency('parent_type', 'alpha', $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $mod_strings['LBL_MEMBER_OF'], 'false', '', 'parent_id');
|
||||
$javascript->addToValidateBinaryDependency('user_name', 'alpha', $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $app_strings['LBL_ASSIGNED_TO'], 'false', '', 'assigned_user_id');
|
||||
if($email_type == 'archived') {
|
||||
$javascript->addFieldIsValidDate('date_start', 'date', $mod_strings['LBL_DATE'], $mod_strings['ERR_DATE_START'], true);
|
||||
$javascript->addFieldIsValidTime('time_start', 'time', $mod_strings['LBL_TIME'], $mod_strings['ERR_TIME_SENT'], true);
|
||||
}
|
||||
echo $javascript->getScript();
|
||||
3157
modules/Emails/Email.php
Executable file
3157
modules/Emails/Email.php
Executable file
File diff suppressed because it is too large
Load Diff
3318
modules/Emails/Email1.php
Executable file
3318
modules/Emails/Email1.php
Executable file
File diff suppressed because it is too large
Load Diff
2936
modules/Emails/EmailUI.php
Executable file
2936
modules/Emails/EmailUI.php
Executable file
File diff suppressed because it is too large
Load Diff
1598
modules/Emails/EmailUIAjax.php
Executable file
1598
modules/Emails/EmailUIAjax.php
Executable file
File diff suppressed because it is too large
Load Diff
42
modules/Emails/Forms.php
Executable file
42
modules/Emails/Forms.php
Executable file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
* *******************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description:
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. All Rights
|
||||
* Reserved. Contributor(s): ______________________________________..
|
||||
*********************************************************************************/
|
||||
49
modules/Emails/GenerateQuickComposeFrame.php
Executable file
49
modules/Emails/GenerateQuickComposeFrame.php
Executable file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
/**
|
||||
* Render the quick compose frame needed by the UI. The data is returned as a JSOn
|
||||
* object and consumed by the client in an ajax call.
|
||||
*/
|
||||
|
||||
require_once('modules/Emails/EmailUI.php');
|
||||
$em = new EmailUI();
|
||||
$out = $em->displayQuickComposeEmailFrame();
|
||||
|
||||
@ob_end_clean();
|
||||
ob_start();
|
||||
echo $out;
|
||||
ob_end_flush();
|
||||
72
modules/Emails/Grab.php
Executable file
72
modules/Emails/Grab.php
Executable file
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
global $current_user;
|
||||
|
||||
|
||||
$focus = new Email();
|
||||
// Get Group User IDs
|
||||
$groupUserQuery = 'SELECT name, group_id FROM inbound_email ie INNER JOIN users u ON (ie.group_id = u.id AND u.is_group = 1)';
|
||||
_pp($groupUserQuery);
|
||||
$r = $focus->db->query($groupUserQuery);
|
||||
$groupIds = '';
|
||||
while($a = $focus->db->fetchByAssoc($r)) {
|
||||
$groupIds .= "'".$a['group_id']."', ";
|
||||
}
|
||||
$groupIds = substr($groupIds, 0, (strlen($groupIds) - 2));
|
||||
|
||||
$query = 'SELECT emails.id AS id FROM emails';
|
||||
$query .= " WHERE emails.deleted = 0 AND emails.status = 'unread' AND emails.assigned_user_id IN ({$groupIds})";
|
||||
//$query .= ' LIMIT 1';
|
||||
|
||||
//_ppd($query);
|
||||
$r2 = $focus->db->query($query);
|
||||
$count = 0;
|
||||
$a2 = $focus->db->fetchByAssoc($r2);
|
||||
|
||||
$focus->retrieve($a2['id']);
|
||||
$focus->assigned_user_id = $current_user->id;
|
||||
$focus->save();
|
||||
|
||||
if(!empty($a2['id'])) {
|
||||
header('Location: index.php?module=Emails&action=ListView&type=inbound&assigned_user_id='.$current_user->id);
|
||||
} else {
|
||||
header('Location: index.php?module=Emails&action=ListView&show_error=true&type=inbound&assigned_user_id='.$current_user->id);
|
||||
}
|
||||
|
||||
?>
|
||||
283
modules/Emails/ListView.php
Executable file
283
modules/Emails/ListView.php
Executable file
@@ -0,0 +1,283 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
// to prevent StoreQuery() from hijacking all values.
|
||||
$_REQUEST = $_REQUEST;
|
||||
/* default to Inbox view: this does belong in the OUTPUT section, but we need these set for StoreQuery */
|
||||
if(!empty($_REQUEST['action']) && $_REQUEST['action'] == 'index') {
|
||||
global $current_user;
|
||||
$_REQUEST['type'] = 'inbound';
|
||||
$_REQUEST['assigned_user_id'] = $current_user->id;
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// NAV FROM MASS UPDATE
|
||||
if(isset($_REQUEST['ie_assigned_user_id']) && !empty($_REQUEST['ie_assigned_user_id'])) {
|
||||
// cn: bug 9103 - hooked from MassUpdate->getMassUpdateFormHeader();
|
||||
$_REQUEST['assigned_user_id'] = $_REQUEST['ie_assigned_user_id'];
|
||||
$_REQUEST['status'] = ''; // "Archiving" MyInbox emails presets the search criteria below
|
||||
}
|
||||
//// END NAV FROM MASS UPDATE
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
require_once('XTemplate/xtpl.php');
|
||||
|
||||
require_once('modules/Emails/Email.php');
|
||||
|
||||
|
||||
require_once('include/ListView/ListView.php');
|
||||
require_once('include/utils.php');
|
||||
require_once('modules/MySettings/StoreQuery.php');
|
||||
global $app_strings;
|
||||
global $app_list_strings;
|
||||
global $mod_strings;
|
||||
global $urlPrefix;
|
||||
global $currentModule;
|
||||
global $image_path;
|
||||
global $theme;
|
||||
global $focus_list; // focus_list is the means of passing data to a ListView.
|
||||
|
||||
$focus = new Email();
|
||||
$header_text = '';
|
||||
$where = '';
|
||||
$type = '';
|
||||
$assigned_user_id = '';
|
||||
$group = '';
|
||||
$search_adv = '';
|
||||
$whereClauses = array();
|
||||
$error = '';
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
////
|
||||
//// SEARCH FORM FUNCTIONALITY
|
||||
//// SEARCH QUERY GENERATION
|
||||
$storeQuery = new StoreQuery();
|
||||
|
||||
// this allows My Inbox, Group Inbox, etc. to have separate stored queries
|
||||
// for the same ListView.php
|
||||
if(isset($_REQUEST['type'])) $Qtype = $_REQUEST['type'];
|
||||
else $Qtype = '';
|
||||
if(isset($_REQUEST['assigned_user_id']) && $_REQUEST['assigned_user_id'] == $current_user->id) {
|
||||
$Qassigned_user_id = $_REQUEST['assigned_user_id'];
|
||||
} else {
|
||||
$Qassigned_user_id = '';
|
||||
}
|
||||
|
||||
if(!isset($_REQUEST['query'])){
|
||||
//_pp('loading: '.$currentModule.$Qtype.$Qgroup);
|
||||
//_pp($current_user->user_preferences[$currentModule.$Qtype.'Q']);
|
||||
$storeQuery->loadQuery($currentModule.$Qtype);
|
||||
$storeQuery->populateRequest();
|
||||
} else {
|
||||
//_pp($current_user->user_preferences[$currentModule.$Qtype.'Q']);
|
||||
//_pp('saving: '.$currentModule.$Qtype);
|
||||
$storeQuery->saveFromGet($currentModule.$Qtype);
|
||||
}
|
||||
|
||||
|
||||
if(isset($_REQUEST['query'])) {
|
||||
// we have a query
|
||||
if (isset($_REQUEST['type'])) $email_type = $_REQUEST['type'];
|
||||
if (isset($_REQUEST['assigned_to'])) $assigned_to = $_REQUEST['assigned_to'];
|
||||
if (isset($_REQUEST['status'])) $status = $_REQUEST['status'];
|
||||
if (isset($_REQUEST['name'])) $name = $_REQUEST['name'];
|
||||
if (isset($_REQUEST['contact_name'])) $contact_name = $_REQUEST['contact_name'];
|
||||
|
||||
if(isset($email_type) && $email_type != "") $whereClauses['emails.type'] = "emails.type = '".$GLOBALS['db']->quote($email_type)."'";
|
||||
if(isset($assigned_to) && $assigned_to != "") $whereClauses['emails.assigned_user_id'] = "emails.assigned_user_id = '".$GLOBALS['db']->quote($assigned_to)."'";
|
||||
if(isset($status) && $status != "") $whereClauses['emails.status'] = "emails.status = '".$GLOBALS['db']->quote($status)."'";
|
||||
if(isset($name) && $name != "") $whereClauses['emails.name'] = "emails.name like '".$GLOBALS['db']->quote($name)."%'";
|
||||
if(isset($contact_name) && $contact_name != '') {
|
||||
$contact_names = explode(" ", $contact_name);
|
||||
foreach ($contact_names as $name) {
|
||||
$whereClauses['contacts.name'] = "parent_id in (select contacts.id from contacts where contacts.last_name like '".$GLOBALS['db']->quote($name)."%')";
|
||||
}
|
||||
}
|
||||
|
||||
$focus->custom_fields->setWhereClauses($whereClauses);
|
||||
|
||||
$GLOBALS['log']->info("Here is the where clause for the list view: $where");
|
||||
} // end isset($_REQUEST['query'])
|
||||
|
||||
|
||||
|
||||
//// OUTPUT GENERATION
|
||||
|
||||
if (!isset($_REQUEST['search_form']) || $_REQUEST['search_form'] != 'false') {
|
||||
// ASSIGNMENTS pre-processing
|
||||
$email_type_sel = '';
|
||||
$assigned_to_sel = '';
|
||||
$status_sel = '';
|
||||
if(isset($_REQUEST['email_type'])) $email_type_sel = $_REQUEST['email_type'];
|
||||
if(isset($_REQUEST['assigned_to'])) $assigned_to_sel = $_REQUEST['assigned_to'];
|
||||
if(isset($_REQUEST['status'])) $status_sel = $_REQUEST['status'];
|
||||
if(isset($_REQUEST['search'])) $search_adv = $_REQUEST['search'];
|
||||
|
||||
// drop-downs values
|
||||
$r = $focus->db->query("SELECT id, first_name, last_name FROM users WHERE deleted = 0 AND status = 'Active' OR users.is_group = 1 ORDER BY status");
|
||||
$users[] = '';
|
||||
while($a = $focus->db->fetchByAssoc($r)) {
|
||||
$users[$a['id']] = $a['first_name'].' '.$a['last_name'];
|
||||
}
|
||||
|
||||
$email_types[] = '';
|
||||
$email_types = array_merge($email_types, $app_list_strings['dom_email_types']);
|
||||
$email_status[] = '';
|
||||
$email_status = array_merge($email_status, $app_list_strings['dom_email_status']);
|
||||
$types = get_select_options_with_id($email_types, $email_type_sel);
|
||||
$assigned_to = get_select_options_with_id($users, $assigned_to_sel);
|
||||
$email_status = get_select_options_with_id($email_status, $status_sel);
|
||||
|
||||
// ASSIGNMENTS AND OUTPUT
|
||||
if(isset($_REQUEST['type']) && $_REQUEST['type'] != '') $emailType = $_REQUEST['type'];
|
||||
else $emailType = '';
|
||||
|
||||
$search_form = new XTemplate ('modules/Emails/SearchFormMyInbox.html');
|
||||
|
||||
$search_form->assign('MOD', $mod_strings);
|
||||
$search_form->assign('APP', $app_strings);
|
||||
$search_form->assign('IMAGE_PATH', $image_path);
|
||||
$search_form->assign('ADVANCED_SEARCH_PNG', get_image($image_path.'advanced_search','alt="'.$app_strings['LNK_ADVANCED_SEARCH'].'" border="0"'));
|
||||
$search_form->assign('BASIC_SEARCH_PNG', get_image($image_path.'basic_search','alt="'.$app_strings['LNK_BASIC_SEARCH'].'" border="0"'));
|
||||
$search_form->assign('TYPE_OPTIONS', $types);
|
||||
$search_form->assign('ASSIGNED_TO_OPTIONS', $assigned_to);
|
||||
$search_form->assign('STATUS_OPTIONS', $email_status);
|
||||
$search_form->assign('ADV_URL', $_SERVER['REQUEST_URI']);
|
||||
$search_form->assign('SEARCH_ADV', $search_adv);
|
||||
|
||||
|
||||
if(isset($_REQUEST['name'])) $search_form->assign('NAME', $_REQUEST['name']);
|
||||
if(isset($_REQUEST['contact_name'])) $search_form->assign('CONTACT_NAME', $_REQUEST['contact_name']);
|
||||
if(isset($current_user_only)) $search_form->assign('CURRENT_USER_ONLY', "checked");
|
||||
|
||||
// adding custom fields:
|
||||
$focus->custom_fields->populateXTPL($search_form, 'search' );
|
||||
$search_form->assign('SEARCH_ACTION', 'ListView');
|
||||
$search_form->assign('TYPE', $Qtype);
|
||||
if(!empty($_REQUEST['assigned_user_id'])) {
|
||||
$search_form->assign('ASSIGNED_USER_ID', $_REQUEST['assigned_user_id']);
|
||||
}
|
||||
$search_form->assign('JAVASCRIPT', $focus->js_set_archived().$focus->u_get_clear_form_js($Qtype, '', $Qassigned_user_id));
|
||||
}
|
||||
//// END SEARCH FORM FUNCTIONALITY
|
||||
////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// NAVIGATION HACK
|
||||
$_SESSION['emailStartAction'] = ''; // empty this value to allow new writes
|
||||
//// END NAVIGATION HACK
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
////
|
||||
//// INBOX FUNCTIONALITY
|
||||
// for Inbox
|
||||
|
||||
//// END INBOX FUNCTIONALITY
|
||||
////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
$ListView = new ListView();
|
||||
|
||||
$ListView->initNewXTemplate('modules/Emails/ListView.html',$mod_strings);
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// OUTPUT
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// make sure $display_title is set prior to display
|
||||
if (!isset($display_title)) {
|
||||
$display_title = '';
|
||||
}
|
||||
|
||||
echo "\n<p>\n";
|
||||
echo get_module_title("Emails", $mod_strings['LBL_MODULE_TITLE'].$display_title, true);
|
||||
echo "\n</p>\n";
|
||||
// admin-edit
|
||||
if(is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])){
|
||||
$header_text = " <a href='index.php?action=index&module=DynamicLayout&from_action=SearchForm&from_module=".$_REQUEST['module'] ."'>".get_image($image_path."EditLayout","border='0' alt='Edit Layout' align='bottom'")."</a>";
|
||||
}
|
||||
// search form
|
||||
//echo get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE']. $header_text, "", false);
|
||||
// ADVANCED SEARCH
|
||||
if(isset($_REQUEST['search']) && $_REQUEST['search'] == 'advanced') {
|
||||
$search_form->parse('adv');
|
||||
$search_form->out('adv');
|
||||
|
||||
} else {
|
||||
$search_form->parse('main');
|
||||
$search_form->out('main');
|
||||
}
|
||||
|
||||
// CONSTRUCT WHERE STRING FROM WHERECLAUSE ARRAY
|
||||
foreach($whereClauses as $clause) {
|
||||
if($where != "")
|
||||
$where .= " AND ";
|
||||
$where .= $clause;
|
||||
}
|
||||
|
||||
//echo $where;
|
||||
|
||||
if( (isset($_REQUEST['assigned_user_id']) && $_REQUEST['assigned_user_id'] != '') && $_REQUEST['type'] == 'inbound') {
|
||||
$ListView->xTemplateAssign('TAKE',$focus->pickOneButton());
|
||||
if($current_user->hasPersonalEmail()) {
|
||||
$ListView->xTemplateAssign('CHECK_MAIL',$focus->checkInbox('personal'));
|
||||
}
|
||||
}
|
||||
if( (isset($_REQUEST['show_error']) && $_REQUEST['show_error'] == 'true') && $_REQUEST['type'] == 'inbound') {
|
||||
$ListView->xTemplateAssign('TAKE_ERROR', $focus->takeError());
|
||||
}
|
||||
//echo $focus->quickCreateJS();
|
||||
$ListView->setAdditionalDetails();
|
||||
$ListView->xTemplateAssign('ATTACHMENT_HEADER', get_image('themes/'.$theme.'/images/attachment',"","",""));
|
||||
$ListView->xTemplateAssign('ERROR', $error);
|
||||
//$ListView->setHeaderTitle($display_title . $header_text );
|
||||
$ListView->setQuery($where, "", "date_sent, date_entered DESC", "EMAIL");
|
||||
$ListView->processListView($focus, "main", "EMAIL");
|
||||
|
||||
$queryToStore = $focus->create_list_query($ListView->query_orderby, $ListView->query_where);
|
||||
SugarVCR::store($focus->module_dir, $queryToStore);
|
||||
?>
|
||||
248
modules/Emails/ListViewAll.php
Executable file
248
modules/Emails/ListViewAll.php
Executable file
@@ -0,0 +1,248 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
require_once('XTemplate/xtpl.php');
|
||||
|
||||
require_once('modules/Emails/Email.php');
|
||||
|
||||
|
||||
require_once('include/ListView/ListView.php');
|
||||
require_once('include/utils.php');
|
||||
require_once('modules/MySettings/StoreQuery.php');
|
||||
|
||||
|
||||
$focus = new Email();
|
||||
$header_text = '';
|
||||
$where = '';
|
||||
$type = '';
|
||||
$assigned_user_id = '';
|
||||
$group = '';
|
||||
$search_adv = '';
|
||||
$whereClauses = array();
|
||||
$error = '';
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
////
|
||||
//// SEARCH FORM FUNCTIONALITY
|
||||
//// SEARCH QUERY GENERATION
|
||||
$storeQuery = new StoreQuery();
|
||||
|
||||
// this allows My Inbox, Group Inbox, etc. to have separate stored queries
|
||||
// for the same ListView.php
|
||||
if(isset($_REQUEST['type'])) $Qtype = $_REQUEST['type'];
|
||||
else $Qtype = '';
|
||||
if(isset($_REQUEST['assigned_user_id']) && $_REQUEST['assigned_user_id'] == $current_user->id) {
|
||||
$Qassigned_user_id = $_REQUEST['assigned_user_id'];
|
||||
} else {
|
||||
$Qassigned_user_id = '';
|
||||
}
|
||||
|
||||
if(!isset($_REQUEST['query'])){
|
||||
//_pp('loading: '.$currentModule.$Qtype.$Qgroup);
|
||||
//_pp($current_user->user_preferences[$currentModule.$Qtype.'Q']);
|
||||
$storeQuery->loadQuery($currentModule.$Qtype);
|
||||
$storeQuery->populateRequest();
|
||||
} else {
|
||||
//_pp($current_user->user_preferences[$currentModule.$Qtype.'Q']);
|
||||
//_pp('saving: '.$currentModule.$Qtype);
|
||||
$storeQuery->saveFromGet($currentModule.$Qtype);
|
||||
}
|
||||
|
||||
|
||||
if(isset($_REQUEST['query'])) {
|
||||
// we have a query
|
||||
if (isset($_REQUEST['email_type'])) $email_type = $_REQUEST['email_type'];
|
||||
if (isset($_REQUEST['assigned_to'])) $assigned_to = $_REQUEST['assigned_to'];
|
||||
if (isset($_REQUEST['status'])) $status = $_REQUEST['status'];
|
||||
if (isset($_REQUEST['name'])) $name = $_REQUEST['name'];
|
||||
if (isset($_REQUEST['contact_name'])) $contact_name = $_REQUEST['contact_name'];
|
||||
|
||||
if(isset($email_type) && $email_type != "") $whereClauses['emails.type'] = "emails.type = '".$GLOBALS['db']->quote($email_type)."'";
|
||||
if(isset($assigned_to) && $assigned_to != "") $whereClauses['emails.assigned_user_id'] = "emails.assigned_user_id = '".$GLOBALS['db']->quote($assigned_to)."'";
|
||||
if(isset($status) && $status != "") $whereClauses['emails.status'] = "emails.status = '".$GLOBALS['db']->quote($status)."'";
|
||||
if(isset($name) && $name != "") $whereClauses['emails.name'] = "emails.name like '".$GLOBALS['db']->quote($name)."%'";
|
||||
if(isset($contact_name) && $contact_name != '') {
|
||||
$contact_names = explode(" ", $contact_name);
|
||||
foreach ($contact_names as $name) {
|
||||
$whereClauses['contacts.name'] = "(contacts.first_name like '".$GLOBALS['db']->quote($name)."%' OR contacts.last_name like '".$GLOBALS['db']->quote($name)."%')";
|
||||
}
|
||||
}
|
||||
|
||||
$focus->custom_fields->setWhereClauses($whereClauses);
|
||||
$GLOBALS['log']->info("Here is the where clause for the list view: $where");
|
||||
} // end isset($_REQUEST['query'])
|
||||
|
||||
|
||||
|
||||
//// OUTPUT GENERATION
|
||||
|
||||
if (!isset($_REQUEST['search_form']) || $_REQUEST['search_form'] != 'false') {
|
||||
// ASSIGNMENTS pre-processing
|
||||
$email_type_sel = '';
|
||||
$assigned_to_sel = '';
|
||||
$status_sel = '';
|
||||
if(isset($_REQUEST['email_type'])) $email_type_sel = $_REQUEST['email_type'];
|
||||
if(isset($_REQUEST['assigned_to'])) $assigned_to_sel = $_REQUEST['assigned_to'];
|
||||
if(isset($_REQUEST['status'])) $status_sel = $_REQUEST['status'];
|
||||
if(isset($_REQUEST['search'])) $search_adv = $_REQUEST['search'];
|
||||
|
||||
// drop-downs values
|
||||
$r = $focus->db->query("SELECT id, user_name FROM users WHERE deleted = 0 AND status = 'Active' OR users.is_group = 1 ORDER BY status");
|
||||
$users[] = '';
|
||||
while($a = $focus->db->fetchByAssoc($r)) {
|
||||
$users[$a['id']] = $a['user_name'];
|
||||
}
|
||||
|
||||
$email_types[] = '';
|
||||
$email_types = array_merge($email_types, $app_list_strings['dom_email_types']);
|
||||
$email_status[] = '';
|
||||
$email_status = array_merge($email_status, $app_list_strings['dom_email_status']);
|
||||
$types = get_select_options_with_id($email_types, $email_type_sel);
|
||||
$assigned_to = get_select_options_with_id($users, $assigned_to_sel);
|
||||
$email_status = get_select_options_with_id($email_status, $status_sel);
|
||||
|
||||
// ASSIGNMENTS AND OUTPUT
|
||||
if(isset($_REQUEST['type']) && $_REQUEST['type'] != '') $emailType = $_REQUEST['type'];
|
||||
else $emailType = '';
|
||||
switch($emailType) {
|
||||
case 'out':
|
||||
$search_form = new XTemplate ('modules/Emails/SearchFormSent.html');
|
||||
break;
|
||||
|
||||
case 'draft':
|
||||
$search_form = new XTemplate ('modules/Emails/SearchFormSent.html');
|
||||
break;
|
||||
|
||||
case 'archived':
|
||||
case 'inbound':
|
||||
$search_form = new XTemplate ('modules/Emails/SearchFormMyInbox.html');
|
||||
break;
|
||||
|
||||
default:
|
||||
$search_form = new XTemplate ('modules/Emails/SearchFormMyInbox.html');
|
||||
break;
|
||||
}
|
||||
|
||||
$search_form->assign('MOD', $mod_strings);
|
||||
$search_form->assign('APP', $app_strings);
|
||||
$search_form->assign('IMAGE_PATH', $image_path);
|
||||
$search_form->assign('ADVANCED_SEARCH_PNG', get_image($image_path.'advanced_search','alt="'.$app_strings['LNK_ADVANCED_SEARCH'].'" border="0"'));
|
||||
$search_form->assign('BASIC_SEARCH_PNG', get_image($image_path.'basic_search','alt="'.$app_strings['LNK_BASIC_SEARCH'].'" border="0"'));
|
||||
$search_form->assign('TYPE_OPTIONS', $types);
|
||||
$search_form->assign('ASSIGNED_TO_OPTIONS', $assigned_to);
|
||||
$search_form->assign('STATUS_OPTIONS', $email_status);
|
||||
$search_form->assign('ADV_URL', $_SERVER['REQUEST_URI']);
|
||||
$search_form->assign('SEARCH_ADV', $search_adv);
|
||||
|
||||
|
||||
if(isset($_REQUEST['name'])) $search_form->assign('NAME', $_REQUEST['name']);
|
||||
if(isset($_REQUEST['contact_name'])) $search_form->assign('CONTACT_NAME', $_REQUEST['contact_name']);
|
||||
if(isset($current_user_only)) $search_form->assign('CURRENT_USER_ONLY', "checked");
|
||||
|
||||
// adding custom fields:
|
||||
$focus->custom_fields->populateXTPL($search_form, 'search' );
|
||||
$search_form->assign('SEARCH_ACTION', 'ListView');
|
||||
$search_form->assign('TYPE', $Qtype);
|
||||
if(!empty($_REQUEST['assigned_user_id'])) {
|
||||
$search_form->assign('ASSIGNED_USER_ID', $_REQUEST['assigned_user_id']);
|
||||
}
|
||||
$search_form->assign('JAVASCRIPT', $focus->js_set_archived().$focus->u_get_clear_form_js($Qtype, '', $Qassigned_user_id));
|
||||
}
|
||||
//// END SEARCH FORM FUNCTIONALITY
|
||||
////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// STANDARD EMAIL BOX FUNCTIONS
|
||||
global $email_title;
|
||||
$display_title = $mod_strings['LBL_LIST_FORM_TITLE'];
|
||||
if($email_title)$display_title = $email_title;
|
||||
|
||||
$ListView = new ListView();
|
||||
$ListView->initNewXTemplate('modules/Emails/ListViewAll.html', $mod_strings);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// OUTPUT
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
echo "\n<p>\n";
|
||||
echo get_module_title("Emails", $mod_strings['LBL_MODULE_TITLE'].$display_title, true);
|
||||
echo "\n</p>\n";
|
||||
// admin-edit
|
||||
if(is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])){
|
||||
$header_text = " <a href='index.php?action=index&module=DynamicLayout&from_action=SearchForm&from_module=".$_REQUEST['module'] ."'>".get_image($image_path."EditLayout","border='0' alt='Edit Layout' align='bottom'")."</a>";
|
||||
}
|
||||
// search form
|
||||
echo get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE']. $header_text, "", false);
|
||||
// ADVANCED SEARCH
|
||||
if(isset($_REQUEST['search']) && $_REQUEST['search'] == 'advanced') {
|
||||
$search_form->parse('adv');
|
||||
$search_form->out('adv');
|
||||
|
||||
} else {
|
||||
$search_form->parse('main');
|
||||
$search_form->out('main');
|
||||
}
|
||||
|
||||
// CONSTRUCT WHERE STRING FROM WHERECLAUSE ARRAY
|
||||
foreach($whereClauses as $clause) {
|
||||
if($where != "")
|
||||
$where .= " AND ";
|
||||
$where .= $clause;
|
||||
}
|
||||
|
||||
//echo $where;
|
||||
|
||||
//echo $focus->quickCreateJS();
|
||||
$ListView->setAdditionalDetails();
|
||||
$ListView->xTemplateAssign('ATTACHMENT_HEADER', get_image('themes/'.$theme.'/images/attachment',"","",""));
|
||||
$ListView->xTemplateAssign('ERROR', $error);
|
||||
$ListView->setHeaderTitle($display_title . $header_text );
|
||||
$ListView->setQuery($where, "", "date_sent, date_entered DESC", "EMAIL");
|
||||
$ListView->processListView($focus, "main", "EMAIL");
|
||||
?>
|
||||
263
modules/Emails/ListViewGroup.php
Executable file
263
modules/Emails/ListViewGroup.php
Executable file
@@ -0,0 +1,263 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
require_once('modules/MySettings/StoreQuery.php');
|
||||
|
||||
global $app_strings;
|
||||
global $app_list_strings;
|
||||
global $mod_strings;
|
||||
global $urlPrefix;
|
||||
global $currentModule;
|
||||
|
||||
global $theme;
|
||||
global $focus_list; // focus_list is the means of passing data to a ListView.
|
||||
|
||||
$focus = new Email();
|
||||
$header_text = '';
|
||||
$where = '';
|
||||
$type = '';
|
||||
$assigned_user_id = '';
|
||||
$group = '';
|
||||
$search_adv = '';
|
||||
$whereClauses = array();
|
||||
$error = '';
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
////
|
||||
//// SEARCH FORM FUNCTIONALITY
|
||||
//// SEARCH QUERY GENERATION
|
||||
$storeQuery = new StoreQuery();
|
||||
|
||||
if(!isset($_REQUEST['query'])){
|
||||
//_pp('loading: '.$currentModule.'Group');
|
||||
//_pp($current_user->user_preferences[$currentModule.'GroupQ']);
|
||||
$storeQuery->loadQuery($currentModule.'Group');
|
||||
$storeQuery->populateRequest();
|
||||
} else {
|
||||
//_pp($current_user->user_preferences[$currentModule.'GroupQ']);
|
||||
//_pp('saving: '.$currentModule.'Group');
|
||||
$storeQuery->saveFromGet($currentModule.'Group');
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['query'])) {
|
||||
// we have a query
|
||||
if(isset($_REQUEST['email_type'])) $email_type = $_REQUEST['email_type'];
|
||||
if(isset($_REQUEST['assigned_to'])) $assigned_to = $_REQUEST['assigned_to'];
|
||||
if(isset($_REQUEST['status'])) $status = $_REQUEST['status'];
|
||||
if(isset($_REQUEST['name'])) $name = $_REQUEST['name'];
|
||||
if(isset($_REQUEST['contact_name'])) $contact_name = $_REQUEST['contact_name'];
|
||||
|
||||
if(isset($email_type) && $email_type != "") $whereClauses['emails.type'] = "emails.type = '".$GLOBALS['db']->quote($email_type)."'";
|
||||
if(isset($assigned_to) && $assigned_to != "") $whereClauses['emails.assigned_user_id'] = "emails.assigned_user_id = '".$GLOBALS['db']->quote($assigned_to)."'";
|
||||
if(isset($status) && $status != "") $whereClauses['emails.status'] = "emails.status = '".$GLOBALS['db']->quote($status)."'";
|
||||
if(isset($name) && $name != "") $whereClauses['emails.name'] = "emails.name like '".$GLOBALS['db']->quote($name)."%'";
|
||||
if(isset($contact_name) && $contact_name != '') {
|
||||
$contact_names = explode(" ", $contact_name);
|
||||
foreach ($contact_names as $name) {
|
||||
$whereClauses['contacts.name'] = "(contacts.first_name like '".$GLOBALS['db']->quote($name)."%' OR contacts.last_name like '".$GLOBALS['db']->quote($name)."%')";
|
||||
}
|
||||
}
|
||||
|
||||
$focus->custom_fields->setWhereClauses($whereClauses);
|
||||
|
||||
$GLOBALS['log']->info("Here is the where clause for the list view: $where");
|
||||
} // end isset($_REQUEST['query'])
|
||||
|
||||
|
||||
|
||||
//// OUTPUT GENERATION
|
||||
|
||||
if (!isset($_REQUEST['search_form']) || $_REQUEST['search_form'] != 'false') {
|
||||
// ASSIGNMENTS pre-processing
|
||||
$email_type_sel = '';
|
||||
$assigned_to_sel = '';
|
||||
$status_sel = '';
|
||||
if(isset($_REQUEST['email_type'])) $email_type_sel = $_REQUEST['email_type'];
|
||||
if(isset($_REQUEST['assigned_to'])) $assigned_to_sel = $_REQUEST['assigned_to'];
|
||||
if(isset($_REQUEST['status'])) $status_sel = $_REQUEST['status'];
|
||||
if(isset($_REQUEST['search'])) $search_adv = $_REQUEST['search'];
|
||||
|
||||
// drop-downs values
|
||||
$r = $focus->db->query("SELECT id, user_name FROM users WHERE deleted = 0 AND status = 'Active' OR users.is_group = 1 ORDER BY status");
|
||||
$users[] = '';
|
||||
while($a = $focus->db->fetchByAssoc($r)) {
|
||||
$users[$a['id']] = $a['user_name'];
|
||||
}
|
||||
|
||||
$email_types[] = '';
|
||||
$email_types = array_merge($email_types, $app_list_strings['dom_email_types']);
|
||||
$email_status[] = '';
|
||||
$email_status = array_merge($email_status, $app_list_strings['dom_email_status']);
|
||||
$types = get_select_options_with_id($email_types, $email_type_sel);
|
||||
$assigned_to = get_select_options_with_id($users, $assigned_to_sel);
|
||||
$email_status = get_select_options_with_id($email_status, $status_sel);
|
||||
|
||||
// ASSIGNMENTS AND OUTPUT
|
||||
$search_form = new XTemplate ('modules/Emails/SearchFormGroupInbox.html');
|
||||
$search_form->assign('MOD', $mod_strings);
|
||||
$search_form->assign('APP', $app_strings);
|
||||
$search_form->assign('ADVANCED_SEARCH_PNG', SugarThemeRegistry::current()->getImage('advanced_search','alt="'.$app_strings['LNK_ADVANCED_SEARCH'].'" border="0"'));
|
||||
$search_form->assign('BASIC_SEARCH_PNG', SugarThemeRegistry::current()->getImage('basic_search','alt="'.$app_strings['LNK_BASIC_SEARCH'].'" border="0"'));
|
||||
$search_form->assign('TYPE_OPTIONS', $types);
|
||||
$search_form->assign('ASSIGNED_TO_OPTIONS', $assigned_to);
|
||||
$search_form->assign('STATUS_OPTIONS', $email_status);
|
||||
$search_form->assign('ADV_URL', $_SERVER['REQUEST_URI']);
|
||||
$search_form->assign('SEARCH_ADV', $search_adv);
|
||||
$search_form->assign('SEARCH_ACTION', 'ListViewGroup');
|
||||
|
||||
if(isset($_REQUEST['name'])) $search_form->assign('NAME', $_REQUEST['name']);
|
||||
if(isset($_REQUEST['contact_name'])) $search_form->assign('CONTACT_NAME', $_REQUEST['contact_name']);
|
||||
if(isset($current_user_only)) $search_form->assign('CURRENT_USER_ONLY', "checked");
|
||||
|
||||
// adding custom fields:
|
||||
$focus->custom_fields->populateXTPL($search_form, 'search' );
|
||||
|
||||
if(!empty($get['assigned_user_id'])) {
|
||||
$search_form->assign('ASSIGNED_USER_ID', $get['assigned_user_id']);
|
||||
}
|
||||
$search_form->assign('JAVASCRIPT', $focus->u_get_clear_form_js());
|
||||
}
|
||||
//// END SEARCH FORM FUNCTIONALITY
|
||||
////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// NAVIGATION HACK
|
||||
$_SESSION['emailStartAction'] = ''; // empty this value to allow new writes
|
||||
//// END NAVIGATION HACK
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
////
|
||||
//// INBOX FUNCTIONALITY
|
||||
// for Inbox
|
||||
$r = $focus->db->query('SELECT count(id) AS c FROM users WHERE users.is_group = 1 AND deleted = 0');
|
||||
$a = $focus->db->fetchByAssoc($r);
|
||||
|
||||
$or = 'emails.assigned_user_id IN (\'abc\''; // must have a dummy entry to force group inboxes to not show personal emails
|
||||
if($a['c'] > 0) {
|
||||
|
||||
$r = $focus->db->query('SELECT id FROM users WHERE users.is_group = 1 AND deleted = 0');
|
||||
while($a = $focus->db->fetchByAssoc($r)) {
|
||||
$or .= ',\''.$a['id'].'\'';
|
||||
}
|
||||
}
|
||||
$or .= ') ';
|
||||
$whereClauses['emails.assigned_user_id'] = $or;
|
||||
$whereClauses['emails.type'] = 'emails.type = \'inbound\'';
|
||||
|
||||
$display_title = $mod_strings['LBL_LIST_TITLE_GROUP_INBOX'];
|
||||
//// END INBOX FUNCTIONALITY
|
||||
////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// OUTPUT
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
echo get_module_title("Emails", $mod_strings['LBL_MODULE_TITLE'].$display_title, true);
|
||||
// admin-edit
|
||||
if(is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])){
|
||||
$header_text = " <a href='index.php?action=index&module=DynamicLayout&from_action=SearchForm&from_module=".$_REQUEST['module'] ."'>".SugarThemeRegistry::current()->getImage("EditLayout","border='0' alt='Edit Layout' align='bottom'")."</a>";
|
||||
}
|
||||
// search form
|
||||
echo get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE']. $header_text, "", false);
|
||||
// ADVANCED SEARCH
|
||||
if(isset($_REQUEST['search']) && $_REQUEST['search'] == 'advanced') {
|
||||
$search_form->parse('adv');
|
||||
$search_form->out('adv');
|
||||
|
||||
} else {
|
||||
$search_form->parse('main');
|
||||
$search_form->out('main');
|
||||
}
|
||||
echo $focus->rolloverStyle; // for email previews
|
||||
if(!empty($_REQUEST['error'])) {
|
||||
$error = $app_list_strings['dom_email_errors'][$_REQUEST['error']];
|
||||
}
|
||||
//_pp($where);
|
||||
if(!empty($assigned_to_sel)) {
|
||||
$whereClauses['emails.assigned_user_id'] = 'emails.assigned_user_id = \''.$assigned_to_sel.'\'';
|
||||
}
|
||||
|
||||
//_pp($whereClauses);
|
||||
|
||||
// CONSTRUCT WHERE STRING FROM WHERECLAUSE ARRAY
|
||||
foreach($whereClauses as $clause) {
|
||||
if($where != '') {
|
||||
$where .= ' AND ';
|
||||
}
|
||||
$where .= $clause;
|
||||
}
|
||||
//echo $focus->quickCreateJS();
|
||||
|
||||
$ListView = new ListView();
|
||||
// group distributionforms
|
||||
echo $focus->distributionForm($where);
|
||||
|
||||
$ListView->shouldProcess = true;
|
||||
$ListView->show_mass_update = true;
|
||||
$ListView->show_mass_update_form = false;
|
||||
$ListView->initNewXTemplate( 'modules/Emails/ListViewGroupInbox.html',$mod_strings);
|
||||
$ListView->xTemplateAssign('ATTACHMENT_HEADER', SugarThemeRegistry::current()->getImage('attachment',"","",""));
|
||||
$ListView->xTemplateAssign('ERROR', $error);
|
||||
$ListView->xTemplateAssign('CHECK_MAIL',$focus->checkInbox('group'));
|
||||
$ListView->setHeaderTitle($display_title . $header_text );
|
||||
$ListView->setQuery($where, '', 'date_sent, date_entered DESC', 'EMAIL');
|
||||
$ListView->setAdditionalDetails();
|
||||
$ListView->processListView($focus, 'main', 'EMAIL');
|
||||
|
||||
?>
|
||||
76
modules/Emails/ListViewHome.php
Executable file
76
modules/Emails/ListViewHome.php
Executable file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
global $theme;
|
||||
global $sugar_config;
|
||||
global $current_language;
|
||||
$currentMax = $sugar_config['list_max_entries_per_page'];
|
||||
$sugar_config['list_max_entries_per_page'] = 10;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$current_mod_strings = return_module_language($current_language, 'Emails');
|
||||
$focus = new Email();
|
||||
$ListView = new ListView();
|
||||
$display_title = $current_mod_strings['LBL_LIST_TITLE_MY_INBOX'].': '.$current_mod_strings['LBL_UNREAD_HOME'];
|
||||
$where = 'emails.deleted = 0 AND emails.assigned_user_id = \''.$current_user->id.'\' AND emails.type = \'inbound\' AND emails.status = \'unread\'';
|
||||
$limit = 10;
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// OUTPUT
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
echo $focus->rolloverStyle;
|
||||
$ListView->initNewXTemplate('modules/Emails/ListViewHome.html',$current_mod_strings);
|
||||
$ListView->xTemplateAssign('ATTACHMENT_HEADER', SugarThemeRegistry::current()->getImage('attachment',"","",""));
|
||||
$ListView->setHeaderTitle($display_title);
|
||||
$ListView->setQuery($where, '', 'date_sent, date_entered DESC', "EMAIL");
|
||||
$ListView->setAdditionalDetails();
|
||||
$ListView->processListView($focus, 'main', 'EMAIL');
|
||||
|
||||
//echo $focus->quickCreateJS();
|
||||
|
||||
$sugar_config['list_max_entries_per_page'] = $currentMax;
|
||||
?>
|
||||
60
modules/Emails/MassDelete.php
Executable file
60
modules/Emails/MassDelete.php
Executable file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
if(!empty($_REQUEST['grabbed'])) {
|
||||
|
||||
$focus = new Email();
|
||||
|
||||
$emailIds = array();
|
||||
// CHECKED ONLY:
|
||||
$grabEx = explode('::',$_REQUEST['grabbed']);
|
||||
|
||||
foreach($grabEx as $k => $emailId) {
|
||||
if($emailId != "undefined") {
|
||||
$focus->mark_deleted($emailId);
|
||||
}
|
||||
}
|
||||
|
||||
header('Location: index.php?module=Emails&action=ListViewGroup');
|
||||
} else {
|
||||
global $mod_strings;
|
||||
// error
|
||||
$error = $mod_strings['LBL_MASS_DELETE_ERROR'];
|
||||
header('Location: index.php?module=Emails&action=ListViewGroup&error='.$error);
|
||||
}
|
||||
|
||||
?>
|
||||
56
modules/Emails/Menu.php
Executable file
56
modules/Emails/Menu.php
Executable file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description:
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. All Rights
|
||||
* Reserved. Contributor(s): ______________________________________..
|
||||
*********************************************************************************/
|
||||
|
||||
global $mod_strings;
|
||||
global $current_user;
|
||||
|
||||
$default = 'index.php?module=Emails&action=ListView&assigned_user_id='.$current_user->id;
|
||||
|
||||
$e = new Email();
|
||||
|
||||
// my inbox
|
||||
if(ACLController::checkAccess('Emails', 'edit', true)) {
|
||||
$module_menu[] = array('index.php?module=Emails&action=ListView', $mod_strings['LNK_VIEW_MY_INBOX'],"EmailFolder","Emails");
|
||||
}
|
||||
|
||||
?>
|
||||
110
modules/Emails/PessimisticLock.php
Executable file
110
modules/Emails/PessimisticLock.php
Executable file
@@ -0,0 +1,110 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
global $mod_strings;
|
||||
global $locale;
|
||||
$userName = $mod_strings['LBL_UNKNOWN'];
|
||||
|
||||
if(isset($_REQUEST['user'])) {
|
||||
|
||||
$user = new User();
|
||||
$user->retrieve($_REQUEST['user']);
|
||||
$userName = $locale->getLocaleFormattedName($user->first_name, $user->last_name);
|
||||
}
|
||||
|
||||
|
||||
// NEXT FREE
|
||||
if(isset($_REQUEST['next_free']) && $_REQUEST['next_free'] == true) {
|
||||
|
||||
$next = new Email();
|
||||
$rG = $next->db->query('SELECT count(id) AS c FROM users WHERE deleted = 0 AND users.is_group = 1');
|
||||
$aG = $next->db->fetchByAssoc($rG);
|
||||
if($rG['c'] > 0) {
|
||||
$rG = $next->db->query('SELECT id FROM users WHERE deleted = 0 AND users.is_group = 1');
|
||||
$aG = $next->db->fetchByAssoc($rG);
|
||||
while($aG = $next->db->fetchByAssoc($rG)) {
|
||||
$ids[] = $aG['id'];
|
||||
}
|
||||
$in = ' IN (';
|
||||
foreach($ids as $k => $id) {
|
||||
$in .= '"'.$id.'", ';
|
||||
}
|
||||
$in = substr($in, 0, (strlen($in) - 2));
|
||||
$in .= ') ';
|
||||
|
||||
$team = '';
|
||||
|
||||
$qE = 'SELECT count(id) AS c FROM emails WHERE deleted = 0 AND assigned_user_id'.$in.$team.'LIMIT 1';
|
||||
$rE = $next->db->query($qE);
|
||||
$aE = $next->db->fetchByAssoc($rE);
|
||||
|
||||
if($aE['c'] > 0) {
|
||||
$qE = 'SELECT id FROM emails WHERE deleted = 0 AND assigned_user_id'.$in.$team.'LIMIT 1';
|
||||
$rE = $next->db->query($qE);
|
||||
$aE = $next->db->fetchByAssoc($rE);
|
||||
$next->retrieve($aE['id']);
|
||||
$next->assigned_user_id = $current_user->id;
|
||||
$next->save();
|
||||
|
||||
header('Location: index.php?module=Emails&action=DetailView&record='.$next->id);
|
||||
|
||||
} else {
|
||||
// no free items
|
||||
header('Location: index.php?module=Emails&action=ListView&type=inbound&group=true');
|
||||
}
|
||||
} else {
|
||||
// no groups
|
||||
header('Location: index.php?module=Emails&action=ListView&type=inbound&group=true');
|
||||
}
|
||||
}
|
||||
?>
|
||||
<table width="100%" cellpadding="12" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td valign="middle" align="center" colspan="2">
|
||||
<?php echo $mod_strings['LBL_LOCK_FAIL_DESC']; ?>
|
||||
<br>
|
||||
<?php echo $userName.$mod_strings['LBL_LOCK_FAIL_USER']; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="middle" align="right" width="50%">
|
||||
<a href="index.php?module=Emails&action=ListView&type=inbound&group=true"><?php echo $mod_strings['LBL_BACK_TO_GROUP']; ?></a>
|
||||
</td>
|
||||
<td valign="middle" align="left">
|
||||
<a href="index.php?module=Emails&action=PessimisticLock&next_free=true"><?php echo $mod_strings['LBL_NEXT_EMAIL']; ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
53
modules/Emails/Popup.php
Executable file
53
modules/Emails/Popup.php
Executable file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
if(isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'show_raw') {
|
||||
if(!class_exists("Email")) {
|
||||
|
||||
}
|
||||
$email = new Email();
|
||||
$email->retrieve($_REQUEST['metadata']);
|
||||
echo nl2br($email->safeText($email->raw_source));
|
||||
} else {
|
||||
require_once('include/Popups/Popup_picker.php');
|
||||
$popup = new Popup_Picker();
|
||||
echo $popup->process_page();
|
||||
}
|
||||
|
||||
?>
|
||||
149
modules/Emails/PopupDocuments.php
Executable file
149
modules/Emails/PopupDocuments.php
Executable file
@@ -0,0 +1,149 @@
|
||||
<?php
|
||||
//_pp($_REQUEST);
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
require_once('modules/Documents/Popup_picker.php');
|
||||
$popup = new Popup_Picker();
|
||||
|
||||
global $theme;
|
||||
global $current_mod_strings;
|
||||
global $app_strings;
|
||||
global $currentModule;
|
||||
global $sugar_version, $sugar_config;
|
||||
global $app_list_strings;
|
||||
|
||||
$current_mod_strings = return_module_language($current_language, 'Documents');
|
||||
$output_html = '';
|
||||
$where = '';
|
||||
|
||||
$where = $popup->_get_where_clause();
|
||||
|
||||
|
||||
|
||||
$name = empty($_REQUEST['name']) ? '' : $_REQUEST['name'];
|
||||
$document_name = empty($_REQUEST['document_name']) ? '' : $_REQUEST['document_name'];
|
||||
$category_id = empty($_REQUEST['category_id']) ? '' : $_REQUEST['category_id'];
|
||||
$subcategory_id = empty($_REQUEST['subcategory_id']) ? '' : $_REQUEST['subcategory_id'];
|
||||
$template_type = empty($_REQUEST['template_type']) ? '' : $_REQUEST['template_type'];
|
||||
$is_template = empty($_REQUEST['is_template']) ? '' : $_REQUEST['is_template'];
|
||||
$document_revision_id = empty($_REQUEST['document_revision_id']) ? '' : $_REQUEST['document_revision_id'];
|
||||
|
||||
//$request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
|
||||
|
||||
$hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
|
||||
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
|
||||
if(!$hide_clear_button)
|
||||
{
|
||||
$button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CLEAR_BUTTON_LABEL']." ' />\n";
|
||||
}
|
||||
$button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CANCEL_BUTTON_LABEL']." ' />\n";
|
||||
$button .= "</form>\n";
|
||||
|
||||
$form = new XTemplate('modules/Emails/PopupDocuments.html');
|
||||
$form->assign('MOD', $current_mod_strings);
|
||||
$form->assign('APP', $app_strings);
|
||||
$form->assign('THEME', $theme);
|
||||
$form->assign('MODULE_NAME', $currentModule);
|
||||
$form->assign('NAME', $name);
|
||||
$form->assign('DOCUMENT_NAME', $document_name);
|
||||
$form->assign('DOCUMENT_TARGET', $_REQUEST['target']);
|
||||
$form->assign('DOCUMENT_REVISION_ID', $document_revision_id);
|
||||
|
||||
//$form->assign('request_data', $request_data);
|
||||
$form->assign("CATEGORY_OPTIONS", get_select_options_with_id($app_list_strings['document_category_dom'], $category_id));
|
||||
$form->assign("SUB_CATEGORY_OPTIONS", get_select_options_with_id($app_list_strings['document_subcategory_dom'], $subcategory_id));
|
||||
$form->assign("IS_TEMPLATE_OPTIONS", get_select_options_with_id($app_list_strings['checkbox_dom'], $is_template));
|
||||
$form->assign("TEMPLATE_TYPE_OPTIONS", get_select_options_with_id($app_list_strings['document_template_type_dom'], $template_type));
|
||||
|
||||
|
||||
|
||||
ob_start();
|
||||
insert_popup_header($theme);
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= get_form_header($current_mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
|
||||
|
||||
$form->parse('main.SearchHeader');
|
||||
$output_html .= $form->text('main.SearchHeader');
|
||||
|
||||
// Reset the sections that are already in the page so that they do not print again later.
|
||||
$form->reset('main.SearchHeader');
|
||||
|
||||
// create the listview
|
||||
$seed_bean = new Document();
|
||||
$ListView = new ListView();
|
||||
$ListView->show_export_button = false;
|
||||
$ListView->process_for_popups = true;
|
||||
$ListView->setXTemplate($form);
|
||||
$ListView->setHeaderTitle($current_mod_strings['LBL_LIST_FORM_TITLE']);
|
||||
$ListView->setHeaderText($button);
|
||||
$ListView->setQuery($where, '', 'document_name', 'DOCUMENT');
|
||||
$ListView->setModStrings($current_mod_strings);
|
||||
|
||||
ob_start();
|
||||
$ListView->processListView($seed_bean, 'main', 'DOCUMENT');
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= insert_popup_footer();
|
||||
|
||||
|
||||
echo $output_html;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
150
modules/Emails/Popup_picker.php
Executable file
150
modules/Emails/Popup_picker.php
Executable file
@@ -0,0 +1,150 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
global $theme;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class Popup_Picker {
|
||||
/*
|
||||
*
|
||||
*/
|
||||
function Popup_Picker() {
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
function _get_where_clause() {
|
||||
$where = '';
|
||||
if(isset($_REQUEST['query'])) {
|
||||
$where_clauses = array();
|
||||
append_where_clause($where_clauses, "name", "emails.name");
|
||||
append_where_clause($where_clauses, "contact_name", "contacts.last_name");
|
||||
|
||||
$where = generate_where_statement($where_clauses);
|
||||
}
|
||||
|
||||
return $where;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function process_page() {
|
||||
global $theme;
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $currentModule;
|
||||
|
||||
$output_html = '';
|
||||
$where = '';
|
||||
|
||||
$where = $this->_get_where_clause();
|
||||
|
||||
|
||||
|
||||
$name = empty($_REQUEST['name']) ? '' : $_REQUEST['name'];
|
||||
$contact_name = empty($_REQUEST['contact_name']) ? '' : $_REQUEST['contact_name'];
|
||||
$request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
|
||||
$hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
|
||||
|
||||
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
|
||||
|
||||
if(!$hide_clear_button) {
|
||||
$button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CLEAR_BUTTON_LABEL']." ' />\n";
|
||||
}
|
||||
$button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CANCEL_BUTTON_LABEL']." ' />\n";
|
||||
$button .= "</form>\n";
|
||||
|
||||
$form = new XTemplate('modules/Emails/Popup_picker.html');
|
||||
$form->assign('MOD', $mod_strings);
|
||||
$form->assign('APP', $app_strings);
|
||||
$form->assign('THEME', $theme);
|
||||
$form->assign('MODULE_NAME', $currentModule);
|
||||
$form->assign('NAME', $name);
|
||||
$form->assign('CONTACT_NAME', $contact_name);
|
||||
$form->assign('request_data', $request_data);
|
||||
|
||||
ob_start();
|
||||
insert_popup_header($theme);
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
|
||||
|
||||
$form->parse('main.SearchHeader');
|
||||
$output_html .= $form->text('main.SearchHeader');
|
||||
|
||||
// Reset the sections that are already in the page so that they do not print again later.
|
||||
$form->reset('main.SearchHeader');
|
||||
|
||||
// create the listview
|
||||
$seed_bean = new Email();
|
||||
$ListView = new ListView();
|
||||
$ListView->show_export_button = false;
|
||||
$ListView->process_for_popups = true;
|
||||
$ListView->setXTemplate($form);
|
||||
$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
|
||||
$ListView->setHeaderText($button);
|
||||
$ListView->setQuery($where, '', 'name', 'EMAIL');
|
||||
$ListView->setModStrings($mod_strings);
|
||||
|
||||
ob_start();
|
||||
$ListView->processListView($seed_bean, 'main', 'EMAIL');
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= insert_popup_footer();
|
||||
return $output_html;
|
||||
}
|
||||
} // end of class Popup_Picker
|
||||
?>
|
||||
302
modules/Emails/Save.php
Executable file
302
modules/Emails/Save.php
Executable file
@@ -0,0 +1,302 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description:
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. All Rights
|
||||
* Reserved. Contributor(s): ______________________________________..
|
||||
*********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// EMAIL SEND/SAVE SETUP
|
||||
$focus = new Email();
|
||||
|
||||
if(!isset($prefix)) {
|
||||
$prefix = '';
|
||||
}
|
||||
if(isset($_POST[$prefix.'meridiem']) && !empty($_POST[$prefix.'meridiem'])) {
|
||||
$_POST[$prefix.'time_start'] = $timedate->merge_time_meridiem($_POST[$prefix.'time_start'], $timedate->get_time_format(true), $_POST[$prefix.'meridiem']);
|
||||
}
|
||||
//retrieve the record
|
||||
if(isset($_POST['record']) && !empty($_POST['record'])) {
|
||||
$focus->retrieve($_POST['record']);
|
||||
|
||||
}
|
||||
if(isset($_REQUEST['user_id'])) {
|
||||
$focus->assigned_user_id = $_REQUEST['user_id'];
|
||||
}
|
||||
if(!$focus->ACLAccess('Save')){
|
||||
ACLController::displayNoAccess(true);
|
||||
sugar_cleanup(true);
|
||||
}
|
||||
if(!empty($_POST['assigned_user_id']) && ($focus->assigned_user_id != $_POST['assigned_user_id']) && ($_POST['assigned_user_id'] != $current_user->id)) {
|
||||
$check_notify = TRUE;
|
||||
}
|
||||
//populate the fields of this Email
|
||||
$allfields = array_merge($focus->column_fields, $focus->additional_column_fields);
|
||||
foreach($allfields as $field) {
|
||||
if(isset($_POST[$field])) {
|
||||
$value = $_POST[$field];
|
||||
$focus->$field = $value;
|
||||
}
|
||||
}
|
||||
|
||||
$focus->description = $_REQUEST['description_html'];
|
||||
$focus->description_html = $_REQUEST['description_html'];
|
||||
|
||||
if (!isset($_REQUEST['to_addrs'])) {
|
||||
$_REQUEST['to_addrs'] = "";
|
||||
}
|
||||
if (!isset($_REQUEST['to_addrs_ids'])) {
|
||||
$_REQUEST['to_addrs_ids'] = "";
|
||||
}
|
||||
if (!isset($_REQUEST['to_addrs_names'])) {
|
||||
$_REQUEST['to_addrs_names'] = "";
|
||||
}
|
||||
if (!isset($_REQUEST['to_addrs_emails'])) {
|
||||
$_REQUEST['to_addrs_emails'] = "";
|
||||
}
|
||||
|
||||
//compare the 3 fields and return list of contact_ids to link:
|
||||
$focus->to_addrs_arr = $focus->parse_addrs($_REQUEST['to_addrs'], $_REQUEST['to_addrs_ids'], $_REQUEST['to_addrs_names'], $_REQUEST['to_addrs_emails']);
|
||||
|
||||
// make sure the cc_* and bcc_* fields are at least empty if not set
|
||||
$fields_to_check = array(
|
||||
'cc_addrs',
|
||||
'cc_addrs_ids',
|
||||
'bcc_addrs',
|
||||
'bcc_addrs_ids',
|
||||
'cc_addrs_names',
|
||||
'cc_addrs_emails',
|
||||
'bcc_addrs_emails',
|
||||
);
|
||||
foreach ($fields_to_check as $field_to_check) {
|
||||
if (!isset($_REQUEST[$field_to_check])) {
|
||||
$_REQUEST[$field_to_check] = '';
|
||||
}
|
||||
}
|
||||
|
||||
$focus->cc_addrs_arr = $focus->parse_addrs($_REQUEST['cc_addrs'], $_REQUEST['cc_addrs_ids'], $_REQUEST['cc_addrs_names'], $_REQUEST['cc_addrs_emails']);
|
||||
$focus->bcc_addrs_arr = $focus->parse_addrs($_REQUEST['bcc_addrs'], $_REQUEST['bcc_addrs_ids'], $_REQUEST['to_addrs_names'], $_REQUEST['bcc_addrs_emails']);
|
||||
|
||||
|
||||
if(!empty($_REQUEST['type'])) {
|
||||
$focus->type = $_REQUEST['type'];
|
||||
} elseif(empty($focus->type)) { // cn: from drafts/quotes
|
||||
$focus->type = 'archived';
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// TEMPLATE PARSING
|
||||
// cn: bug 7244 - need to pass an empty bean to parse email templates
|
||||
$object_arr = array();
|
||||
if(!empty($focus->parent_id)) {
|
||||
$object_arr[$focus->parent_type] = $focus->parent_id;
|
||||
}
|
||||
if(isset($focus->to_addrs_arr[0]['contact_id'])) {
|
||||
$object_arr['Contacts'] = $focus->to_addrs_arr[0]['contact_id'];
|
||||
}
|
||||
if(empty($object_arr)) {
|
||||
$object_arr = array('Contacts' => '123');
|
||||
}
|
||||
|
||||
// do not parse email templates if the email is being saved as draft....
|
||||
if($focus->type != 'draft' && count($object_arr) > 0) {
|
||||
require_once($beanFiles['EmailTemplate']);
|
||||
$focus->name = EmailTemplate::parse_template($focus->name, $object_arr);
|
||||
$focus->description = EmailTemplate::parse_template($focus->description, $object_arr);
|
||||
$focus->description_html = EmailTemplate::parse_template($focus->description_html, $object_arr);
|
||||
}
|
||||
//// END TEMPLATE PARSING
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// PREP FOR ATTACHMENTS
|
||||
if(empty($focus->id)){
|
||||
$focus->id = create_guid();
|
||||
$focus->new_with_id = true;
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// ATTACHMENT HANDLING
|
||||
$focus->handleAttachments();
|
||||
//// END ATTACHMENT HANDLING
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
$focus->status = 'draft';
|
||||
if($focus->type == 'archived' ) {
|
||||
$focus->status= 'archived';
|
||||
$focus->date_start = $_REQUEST['date_start'];
|
||||
$focus->time_start = $_REQUEST['time_start'] . $_REQUEST['meridiem'];
|
||||
} elseif(($focus->type == 'out' || $focus->type == 'forward') && isset($_REQUEST['send']) && $_REQUEST['send'] == '1') {
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//// REPLY PROCESSING
|
||||
$old = array('<','>');
|
||||
$new = array('<','>');
|
||||
|
||||
if($_REQUEST['from_addr'] != $_REQUEST['from_addr_name'].' <'.$_REQUEST['from_addr_email'].'>') {
|
||||
if(false === strpos($_REQUEST['from_addr'], '<')) { // we have an email only?
|
||||
$focus->from_addr = $_REQUEST['from_addr'];
|
||||
$focus->from_name = '';
|
||||
} else { // we have a compound string
|
||||
$newFromAddr = str_replace($old, $new, $_REQUEST['from_addr']);
|
||||
$focus->from_addr = substr($newFromAddr, (1 + strpos($newFromAddr, '<')), (strpos($newFromAddr, '>') - strpos($newFromAddr, '<')) -1 );
|
||||
$focus->from_name = substr($newFromAddr, 0, (strpos($newFromAddr, '<') -1));
|
||||
}
|
||||
} elseif(!empty($_REQUEST['from_addr_email']) && isset($_REQUEST['from_addr_email'])) {
|
||||
$focus->from_addr = $_REQUEST['from_addr_email'];
|
||||
$focus->from_name = $_REQUEST['from_addr_name'];
|
||||
} else {
|
||||
$focus->from_addr = $focus->getSystemDefaultEmail();
|
||||
}
|
||||
//// REPLY PROCESSING
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
if($focus->send()) {
|
||||
$focus->status = 'sent';
|
||||
} else {
|
||||
$focus->status = 'send_error';
|
||||
}
|
||||
}
|
||||
$focus->to_addrs = $_REQUEST['to_addrs'];
|
||||
$focus->cc_addrs = $_REQUEST['cc_addrs'];
|
||||
$focus->bcc_addrs = $_REQUEST['bcc_addrs'];
|
||||
$focus->from_addr = $_REQUEST['from_addr'];
|
||||
|
||||
// delete the existing relationship of all the email addresses with this email
|
||||
$query = "update emails_email_addr_rel set deleted = 1 WHERE email_id = '{$focus->id}'";
|
||||
$focus->db->query($query);
|
||||
|
||||
// delete al the relationship of this email with all the beans
|
||||
//$query = "update emails_beans set deleted = 1, bean_id = '', bean_module = '' WHERE email_id = '{$focus->id}'";
|
||||
//$focus->db->query($query);
|
||||
|
||||
if(isset($_REQUEST['object_type']) && !empty($_REQUEST['object_type']) && isset($_REQUEST['object_id']) && !empty($_REQUEST['object_id'])) {
|
||||
//run linking code only if the object_id has not been linked as part of the contacts above and it is an OOB relationship
|
||||
$GLOBALS['log']->debug("CESELY".$_REQUEST['object_type']);
|
||||
if(!in_array($_REQUEST['object_id'],$exContactIds)){
|
||||
$rel = strtolower($_REQUEST['object_type']);
|
||||
if ($focus->load_relationship($rel)) {
|
||||
$focus->$rel->add($_REQUEST['object_id']);
|
||||
$GLOBALS['log']->debug("CESELY LOADED".$_REQUEST['object_type']);
|
||||
}
|
||||
}
|
||||
}
|
||||
//// handle legacy parent_id/parent_type relationship calls
|
||||
elseif(isset($_REQUEST['parent_type']) && !empty($_REQUEST['parent_type'])
|
||||
&& isset($_REQUEST['parent_id']) && !empty($_REQUEST['parent_id'])) {
|
||||
//run linking code only if the object_id has not been linked as part of the contacts above
|
||||
if(!isset($exContactIds) || !in_array($_REQUEST['parent_id'],$exContactIds)){
|
||||
$rel = strtolower($_REQUEST['parent_type']);
|
||||
if ($focus->load_relationship($rel)) {
|
||||
$focus->$rel->add($_REQUEST['parent_id']);
|
||||
}
|
||||
}
|
||||
}
|
||||
//// END RELATIONSHIP LINKING
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// If came from email archiving edit view, this would have been set from form input.
|
||||
if (!isset($focus->date_start))
|
||||
{
|
||||
$today = gmdate($GLOBALS['timedate']->get_db_date_time_format());
|
||||
$focus->date_start = $timedate->to_display_date($today);
|
||||
$focus->time_start = $timedate->to_display_time($today, true);
|
||||
}
|
||||
|
||||
$focus->date_sent = "";
|
||||
|
||||
require_once('include/formbase.php');
|
||||
$focus = populateFromPost('', $focus);
|
||||
|
||||
$focus->save(false);
|
||||
//// END EMAIL SAVE/SEND SETUP
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// RELATIONSHIP LINKING
|
||||
$focus->load_relationship('users');
|
||||
$focus->users->add($current_user->id);
|
||||
|
||||
if(!empty($_REQUEST['to_addrs_ids'])) {
|
||||
$focus->load_relationship('contacts');
|
||||
$exContactIds = explode(';', $_REQUEST['to_addrs_ids']);
|
||||
foreach($exContactIds as $contactId) {
|
||||
$contactId = trim($contactId);
|
||||
$focus->contacts->add($contactId);
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// PAGE REDIRECTION
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
$return_id = $focus->id;
|
||||
|
||||
if(empty($_POST['return_module'])) {
|
||||
$return_module = "Emails";
|
||||
} else {
|
||||
$return_module = $_POST['return_module'];
|
||||
}
|
||||
if(empty($_POST['return_action'])) {
|
||||
$return_action = "DetailView";
|
||||
} else {
|
||||
$return_action = $_POST['return_action'];
|
||||
}
|
||||
$GLOBALS['log']->debug("Saved record with id of ".$return_id);
|
||||
|
||||
if($focus->type == 'draft') {
|
||||
if($return_module == 'Emails') {
|
||||
header("Location: index.php?module=$return_module&action=ListViewDrafts");
|
||||
} else {
|
||||
handleRedirect($return_id, 'Emails');
|
||||
}
|
||||
} elseif($focus->type == 'out') {
|
||||
if($return_module == 'Home') {
|
||||
header('Location: index.php?module='.$return_module.'&action=index');
|
||||
}
|
||||
if(!empty($_REQUEST['return_id'])) {
|
||||
$return_id = $_REQUEST['return_id'];
|
||||
}
|
||||
header('Location: index.php?action='.$return_action.'&module='.$return_module.'&record='.$return_id.'&assigned_user_id='.$current_user->id.'&type=inbound');
|
||||
} elseif(isset($_POST['return_id']) && $_POST['return_id'] != "") {
|
||||
$return_id = $_POST['return_id'];
|
||||
}
|
||||
header("Location: index.php?action=$return_action&module=$return_module&record=$return_id");
|
||||
?>
|
||||
111
modules/Emails/Status.php
Executable file
111
modules/Emails/Status.php
Executable file
@@ -0,0 +1,111 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
|
||||
$focus = new Email();
|
||||
|
||||
if(!empty($_REQUEST['record'])) {
|
||||
$result = $focus->retrieve($_REQUEST['record']);
|
||||
if($result == null)
|
||||
{
|
||||
sugar_die($app_strings['ERROR_NO_RECORD']);
|
||||
}
|
||||
}
|
||||
else {
|
||||
header("Location: index.php?module=Emails&action=index");
|
||||
}
|
||||
|
||||
//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'];
|
||||
}
|
||||
echo get_module_title($mod_strings['LBL_SEND'], $mod_strings['LBL_SEND'], true);
|
||||
|
||||
$GLOBALS['log']->info("Email detail view");
|
||||
|
||||
$xtpl=new XTemplate ('modules/Emails/Status.html');
|
||||
$xtpl->assign("MOD", $mod_strings);
|
||||
$xtpl->assign("APP", $app_strings);
|
||||
|
||||
$xtpl->assign("GRIDLINE", $gridline);
|
||||
$xtpl->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']);
|
||||
$xtpl->assign("ID", $focus->id);
|
||||
$xtpl->assign("PARENT_NAME", $focus->parent_name);
|
||||
if (isset($focus->parent_type))
|
||||
{
|
||||
$xtpl->assign("PARENT_MODULE", $focus->parent_type);
|
||||
$xtpl->assign("PARENT_TYPE", $app_list_strings['record_type_display'][$focus->parent_type]);
|
||||
}
|
||||
$xtpl->assign("PARENT_ID", $focus->parent_id);
|
||||
$xtpl->assign("NAME", $focus->name);
|
||||
//$xtpl->assign("SENT_BY_USER_NAME", $focus->sent_by_user_name);
|
||||
$xtpl->assign("DATE_SENT", $focus->date_start." ".$focus->time_start);
|
||||
if ($focus->status == 'sent')
|
||||
{
|
||||
$xtpl->assign("STATUS", $mod_strings['LBL_MESSAGE_SENT']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$xtpl->assign("STATUS", "<font color=red>".$mod_strings['LBL_ERROR_SENDING_EMAIL']."</font>");
|
||||
}
|
||||
|
||||
global $current_user;
|
||||
if(is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])){
|
||||
|
||||
$xtpl->assign("ADMIN_EDIT","<a href='index.php?action=index&module=DynamicLayout&from_action=".$_REQUEST['action'] ."&from_module=".$_REQUEST['module'] ."&record=".$_REQUEST['record']. "'>".SugarThemeRegistry::current()->getImage("EditLayout","border='0' alt='Edit Layout' align='bottom'")."</a>");
|
||||
}
|
||||
|
||||
// adding custom fields:
|
||||
require_once('modules/DynamicFields/templates/Files/DetailView.php');
|
||||
|
||||
$xtpl->parse("main");
|
||||
$xtpl->out("main");
|
||||
|
||||
?>
|
||||
149
modules/Emails/SubPanelViewRecipients.php
Executable file
149
modules/Emails/SubPanelViewRecipients.php
Executable file
@@ -0,0 +1,149 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
global $currentModule;
|
||||
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
|
||||
global $theme;
|
||||
global $focus;
|
||||
global $action;
|
||||
|
||||
// focus_list is the means of passing data to a SubPanelView.
|
||||
global $focus_list;
|
||||
|
||||
$button = "<table cellspacing='0' cellpadding='1' border='0'><form border='0' action='index.php' method='post' name='form' id='form'>\n";
|
||||
$button .= "<input type='hidden' name='module' value='Contacts'>\n";
|
||||
if ($currentModule == 'Accounts') $button .= "<input type='hidden' name='account_id' value='$focus->id'>\n<input type='hidden' name='account_name' value='$focus->name'>\n";
|
||||
$button .= "<input type='hidden' name='return_module' value='".$currentModule."'>\n";
|
||||
$button .= "<input type='hidden' name='return_action' value='".$action."'>\n";
|
||||
$button .= "<input type='hidden' name='return_id' value='".$focus->id."'>\n";
|
||||
$button .= "<input type='hidden' name='action'>\n";
|
||||
$button .= "<tr><td> </td>";
|
||||
if ($focus->parent_type == "Accounts") $button .= "<td><input title='".$app_strings['LBL_SELECT_CONTACT_BUTTON_TITLE']."' accessKey='".$app_strings['LBL_SELECT_CONTACT_BUTTON_KEY']."' type='button' class='button' value='".$app_strings['LBL_SELECT_CONTACT_BUTTON_LABEL']."' name='button' LANGUAGE=javascript onclick='window.open(\"index.php?module=Contacts&action=Popup&html=Popup_picker&form=DetailView&form_submit=true&query=true&account_id=$focus->parent_id&account_name=".urlencode($focus->parent_name)."\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'></td>\n";
|
||||
else $button .= "<td><input title='".$app_strings['LBL_SELECT_CONTACT_BUTTON_TITLE']."' accessKey='".$app_strings['LBL_SELECT_CONTACT_BUTTON_KEY']."' type='button' class='button' value='".$app_strings['LBL_SELECT_CONTACT_BUTTON_LABEL']."' name='button' LANGUAGE=javascript onclick='window.open(\"index.php?module=Contacts&action=Popup&html=Popup_picker&form=DetailView&form_submit=true\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'></td>\n";
|
||||
$button .= "<td><input title='".$app_strings['LBL_SELECT_USER_BUTTON_TITLE']."' accessKey='".$app_strings['LBL_SELECT_USER_BUTTON_KEY']."' type='button' class='button' value='".$app_strings['LBL_SELECT_USER_BUTTON_LABEL']."' name='button' LANGUAGE=javascript onclick='window.open(\"index.php?module=Users&action=Popup&html=Popup_picker&form=DetailView&form_submit=true\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'></td>\n";
|
||||
$button .= "</tr></form></table>\n";
|
||||
|
||||
// Stick the form header out there.
|
||||
echo get_form_header($mod_strings['LBL_INVITEE'], $button, false);
|
||||
$xtpl=new XTemplate ('modules/Emails/SubPanelViewRecipients.html');
|
||||
$xtpl->assign("MOD", $mod_strings);
|
||||
$xtpl->assign("APP", $app_strings);
|
||||
$xtpl->assign("RETURN_URL", "&return_module=$currentModule&return_action=DetailView&return_id=$focus->id");
|
||||
$xtpl->assign("EMAIL_ID", $focus->id);
|
||||
$xtpl->assign("DELETE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline','align="absmiddle" alt="'.$app_strings['LNK_REMOVE'].'" border="0"'));
|
||||
$xtpl->assign("EDIT_INLINE_PNG", SugarThemeRegistry::current()->getImage('edit_inline','align="absmiddle" alt="'.$app_strings['LNK_EDIT'].'" border="0"'));
|
||||
$oddRow = true;
|
||||
foreach($focus_users_list as $user)
|
||||
{
|
||||
$user_fields = array(
|
||||
'USER_NAME' => $user->user_name,
|
||||
'FULL_NAME' => $user->first_name." ".$user->last_name,
|
||||
'ID' => $user->id,
|
||||
'EMAIL' => $user->email1,
|
||||
'PHONE_WORK' => $user->phone_work
|
||||
);
|
||||
|
||||
$xtpl->assign("USER", $user_fields);
|
||||
|
||||
if($oddRow)
|
||||
{
|
||||
//todo move to themes
|
||||
$xtpl->assign("ROW_COLOR", 'oddListRow');
|
||||
}
|
||||
else
|
||||
{
|
||||
//todo move to themes
|
||||
$xtpl->assign("ROW_COLOR", 'evenListRow');
|
||||
}
|
||||
$oddRow = !$oddRow;
|
||||
|
||||
$xtpl->parse("users.row");
|
||||
// Put the rows in.
|
||||
}
|
||||
|
||||
$xtpl->parse("users");
|
||||
$xtpl->out("users");
|
||||
|
||||
$oddRow = true;
|
||||
print count($focus_contacts_list);
|
||||
|
||||
foreach($focus_contacts_list as $contact)
|
||||
{
|
||||
$contact_fields = array(
|
||||
'FIRST_NAME' => $contact->first_name,
|
||||
'LAST_NAME' => $contact->last_name,
|
||||
'ACCOUNT_NAME' => $contact->account_name,
|
||||
'ID' => $contact->id,
|
||||
'EMAIL' => $contact->email1,
|
||||
'PHONE_WORK' => $contact->phone_work
|
||||
);
|
||||
|
||||
$xtpl->assign("CONTACT", $contact_fields);
|
||||
|
||||
if($oddRow)
|
||||
{
|
||||
//todo move to themes
|
||||
$xtpl->assign("ROW_COLOR", 'oddListRow');
|
||||
}
|
||||
else
|
||||
{
|
||||
//todo move to themes
|
||||
$xtpl->assign("ROW_COLOR", 'evenListRow');
|
||||
}
|
||||
$oddRow = !$oddRow;
|
||||
|
||||
$xtpl->parse("contacts.row");
|
||||
// Put the rows in.
|
||||
}
|
||||
|
||||
$xtpl->parse("contacts");
|
||||
$xtpl->out("contacts");
|
||||
|
||||
?>
|
||||
117
modules/Emails/SugarRoutingAsync.php
Executable file
117
modules/Emails/SugarRoutingAsync.php
Executable file
@@ -0,0 +1,117 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description:
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. All Rights
|
||||
* Reserved. Contributor(s): ______________________________________..
|
||||
*********************************************************************************/
|
||||
require_once("include/SugarRouting/SugarRouting.php");
|
||||
|
||||
$ie = new InboundEmail();
|
||||
$json = getJSONobj();
|
||||
$rules = new SugarRouting($ie, $current_user);
|
||||
|
||||
switch($_REQUEST['routingAction']) {
|
||||
case "setRuleStatus":
|
||||
$rules->setRuleStatus($_REQUEST['rule_id'], $_REQUEST['status']);
|
||||
break;
|
||||
|
||||
case "saveRule":
|
||||
$rules->save($_REQUEST);
|
||||
break;
|
||||
|
||||
case "deleteRule":
|
||||
$rules->deleteRule($_REQUEST['rule_id']);
|
||||
break;
|
||||
|
||||
/* returns metadata to construct actions */
|
||||
case "getActions":
|
||||
require_once("include/SugarDependentDropdown/SugarDependentDropdown.php");
|
||||
|
||||
$sdd = new SugarDependentDropdown();
|
||||
$sdd->init("include/SugarDependentDropdown/metadata/dependentDropdown.php");
|
||||
$out = $json->encode($sdd->metadata, true);
|
||||
echo $out;
|
||||
break;
|
||||
|
||||
/* returns metadata to construct a rule */
|
||||
case "getRule":
|
||||
$ret = '';
|
||||
if(isset($_REQUEST['rule_id']) && !empty($_REQUEST['rule_id']) && isset($_REQUEST['bean']) && !empty($_REQUEST['bean'])) {
|
||||
if(!isset($beanList))
|
||||
include("include/modules.php");
|
||||
|
||||
$class = $beanList[$_REQUEST['bean']];
|
||||
//$beanList['Groups'] = 'Group';
|
||||
if(isset($beanList[$_REQUEST['bean']])) {
|
||||
require_once("modules/{$_REQUEST['bean']}/{$class}.php");
|
||||
$bean = new $class();
|
||||
|
||||
$rule = $rules->getRule($_REQUEST['rule_id'], $bean);
|
||||
|
||||
$ret = array(
|
||||
'bean' => $_REQUEST['bean'],
|
||||
'rule' => $rule
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$bean = new SugarBean();
|
||||
$rule = $rules->getRule('', $bean);
|
||||
|
||||
$ret = array(
|
||||
'bean' => $_REQUEST['bean'],
|
||||
'rule' => $rule
|
||||
);
|
||||
}
|
||||
|
||||
//_ppd($ret);
|
||||
|
||||
$out = $json->encode($ret, true);
|
||||
echo $out;
|
||||
break;
|
||||
|
||||
case "getStrings":
|
||||
$ret = $rules->getStrings();
|
||||
$out = $json->encode($ret, true);
|
||||
echo $out;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
echo "NOOP";
|
||||
}
|
||||
353
modules/Emails/allList.php
Executable file
353
modules/Emails/allList.php
Executable file
@@ -0,0 +1,353 @@
|
||||
<?php
|
||||
if (!defined('sugarEntry') || !sugarEntry)
|
||||
die('Not A Valid Entry Point');
|
||||
|
||||
//if (!is_admin($current_user)) die('Nie masz wystarczających uprawnień');
|
||||
|
||||
if (isset($_GET['request'])) {
|
||||
if ($_GET['request'] == 'showHeaders')
|
||||
echo loadHeaders($_GET['user_id'], $_GET['date_from'], $_GET['date_to'], $_GET['answered'], $_GET['seen'], $_GET['deleted'], $_GET['io'], 'in');
|
||||
|
||||
if ($_GET['request'] == 'showHeaders_outbox')
|
||||
echo loadHeaders($_GET['user_id'], $_GET['date_from'], $_GET['date_to'], null , null , $_GET['deleted'], $_GET['io'], 'out');
|
||||
|
||||
if ($_GET['request'] == 'showMail')
|
||||
echo loadMail($_GET['mail_id'], $_GET['user_id']);
|
||||
|
||||
if ($_GET['request'] == 'showAttachments')
|
||||
echo loadAttachments($_GET['mail_id'], $_GET['user_id']);
|
||||
} else
|
||||
initSearch();
|
||||
|
||||
function initSearch() {
|
||||
$xtpl = new XTemplate('modules/Emails/allList.html');
|
||||
$db = $GLOBALS['db'];
|
||||
|
||||
//generate users list
|
||||
//AND id!='9adce0e8-d0c2-dc41-83f8-4eb9333b6c77'
|
||||
//list without user Marek Wiśniewski
|
||||
$query = "
|
||||
SELECT
|
||||
id,
|
||||
first_name,
|
||||
last_name
|
||||
FROM
|
||||
users
|
||||
WHERE
|
||||
deleted = 0
|
||||
AND
|
||||
employee_status = 'Active'
|
||||
AND
|
||||
id != '9adce0e8-d0c2-dc41-83f8-4eb9333b6c77';
|
||||
";
|
||||
|
||||
// print_r($query);
|
||||
// exit;
|
||||
|
||||
$result = $db->query($query);
|
||||
$user_list = '';
|
||||
$user_list.='<select size="' . $result->num_rows . '" id="user_list" onClick="javascript:showHeaders()">';
|
||||
|
||||
while ($row = $db->fetchByAssoc($result)) {
|
||||
$user_list.='<option value="' . $row['id'] . '">' . $row['first_name'] . ' ' . $row['last_name'] . '</option>';
|
||||
}
|
||||
|
||||
$user_list.='</select>';
|
||||
$xtpl->assign("USER_LIST", $user_list);
|
||||
|
||||
$xtpl->parse("main");
|
||||
$xtpl->out("main");
|
||||
}
|
||||
|
||||
function loadHeaders($user_id, $date_from, $date_to, $answered, $seen, $deleted, $io, $in_out) {
|
||||
$db = $GLOBALS['db'];
|
||||
|
||||
$io = trim($io);
|
||||
|
||||
if ($in_out != 'in')
|
||||
$in_out = 'out';
|
||||
|
||||
//var_dump($in_out);
|
||||
|
||||
$whereConditions = array();
|
||||
|
||||
if(strlen($io))
|
||||
switch($in_out){
|
||||
default:
|
||||
case 'in':
|
||||
array_push($whereConditions, 'ec.`fromaddr` LIKE \'%' . $io . '%\'');
|
||||
break;
|
||||
case 'out':
|
||||
array_push($whereConditions, 'ec.`toaddr` LIKE \'%' . $io . '%\'');
|
||||
break;
|
||||
}
|
||||
|
||||
//echo '<pre>';
|
||||
//var_dump($whereConditions);
|
||||
//echo '</pre>';
|
||||
|
||||
$query = "
|
||||
SELECT
|
||||
ec.ie_id,
|
||||
ec.subject,
|
||||
ec.message_id,
|
||||
ec.fromaddr,
|
||||
ec.toaddr,
|
||||
ec.senddate,
|
||||
ec.alllist_text_id
|
||||
FROM
|
||||
email_cache AS ec
|
||||
INNER JOIN
|
||||
email_alllist_texts as et ON et.id=ec.alllist_text_id
|
||||
WHERE
|
||||
et.ie_id IN
|
||||
(
|
||||
SELECT id FROM inbound_email WHERE group_id='" . $user_id . "'
|
||||
)
|
||||
AND
|
||||
et.in_out LIKE '" . $in_out . "'";
|
||||
|
||||
$query .= $whereConditions ? (' AND ' . implode(' AND ', $whereConditions)) : '';
|
||||
|
||||
//print_r($query);
|
||||
//exit;
|
||||
|
||||
if (($date_from != '') && ($date_to != ''))
|
||||
{
|
||||
$query.=" AND senddate BETWEEN (SELECT DATE_FORMAT('" . $date_from . "', '%Y%m%d')) AND (SELECT DATE_FORMAT('" . $date_to . "', '%Y%m%d'))";
|
||||
} else {
|
||||
if ($date_from != '')
|
||||
$query.=" AND senddate >= '" . $date_from . "'";
|
||||
|
||||
if ($date_to != '')
|
||||
$query.=" AND senddate <= '" . $date_to . "'";
|
||||
}
|
||||
|
||||
$query.=" AND alllist_text_id IS NOT NULL";
|
||||
$query.=" ORDER BY senddate DESC";
|
||||
|
||||
$result = $db->query($query);
|
||||
|
||||
$header_list = '';
|
||||
$header_list .= '<table id ="header_table" cellpadding="1px">';
|
||||
$header_list .= '<tr id="header_table_head_row">';
|
||||
$header_list .= '<td width=500><b>Temat</b></td>';
|
||||
|
||||
switch($in_out){
|
||||
default:
|
||||
case 'in':
|
||||
$header_list .= '<td width=250><b>Nadawca</b></td>';
|
||||
break;
|
||||
case 'out':
|
||||
$header_list .= '<td width=250><b>Odbiorca</b></td>';
|
||||
break;
|
||||
}
|
||||
|
||||
$header_list .= '<td width=150><b>Data otrzymania</b></td>';
|
||||
$header_list .= '</tr>';
|
||||
|
||||
$s = 0;
|
||||
$a = 0;
|
||||
$d = 0;
|
||||
|
||||
while ($row = $db->fetchByAssoc($result)) {
|
||||
if ($row['deleted'] == 1) {
|
||||
$przekreP = '<s>';
|
||||
$przekreK = '</s>';
|
||||
} else {
|
||||
$przekreP = '';
|
||||
$przekreK = '';
|
||||
}
|
||||
|
||||
if ($row['answered'] == 1) {
|
||||
$podkreP = '<u>';
|
||||
$podkreK = '</u>';
|
||||
} else {
|
||||
$podkreP = '';
|
||||
$podkreK = '';
|
||||
}
|
||||
|
||||
if ($row['seen'] == 0) {
|
||||
$pogruP = '<b>';
|
||||
$pogruK = '</b>';
|
||||
} else {
|
||||
$pogruP = '';
|
||||
$pogruK = '';
|
||||
}
|
||||
|
||||
$subject = charsetEncode($row['subject']);
|
||||
$from = '';
|
||||
|
||||
switch($in_out){
|
||||
default:
|
||||
case 'in':
|
||||
$from = charsetEncode($row['fromaddr']);
|
||||
break;
|
||||
case 'out':
|
||||
$from = charsetEncode($row['toaddr']);
|
||||
break;
|
||||
}
|
||||
|
||||
$id = $row['alllist_text_id'];
|
||||
|
||||
$header_list .= '<tr onMouseOver="this.className=\'highlight\'" onMouseOut="this.className=\'normal\'" onClick="this.className=\'selected\';javascript:showAttachments(\'' . $id . '\');javascript:showMail(\'' . $id . '\');">
|
||||
<td width=500>' . $podkreP . $przekreP . $pogruP . $subject . $podkreK . $przekreK . $pogruK . '</td>
|
||||
<td width=250>' . $podkreP . $przekreP . $pogruP . ($from) . $podkreK . $przekreK . $pogruK . '</td>
|
||||
<td width=150>' . $podkreP . $przekreP . $pogruP . $row['senddate'] . $podkreK . $przekreK . $pogruK . '</td>
|
||||
</tr>
|
||||
';
|
||||
|
||||
if ($row['seen'] == 1)
|
||||
$s++;
|
||||
if ($row['answered'] == 1)
|
||||
$a++;
|
||||
if ($row['deleted'] == 1)
|
||||
$d++;
|
||||
}
|
||||
|
||||
$header_list.='</table>';
|
||||
$header_list.='</select></td><td valign="top" style="padding-left: 10px;">';
|
||||
|
||||
return $header_list;
|
||||
}
|
||||
|
||||
function loadHeaders_outbox($user_id, $date_from, $date_to, $deleted) {
|
||||
$db = $GLOBALS['db'];
|
||||
|
||||
$query = "SELECT id, assigned_user_id, name, deleted, date_sent FROM emails WHERE assigned_user_id='" . $user_id . "' AND (status='sent' OR status='archived') AND (type='out' OR type='archived') AND mailbox_id IS NULL";
|
||||
|
||||
if (($date_from != '') && ($date_to != ''))
|
||||
$query.=" AND date_sent BETWEEN (SELECT DATE_FORMAT('" . $date_from . "', '%Y%m%d')) AND (SELECT DATE_FORMAT('" . $date_to . "', '%Y%m%d'))";
|
||||
else {
|
||||
if ($date_from != '')
|
||||
$query.=" AND date_sent >= '" . $date_from . "'";
|
||||
|
||||
if ($date_to != '')
|
||||
$query.=" AND date_sent <= '" . $date_to . "'";
|
||||
}
|
||||
|
||||
if ($deleted == 0)
|
||||
$query.=" AND deleted=0";
|
||||
|
||||
if ($deleted == 1)
|
||||
$query.=" AND deleted=1";
|
||||
|
||||
$query.=" ORDER BY date_sent DESC";
|
||||
$result = $db->query($query);
|
||||
|
||||
$emails = array();
|
||||
while ($row = $db->fetchByAssoc($result)) {
|
||||
$res = $db->query("SELECT email_address FROM email_addresses AS ea INNER JOIN emails_email_addr_rel AS eear ON (eear.email_address_id=ea.id AND eear.address_type='FROM' AND email_id='" . $row['id'] . "') INNER JOIN inbound_email AS ie ON (ie.email_user!=ea.email_address AND ie.group_id='" . $user_id . "')");
|
||||
|
||||
if ($res->num_rows == 0)
|
||||
$emails[] = $row;
|
||||
}
|
||||
|
||||
//$header_list.='<select size="'.$result->num_rows.'" id="header_list" onClick="javascript:showMail()">';
|
||||
$header_list = '<table id ="header_table" cellpadding="1px"><tr id="header_table_head_row">
|
||||
<td width=650><b>Temat</b></td>
|
||||
<td width=150><b>Data wysłania</b></td>
|
||||
</tr>';
|
||||
$s = 0;
|
||||
$a = 0;
|
||||
$d = 0;
|
||||
|
||||
//while ($row = $db->fetchByAssoc($result)) {
|
||||
foreach ($emails as $row) {
|
||||
if ($row['deleted'] == 1) {
|
||||
$przekreP = '<s>';
|
||||
$przekreK = '</s>';
|
||||
} else {
|
||||
$przekreP = '';
|
||||
$przekreK = '';
|
||||
}
|
||||
|
||||
$subject = charsetEncode($row['name']);
|
||||
//$subject = charsetEncode($row['id']);
|
||||
//$from = fix_text($row['fromaddr']);
|
||||
|
||||
$header_list.='<tr onMouseOver="this.className=\'highlight\'" onMouseOut="this.className=\'normal\'">
|
||||
<td width=500>
|
||||
<a href="index.php?module=Emails&action=DetailView&record=' . $row['id'] . '" target="new">
|
||||
' . $podkreP . $przekreP . $pogruP . $subject . $podkreK . $przekreK . $pogruK . '</a></td>
|
||||
<td width=150>' . $podkreP . $przekreP . $pogruP . $row['date_sent'] . $podkreK . $przekreK . $pogruK . '</td>
|
||||
</tr>';
|
||||
if ($row['seen'] == 1)
|
||||
$s++;
|
||||
if ($row['answered'] == 1)
|
||||
$a++;
|
||||
if ($row['deleted'] == 1)
|
||||
$d++;
|
||||
}
|
||||
$header_list.='</table>';
|
||||
//$header_list.='</select></td><td valign="top" style="padding-left: 10px;">';
|
||||
return $header_list;
|
||||
}
|
||||
|
||||
function loadMail($id, $user_id) {
|
||||
$db = $GLOBALS['db'];
|
||||
$query = "SELECT description_html, attachments FROM email_alllist_texts WHERE id='" . $id . "';";
|
||||
$result = $db->query($query);
|
||||
$row = $db->fetchByAssoc($result);
|
||||
$text = htmlspecialchars_decode($row['description_html']);
|
||||
|
||||
//return $query;
|
||||
|
||||
//to fix images
|
||||
//
|
||||
//$attachments = explode(";", $row['attachments']);
|
||||
//$file_name = array();
|
||||
//if (count($attachments)>1)
|
||||
//foreach ($attachments as $file) {
|
||||
//$parts = explode("/", $file);
|
||||
// $ext = substr($parts[count($parts)-1],strlen($parts[count($parts)-1])-4, 4);
|
||||
// if (($ext=='.jpg') || ($ext=='.png') || ($ext=='.gif'))
|
||||
// array_push($file_name, $parts[count($parts)-1]);
|
||||
// }
|
||||
//
|
||||
//$text = str_replace('http://192.168.0.4/crm/cache//images/','modules/Emails/alllist_upload/'.$id.'/"',$text);
|
||||
//foreach ($file_name as $file)
|
||||
//$text = str_replace($id.'/"', $id.'/'.$file.'"', $text, 1);
|
||||
|
||||
str_replace("\n", "<br>", $text);
|
||||
return $text;
|
||||
}
|
||||
|
||||
function loadAttachments($id, $user_id) {
|
||||
$db = $GLOBALS['db'];
|
||||
$query = "SELECT attachments FROM email_alllist_texts WHERE id='" . $id . "';";
|
||||
$result = $db->query($query);
|
||||
$row = $db->fetchByAssoc($result);
|
||||
//$text = htmlspecialchars_decode($row['attachments']);
|
||||
$text = $row['attachments'];
|
||||
|
||||
$attachments = explode(";", $row['attachments']);
|
||||
$return = ' ';
|
||||
|
||||
if (count($attachments) == 1)
|
||||
return 'Załączników: 0<br><br>';
|
||||
else {
|
||||
//$return = "Załączników: ".(count($attachments)-1).'<br><br>';
|
||||
foreach ($attachments as $file) {
|
||||
$parts = explode("/", $file);
|
||||
$file_name = $parts[count($parts) - 1];
|
||||
$return.='<a target="new" href="modules/Emails/alllist_upload/' . $file . '">' . $file_name . '</a><br>';
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
//to fix headers charset
|
||||
function charsetEncode($string) {
|
||||
$a = imap_mime_header_decode($string);
|
||||
$result = '';
|
||||
|
||||
foreach ($a as $v)
|
||||
if ($v->charset != 'default')
|
||||
$result.=iconv($v->charset, "UTF-8", $v->text) . ' ';
|
||||
|
||||
if ($result != '')
|
||||
return $result;
|
||||
else
|
||||
return $string;
|
||||
}
|
||||
214
modules/Emails/allList_getTexts.php
Executable file
214
modules/Emails/allList_getTexts.php
Executable file
@@ -0,0 +1,214 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
set_time_limit(9999999999);
|
||||
|
||||
$db = $GLOBALS['db'];
|
||||
|
||||
$eaddr = array();
|
||||
$r=$db->query("SELECT id, email_user FROM inbound_email WHERE id NOT IN ('813761a2-8711-3b3c-7a95-4f0acecfd08b')");
|
||||
while ($w = $db->fetchByAssoc($r)) {
|
||||
$eaddr[$w['email_user']] = $w['id'];
|
||||
}
|
||||
|
||||
$ie_id='ec629543-24b1-3326-7f01-5048c8813921';
|
||||
$cache_query = "SELECT senddate, imap_uid, alllist_text_id FROM email_cache WHERE deleted='0' AND mbox='INBOX' AND ie_id ='".$ie_id."' AND (alllist_text_id IS NULL OR alllist_text_id='') AND datediff(senddate, now())>-7 ORDER BY senddate ASC;";
|
||||
|
||||
$result = $db->query($cache_query);
|
||||
$messages = array();
|
||||
while ($row = $db->fetchByAssoc($result)) {
|
||||
$messages[$row['imap_uid']] = $row['senddate'];
|
||||
}
|
||||
if (count($messages)==0) continue; //don't connect with server
|
||||
|
||||
|
||||
$ie = new InboundEmail();
|
||||
$ie->retrieve($ie_id);
|
||||
$ie->connectMailserver();
|
||||
$connection = $ie->conn;
|
||||
if (!isset($connection)) {print_r(imap_errors()); exit;}
|
||||
//loop throught cache messages and save it if is unsaved
|
||||
$add =0;
|
||||
$i==0;
|
||||
|
||||
foreach ($messages as $k=>$v) {
|
||||
$messageNo = $ie->getMsgNo($k);
|
||||
if ($messageNo<1) {
|
||||
//echo "Can't find message (date: $v)<br>";
|
||||
continue;
|
||||
} //message deleted from server
|
||||
$add++;
|
||||
$senddate = $v;
|
||||
$attachments = array();
|
||||
$structure = imap_fetchstructure($connection, $messageNo);
|
||||
|
||||
|
||||
//if ($add == 5) return;
|
||||
|
||||
$flattenedParts = flattenParts($structure->parts);
|
||||
|
||||
|
||||
//get fromadd & subject
|
||||
$header = imap_header($connection, $messageNo);
|
||||
//$fromaddr = $header->from[0]->mailbox.'@'.$header->from[0]->host;
|
||||
$subject = $header->subject;
|
||||
//echo 'Temat: '.$subjest.'<br>';
|
||||
//continue;
|
||||
//get from addresses
|
||||
|
||||
$from_addr=array();
|
||||
foreach ($header->from as $v) {
|
||||
$from_addr[] = $v->mailbox.'@'.$v->host;
|
||||
}
|
||||
//get to address
|
||||
$to_addr = array();
|
||||
foreach ($header->to as $v) {
|
||||
$to_addr[] = $v->mailbox.'@'.$v->host;
|
||||
}
|
||||
|
||||
foreach ($to_addr as $v)
|
||||
if ($v!='')
|
||||
if ($eaddr[$v]) save($connection, $messageNo, $flattenedParts, $eaddr[$v], 'in', $db, $k, $senddate);
|
||||
|
||||
foreach ($from_addr as $v)
|
||||
if ($v!='')
|
||||
if ($eaddr[$v]) save($connection, $messageNo, $flattenedParts, $eaddr[$v], 'out', $db, $k, $senddate);
|
||||
|
||||
//if ($add ==20) return;
|
||||
//return;;
|
||||
|
||||
}
|
||||
//echo 'Uploaded (user: '.$ie_id.'): '.$add.'<br>';
|
||||
imap_close($connection);
|
||||
|
||||
echo 'Wiadomości odebrane zaktualizowane!';
|
||||
|
||||
return true;
|
||||
|
||||
function save($connection, $messageNo, $flattenedParts, $ie_id, $in_out, $db, $k, $senddate) {
|
||||
foreach($flattenedParts as $partNumber => $part) {
|
||||
switch($part->type) {
|
||||
case 0:
|
||||
$message = getPart($connection, $messageNo, $partNumber, $part->encoding);
|
||||
$charset = $part->parameters[0]->value;
|
||||
if (($charset!='') && ($charset!="UTF-8"));
|
||||
$message=addslashes(htmlspecialchars(iconv($charset,"UTF-8",$message)));
|
||||
break;
|
||||
case 1:
|
||||
break;
|
||||
case 2:
|
||||
break;
|
||||
case 3: // application
|
||||
case 4: // audio
|
||||
case 5: // image
|
||||
case 6: // video
|
||||
case 7: // other
|
||||
$filename = getFilenameFromPart($part);
|
||||
if($filename) {
|
||||
$attachment = getPart($connection, $messageNo, $partNumber, $part->encoding);
|
||||
$a=array();
|
||||
$a['filename'] = charsetEncode($filename);
|
||||
$a['content'] = $attachment;
|
||||
$attachments[] = $a;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$id = create_guid();
|
||||
|
||||
//echo "Before save: $ie_id<br>";
|
||||
if (count($attachments)!=0)
|
||||
$path = saveAttachments($ie_id, $id, $attachments);
|
||||
|
||||
$db->query("INSERT INTO email_alllist_texts VALUES('".$id."','".$message."','".$path."','".$k."','".$senddate."','".$ie_id."','".date("Y-m-d H:i:s")."','".$in_out."')");
|
||||
//add info to email_cache
|
||||
$r = $db->query("UPDATE email_cache SET alllist_text_id='".$id."', alllist_ie_id='".$ie_id."' WHERE ie_id='ec629543-24b1-3326-7f01-5048c8813921' AND imap_uid='".$k."' AND senddate='".$senddate."'");
|
||||
if (!isset($r)) echo 'error<br>';
|
||||
//if ($i=50) break;
|
||||
//$i++;
|
||||
}
|
||||
function charsetEncode($string) {
|
||||
$a = imap_mime_header_decode($string);
|
||||
$result='';
|
||||
foreach ($a as $v)
|
||||
if ($v->charset!='default')
|
||||
$result.=iconv($v->charset,"UTF-8", $v->text).' ';
|
||||
if ($result!='') return $result; else return $string;
|
||||
}
|
||||
function saveAttachments($ie_id, $id, $attachments) {
|
||||
$path='';
|
||||
if ((!$attachments) && (count($attachments)==0)) exit;
|
||||
foreach ($attachments as $v) {
|
||||
$file_name = $v['filename'];
|
||||
$content = $v['content'];
|
||||
mkdir('./modules/Emails/alllist_upload/'.$ie_id);
|
||||
$dir = $ie_id.'/'.$id;
|
||||
mkdir('./modules/Emails/alllist_upload/'.$dir);
|
||||
$fp = fopen('modules/Emails/alllist_upload/'.$dir.'/'.$file_name, 'wb');
|
||||
if (!fwrite($fp, $content)==0) {
|
||||
$path.= $dir.'/'.$file_name.';';
|
||||
fwrite($fp, $content);
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
return $path;
|
||||
}
|
||||
function getPart($connection, $messageNumber, $partNumber, $encoding) {
|
||||
|
||||
$data = imap_fetchbody($connection, $messageNumber, $partNumber);
|
||||
switch($encoding) {
|
||||
case 0: return $data; // 7BIT
|
||||
case 1: return $data; // 8BIT
|
||||
case 2: return $data; // BINARY
|
||||
case 3: return base64_decode($data); // BASE64
|
||||
case 4: return quoted_printable_decode($data); // QUOTED_PRINTABLE
|
||||
case 5: return $data; // OTHER
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function flattenParts($messageParts, $flattenedParts = array(), $prefix = '', $index = 1, $fullPrefix = true) {
|
||||
foreach($messageParts as $part) {
|
||||
$flattenedParts[$prefix.$index] = $part;
|
||||
if(isset($part->parts)) {
|
||||
if($part->type == 2) {
|
||||
$flattenedParts = flattenParts($part->parts, $flattenedParts, $prefix.$index.'.', 0, false);
|
||||
}
|
||||
elseif($fullPrefix) {
|
||||
$flattenedParts = flattenParts($part->parts, $flattenedParts, $prefix.$index.'.');
|
||||
}
|
||||
else {
|
||||
$flattenedParts = flattenParts($part->parts, $flattenedParts, $prefix);
|
||||
}
|
||||
unset($flattenedParts[$prefix.$index]->parts);
|
||||
}
|
||||
$index++;
|
||||
}
|
||||
|
||||
return $flattenedParts;
|
||||
}
|
||||
|
||||
function getFilenameFromPart($part) {
|
||||
|
||||
$filename = '';
|
||||
|
||||
if($part->ifdparameters) {
|
||||
foreach($part->dparameters as $object) {
|
||||
if(strtolower($object->attribute) == 'filename') {
|
||||
$filename = $object->value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!$filename && $part->ifparameters) {
|
||||
foreach($part->parameters as $object) {
|
||||
if(strtolower($object->attribute) == 'name') {
|
||||
$filename = $object->value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $filename;
|
||||
}
|
||||
?>
|
||||
131
modules/Emails/allList_getTexts2.php
Executable file
131
modules/Emails/allList_getTexts2.php
Executable file
@@ -0,0 +1,131 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
//$server="{imap.gmail.com:993/ssl}INBOX";
|
||||
//$login="mz@e5.pl";
|
||||
//$password="3x4z8123";
|
||||
//$connection = imap_open($server, $login, $password);
|
||||
|
||||
$ie_id = "5292ef35-2864-0002-b6b3-4f3e2bacf43a";
|
||||
|
||||
$ie = new InboundEmail();
|
||||
$ie->retrieve($ie_id);
|
||||
$ie->connectMailserver();
|
||||
$connection = $ie->conn;
|
||||
|
||||
if (!$connection) {print_r(imap_errors()); exit;}
|
||||
$messages = imap_search($connection, 'ALL');
|
||||
|
||||
$i=0;
|
||||
foreach ($messages as $messageNo) {
|
||||
$structure = imap_fetchstructure($connection, $messageNo);
|
||||
$flattenedParts = flattenParts($structure->parts);
|
||||
|
||||
foreach($flattenedParts as $partNumber => $part) {
|
||||
switch($part->type) {
|
||||
case 0:
|
||||
// the HTML or plain text part of the email
|
||||
$message = getPart($connection, $messageNo, $partNumber, $part->encoding);
|
||||
// now do something with the message, e.g. render it
|
||||
break;
|
||||
case 1:
|
||||
// multi-part headers, can ignore
|
||||
break;
|
||||
case 2:
|
||||
// attached message headers, can ignore
|
||||
break;
|
||||
case 3: // application
|
||||
case 4: // audio
|
||||
case 5: // image
|
||||
case 6: // video
|
||||
case 7: // other
|
||||
$filename = getFilenameFromPart($part);
|
||||
if($filename) {
|
||||
// it's an attachment
|
||||
$attachment = getPart($connection, $messageNo, $partNumber, $part->encoding);
|
||||
// now do something with the attachment, e.g. save it somewhere
|
||||
}
|
||||
else {
|
||||
// don't know what it is
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
//get from addr
|
||||
$header = imap_header($connection, $messageNo);
|
||||
$fromaddr = $header->from[0]->mailbox.'@'.$header->from[0]->host;
|
||||
$subject = $header->subject;
|
||||
echo $fromaddr.' - '.$subject;
|
||||
echo '<br><br>';
|
||||
|
||||
$i++;
|
||||
if ($i==50) break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function getPart($connection, $messageNumber, $partNumber, $encoding) {
|
||||
|
||||
$data = imap_fetchbody($connection, $messageNumber, $partNumber);
|
||||
switch($encoding) {
|
||||
case 0: return $data; // 7BIT
|
||||
case 1: return $data; // 8BIT
|
||||
case 2: return $data; // BINARY
|
||||
case 3: return base64_decode($data); // BASE64
|
||||
case 4: return quoted_printable_decode($data); // QUOTED_PRINTABLE
|
||||
case 5: return $data; // OTHER
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function flattenParts($messageParts, $flattenedParts = array(), $prefix = '', $index = 1, $fullPrefix = true) {
|
||||
|
||||
foreach($messageParts as $part) {
|
||||
$flattenedParts[$prefix.$index] = $part;
|
||||
if(isset($part->parts)) {
|
||||
if($part->type == 2) {
|
||||
$flattenedParts = flattenParts($part->parts, $flattenedParts, $prefix.$index.'.', 0, false);
|
||||
}
|
||||
elseif($fullPrefix) {
|
||||
$flattenedParts = flattenParts($part->parts, $flattenedParts, $prefix.$index.'.');
|
||||
}
|
||||
else {
|
||||
$flattenedParts = flattenParts($part->parts, $flattenedParts, $prefix);
|
||||
}
|
||||
unset($flattenedParts[$prefix.$index]->parts);
|
||||
}
|
||||
$index++;
|
||||
}
|
||||
|
||||
return $flattenedParts;
|
||||
|
||||
}
|
||||
|
||||
function getFilenameFromPart($part) {
|
||||
|
||||
$filename = '';
|
||||
|
||||
if($part->ifdparameters) {
|
||||
foreach($part->dparameters as $object) {
|
||||
if(strtolower($object->attribute) == 'filename') {
|
||||
$filename = $object->value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!$filename && $part->ifparameters) {
|
||||
foreach($part->parameters as $object) {
|
||||
if(strtolower($object->attribute) == 'name') {
|
||||
$filename = $object->value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $filename;
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
81
modules/Emails/field_arrays.php
Executable file
81
modules/Emails/field_arrays.php
Executable file
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: Contains field arrays that are used for caching
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
$fields_array['Email'] = array(
|
||||
'column_fields' => array(
|
||||
"id"
|
||||
, "date_entered"
|
||||
, "date_modified"
|
||||
, "assigned_user_id"
|
||||
, "modified_user_id"
|
||||
, "created_by"
|
||||
, "description"
|
||||
, "description_html"
|
||||
, "name"
|
||||
, "date_start"
|
||||
, "time_start"
|
||||
, "parent_type"
|
||||
, "parent_id"
|
||||
, "from_addr"
|
||||
, "from_name"
|
||||
, "to_addrs"
|
||||
, "cc_addrs"
|
||||
, "bcc_addrs"
|
||||
, "to_addrs_ids"
|
||||
, "to_addrs_names"
|
||||
, "to_addrs_emails"
|
||||
, "cc_addrs_ids"
|
||||
, "cc_addrs_names"
|
||||
, "cc_addrs_emails"
|
||||
, "bcc_addrs_ids"
|
||||
, "bcc_addrs_names"
|
||||
, "bcc_addrs_emails"
|
||||
, "type"
|
||||
, "status"
|
||||
, "intent"
|
||||
),
|
||||
'list_fields' => array(
|
||||
'id', 'name', 'parent_type', 'parent_name', 'parent_id', 'date_start', 'time_start', 'assigned_user_name', 'assigned_user_id', 'contact_name', 'contact_id', 'first_name','last_name','to_addrs','from_addr','date_sent','type_name','type','status','link_action','date_entered','attachment_image','intent','date_sent'
|
||||
),
|
||||
);
|
||||
?>
|
||||
53
modules/Emails/index.php
Executable file
53
modules/Emails/index.php
Executable file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description:
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. All Rights
|
||||
* Reserved. Contributor(s): ______________________________________..
|
||||
*********************************************************************************/
|
||||
|
||||
|
||||
$focus = new Email();
|
||||
$focus->email2init();
|
||||
$focus->et->preflightUser($current_user);
|
||||
$out = $focus->et->displayEmailFrame();
|
||||
echo $out;
|
||||
echo "<script>var composePackage = null;</script>";
|
||||
|
||||
$skipFooters = true;
|
||||
|
||||
368
modules/Emails/language/en_us.lang.php
Executable file
368
modules/Emails/language/en_us.lang.php
Executable file
@@ -0,0 +1,368 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: Defines the English language pack for the base application.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
$mod_strings = array (
|
||||
'LBL_FW' => 'FW:',
|
||||
'LBL_RE' => 'RE:',
|
||||
|
||||
'LBL_BUTTON_CREATE' => 'Create',
|
||||
'LBL_BUTTON_EDIT' => 'Edit',
|
||||
'LBL_QS_DISABLED' => '(QuickSearch is not availible for this module. Please use the select button.)',
|
||||
'LBL_SIGNATURE_PREPEND' => 'Signature above reply',
|
||||
'LBL_EMAIL_DEFAULT_DESCRIPTION' => 'Here is the quote you requested (You can change this text)',
|
||||
'LBL_EMAIL_QUOTE_FOR' => 'Quote for: ',
|
||||
'LBL_QUOTE_LAYOUT_DOES_NOT_EXIST_ERROR' => 'quote layout file does not exist: $layout',
|
||||
'LBL_QUOTE_LAYOUT_REGISTERED_ERROR' => 'quote layout is not registered in modules/Quotes/Layouts.php',
|
||||
|
||||
|
||||
'LBL_CONFIRM_DELETE' => 'Are you sure you want to delete this folder?',
|
||||
'LBL_ENTER_FOLDER_NAME' => 'Please enter a folder name',
|
||||
|
||||
'LBL_ERROR_SELECT_MODULE' => 'Please select a module for the Related to field',
|
||||
|
||||
'ERR_ARCHIVE_EMAIL' => 'Error: Select emails to archive.',
|
||||
'ERR_DATE_START' => 'Date Start',
|
||||
'ERR_DELETE_RECORD' => 'Error: You must specify a record number to delete the account.',
|
||||
'ERR_NOT_ADDRESSED' => 'Error: Email must have a To, CC, or BCC address',
|
||||
'ERR_TIME_START' => 'Time Start',
|
||||
'ERR_TIME_SENT' => 'Time Sent',
|
||||
'LBL_ACCOUNTS_SUBPANEL_TITLE'=> 'Accounts',
|
||||
'LBL_ADD_ANOTHER_FILE' => 'Add Another File',
|
||||
'LBL_ADD_DASHLETS' => 'Add Sugar Dashlets',
|
||||
'LBL_ADD_DOCUMENT' => 'Add Documents',
|
||||
'LBL_ADD_ENTRIES' => 'Add Entries',
|
||||
'LBL_ADD_FILE' => 'Add Files',
|
||||
'LBL_ARCHIVED_EMAIL' => 'Archived Email',
|
||||
'LBL_ARCHIVED_MODULE_NAME' => 'Create Archived Emails',
|
||||
'LBL_ATTACHMENTS' => 'Attachments:',
|
||||
'LBL_HAS_ATTACHMENT' => 'Has Attachment?:',
|
||||
'LBL_BCC' => 'Bcc:',
|
||||
'LBL_BODY' => 'Body:',
|
||||
'LBL_BUGS_SUBPANEL_TITLE' => 'Bugs',
|
||||
'LBL_CC' => 'Cc:',
|
||||
'LBL_COLON' => ':',
|
||||
'LBL_COMPOSE_MODULE_NAME' => 'Compose Email',
|
||||
'LBL_CONTACT_FIRST_NAME' => 'Contact First Name',
|
||||
'LBL_CONTACT_LAST_NAME' => 'Contact Last Name',
|
||||
'LBL_CONTACT_NAME' => 'Contact:',
|
||||
'LBL_CONTACTS_SUBPANEL_TITLE'=> 'Contacts',
|
||||
'LBL_CREATED_BY' => 'Created by',
|
||||
'LBL_DATE_AND_TIME' => 'Date & Time Sent:',
|
||||
'LBL_DATE_SENT' => 'Date Sent:',
|
||||
'LBL_DATE' => 'Date Sent:',
|
||||
'LBL_DELETE_FROM_SERVER' => 'Delete message from server',
|
||||
'LBL_DESCRIPTION' => 'Description',
|
||||
'LBL_EDIT_ALT_TEXT' => 'Edit Plain Text',
|
||||
'LBL_SEND_IN_PLAIN_TEXT' => 'Send in Plain Text',
|
||||
'LBL_EDIT_MY_SETTINGS' => 'Edit My Settings',
|
||||
'LBL_EMAIL_ATTACHMENT' => 'Email Attachment',
|
||||
'LBL_EMAIL_EDITOR_OPTION' => 'Send HTML Email',
|
||||
'LBL_EMAIL_SELECTOR' => 'Select',
|
||||
'LBL_EMAIL' => 'Email Address:',
|
||||
'LBL_EMAILS_ACCOUNTS_REL' => 'Emails:Accounts',
|
||||
'LBL_EMAILS_BUGS_REL' => 'Emails:Bugs',
|
||||
'LBL_EMAILS_CASES_REL' => 'Emails:Cases',
|
||||
'LBL_EMAILS_CONTACTS_REL' => 'Emails:Contacts',
|
||||
'LBL_EMAILS_LEADS_REL' => 'Emails:Leads',
|
||||
'LBL_EMAILS_OPPORTUNITIES_REL'=> 'Emails:Opportunities',
|
||||
'LBL_EMAILS_NOTES_REL' => 'Emails:Notes',
|
||||
'LBL_EMAILS_PROJECT_REL' => 'Emails:Project',
|
||||
'LBL_EMAILS_PROJECT_TASK_REL'=> 'Emails:ProjectTask',
|
||||
'LBL_EMAILS_PROSPECT_REL' => 'Emails:Prospect',
|
||||
'LBL_EMAILS_TASKS_REL' => 'Emails:Tasks',
|
||||
'LBL_EMAILS_USERS_REL' => 'Emails:Users',
|
||||
'LBL_EMPTY_FOLDER' => 'No Emails to display',
|
||||
'LBL_ERROR_SENDING_EMAIL' => 'Error Sending email',
|
||||
'LBL_ERROR_SAVING_DRAFT' => 'Error Saving Draft',
|
||||
'LBL_FORWARD_HEADER' => 'Begin forwarded message:',
|
||||
'LBL_FROM_NAME' => 'From Name',
|
||||
'LBL_FROM' => 'From:',
|
||||
'LBL_REPLY_TO' => 'Reply To:',
|
||||
'LBL_HTML_BODY' => 'HTML Body',
|
||||
'LBL_INVITEE' => 'Recipients',
|
||||
'LBL_LEADS_SUBPANEL_TITLE' => 'Leads',
|
||||
'LBL_MESSAGE_SENT' => 'Message Sent',
|
||||
'LBL_MODIFIED_BY' => 'Modified By',
|
||||
'LBL_MODULE_NAME_NEW' => 'Archive Email',
|
||||
'LBL_MODULE_NAME' => 'All Emails',
|
||||
'LBL_MODULE_TITLE' => 'Emails: ',
|
||||
'LBL_MY_EMAILS' => 'My Emails',
|
||||
'LBL_NEW_FORM_TITLE' => 'Archive Email',
|
||||
'LBL_NONE' => 'None',
|
||||
'LBL_NOT_SENT' => 'Send Error',
|
||||
'LBL_NOTE_SEMICOLON' => 'Note: Use commas or semi-colons as separators for multiple email addresses.',
|
||||
'LBL_NOTES_SUBPANEL_TITLE' => 'Attachments',
|
||||
'LBL_OPPORTUNITY_SUBPANEL_TITLE' => 'Opportunities',
|
||||
'LBL_PROJECT_SUBPANEL_TITLE'=> 'Projects',
|
||||
'LBL_PROJECT_TASK_SUBPANEL_TITLE'=> 'Project Tasks',
|
||||
'LBL_RAW' => 'Raw Email',
|
||||
'LBL_SAVE_AS_DRAFT_BUTTON_KEY'=> 'R',
|
||||
'LBL_SAVE_AS_DRAFT_BUTTON_LABEL'=> 'Save Draft',
|
||||
'LBL_SAVE_AS_DRAFT_BUTTON_TITLE'=> 'Save Draft [Alt+R]',
|
||||
'LBL_SEARCH_FORM_DRAFTS_TITLE'=> 'Search Drafts',
|
||||
'LBL_SEARCH_FORM_SENT_TITLE'=> 'Search Sent Emails',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Email Search',
|
||||
'LBL_SEND_ANYWAYS' => 'This email has no subject. Send/save anyway?',
|
||||
'LBL_SEND_BUTTON_KEY' => 'S',
|
||||
'LBL_SEND_BUTTON_LABEL' => 'Send',
|
||||
'LBL_SEND_BUTTON_TITLE' => 'Send [Alt+S]',
|
||||
'LBL_SEND' => 'SEND',
|
||||
'LBL_SENT_MODULE_NAME' => 'Sent Emails',
|
||||
'LBL_SHOW_ALT_TEXT' => 'Show Plain Text',
|
||||
'LBL_SIGNATURE' => 'Signature',
|
||||
'LBL_SUBJECT' => 'Subject:',
|
||||
'LBL_TEXT_BODY' => 'Text Body',
|
||||
'LBL_TIME' => 'Time Sent:',
|
||||
'LBL_TO_ADDRS' => 'To',
|
||||
'LBL_USE_TEMPLATE' => 'Use Template:',
|
||||
'LBL_USERS_SUBPANEL_TITLE' => 'Users',
|
||||
'LBL_USERS' => 'Users',
|
||||
|
||||
'LNK_ALL_EMAIL_LIST' => 'All Emails',
|
||||
'LNK_ARCHIVED_EMAIL_LIST' => 'Archived Emails',
|
||||
'LNK_CALL_LIST' => 'Calls',
|
||||
'LNK_DRAFTS_EMAIL_LIST' => 'All Drafts',
|
||||
'LNK_EMAIL_LIST' => 'Emails',
|
||||
'LBL_EMAIL_RELATE' => 'Related To',
|
||||
'LNK_EMAIL_TEMPLATE_LIST' => 'View Email Templates',
|
||||
'LNK_MEETING_LIST' => 'Meetings',
|
||||
'LNK_NEW_ARCHIVE_EMAIL' => 'Create Archived Email',
|
||||
'LNK_NEW_CALL' => 'Log Call',
|
||||
'LNK_NEW_EMAIL_TEMPLATE' => 'Create Email Template',
|
||||
'LNK_NEW_EMAIL' => 'Send Email',
|
||||
'LNK_NEW_MEETING' => 'Schedule Meeting',
|
||||
'LNK_NEW_NOTE' => 'Create Note or Attachment',
|
||||
'LNK_NEW_SEND_EMAIL' => 'Compose',
|
||||
'LNK_NEW_TASK' => 'Create Task',
|
||||
'LNK_NOTE_LIST' => 'Notes',
|
||||
'LNK_SENT_EMAIL_LIST' => 'Sent Emails',
|
||||
'LNK_TASK_LIST' => 'Tasks',
|
||||
'LNK_VIEW_CALENDAR' => 'Today',
|
||||
|
||||
'LBL_LIST_ASSIGNED' => 'Assigned',
|
||||
'LBL_LIST_CONTACT_NAME' => 'Contact Name',
|
||||
'LBL_LIST_CREATED' => 'Created',
|
||||
'LBL_LIST_DATE_SENT' => 'Date Sent',
|
||||
'LBL_LIST_DATE' => 'Date Sent',
|
||||
'LBL_LIST_FORM_DRAFTS_TITLE'=> 'Draft',
|
||||
'LBL_LIST_FORM_SENT_TITLE' => 'Sent Emails',
|
||||
'LBL_LIST_FORM_TITLE' => 'Email List',
|
||||
'LBL_LIST_FROM_ADDR' => 'From',
|
||||
'LBL_LIST_RELATED_TO' => 'Recipient Type',
|
||||
'LBL_LIST_SUBJECT' => 'Subject',
|
||||
'LBL_LIST_TIME' => 'Time Sent',
|
||||
'LBL_LIST_TO_ADDR' => 'To',
|
||||
'LBL_LIST_TYPE' => 'Type',
|
||||
|
||||
'NTC_REMOVE_INVITEE' => 'Are you sure you want to remove this recipient from the email?',
|
||||
'WARNING_SETTINGS_NOT_CONF' => 'Warning: Your email settings are not configured to send email.',
|
||||
'WARNING_NO_UPLOAD_DIR' => 'Attachments may fail: No value for "upload_tmp_dir" was detected. Please correct this in your php.ini file.',
|
||||
'WARNING_UPLOAD_DIR_NOT_WRITABLE' => 'Attachments may fail: An incorrect or unusable value for "upload_tmp_dir" was detected. Please correct this in your php.ini file.',
|
||||
|
||||
// for All emails
|
||||
'LBL_BUTTON_RAW_TITLE' => 'Show Raw Message [Alt+E]',
|
||||
'LBL_BUTTON_RAW_KEY' => 'e',
|
||||
'LBL_BUTTON_RAW_LABEL' => 'Show Raw',
|
||||
'LBL_BUTTON_RAW_LABEL_HIDE' => 'Hide Raw',
|
||||
|
||||
// for InboundEmail
|
||||
'LBL_BUTTON_CHECK' => 'Check Mail',
|
||||
'LBL_BUTTON_CHECK_TITLE' => 'Check For New Email [Alt+C]',
|
||||
'LBL_BUTTON_CHECK_KEY' => 'c',
|
||||
'LBL_BUTTON_FORWARD' => 'Forward',
|
||||
'LBL_BUTTON_FORWARD_TITLE' => 'Forward This Email [Alt+F]',
|
||||
'LBL_BUTTON_FORWARD_KEY' => 'f',
|
||||
'LBL_BUTTON_REPLY_KEY' => 'r',
|
||||
'LBL_BUTTON_REPLY_TITLE' => 'Reply [Alt+R]',
|
||||
'LBL_BUTTON_REPLY' => 'Reply',
|
||||
'LBL_CASES_SUBPANEL_TITLE' => 'Cases',
|
||||
'LBL_INBOUND_TITLE' => 'Inbound Email',
|
||||
'LBL_INTENT' => 'Intent',
|
||||
'LBL_MESSAGE_ID' => 'Message ID',
|
||||
'LBL_REPLY_HEADER_1' => 'On ',
|
||||
'LBL_REPLY_HEADER_2' => 'wrote:',
|
||||
'LBL_REPLY_TO_ADDRESS' => 'Reply-to Address',
|
||||
'LBL_REPLY_TO_NAME' => 'Reply-to Name',
|
||||
|
||||
'LBL_LIST_BUG' => 'Bugs',
|
||||
'LBL_LIST_CASE' => 'Cases',
|
||||
'LBL_LIST_CONTACT' => 'Contacts',
|
||||
'LBL_LIST_LEAD' => 'Leads',
|
||||
'LBL_LIST_TASK' => 'Tasks',
|
||||
'LBL_LIST_ASSIGNED_TO_NAME' => 'Assigned User',
|
||||
|
||||
// for Inbox
|
||||
'LBL_ALL' => 'All',
|
||||
'LBL_ASSIGN_WARN' => 'Ensure that all 2 options are selected.',
|
||||
'LBL_BACK_TO_GROUP' => 'Back to Group Inbox',
|
||||
'LBL_BUTTON_DISTRIBUTE_KEY' => 'a',
|
||||
'LBL_BUTTON_DISTRIBUTE_TITLE'=> 'Assign [Alt+A]',
|
||||
'LBL_BUTTON_DISTRIBUTE' => 'Assign',
|
||||
'LBL_BUTTON_GRAB_KEY' => 't',
|
||||
'LBL_BUTTON_GRAB_TITLE' => 'Take from Group [Alt+T]',
|
||||
'LBL_BUTTON_GRAB' => 'Take from Group',
|
||||
'LBL_CREATE_BUG' => 'Create Bug',
|
||||
'LBL_CREATE_CASE' => 'Create Case',
|
||||
'LBL_CREATE_CONTACT' => 'Create Contact',
|
||||
'LBL_CREATE_LEAD' => 'Create Lead',
|
||||
'LBL_CREATE_TASK' => 'Create Task',
|
||||
'LBL_DIST_TITLE' => 'Assignment',
|
||||
'LBL_LOCK_FAIL_DESC' => 'The chosen item is unavailable currently.',
|
||||
'LBL_LOCK_FAIL_USER' => ' has taken ownership.',
|
||||
'LBL_MASS_DELETE_ERROR' => 'No checked items were passed for deletion.',
|
||||
'LBL_NEW' => 'New',
|
||||
'LBL_NEXT_EMAIL' => 'Next Free Item',
|
||||
'LBL_NO_GRAB_DESC' => 'There were no items available. Try again in a moment.',
|
||||
'LBL_QUICK_REPLY' => 'Reply',
|
||||
'LBL_REPLIED' => 'Replied',
|
||||
'LBL_SELECT_TEAM' => 'Select Teams',
|
||||
'LBL_TAKE_ONE_TITLE' => 'Reps',
|
||||
'LBL_TITLE_SEARCH_RESULTS' => 'Search Results',
|
||||
'LBL_TO' => 'To: ',
|
||||
'LBL_TOGGLE_ALL' => 'Toggle All',
|
||||
'LBL_UNKNOWN' => 'Unknown',
|
||||
'LBL_UNREAD_HOME' => 'Unread Emails',
|
||||
'LBL_UNREAD' => 'Unread',
|
||||
'LBL_USE_ALL' => 'All Search Results',
|
||||
'LBL_USE_CHECKED' => 'Only Checked',
|
||||
'LBL_USE_MAILBOX_INFO' => 'Use Mailbox From: Address',
|
||||
'LBL_USE' => 'Assign:',
|
||||
'LBL_ASSIGN_SELECTED_RESULTS_TO' => 'Assign Selected Results To: ',
|
||||
'LBL_USER_SELECT' => 'Select Users',
|
||||
'LBL_USING_RULES' => 'Using Rules:',
|
||||
'LBL_WARN_NO_DIST' => 'No Distribution Method Selected',
|
||||
'LBL_WARN_NO_USERS' => 'No Users are selected',
|
||||
'LBL_WARN_NO_USERS_OR_TEAM' => 'Please select either a user or team for assignment.',
|
||||
'LBL_IMPORT_STATUS_TITLE' => 'Status',
|
||||
'LBL_LIST_STATUS' => 'Status',
|
||||
'LBL_LIST_TITLE_GROUP_INBOX'=> 'Group Inbox',
|
||||
'LBL_LIST_TITLE_MY_DRAFTS' => 'My Drafts',
|
||||
'LBL_LIST_TITLE_MY_INBOX' => 'My Inbox',
|
||||
'LBL_LIST_TITLE_MY_SENT' => 'My Sent Email',
|
||||
'LBL_LIST_TITLE_MY_ARCHIVES'=> 'My Archived Emails',
|
||||
'LBL_ACTIVITIES_REPORTS' => 'Activities Report',
|
||||
|
||||
'LNK_CHECK_MY_INBOX' => 'Check My Mail',
|
||||
'LNK_DATE_SENT' => 'Date Sent',
|
||||
'LNK_GROUP_INBOX' => 'Group Inbox',
|
||||
'LNK_MY_DRAFTS' => 'My Drafts',
|
||||
'LNK_MY_INBOX' => 'My Email',
|
||||
'LNK_VIEW_MY_INBOX' => 'View My Email',
|
||||
'LNK_QUICK_REPLY' => 'Reply',
|
||||
'LNK_MY_ARCHIVED_LIST' => 'My Archives',
|
||||
'LBL_EMAILS_NO_PRIMARY_TEAM_SPECIFIED' =>'No Primary Team specified',
|
||||
|
||||
// advanced search
|
||||
'LBL_ASSIGNED_TO' => 'Assigned To:',
|
||||
'LBL_MEMBER_OF' => 'Parent',
|
||||
'LBL_QUICK_CREATE' => 'Quick Create',
|
||||
'LBL_STATUS' => 'Email Status:',
|
||||
'LBL_EMAIL_FLAGGED' => 'Flagged:',
|
||||
'LBL_EMAIL_REPLY_TO_STATUS' => 'Reply To Status:',
|
||||
'LBL_TYPE' => 'Type:',
|
||||
//#20680 EmialTemplate Ext.Message.show;
|
||||
'LBL_EMAILTEMPLATE_MESSAGE_SHOW_TITLE' => 'Please check!',
|
||||
'LBL_EMAILTEMPLATE_MESSAGE_SHOW_MSG' => 'Selecting this template will overwrite any data already entered within the email body. Do you wish to continue?',
|
||||
'LBL_EMAILTEMPLATE_MESSAGE_CLEAR_MSG' => 'Selecting "--None--" will clear any data already entered within the email body. Do you wish to continue?',
|
||||
'LBL_CHECK_ATTACHMENTS'=>'Please Check Attachments!',
|
||||
'LBL_HAS_ATTACHMENTS' => 'This email already has attachment(s). Would you like to keep the attachment(s)?',
|
||||
'ERR_MISSING_REQUIRED_FIELDS' => 'Missing required field',
|
||||
'ERR_INVALID_REQUIRED_FIELDS' => 'Invalid required field',
|
||||
'LBL_FILTER_BY_RELATED_BEAN' => 'Only show recipients related to',
|
||||
'LBL_RECIPIENTS_HAVE_BEEN_ADDED' => 'Recipients have been added.',
|
||||
'LBL_ADD_INBOUND_ACCOUNT' => 'Add',
|
||||
'LBL_ADD_OUTBOUND_ACCOUNT' => 'Add',
|
||||
'LBL_EMAIL_ACCOUNTS_INBOUND' => 'Mail Account Properties',
|
||||
'LBL_EMAIL_SETTINGS_OUTBOUND_ACCOUNT' => 'Outgoing SMTP Mail Server',
|
||||
'LBL_EMAIL_SETTINGS_OUTBOUND_ACCOUNTS' => 'Outgoing SMTP Mail Servers',
|
||||
'LBL_EMAIL_SETTINGS_INBOUND_ACCOUNTS' => 'Mail Accounts',
|
||||
'LBL_EMAIL_SETTINGS_INBOUND' => 'Incoming Email',
|
||||
'LBL_EMAIL_SETTINGS_OUTBOUND' => 'Outgoing Email',
|
||||
'LBL_ADD_CC' => 'Add Cc',
|
||||
'LBL_ADD_BCC' => 'Add Bcc',
|
||||
'LBL_ADD_TO_ADDR' => 'Add To',
|
||||
'LBL_SELECTED_ADDR' => 'Selected',
|
||||
'LBL_ADD_CC_BCC_SEP' => '|',
|
||||
'LBL_SEND_EMAIL_FAIL_TITLE' => 'Error Sending Email',
|
||||
'LBL_EMAIL_DETAIL_VIEW_SHOW' => 'show ',
|
||||
'LBL_EMAIL_DETAIL_VIEW_MORE' => ' more',
|
||||
'LBL_MORE_OPTIONS' => 'More',
|
||||
'LBL_LESS_OPTIONS' => 'Less',
|
||||
'LBL_MAILBOX_TYPE_PERSONAL' => 'Personal',
|
||||
'LBL_MAILBOX_TYPE_GROUP' => 'Group',
|
||||
'LBL_MAILBOX_TYPE_GROUP_FOLDER' => 'Group - Auto-Import',
|
||||
'LBL_SEARCH_FOR' => 'Search For',
|
||||
'LBL_EMAIL_INBOUND_TYPE_HELP' => '<b>Personal</b>: Email account accessible by you. Only you can manage and import emails from this account.<br><b>Group</b>: Email account accessible by members of specified teams. Team members can manage and import emails from this account.<br><b>Group - auto-import</b>: Email account accessible by members of specified teams. Emails are automatically imported as records.',
|
||||
'LBL_ADDRESS_BOOK_SEARCH_HELP' => 'Enter an email address, First Name, Last Name or Account Name to find recipients.',
|
||||
'LBL_TEST_SETTINGS' => 'Test Settings',
|
||||
'LBL_EMPTY_EMAIL_BODY' => '<p><span style="color: #888888;"><em>This Message Has No Content</em></span></p>',
|
||||
'LBL_TEST_EMAIL_SUBJECT' => 'Test Email from Sugar',
|
||||
'LBL_NO_SUBJECT' =>'(no subject)',
|
||||
'LBL_CHECKING_ACCOUNT' => 'Checking Account',
|
||||
'LBL_OF' => 'of',
|
||||
'LBL_TEST_EMAIL_BODY' => 'This email was sent in order to test the outgoing mail server information provided in the Sugar application. A successful receipt of this email indicates that the outgoing mail server information provided is valid.',
|
||||
|
||||
// for outbound email dialog
|
||||
'LBL_MAIL_SMTPUSER' => 'Username',
|
||||
'LBL_MAIL_SMTPPASS' => 'Password',
|
||||
'LBL_MAIL_SMTPSERVER' => 'SMTP Mail Server',
|
||||
'LBL_SMTP_SERVER_HELP' => 'This SMTP Mail Server can be used for outgoing mail. Provide a username and password for your email account in order to use the mail server.',
|
||||
'LBL_MISSING_DEFAULT_OUTBOUND_SMTP_SETTINGS' => 'The administator has not yet configured the default outbound account. Unable to send test email.',
|
||||
'LBL_MAIL_SMTPAUTH_REQ' => 'Use SMTP Authentication?',
|
||||
'LBL_MAIL_SMTPPASS' => 'SMTP Password:',
|
||||
'LBL_MAIL_SMTPPORT' => 'SMTP Port:',
|
||||
'LBL_MAIL_SMTPSERVER' => 'SMTP Server:',
|
||||
'LBL_MAIL_SMTPUSER' => 'SMTP Username:',
|
||||
'LBL_MAIL_SMTPTYPE' => 'SMTP Server Type:',
|
||||
'LBL_MAIL_SMTP_SETTINGS' => 'SMTP Server Specification',
|
||||
'LBL_CHOOSE_EMAIL_PROVIDER' => 'Choose your Email provider:',
|
||||
'LBL_YAHOOMAIL_SMTPPASS' => 'Yahoo! Mail Password:',
|
||||
'LBL_YAHOOMAIL_SMTPUSER' => 'Yahoo! Mail ID:',
|
||||
'LBL_GMAIL_SMTPPASS' => 'Gmail Password:',
|
||||
'LBL_GMAIL_SMTPUSER' => 'Gmail Email Address:',
|
||||
'LBL_EXCHANGE_SMTPPASS' => 'Exchange Password:',
|
||||
'LBL_EXCHANGE_SMTPUSER' => 'Exchange Username:',
|
||||
'LBL_EXCHANGE_SMTPPORT' => 'Exchange Server Port:',
|
||||
'LBL_EXCHANGE_SMTPSERVER' => 'Exchange Server:',
|
||||
);
|
||||
284
modules/Emails/language/ge_ge.lang.php
Executable file
284
modules/Emails/language/ge_ge.lang.php
Executable file
@@ -0,0 +1,284 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Enterprise Subscription
|
||||
* Agreement ("License") which can be viewed at
|
||||
* http://www.sugarcrm.com/crm/products/sugar-enterprise-eula.html
|
||||
* By installing or using this file, You have unconditionally agreed to the
|
||||
* terms and conditions of the License, and You may not use this file except in
|
||||
* compliance with the License. Under the terms of the license, You shall not,
|
||||
* among other things: 1) sublicense, resell, rent, lease, redistribute, assign
|
||||
* or otherwise transfer Your rights to the Software, and 2) use the Software
|
||||
* for timesharing or service bureau purposes such as hosting the Software for
|
||||
* commercial gain and/or for the benefit of a third party. Use of the Software
|
||||
* may be subject to applicable fees and any use of the Software without first
|
||||
* paying applicable fees is strictly prohibited. You do not have the right to
|
||||
* remove SugarCRM copyrights from the source code or user interface.
|
||||
*
|
||||
* All copies of the Covered Code must include on each user interface screen:
|
||||
* (i) the "Powered by SugarCRM" logo and
|
||||
* (ii) the SugarCRM copyright notice
|
||||
* in the same form as they appear in the distribution. See full license for
|
||||
* requirements.
|
||||
*
|
||||
* Your Warranty, Limitations of liability and Indemnity are expressly stated
|
||||
* in the License. Please refer to the License for the specific language
|
||||
* governing these rights and limitations under the License. Portions created
|
||||
* by SugarCRM are Copyright (C) 2004-2007 SugarCRM, Inc.; All Rights Reserved.
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: Defines the English language pack for the base application.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributors: Genius4U Ltd., simplicity GmbH, iscongroup kft.
|
||||
********************************************************************************/
|
||||
|
||||
$mod_strings = array (
|
||||
'LBL_FW' => 'FW:',
|
||||
'LBL_RE' => 'RE:',
|
||||
|
||||
'LBL_BUTTON_CREATE' => 'Erstellen',
|
||||
'LBL_BUTTON_EDIT' => 'Bearbeiten',
|
||||
'LBL_QS_DISABLED' => '(Schnellsuche ist für dieses Modul nicht verfügbar. Bitte verwenden Sie die \'Auswahl \' Schaltfläche.)',
|
||||
'LBL_SIGNATURE_PREPEND' => 'Signatur oberhalb der Antwort?',
|
||||
'LBL_EMAIL_DEFAULT_DESCRIPTION' => 'Hier ist das Angebot das Sie angefragt haben (Sie können diesen Text ändern)',
|
||||
'LBL_EMAIL_QUOTE_FOR' => 'Angebot für:',
|
||||
'LBL_QUOTE_LAYOUT_DOES_NOT_EXIST_ERROR' => 'Angebotsvorlagedatei exisitert nicht: $layout',
|
||||
'LBL_QUOTE_LAYOUT_REGISTERED_ERROR' => 'Angebotsvorlage ist nicht in Modules/Quotes/Layouts.php registriert',
|
||||
|
||||
|
||||
'LBL_CONFIRM_DELETE' => 'Möchten Sie diesen Ordner wirklich löschen?',
|
||||
|
||||
'LBL_QUOTES_SUBPANEL_TITLE' => 'Angebote',
|
||||
'LBL_EMAILS_QUOTES_REL' => 'E-Mails: Angebote',
|
||||
'LBL_ERROR_SELECT_REPORT' => 'Bitte einen Bericht auswählen',
|
||||
|
||||
'ERR_ARCHIVE_EMAIL' => 'Fehler: E-Mails zum Archivieren auswählen.',
|
||||
'ERR_DATE_START' => 'Startdatum',
|
||||
'ERR_DELETE_RECORD' => 'Fehler: Um diese Firma zu löschen, muss eine Datensatznummer angegeben werden.',
|
||||
'ERR_NOT_ADDRESSED' => 'Fehler: E-Mail muss eine An:, CC: oder BCC: Adresse haben',
|
||||
'ERR_TIME_START' => 'Startzeit',
|
||||
'LBL_ACCOUNTS_SUBPANEL_TITLE'=> 'Firmen',
|
||||
'LBL_ADD_ANOTHER_FILE' => 'Weitere Datei hinzufügen',
|
||||
'LBL_ADD_DASHLETS' => 'Dashlets hinzufügen',
|
||||
'LBL_ADD_DOCUMENT' => 'Dokument aus Sugar hinzufügen',
|
||||
'LBL_ADD_ENTRIES' => 'Einträge hinzufügen',
|
||||
'LBL_ADD_FILE' => 'Datei aus dem Dateisystem hinzufügen',
|
||||
'LBL_ARCHIVED_EMAIL' => 'Archivierte E-Mails',
|
||||
'LBL_ARCHIVED_MODULE_NAME' => 'Archivierte E-Mails',
|
||||
'LBL_ATTACHMENTS' => 'Anhänge:',
|
||||
'LBL_BCC' => 'Bcc:',
|
||||
'LBL_BODY' => 'Text:',
|
||||
'LBL_BUGS_SUBPANEL_TITLE' => 'Fehler',
|
||||
'LBL_CC' => 'Cc:',
|
||||
'LBL_COLON' => ':',
|
||||
'LBL_COMPOSE_MODULE_NAME' => 'Neue E-Mail',
|
||||
'LBL_CONTACT_FIRST_NAME' => 'Kontakt Vorname',
|
||||
'LBL_CONTACT_LAST_NAME' => 'Kontakt Nachname',
|
||||
'LBL_CONTACT_NAME' => 'Kontakt:',
|
||||
'LBL_CONTACTS_SUBPANEL_TITLE'=> 'Kontakte',
|
||||
'LBL_CREATED_BY' => 'Erstellt von:',
|
||||
'LBL_DATE_AND_TIME' => 'Sendetag & -zeit :',
|
||||
'LBL_DATE_SENT' => 'Sendetag:',
|
||||
'LBL_DATE' => 'Sendetag:',
|
||||
'LBL_DELETE_FROM_SERVER' => 'Nachricht vom Server löschen',
|
||||
'LBL_DESCRIPTION' => 'Beschreibung',
|
||||
'LBL_EDIT_ALT_TEXT' => 'Als Text bearbeiten',
|
||||
'LBL_EDIT_MY_SETTINGS' => 'Meine Einstellungen bearbeiten',
|
||||
'LBL_EMAIL_ATTACHMENT' => 'E-Mail Anhang',
|
||||
'LBL_EMAIL_EDITOR_OPTION' => 'HTML E-Mails versenden',
|
||||
'LBL_EMAIL_SELECTOR' => 'Auswählen',
|
||||
'LBL_EMAIL' => 'E-Mail:',
|
||||
'LBL_EMAILS_ACCOUNTS_REL' => 'E-Mails:Firmen',
|
||||
'LBL_EMAILS_BUGS_REL' => 'E-Mails:Fehler',
|
||||
'LBL_EMAILS_CASES_REL' => 'E-Mails:Fälle',
|
||||
'LBL_EMAILS_CONTACTS_REL' => 'E-Mails:Kontakte',
|
||||
'LBL_EMAILS_LEADS_REL' => 'E-Mails:Interessenten',
|
||||
'LBL_EMAILS_OPPORTUNITIES_REL'=> 'E-Mails:Verkaufschancen',
|
||||
'LBL_EMAILS_NOTES_REL' => 'E-Mails:Notizen',
|
||||
'LBL_EMAILS_PROJECT_REL' => 'E-Mails:Projekt',
|
||||
'LBL_EMAILS_PROJECT_TASK_REL'=> 'E-Mails:Projektaufgabe',
|
||||
'LBL_EMAILS_PROSPECT_REL' => 'E-Mails:Zielkontakt',
|
||||
'LBL_EMAILS_TASKS_REL' => 'E-Mails:Aufgaben',
|
||||
'LBL_EMAILS_USERS_REL' => 'E-Mails:Benutzer',
|
||||
'LBL_ERROR_SENDING_EMAIL' => 'Fehler beim Senden der E-Mail',
|
||||
'LBL_FORWARD_HEADER' => 'Anfang weitergeleitete Nachricht:',
|
||||
'LBL_FROM_NAME' => 'Von Name',
|
||||
'LBL_FROM' => 'Von:',
|
||||
'LBL_HTML_BODY' => 'HTML Body',
|
||||
'LBL_INVITEE' => 'Empfänger',
|
||||
'LBL_LEADS_SUBPANEL_TITLE' => 'Interessenten',
|
||||
'LBL_MESSAGE_SENT' => 'Mail gesendet',
|
||||
'LBL_MODIFIED_BY' => 'Geändert von',
|
||||
'LBL_MODULE_NAME_NEW' => 'E-Mail archivieren',
|
||||
'LBL_MODULE_NAME' => 'E-Mails',
|
||||
'LBL_MODULE_TITLE' => 'E-Mails:',
|
||||
'LBL_NEW_FORM_TITLE' => 'E-Mail archivieren',
|
||||
'LBL_NONE' => 'Kein(e)',
|
||||
'LBL_NOT_SENT' => 'Sende-Fehler',
|
||||
'LBL_NOTE_SEMICOLON' => 'Bemerkung: Verwenden Sie Kommas oder Semikolons als Trennzeichen für mehrere E-Mail Adressen.',
|
||||
'LBL_NOTES_SUBPANEL_TITLE' => 'Anhänge',
|
||||
'LBL_OPPORTUNITY_SUBPANEL_TITLE' => 'Verkaufschancen',
|
||||
'LBL_PROJECT_SUBPANEL_TITLE'=> 'Projekte',
|
||||
'LBL_PROJECT_TASK_SUBPANEL_TITLE'=> 'Projektaufgaben',
|
||||
'LBL_RAW' => 'Unbearbeitetes Mail',
|
||||
'LBL_SAVE_AS_DRAFT_BUTTON_KEY'=> 'Entwurf speichern [Alt+R]',
|
||||
'LBL_SAVE_AS_DRAFT_BUTTON_LABEL'=> 'Entwurf speichern',
|
||||
'LBL_SAVE_AS_DRAFT_BUTTON_TITLE'=> 'Entwurf speichern',
|
||||
'LBL_SEARCH_FORM_DRAFTS_TITLE'=> 'Entwürfe durchsuchen',
|
||||
'LBL_SEARCH_FORM_SENT_TITLE'=> 'Durchsuche gesendete E-Mails',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'E-Mail Suche',
|
||||
'LBL_SEND_ANYWAYS' => 'Diese E-Mail hat kein Betreff. Trotzdem speichern/senden?',
|
||||
'LBL_SEND_BUTTON_KEY' => 'S',
|
||||
'LBL_SEND_BUTTON_LABEL' => 'Senden',
|
||||
'LBL_SEND_BUTTON_TITLE' => 'Versenden [Alt+S]',
|
||||
'LBL_SEND' => 'Versenden',
|
||||
'LBL_SENT_MODULE_NAME' => 'Gesendete E-Mail',
|
||||
'LBL_SHOW_ALT_TEXT' => 'Als Text zeigen',
|
||||
'LBL_SIGNATURE' => 'Unterschrift',
|
||||
'LBL_SUBJECT' => 'Betreff:',
|
||||
'LBL_TEXT_BODY' => 'Textkörper',
|
||||
'LBL_TIME' => 'Sendezeit:',
|
||||
'LBL_TO_ADDRS' => 'An',
|
||||
'LBL_USE_TEMPLATE' => 'Vorlage benutzen:',
|
||||
'LBL_USERS_SUBPANEL_TITLE' => 'Benutzer',
|
||||
'LBL_USERS' => 'Benutzer',
|
||||
|
||||
'LNK_ALL_EMAIL_LIST' => 'E-Mails',
|
||||
'LNK_ARCHIVED_EMAIL_LIST' => 'Archivierte E-Mails',
|
||||
'LNK_CALL_LIST' => 'Anrufe',
|
||||
'LNK_DRAFTS_EMAIL_LIST' => 'Alle Entwürfe',
|
||||
'LNK_EMAIL_LIST' => 'E-Mails',
|
||||
'LBL_EMAIL_RELATE' => 'Verbinden mit',
|
||||
'LNK_EMAIL_TEMPLATE_LIST' => 'E-Mail Vorlagen',
|
||||
'LNK_MEETING_LIST' => 'Meetings',
|
||||
'LNK_NEW_ARCHIVE_EMAIL' => 'E-Mail archivieren',
|
||||
'LNK_NEW_CALL' => 'Neuer Anruf',
|
||||
'LNK_NEW_EMAIL_TEMPLATE' => 'Neue E-Mail Vorlage',
|
||||
'LNK_NEW_EMAIL' => 'E-Mail archivieren',
|
||||
'LNK_NEW_MEETING' => 'Neues Meeting',
|
||||
'LNK_NEW_NOTE' => 'Neue Notiz oder Anlage',
|
||||
'LNK_NEW_SEND_EMAIL' => 'Neue E-Mail',
|
||||
'LNK_NEW_TASK' => 'Neue Aufgabe',
|
||||
'LNK_NOTE_LIST' => 'Notizen',
|
||||
'LNK_SENT_EMAIL_LIST' => 'Gesendete E-Mail',
|
||||
'LNK_TASK_LIST' => 'Aufgaben',
|
||||
'LNK_VIEW_CALENDAR' => 'Heute',
|
||||
|
||||
'LBL_LIST_ASSIGNED' => 'Zugewiesen',
|
||||
'LBL_LIST_CONTACT_NAME' => 'Kontakt:',
|
||||
'LBL_LIST_CREATED' => 'Erstellt',
|
||||
'LBL_LIST_DATE_SENT' => 'Sendedatum',
|
||||
'LBL_LIST_DATE' => 'Sendedatum',
|
||||
'LBL_LIST_FORM_DRAFTS_TITLE'=> 'Entwurf',
|
||||
'LBL_LIST_FORM_SENT_TITLE' => 'Gesendete E-Mail',
|
||||
'LBL_LIST_FORM_TITLE' => 'E-Mail Liste',
|
||||
'LBL_LIST_FROM_ADDR' => 'Von',
|
||||
'LBL_LIST_RELATED_TO' => 'Gehört zu',
|
||||
'LBL_LIST_SUBJECT' => 'Betreff',
|
||||
'LBL_LIST_TIME' => 'Sendezeit',
|
||||
'LBL_LIST_TO_ADDR' => 'An',
|
||||
'LBL_LIST_TYPE' => 'Typ:',
|
||||
|
||||
'NTC_REMOVE_INVITEE' => 'Möchten Sie diesen Empfänger wirklich von der E-Mail entfernen?',
|
||||
'WARNING_SETTINGS_NOT_CONF' => 'Warnung: Ihre E-Mail Einstellungen sind zum Senden von Mails nicht konfiguriert.',
|
||||
'WARNING_NO_UPLOAD_DIR' => 'Anhänge werde nicht funktionieren: Kein Wert für "upload_tmp_dir" gefunden. Bitte korrigieren Sie Ihre php.ini Datei.',
|
||||
'WARNING_UPLOAD_DIR_NOT_WRITABLE' => 'Anhänge werde nicht funktionieren: Ein inkorrekter oder unbrauchbarer Wert für "upload_tmp_dir" wurde gefunden. Bitte korrigieren Sie Ihre php.ini Datei.',
|
||||
|
||||
// for All emails
|
||||
'LBL_BUTTON_RAW_TITLE' => 'Unbearbeitete E-Mail anzeigen [Alt+E]',
|
||||
'LBL_BUTTON_RAW_KEY' => 'e',
|
||||
'LBL_BUTTON_RAW_LABEL' => 'Unbearbeitete anzeigen',
|
||||
'LBL_BUTTON_RAW_LABEL_HIDE' => 'Unbearbeitete verbergen',
|
||||
|
||||
// for InboundEmail
|
||||
'LBL_BUTTON_CHECK' => 'E-Mails holen',
|
||||
'LBL_BUTTON_CHECK_TITLE' => 'Auf neue E-Mails prüfen [Alt + C]',
|
||||
'LBL_BUTTON_CHECK_KEY' => 'c',
|
||||
'LBL_BUTTON_FORWARD' => 'Vorwärts',
|
||||
'LBL_BUTTON_FORWARD_TITLE' => 'Diese E-Mail weiterleiten [Alt + F]',
|
||||
'LBL_BUTTON_FORWARD_KEY' => 'f',
|
||||
'LBL_BUTTON_REPLY_KEY' => 'r',
|
||||
'LBL_BUTTON_REPLY_TITLE' => 'Antworten [Alt+R]',
|
||||
'LBL_BUTTON_REPLY' => 'Antworten',
|
||||
'LBL_CASES_SUBPANEL_TITLE' => 'Fälle',
|
||||
'LBL_INBOUND_TITLE' => 'Eingehende E-Mails',
|
||||
'LBL_INTENT' => 'Absicht',
|
||||
'LBL_MESSAGE_ID' => 'Nachricht ID',
|
||||
'LBL_REPLY_HEADER_1' => 'Am',
|
||||
'LBL_REPLY_HEADER_2' => 'geschrieben:',
|
||||
'LBL_REPLY_TO_ADDRESS' => 'Antwort-an Adresse',
|
||||
'LBL_REPLY_TO_NAME' => 'Antwort-an Name',
|
||||
|
||||
'LBL_LIST_BUG' => 'Fehler',
|
||||
'LBL_LIST_CASE' => 'Fälle',
|
||||
'LBL_LIST_CONTACT' => 'Kontakte',
|
||||
'LBL_LIST_LEAD' => 'Interessenten',
|
||||
'LBL_LIST_TASK' => 'Aufgaben',
|
||||
'LBL_LIST_ASSIGNED_TO_NAME' => 'Zugew. Benutzer',
|
||||
|
||||
// for Inbox
|
||||
'LBL_ALL' => 'Alle',
|
||||
'LBL_ASSIGN_WARN' => 'Stellen Sie sicher, dass alle 2 Optionen gewählt sind.',
|
||||
'LBL_BACK_TO_GROUP' => 'Zurück zum Gruppen Posteingang',
|
||||
'LBL_BUTTON_DISTRIBUTE_KEY' => 'a',
|
||||
'LBL_BUTTON_DISTRIBUTE_TITLE'=> 'Zuweisen [Alt+A]',
|
||||
'LBL_BUTTON_DISTRIBUTE' => 'Zuweisen',
|
||||
'LBL_BUTTON_GRAB_KEY' => 't',
|
||||
'LBL_BUTTON_GRAB_TITLE' => 'Von Gruppe nehmen [Alt+T]',
|
||||
'LBL_BUTTON_GRAB' => 'Von Gruppe nehmen',
|
||||
'LBL_CREATE_BUG' => 'Neuer Fehler',
|
||||
'LBL_CREATE_CASE' => 'Neuer Fall',
|
||||
'LBL_CREATE_CONTACT' => 'Neuer Kontakt',
|
||||
'LBL_CREATE_LEAD' => 'Neuer Interessent',
|
||||
'LBL_CREATE_TASK' => 'Neue Aufgabe',
|
||||
'LBL_DIST_TITLE' => 'Aufgabe',
|
||||
'LBL_LOCK_FAIL_DESC' => 'Das gewählte Item ist momentan nicht verfügbar.',
|
||||
'LBL_LOCK_FAIL_USER' => 'hat Eigentum übernommen.',
|
||||
'LBL_MASS_DELETE_ERROR' => 'Es wurden keine Einträge zum löschen markiert.',
|
||||
'LBL_NEW' => 'Neu',
|
||||
'LBL_NEXT_EMAIL' => 'Nächster freier Eintrag',
|
||||
'LBL_NO_GRAB_DESC' => 'Es waren keine Elemente verfügbar. Versuchen Sie es später noch einmal.',
|
||||
'LBL_QUICK_REPLY' => 'Antworten',
|
||||
'LBL_REPLIED' => 'Beantwortet',
|
||||
'LBL_SELECT_TEAM' => 'Teams auswählen',
|
||||
'LBL_TAKE_ONE_TITLE' => 'Reps',
|
||||
'LBL_TITLE_SEARCH_RESULTS' => 'Suchergebnisse',
|
||||
'LBL_TO' => 'An:',
|
||||
'LBL_TOGGLE_ALL' => 'Alle umschalten',
|
||||
'LBL_UNKNOWN' => 'Unbekannt',
|
||||
'LBL_UNREAD_HOME' => 'Ungelesene E-Mails',
|
||||
'LBL_UNREAD' => 'Ungelesen',
|
||||
'LBL_USE_ALL' => 'Alle Suchergebnisse',
|
||||
'LBL_USE_CHECKED' => 'Nur markierte',
|
||||
'LBL_USE_MAILBOX_INFO' => 'Mailbox E-Mail benutzen',
|
||||
'LBL_USE' => 'Zuweisen:',
|
||||
'LBL_ASSIGN_SELECTED_RESULTS_TO' => 'Ausgewählte Resultate zuweisen an:',
|
||||
'LBL_USER_SELECT' => 'Benutzer auswählen',
|
||||
'LBL_USING_RULES' => 'Regeln verwenden:',
|
||||
'LBL_WARN_NO_DIST' => 'Keine Verteilmethode gewählt',
|
||||
'LBL_WARN_NO_USERS' => 'Keine Benutzer ausgewählt',
|
||||
|
||||
'LBL_LIST_STATUS' => 'Status',
|
||||
'LBL_LIST_TITLE_GROUP_INBOX'=> 'Gruppen Posteingang',
|
||||
'LBL_LIST_TITLE_MY_DRAFTS' => 'Meine Entwürfe',
|
||||
'LBL_LIST_TITLE_MY_INBOX' => 'Mein Posteingang',
|
||||
'LBL_LIST_TITLE_MY_SENT' => 'Meine gesendeten E-Mails',
|
||||
'LBL_LIST_TITLE_MY_ARCHIVES'=> 'Meine archvierten E-mails',
|
||||
|
||||
'LNK_CHECK_MY_INBOX' => 'Meine E-Mails überprüfen',
|
||||
'LNK_DATE_SENT' => 'Sendedatum',
|
||||
'LNK_GROUP_INBOX' => 'Gruppen Posteingang',
|
||||
'LNK_MY_DRAFTS' => 'Meine Entwürfe',
|
||||
'LNK_MY_INBOX' => 'Mein Posteingang',
|
||||
'LNK_QUICK_REPLY' => 'Antworten',
|
||||
'LNK_MY_ARCHIVED_LIST' => 'Mein Archiv',
|
||||
|
||||
// advanced search
|
||||
'LBL_ASSIGNED_TO' => 'Zugewiesen an:',
|
||||
'LBL_MEMBER_OF' => 'Vorläufer',
|
||||
'LBL_QUICK_CREATE' => 'Schnellerfassung',
|
||||
'LBL_STATUS' => 'E-Mail Status:',
|
||||
'LBL_TYPE' => 'Typ:',
|
||||
);
|
||||
370
modules/Emails/language/pl_pl.lang.php
Executable file
370
modules/Emails/language/pl_pl.lang.php
Executable file
@@ -0,0 +1,370 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: Defines the English language pack for the base application.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
$mod_strings = array (
|
||||
'LBL_FW' => 'FW:',
|
||||
'LBL_RE' => 'RE:',
|
||||
|
||||
'LBL_BUTTON_CREATE' => 'Create',
|
||||
'LBL_BUTTON_EDIT' => 'Edit',
|
||||
'LBL_QS_DISABLED' => '(QuickSearch is not availible for this module. Please use the select button.)',
|
||||
'LBL_SIGNATURE_PREPEND' => 'Signature above reply',
|
||||
'LBL_EMAIL_DEFAULT_DESCRIPTION' => 'Here is the quote you requested (You can change this text)',
|
||||
'LBL_EMAIL_QUOTE_FOR' => 'Quote for: ',
|
||||
'LBL_QUOTE_LAYOUT_DOES_NOT_EXIST_ERROR' => 'quote layout file does not exist: $layout',
|
||||
'LBL_QUOTE_LAYOUT_REGISTERED_ERROR' => 'quote layout is not registered in modules/Quotes/Layouts.php',
|
||||
|
||||
|
||||
'LBL_CONFIRM_DELETE' => 'Are you sure you want to delete this folder?',
|
||||
'LBL_ENTER_FOLDER_NAME' => 'Please enter a folder name',
|
||||
|
||||
'LBL_ERROR_SELECT_MODULE' => 'Please select a module for the Related to field',
|
||||
|
||||
'ERR_ARCHIVE_EMAIL' => 'Error: Select emails to archive.',
|
||||
'ERR_DATE_START' => 'Date Start',
|
||||
'ERR_DELETE_RECORD' => 'Error: You must specify a record number to delete the account.',
|
||||
'ERR_NOT_ADDRESSED' => 'Error: Email must have a Do, CC, or BCC address',
|
||||
'ERR_TIME_START' => 'Time Start',
|
||||
'ERR_TIME_SENT' => 'Time Sent',
|
||||
'LBL_ACCOUNTS_SUBPANEL_TITLE'=> 'Accounts',
|
||||
'LBL_ADD_ANOTHER_FILE' => 'Add Another File',
|
||||
'LBL_ADD_DASHLETS' => 'Add Sugar Dashlets',
|
||||
'LBL_ADD_DOCUMENT' => 'Add Documents',
|
||||
'LBL_ADD_ENTRIES' => 'Add Entries',
|
||||
'LBL_ADD_FILE' => 'Add Files',
|
||||
'LBL_ARCHIVED_EMAIL' => 'Archived Email',
|
||||
'LBL_ARCHIVED_MODULE_NAME' => 'Create Archived Emails',
|
||||
'LBL_ATTACHMENTS' => 'Załączniki:',
|
||||
'LBL_HAS_ATTACHMENT' => 'Has Attachment?:',
|
||||
'LBL_BCC' => 'Bcc:',
|
||||
'LBL_BODY' => 'Treść:',
|
||||
'LBL_BUGS_SUBPANEL_TITLE' => 'Bugs',
|
||||
'LBL_CC' => 'Cc:',
|
||||
'LBL_COLON' => ':',
|
||||
'LBL_COMPOSE_MODULE_NAME' => 'Compose Email',
|
||||
'LBL_CONTACT_FIRST_NAME' => 'Contact First Name',
|
||||
'LBL_CONTACT_LAST_NAME' => 'Contact Last Name',
|
||||
'LBL_CONTACT_NAME' => 'Kontakt:',
|
||||
'LBL_CONTACTS_SUBPANEL_TITLE'=> 'Contacts',
|
||||
'LBL_CREATED_BY' => 'Created by',
|
||||
'LBL_DATE_AND_TIME' => 'Date & Time Sent:',
|
||||
'LBL_DATE_SENT' => 'Data wysłania:',
|
||||
'LBL_DATE' => 'Data wysłania:',
|
||||
'LBL_DELETE_FROM_SERVER' => 'Delete message from server',
|
||||
'LBL_DESCRIPTION' => 'Description',
|
||||
'LBL_EDIT_ALT_TEXT' => 'Edit Plain Text',
|
||||
'LBL_SEND_IN_PLAIN_TEXT' => 'Send in Plain Text',
|
||||
'LBL_EDIT_MY_SETTINGS' => 'Edit My Settings',
|
||||
'LBL_EMAIL_ATTACHMENT' => 'Email Attachment',
|
||||
'LBL_EMAIL_EDITOR_OPTION' => 'Send HTML Email',
|
||||
'LBL_EMAIL_SELECTOR' => 'Select',
|
||||
'LBL_EMAIL' => 'Email Address:',
|
||||
'LBL_EMAILS_ACCOUNTS_REL' => 'Emails:Accounts',
|
||||
'LBL_EMAILS_BUGS_REL' => 'Emails:Bugs',
|
||||
'LBL_EMAILS_CASES_REL' => 'Emails:Cases',
|
||||
'LBL_EMAILS_CONTACTS_REL' => 'Emails:Contacts',
|
||||
'LBL_EMAILS_LEADS_REL' => 'Emails:Leads',
|
||||
'LBL_EMAILS_OPPORTUNITIES_REL'=> 'Emails:Opportunities',
|
||||
'LBL_EMAILS_NOTES_REL' => 'Emails:Notes',
|
||||
'LBL_EMAILS_PROJECT_REL' => 'Emails:Project',
|
||||
'LBL_EMAILS_PROJECT_TASK_REL'=> 'Emails:ProjectTask',
|
||||
'LBL_EMAILS_PROSPECT_REL' => 'Emails:Prospect',
|
||||
'LBL_EMAILS_TASKS_REL' => 'Emails:Tasks',
|
||||
'LBL_EMAILS_USERS_REL' => 'Emails:Users',
|
||||
'LBL_EMPTY_FOLDER' => 'No Emails to display',
|
||||
'LBL_ERROR_SENDING_EMAIL' => 'Error Sending email',
|
||||
'LBL_ERROR_SAVING_DRAFT' => 'Error Saving Draft',
|
||||
'LBL_FORWARD_HEADER' => 'Begin forwarded message:',
|
||||
'LBL_FROM_NAME' => 'Od Name',
|
||||
'LBL_FROM' => 'Od:',
|
||||
'LBL_REPLY_TO' => 'Reply Do:',
|
||||
'LBL_HTML_BODY' => 'HTML Treść',
|
||||
'LBL_INVITEE' => 'Recipients',
|
||||
'LBL_LEADS_SUBPANEL_TITLE' => 'Leads',
|
||||
'LBL_MESSAGE_SENT' => 'Message Sent',
|
||||
'LBL_MODIFIED_BY' => 'Modified By',
|
||||
'LBL_MODULE_NAME_NEW' => 'Archive Email',
|
||||
'LBL_MODULE_NAME' => 'All Emails',
|
||||
'LBL_MODULE_TITLE' => 'Emails: ',
|
||||
'LBL_MY_EMAILS' => 'My Emails',
|
||||
'LBL_NEW_FORM_TITLE' => 'Archive Email',
|
||||
'LBL_NONE' => 'None',
|
||||
'LBL_NOT_SENT' => 'Send Error',
|
||||
'LBL_NOTE_SEMICOLON' => 'Note: Use commas or semi-colons as separators for multiple email addresses.',
|
||||
'LBL_NOTES_SUBPANEL_TITLE' => 'Załączniki',
|
||||
'LBL_OPPORTUNITY_SUBPANEL_TITLE' => 'Opportunities',
|
||||
'LBL_PROJECT_SUBPANEL_TITLE'=> 'Projects',
|
||||
'LBL_PROJECT_TASK_SUBPANEL_TITLE'=> 'Project Tasks',
|
||||
'LBL_RAW' => 'Raw Email',
|
||||
'LBL_SAVE_AS_DRAFT_BUTTON_KEY'=> 'R',
|
||||
'LBL_SAVE_AS_DRAFT_BUTTON_LABEL'=> 'Save Draft',
|
||||
'LBL_SAVE_AS_DRAFT_BUTTON_TITLE'=> 'Save Draft [Alt+R]',
|
||||
'LBL_SEARCH_FORM_DRAFTS_TITLE'=> 'Search Drafts',
|
||||
'LBL_SEARCH_FORM_SENT_TITLE'=> 'Search Sent Emails',
|
||||
'LBL_SEARCH_FORM_TITLE' => ' ',
|
||||
'LBL_SEND_ANYWAYS' => 'This email has no subject. Send/save anyway?',
|
||||
'LBL_SEND_BUTTON_KEY' => 'S',
|
||||
'LBL_SEND_BUTTON_LABEL' => 'Send',
|
||||
'LBL_SEND_BUTTON_TITLE' => 'Send [Alt+S]',
|
||||
'LBL_SEND' => 'SEND',
|
||||
'LBL_SENT_MODULE_NAME' => 'Sent Emails',
|
||||
'LBL_SHOW_ALT_TEXT' => 'Show Plain Text',
|
||||
'LBL_SIGNATURE' => 'Signature',
|
||||
'LBL_SUBJECT' => 'Temat:',
|
||||
'LBL_TEXT_BODY' => 'Text Treść',
|
||||
'LBL_TIME' => 'Time Sent:',
|
||||
'LBL_TO_ADDRS' => 'Do',
|
||||
'LBL_USE_TEMPLATE' => 'Use Template:',
|
||||
'LBL_USERS_SUBPANEL_TITLE' => 'Users',
|
||||
'LBL_USERS' => 'Users',
|
||||
|
||||
'LNK_ALL_EMAIL_LIST' => 'All Emails',
|
||||
'LNK_ARCHIVED_EMAIL_LIST' => 'Archived Emails',
|
||||
'LNK_CALL_LIST' => 'Calls',
|
||||
'LNK_DRAFTS_EMAIL_LIST' => 'All Drafts',
|
||||
'LNK_EMAIL_LIST' => 'Emails',
|
||||
'LBL_EMAIL_RELATE' => 'Related Do',
|
||||
'LNK_EMAIL_TEMPLATE_LIST' => 'View Email Templates',
|
||||
'LNK_MEETING_LIST' => 'Meetings',
|
||||
'LNK_NEW_ARCHIVE_EMAIL' => 'Create Archived Email',
|
||||
'LNK_NEW_CALL' => 'Log Call',
|
||||
'LNK_NEW_EMAIL_TEMPLATE' => 'Create Email Template',
|
||||
'LNK_NEW_EMAIL' => 'Send Email',
|
||||
'LNK_NEW_MEETING' => 'Schedule Meeting',
|
||||
'LNK_NEW_NOTE' => 'Create Note or Attachment',
|
||||
'LNK_NEW_SEND_EMAIL' => 'Utwórz wiadomość',
|
||||
'LNK_NEW_TASK' => 'Create Task',
|
||||
'LNK_NOTE_LIST' => 'Notes',
|
||||
'LNK_SENT_EMAIL_LIST' => 'Sent Emails',
|
||||
'LNK_TASK_LIST' => 'Tasks',
|
||||
'LNK_VIEW_CALENDAR' => 'Doday',
|
||||
|
||||
'LBL_LIST_ASSIGNED' => 'Przypisany do',
|
||||
'LBL_LIST_CONTACT_NAME' => 'Contact Name',
|
||||
'LBL_LIST_CREATED' => 'Utworzony',
|
||||
'LBL_LIST_DATE_SENT' => 'Data wysłania',
|
||||
'LBL_LIST_DATE' => 'Data wysłania',
|
||||
'LBL_LIST_FORM_DRAFTS_TITLE'=> 'Draft',
|
||||
'LBL_LIST_FORM_SENT_TITLE' => 'Sent Emails',
|
||||
'LBL_LIST_FORM_TITLE' => 'Lista Emaili',
|
||||
'LBL_LIST_FROM_ADDR' => 'Od',
|
||||
'LBL_LIST_RELATED_TO' => 'Szukaj w',
|
||||
'LBL_LIST_SUBJECT' => 'Temat',
|
||||
'LBL_LIST_TIME' => 'Time Sent',
|
||||
'LBL_LIST_TO_ADDR' => 'Do',
|
||||
'LBL_LIST_TYPE' => 'Typ',
|
||||
|
||||
'NTC_REMOVE_INVITEE' => 'Are you sure you want to remove this recipient from the email?',
|
||||
'WARNING_SETTINGS_NOT_CONF' => 'Warning: Your email settings are not configured to send email.',
|
||||
'WARNING_NO_UPLOAD_DIR' => 'Załączniki may fail: No value for "upload_tmp_dir" was detected. Please correct this in your php.ini file.',
|
||||
'WARNING_UPLOAD_DIR_NOT_WRITABLE' => 'Załączniki may fail: An incorrect or unusable value for "upload_tmp_dir" was detected. Please correct this in your php.ini file.',
|
||||
|
||||
// for All emails
|
||||
'LBL_BUTTON_RAW_TITLE' => 'Show Raw Message [Alt+E]',
|
||||
'LBL_BUTTON_RAW_KEY' => 'e',
|
||||
'LBL_BUTTON_RAW_LABEL' => 'Show Raw',
|
||||
'LBL_BUTTON_RAW_LABEL_HIDE' => 'Hide Raw',
|
||||
|
||||
// for InboundEmail
|
||||
'LBL_BUTTON_CHECK' => 'Check Mail',
|
||||
'LBL_BUTTON_CHECK_TITLE' => 'Check For New Email [Alt+C]',
|
||||
'LBL_BUTTON_CHECK_KEY' => 'c',
|
||||
'LBL_BUTTON_FORWARD' => 'Forward',
|
||||
'LBL_BUTTON_FORWARD_TITLE' => 'Forward This Email [Alt+F]',
|
||||
'LBL_BUTTON_FORWARD_KEY' => 'f',
|
||||
'LBL_BUTTON_REPLY_KEY' => 'r',
|
||||
'LBL_BUTTON_REPLY_TITLE' => 'Reply [Alt+R]',
|
||||
'LBL_BUTTON_REPLY' => 'Reply',
|
||||
'LBL_CASES_SUBPANEL_TITLE' => 'Cases',
|
||||
'LBL_INBOUND_TITLE' => 'Inbound Email',
|
||||
'LBL_INTENT' => 'Intent',
|
||||
'LBL_MESSAGE_ID' => 'Message ID',
|
||||
'LBL_REPLY_HEADER_1' => 'On ',
|
||||
'LBL_REPLY_HEADER_2' => 'wrote:',
|
||||
'LBL_REPLY_TO_ADDRESS' => 'Reply-to Address',
|
||||
'LBL_REPLY_TO_NAME' => 'Reply-to Name',
|
||||
|
||||
'LBL_LIST_BUG' => 'Bugs',
|
||||
'LBL_LIST_CASE' => 'Cases',
|
||||
'LBL_LIST_CONTACT' => 'Kontakt',
|
||||
'LBL_LIST_LEAD' => 'Leads',
|
||||
'LBL_LIST_TASK' => 'Tasks',
|
||||
'LBL_LIST_ASSIGNED_TO_NAME' => 'Assigned User',
|
||||
|
||||
// for Inbox
|
||||
'LBL_ALL' => 'All',
|
||||
'LBL_ASSIGN_WARN' => 'Ensure that all 2 options are selected.',
|
||||
'LBL_BACK_TO_GROUP' => 'Back to Group Inbox',
|
||||
'LBL_BUTTON_DISTRIBUTE_KEY' => 'a',
|
||||
'LBL_BUTTON_DISTRIBUTE_TITLE'=> 'Assign [Alt+A]',
|
||||
'LBL_BUTTON_DISTRIBUTE' => 'Assign',
|
||||
'LBL_BUTTON_GRAB_KEY' => 't',
|
||||
'LBL_BUTTON_GRAB_TITLE' => 'Take from Group [Alt+T]',
|
||||
'LBL_BUTTON_GRAB' => 'Take from Group',
|
||||
'LBL_CREATE_BUG' => 'Create Bug',
|
||||
'LBL_CREATE_CASE' => 'Create Case',
|
||||
'LBL_CREATE_CONTACT' => 'Create Contact',
|
||||
'LBL_CREATE_LEAD' => 'Create Lead',
|
||||
'LBL_CREATE_TASK' => 'Create Task',
|
||||
'LBL_DIST_TITLE' => 'Assignment',
|
||||
'LBL_LOCK_FAIL_DESC' => 'The chosen item is unavailable currently.',
|
||||
'LBL_LOCK_FAIL_USER' => ' has taken ownership.',
|
||||
'LBL_MASS_DELETE_ERROR' => 'No checked items were passed for deletion.',
|
||||
'LBL_NEW' => 'New',
|
||||
'LBL_NEXT_EMAIL' => 'Next Free Item',
|
||||
'LBL_NO_GRAB_DESC' => 'There were no items available. Try again in a moment.',
|
||||
'LBL_QUICK_REPLY' => 'Reply',
|
||||
'LBL_REPLIED' => 'Replied',
|
||||
'LBL_SELECT_TEAM' => 'Select Teams',
|
||||
'LBL_TAKE_ONE_TITLE' => 'Reps',
|
||||
'LBL_TITLE_SEARCH_RESULTS' => 'Search Results',
|
||||
'LBL_TO' => 'Do: ',
|
||||
'LBL_TOGGLE_ALL' => 'Doggle All',
|
||||
'LBL_UNKNOWN' => 'Unknown',
|
||||
'LBL_UNREAD_HOME' => 'Unread Emails',
|
||||
'LBL_UNREAD' => 'Unread',
|
||||
'LBL_USE_ALL' => 'All Search Results',
|
||||
'LBL_USE_CHECKED' => 'Only Checked',
|
||||
'LBL_USE_MAILBOX_INFO' => 'Use Mailbox Od: Address',
|
||||
'LBL_USE' => 'Assign:',
|
||||
'LBL_ASSIGN_SELECTED_RESULTS_TO' => 'Assign Selected Results Do: ',
|
||||
'LBL_USER_SELECT' => 'Select Users',
|
||||
'LBL_USING_RULES' => 'Using Rules:',
|
||||
'LBL_WARN_NO_DIST' => 'No Distribution Method Selected',
|
||||
'LBL_WARN_NO_USERS' => 'No Users are selected',
|
||||
'LBL_WARN_NO_USERS_OR_TEAM' => 'Please select either a user or team for assignment.',
|
||||
'LBL_IMPORT_STATUS_TITLE' => 'Status',
|
||||
'LBL_LIST_STATUS' => 'Status',
|
||||
'LBL_LIST_TITLE_GROUP_INBOX'=> 'Group Inbox',
|
||||
'LBL_LIST_TITLE_MY_DRAFTS' => 'My Drafts',
|
||||
'LBL_LIST_TITLE_MY_INBOX' => 'My Inbox',
|
||||
'LBL_LIST_TITLE_MY_SENT' => 'My Sent Email',
|
||||
'LBL_LIST_TITLE_MY_ARCHIVES'=> 'My Archived Emails',
|
||||
'LBL_ACTIVITIES_REPORTS' => 'Activities Report',
|
||||
|
||||
'LNK_CHECK_MY_INBOX' => 'Check My Mail',
|
||||
'LNK_DATE_SENT' => 'Data wysłania',
|
||||
'LNK_GROUP_INBOX' => 'Group Inbox',
|
||||
'LNK_MY_DRAFTS' => 'My Drafts',
|
||||
'LNK_MY_INBOX' => 'Mój Email',
|
||||
'LNK_VIEW_MY_INBOX' => 'Pokaż moje Emaile',
|
||||
'LNK_QUICK_REPLY' => 'Reply',
|
||||
'LNK_MY_ARCHIVED_LIST' => 'My Archives',
|
||||
'LBL_EMAILS_NO_PRIMARY_TEAM_SPECIFIED' =>'No Primary Team specified',
|
||||
|
||||
// advanced search
|
||||
|
||||
'LBL_ASSIGNED_TO' => 'Przypisane do:',
|
||||
'LBL_MEMBER_OF' => 'Parent',
|
||||
'LBL_QUICK_CREATE' => 'Quick Create',
|
||||
'LBL_STATUS' => 'Status:',
|
||||
'LBL_EMAIL_FLAGGED' => 'Flagged:',
|
||||
'LBL_EMAIL_REPLY_TO_STATUS' => 'Reply Do Status:',
|
||||
'LBL_TYPE' => 'Typ:',
|
||||
//#20680 EmialTemplate Ext.Message.show;
|
||||
'LBL_EMAILTEMPLATE_MESSAGE_SHOW_TITLE' => 'Please check!',
|
||||
'LBL_EMAILTEMPLATE_MESSAGE_SHOW_MSG' => 'Selecting this template will overwrite any data already entered within the email body. Do you wish to continue?',
|
||||
'LBL_EMAILTEMPLATE_MESSAGE_CLEAR_MSG' => 'Selecting "--None--" will clear any data already entered within the email body. Do you wish to continue?',
|
||||
'LBL_CHECK_ATTACHMENTS'=>'Please Check Załączniki!',
|
||||
'LBL_HAS_ATTACHMENTS' => 'This email already has attachment(s). Would you like to keep the attachment(s)?',
|
||||
'ERR_MISSING_REQUIRED_FIELDS' => 'Missing required field',
|
||||
'ERR_INVALID_REQUIRED_FIELDS' => 'Invalid required field',
|
||||
'LBL_FILTER_BY_RELATED_BEAN' => 'Only show recipients related to',
|
||||
'LBL_RECIPIENTS_HAVE_BEEN_ADDED' => 'Recipients have been added.',
|
||||
'LBL_ADD_INBOUND_ACCOUNT' => 'Add',
|
||||
'LBL_ADD_OUTBOUND_ACCOUNT' => 'Add',
|
||||
'LBL_EMAIL_ACCOUNTS_INBOUND' => 'Mail Account Properties',
|
||||
'LBL_EMAIL_SETTINGS_OUTBOUND_ACCOUNT' => 'Outgoing SMTP Mail Server',
|
||||
'LBL_EMAIL_SETTINGS_OUTBOUND_ACCOUNTS' => 'Outgoing SMTP Mail Servers',
|
||||
'LBL_EMAIL_SETTINGS_INBOUND_ACCOUNTS' => 'Mail Accounts',
|
||||
'LBL_EMAIL_SETTINGS_INBOUND' => 'Incoming Email',
|
||||
'LBL_EMAIL_SETTINGS_OUTBOUND' => 'Outgoing Email',
|
||||
'LBL_ADD_CC' => 'Dodaj Cc',
|
||||
'LBL_ADD_BCC' => 'Dodaj Bcc',
|
||||
'LBL_ADD_TO_ADDR' => 'Add Do',
|
||||
'LBL_SELECTED_ADDR' => 'Selected',
|
||||
'LBL_ADD_CC_BCC_SEP' => '|',
|
||||
'LBL_SEND_EMAIL_FAIL_TITLE' => 'Error Sending Email',
|
||||
'LBL_EMAIL_DETAIL_VIEW_SHOW' => 'show ',
|
||||
'LBL_EMAIL_DETAIL_VIEW_MORE' => ' more',
|
||||
'LBL_MORE_OPTIONS' => 'More',
|
||||
'LBL_LESS_OPTIONS' => 'Less',
|
||||
'LBL_MAILBOX_TYPE_PERSONAL' => 'Personal',
|
||||
'LBL_MAILBOX_TYPE_GROUP' => 'Group',
|
||||
'LBL_MAILBOX_TYPE_GROUP_FOLDER' => 'Group - Auto-Import',
|
||||
'LBL_SEARCH_FOR' => 'Szukaj',
|
||||
'LBL_EMAIL_INBOUND_TYPE_HELP' => '<b>Personal</b>: Email account accessible by you. Only you can manage and import emails from this account.<br><b>Group</b>: Email account accessible by members of specified teams. Team members can manage and import emails from this account.<br><b>Group - auto-import</b>: Email account accessible by members of specified teams. Emails are automatically imported as records.',
|
||||
// 'LBL_ADDRESS_BOOK_SEARCH_HELP' => 'Enter an email address, First Name, Last Name or Account Name to find recipients.',
|
||||
'LBL_ADDRESS_BOOK_SEARCH_HELP' => 'Wpisz adres email, imię, nazwisko, lub nazwę kontaktu',
|
||||
'LBL_TEST_SETTINGS' => 'Test Settings',
|
||||
'LBL_EMPTY_EMAIL_BODY' => '<p><span style="color: #888888;"><em>This Message Has No Content</em></span></p>',
|
||||
'LBL_TEST_EMAIL_SUBJECT' => 'Test Email from Sugar',
|
||||
'LBL_NO_SUBJECT' =>'(no subject)',
|
||||
'LBL_CHECKING_ACCOUNT' => 'Checking Account',
|
||||
'LBL_OF' => 'of',
|
||||
'LBL_TEST_EMAIL_BODY' => 'This email was sent in order to test the outgoing mail server information provided in the Sugar application. A successful receipt of this email indicates that the outgoing mail server information provided is valid.',
|
||||
|
||||
// for outbound email dialog
|
||||
'LBL_MAIL_SMTPUSER' => 'Username',
|
||||
'LBL_MAIL_SMTPPASS' => 'Password',
|
||||
'LBL_MAIL_SMTPSERVER' => 'SMTP Mail Server',
|
||||
'LBL_SMTP_SERVER_HELP' => 'This SMTP Mail Server can be used for outgoing mail. Provide a username and password for your email account in order to use the mail server.',
|
||||
'LBL_MISSING_DEFAULT_OUTBOUND_SMTP_SETTINGS' => 'The administator has not yet configured the default outbound account. Unable to send test email.',
|
||||
'LBL_MAIL_SMTPAUTH_REQ' => 'Use SMTP Authentication?',
|
||||
'LBL_MAIL_SMTPPASS' => 'SMTP Password:',
|
||||
'LBL_MAIL_SMTPPORT' => 'SMTP Port:',
|
||||
'LBL_MAIL_SMTPSERVER' => 'SMTP Server:',
|
||||
'LBL_MAIL_SMTPUSER' => 'SMTP Username:',
|
||||
'LBL_MAIL_SMTPTYPE' => 'SMTP Server Type:',
|
||||
'LBL_MAIL_SMTP_SETTINGS' => 'SMTP Server Specification',
|
||||
'LBL_CHOOSE_EMAIL_PROVIDER' => 'Choose your Email provider:',
|
||||
'LBL_YAHOOMAIL_SMTPPASS' => 'Yahoo! Mail Password:',
|
||||
'LBL_YAHOOMAIL_SMTPUSER' => 'Yahoo! Mail ID:',
|
||||
'LBL_GMAIL_SMTPPASS' => 'Gmail Password:',
|
||||
'LBL_GMAIL_SMTPUSER' => 'Gmail Email Address:',
|
||||
'LBL_EXCHANGE_SMTPPASS' => 'Exchange Password:',
|
||||
'LBL_EXCHANGE_SMTPUSER' => 'Exchange Username:',
|
||||
'LBL_EXCHANGE_SMTPPORT' => 'Exchange Server Port:',
|
||||
'LBL_EXCHANGE_SMTPSERVER' => 'Exchange Server:',
|
||||
);
|
||||
88
modules/Emails/metadata/additionalDetails.php
Executable file
88
modules/Emails/metadata/additionalDetails.php
Executable file
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
function additionalDetailsEmail($fields) {
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, 'Emails');
|
||||
$newLines = array("\r", "\R", "\n", "\N");
|
||||
|
||||
$overlib_string = '';
|
||||
// From Name
|
||||
if(!empty($fields['FROM_NAME'])) {
|
||||
$overlib_string .= '<b>' . $mod_strings['LBL_FROM'] . '</b> ';
|
||||
$overlib_string .= $fields['FROM_NAME'];
|
||||
}
|
||||
|
||||
// email text
|
||||
if(!empty($fields['DESCRIPTION_HTML'])) {
|
||||
if(!empty($overlib_string)) $overlib_string .= '<br>';
|
||||
$overlib_string .= '<b>'.$mod_strings['LBL_BODY'].'</b><br>';
|
||||
$descH = strip_tags($fields['DESCRIPTION_HTML'], '<a>');
|
||||
$desc = str_replace($newLines, ' ', $descH);
|
||||
$overlib_string .= substr($desc, 0, 300);
|
||||
if(strlen($descH) > 300) $overlib_string .= '...';
|
||||
} elseif (!empty($fields['DESCRIPTION'])) {
|
||||
if(!empty($overlib_string)) $overlib_string .= '<br>';
|
||||
$overlib_string .= '<b>'.$mod_strings['LBL_BODY'].'</b><br>';
|
||||
$descH = strip_tags(nl2br($fields['DESCRIPTION']));
|
||||
$desc = str_replace($newLines, ' ', $descH);
|
||||
$overlib_string .= substr($desc, 0, 300);
|
||||
if(strlen($descH) > 300) $overlib_string .= '...';
|
||||
}
|
||||
|
||||
$editLink = "index.php?action=EditView&module=Emails&record={$fields['ID']}";
|
||||
$viewLink = "index.php?action=DetailView&module=Emails&record={$fields['ID']}";
|
||||
|
||||
$return_module = empty($_REQUEST['module']) ? 'Meetings' : $_REQUEST['module'];
|
||||
$return_action = empty($_REQUEST['action']) ? 'ListView' : $_REQUEST['action'];
|
||||
$type = empty($_REQUEST['type']) ? '' : $_REQUEST['type'];
|
||||
$user_id = empty($_REQUEST['assigned_user_id']) ? '' : $_REQUEST['assigned_user_id'];
|
||||
|
||||
$additional_params = "&return_module=$return_module&return_action=$return_action&type=$type&assigned_user_id=$user_id";
|
||||
|
||||
$editLink .= $additional_params;
|
||||
$viewLink .= $additional_params;
|
||||
|
||||
return array('fieldToAddTo' => 'NAME',
|
||||
'string' => $overlib_string,
|
||||
'editLink' => $editLink,
|
||||
'viewLink' => $viewLink);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
53
modules/Emails/metadata/popupdefs.php
Executable file
53
modules/Emails/metadata/popupdefs.php
Executable file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
$popupMeta = array(
|
||||
'moduleMain' => 'Email',
|
||||
'varName' => 'EMAIL',
|
||||
'orderBy' => 'name',
|
||||
'whereClauses' => array(
|
||||
'name' => 'emails.name',
|
||||
'contact_name' => 'contacts.last_name'
|
||||
),
|
||||
'searchInputs' => array(
|
||||
'name',
|
||||
'contact_name',
|
||||
'request_data'
|
||||
),
|
||||
);
|
||||
?>
|
||||
|
||||
174
modules/Emails/metadata/subpaneldefs.php
Executable file
174
modules/Emails/metadata/subpaneldefs.php
Executable file
@@ -0,0 +1,174 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description:
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. All Rights
|
||||
* Reserved. Contributor(s): ______________________________________..
|
||||
*********************************************************************************/
|
||||
|
||||
|
||||
|
||||
$layout_defs['Emails'] = array(
|
||||
// list of what Subpanels to show in the DetailView
|
||||
'subpanel_setup' => array(
|
||||
'notes' => array(
|
||||
'order' => 5,
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'name',
|
||||
'subpanel_name' => 'default',
|
||||
'get_subpanel_data' => 'notes',
|
||||
'title_key' => 'LBL_NOTES_SUBPANEL_TITLE',
|
||||
'module' => 'Notes',
|
||||
'top_buttons' => array(),
|
||||
),
|
||||
'accounts' => array(
|
||||
'order' => 10,
|
||||
'module' => 'Accounts',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'name',
|
||||
'subpanel_name' => 'ForEmails',
|
||||
'get_subpanel_data' => 'accounts',
|
||||
'add_subpanel_data' => 'account_id',
|
||||
'title_key' => 'LBL_ACCOUNTS_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
|
||||
),
|
||||
),
|
||||
'contacts' => array(
|
||||
'order' => 20,
|
||||
'module' => 'Contacts',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'last_name, first_name',
|
||||
'subpanel_name' => 'ForEmails',
|
||||
'get_subpanel_data' => 'contacts',
|
||||
'add_subpanel_data' => 'contact_id',
|
||||
'title_key' => 'LBL_CONTACTS_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
|
||||
),
|
||||
),
|
||||
'opportunities' => array(
|
||||
'order' => 25,
|
||||
'module' => 'Opportunities',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'name',
|
||||
'subpanel_name' => 'ForEmails',
|
||||
'get_subpanel_data' => 'opportunities',
|
||||
'add_subpanel_data' => 'opportunity_id',
|
||||
'title_key' => 'LBL_OPPORTUNITY_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
|
||||
),
|
||||
),
|
||||
'leads' => array(
|
||||
'order' => 30,
|
||||
'module' => 'Leads',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'last_name, first_name',
|
||||
'subpanel_name' => 'ForEmails',
|
||||
'get_subpanel_data' => 'leads',
|
||||
'add_subpanel_data' => 'lead_id',
|
||||
'title_key' => 'LBL_LEADS_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
|
||||
),
|
||||
),
|
||||
'cases' => array(
|
||||
'order' => 40,
|
||||
'module' => 'Cases',
|
||||
'sort_order' => 'desc',
|
||||
'sort_by' => 'case_number',
|
||||
'subpanel_name' => 'ForEmails',
|
||||
'get_subpanel_data' => 'cases',
|
||||
'add_subpanel_data' => 'case_id',
|
||||
'title_key' => 'LBL_CASES_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
|
||||
),
|
||||
),
|
||||
'users' => array(
|
||||
'order' => 50,
|
||||
'module' => 'Users',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'name',
|
||||
'subpanel_name' => 'ForEmails',
|
||||
'get_subpanel_data' => 'users',
|
||||
'add_subpanel_data' => 'user_id',
|
||||
'title_key' => 'LBL_USERS_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
|
||||
),
|
||||
),
|
||||
'bugs' => array(
|
||||
'order' => 60,
|
||||
'module' => 'Bugs',
|
||||
'sort_order' => 'desc',
|
||||
'sort_by' => 'bug_number',
|
||||
'subpanel_name' => 'ForEmails',
|
||||
'get_subpanel_data' => 'bugs',
|
||||
'add_subpanel_data' => 'bug_id',
|
||||
'title_key' => 'LBL_BUGS_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
'project' => array(
|
||||
'order' => 80,
|
||||
'module' => 'Project',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'name',
|
||||
'subpanel_name' => 'ForEmails',
|
||||
'get_subpanel_data' => 'project',
|
||||
'add_subpanel_data' => 'project_id',
|
||||
'title_key' => 'LBL_PROJECT_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
|
||||
),
|
||||
),
|
||||
|
||||
),
|
||||
);
|
||||
45
modules/Emails/metadata/subpanels/ForContacts.php
Executable file
45
modules/Emails/metadata/subpanels/ForContacts.php
Executable file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
$layout_defs['ForContacts'] = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Contacts'),
|
||||
),
|
||||
);
|
||||
?>
|
||||
111
modules/Emails/metadata/subpanels/ForEcmDeliveryNotes.php
Executable file
111
modules/Emails/metadata/subpanels/ForEcmDeliveryNotes.php
Executable file
@@ -0,0 +1,111 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Subpanel Layout definition for Emails.
|
||||
*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'where' => "",
|
||||
|
||||
|
||||
'fill_in_additional_fields' => true,
|
||||
'list_fields' => array(
|
||||
'object_image'=>array(
|
||||
'widget_class' => 'SubPanelIcon',
|
||||
'width' => '2%',
|
||||
),
|
||||
'name' => array(
|
||||
'vname' => 'LBL_LIST_SUBJECT',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '30%',
|
||||
'parent_info' => true
|
||||
),
|
||||
'status' => array(
|
||||
'vname' => 'LBL_LIST_STATUS',
|
||||
'width' => '5%',
|
||||
|
||||
),
|
||||
'to_addr_list' => array(
|
||||
'vname' => 'LBL_TO_ADDRS',
|
||||
'width' => '20%',
|
||||
'sortable' => false,
|
||||
),
|
||||
'contact_name'=>array(
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'target_record_key' => 'contact_id',
|
||||
'target_module' => 'Contacts',
|
||||
'module' => 'Contacts',
|
||||
'vname' => 'LBL_LIST_CONTACT',
|
||||
'width' => '11%',
|
||||
'sortable' => false,
|
||||
'force_exists' => true,
|
||||
'usage'=>'query_only',
|
||||
),
|
||||
'contact_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
'contact_name_owner'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
'contact_name_mod'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
'date_modified' => array(
|
||||
'width' => '10%',
|
||||
),
|
||||
'assigned_user_name' => array (
|
||||
'name' => 'assigned_user_name',
|
||||
'vname' => 'LBL_LIST_ASSIGNED_TO_NAME',
|
||||
),
|
||||
'edit_button' => array(
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'width' => '2%',
|
||||
),
|
||||
'remove_button' => array(
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'width' => '2%',
|
||||
),
|
||||
'filename' => array(
|
||||
'usage' => 'query_only',
|
||||
'force_exists' => true
|
||||
),
|
||||
), // end list_fields
|
||||
);
|
||||
?>
|
||||
111
modules/Emails/metadata/subpanels/ForEcmInvoiceOuts.php
Executable file
111
modules/Emails/metadata/subpanels/ForEcmInvoiceOuts.php
Executable file
@@ -0,0 +1,111 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Subpanel Layout definition for Emails.
|
||||
*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'where' => "",
|
||||
|
||||
|
||||
'fill_in_additional_fields' => true,
|
||||
'list_fields' => array(
|
||||
'object_image'=>array(
|
||||
'widget_class' => 'SubPanelIcon',
|
||||
'width' => '2%',
|
||||
),
|
||||
'name' => array(
|
||||
'vname' => 'LBL_LIST_SUBJECT',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '30%',
|
||||
'parent_info' => true
|
||||
),
|
||||
'status' => array(
|
||||
'vname' => 'LBL_LIST_STATUS',
|
||||
'width' => '5%',
|
||||
|
||||
),
|
||||
'to_addr_list' => array(
|
||||
'vname' => 'LBL_TO_ADDRS',
|
||||
'width' => '20%',
|
||||
'sortable' => false,
|
||||
),
|
||||
'contact_name'=>array(
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'target_record_key' => 'contact_id',
|
||||
'target_module' => 'Contacts',
|
||||
'module' => 'Contacts',
|
||||
'vname' => 'LBL_LIST_CONTACT',
|
||||
'width' => '11%',
|
||||
'sortable' => false,
|
||||
'force_exists' => true,
|
||||
'usage'=>'query_only',
|
||||
),
|
||||
'contact_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
'contact_name_owner'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
'contact_name_mod'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
'date_modified' => array(
|
||||
'width' => '10%',
|
||||
),
|
||||
'assigned_user_name' => array (
|
||||
'name' => 'assigned_user_name',
|
||||
'vname' => 'LBL_LIST_ASSIGNED_TO_NAME',
|
||||
),
|
||||
'edit_button' => array(
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'width' => '2%',
|
||||
),
|
||||
'remove_button' => array(
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'width' => '2%',
|
||||
),
|
||||
'filename' => array(
|
||||
'usage' => 'query_only',
|
||||
'force_exists' => true
|
||||
),
|
||||
), // end list_fields
|
||||
);
|
||||
?>
|
||||
111
modules/Emails/metadata/subpanels/ForEcmQuotes.php
Executable file
111
modules/Emails/metadata/subpanels/ForEcmQuotes.php
Executable file
@@ -0,0 +1,111 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Subpanel Layout definition for Emails.
|
||||
*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'where' => "",
|
||||
|
||||
|
||||
'fill_in_additional_fields' => true,
|
||||
'list_fields' => array(
|
||||
'object_image'=>array(
|
||||
'widget_class' => 'SubPanelIcon',
|
||||
'width' => '2%',
|
||||
),
|
||||
'name' => array(
|
||||
'vname' => 'LBL_LIST_SUBJECT',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '30%',
|
||||
'parent_info' => true
|
||||
),
|
||||
'status' => array(
|
||||
'vname' => 'LBL_LIST_STATUS',
|
||||
'width' => '5%',
|
||||
|
||||
),
|
||||
'to_addr_list' => array(
|
||||
'vname' => 'LBL_TO_ADDRS',
|
||||
'width' => '20%',
|
||||
'sortable' => false,
|
||||
),
|
||||
'contact_name'=>array(
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'target_record_key' => 'contact_id',
|
||||
'target_module' => 'Contacts',
|
||||
'module' => 'Contacts',
|
||||
'vname' => 'LBL_LIST_CONTACT',
|
||||
'width' => '11%',
|
||||
'sortable' => false,
|
||||
'force_exists' => true,
|
||||
'usage'=>'query_only',
|
||||
),
|
||||
'contact_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
'contact_name_owner'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
'contact_name_mod'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
'date_modified' => array(
|
||||
'width' => '10%',
|
||||
),
|
||||
'assigned_user_name' => array (
|
||||
'name' => 'assigned_user_name',
|
||||
'vname' => 'LBL_LIST_ASSIGNED_TO_NAME',
|
||||
),
|
||||
'edit_button' => array(
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'width' => '2%',
|
||||
),
|
||||
'remove_button' => array(
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'width' => '2%',
|
||||
),
|
||||
'filename' => array(
|
||||
'usage' => 'query_only',
|
||||
'force_exists' => true
|
||||
),
|
||||
), // end list_fields
|
||||
);
|
||||
?>
|
||||
111
modules/Emails/metadata/subpanels/ForEcmSales.php
Executable file
111
modules/Emails/metadata/subpanels/ForEcmSales.php
Executable file
@@ -0,0 +1,111 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Subpanel Layout definition for Emails.
|
||||
*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'where' => "",
|
||||
|
||||
|
||||
'fill_in_additional_fields' => true,
|
||||
'list_fields' => array(
|
||||
'object_image'=>array(
|
||||
'widget_class' => 'SubPanelIcon',
|
||||
'width' => '2%',
|
||||
),
|
||||
'name' => array(
|
||||
'vname' => 'LBL_LIST_SUBJECT',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '30%',
|
||||
'parent_info' => true
|
||||
),
|
||||
'status' => array(
|
||||
'vname' => 'LBL_LIST_STATUS',
|
||||
'width' => '5%',
|
||||
|
||||
),
|
||||
'to_addr_list' => array(
|
||||
'vname' => 'LBL_TO_ADDRS',
|
||||
'width' => '20%',
|
||||
'sortable' => false,
|
||||
),
|
||||
'contact_name'=>array(
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'target_record_key' => 'contact_id',
|
||||
'target_module' => 'Contacts',
|
||||
'module' => 'Contacts',
|
||||
'vname' => 'LBL_LIST_CONTACT',
|
||||
'width' => '11%',
|
||||
'sortable' => false,
|
||||
'force_exists' => true,
|
||||
'usage'=>'query_only',
|
||||
),
|
||||
'contact_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
'contact_name_owner'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
'contact_name_mod'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
'date_modified' => array(
|
||||
'width' => '10%',
|
||||
),
|
||||
'assigned_user_name' => array (
|
||||
'name' => 'assigned_user_name',
|
||||
'vname' => 'LBL_LIST_ASSIGNED_TO_NAME',
|
||||
),
|
||||
'edit_button' => array(
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'width' => '2%',
|
||||
),
|
||||
'remove_button' => array(
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'width' => '2%',
|
||||
),
|
||||
'filename' => array(
|
||||
'usage' => 'query_only',
|
||||
'force_exists' => true
|
||||
),
|
||||
), // end list_fields
|
||||
);
|
||||
?>
|
||||
111
modules/Emails/metadata/subpanels/ForEcmWorkReports.php
Executable file
111
modules/Emails/metadata/subpanels/ForEcmWorkReports.php
Executable file
@@ -0,0 +1,111 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Subpanel Layout definition for Emails.
|
||||
*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'where' => "",
|
||||
|
||||
|
||||
'fill_in_additional_fields' => true,
|
||||
'list_fields' => array(
|
||||
'object_image'=>array(
|
||||
'widget_class' => 'SubPanelIcon',
|
||||
'width' => '2%',
|
||||
),
|
||||
'name' => array(
|
||||
'vname' => 'LBL_LIST_SUBJECT',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '30%',
|
||||
'parent_info' => true
|
||||
),
|
||||
'status' => array(
|
||||
'vname' => 'LBL_LIST_STATUS',
|
||||
'width' => '5%',
|
||||
|
||||
),
|
||||
'to_addr_list' => array(
|
||||
'vname' => 'LBL_TO_ADDRS',
|
||||
'width' => '20%',
|
||||
'sortable' => false,
|
||||
),
|
||||
'contact_name'=>array(
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'target_record_key' => 'contact_id',
|
||||
'target_module' => 'Contacts',
|
||||
'module' => 'Contacts',
|
||||
'vname' => 'LBL_LIST_CONTACT',
|
||||
'width' => '11%',
|
||||
'sortable' => false,
|
||||
'force_exists' => true,
|
||||
'usage'=>'query_only',
|
||||
),
|
||||
'contact_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
'contact_name_owner'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
'contact_name_mod'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
'date_modified' => array(
|
||||
'width' => '10%',
|
||||
),
|
||||
'assigned_user_name' => array (
|
||||
'name' => 'assigned_user_name',
|
||||
'vname' => 'LBL_LIST_ASSIGNED_TO_NAME',
|
||||
),
|
||||
'edit_button' => array(
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'width' => '2%',
|
||||
),
|
||||
'remove_button' => array(
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'width' => '2%',
|
||||
),
|
||||
'filename' => array(
|
||||
'usage' => 'query_only',
|
||||
'force_exists' => true
|
||||
),
|
||||
), // end list_fields
|
||||
);
|
||||
?>
|
||||
114
modules/Emails/metadata/subpanels/ForHistory.php
Executable file
114
modules/Emails/metadata/subpanels/ForHistory.php
Executable file
@@ -0,0 +1,114 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'where' => "",
|
||||
|
||||
|
||||
'fill_in_additional_fields' => true,
|
||||
'list_fields' => array(
|
||||
'AD' => array (
|
||||
'widget_class' => 'SubPanelAdditionalDetailsLink',
|
||||
'vname' => ' ',
|
||||
'sortable' => false,
|
||||
'width' => 0,
|
||||
),
|
||||
'object_image'=>array(
|
||||
'widget_class' => 'SubPanelIcon',
|
||||
'width' => '2%',
|
||||
),
|
||||
'name' => array(
|
||||
'vname' => 'LBL_LIST_SUBJECT',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '30%',
|
||||
'parent_info' => true
|
||||
),
|
||||
'status' => array(
|
||||
'vname' => 'Typ',
|
||||
'width' => '15%',
|
||||
),
|
||||
'reply_to_status' => array(
|
||||
'usage' => 'query_only',
|
||||
'force_exists' => true,
|
||||
'force_default' => 0,
|
||||
),
|
||||
'contact_name'=>array(
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'target_record_key' => 'contact_id',
|
||||
'target_module' => 'Contacts',
|
||||
'module' => 'Contacts',
|
||||
'vname' => 'LBL_LIST_CONTACT',
|
||||
'width' => '11%',
|
||||
'sortable' => false,
|
||||
'force_exists' => true,
|
||||
),
|
||||
'contact_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
'contact_name_owner'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
'contact_name_mod'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
'parent_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
'parent_type'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
'date_modified' => array(
|
||||
'width' => '10%',
|
||||
),
|
||||
'assigned_user_name' => array (
|
||||
'name' => 'assigned_user_name',
|
||||
'vname' => 'LBL_LIST_ASSIGNED_TO_NAME',
|
||||
),
|
||||
|
||||
'filename' => array(
|
||||
'usage' => 'query_only',
|
||||
'force_exists' => true
|
||||
),
|
||||
), // end list_fields
|
||||
);
|
||||
?>
|
||||
115
modules/Emails/metadata/subpanels/ForQueues.php
Executable file
115
modules/Emails/metadata/subpanels/ForQueues.php
Executable file
@@ -0,0 +1,115 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
//$layout_defs['ForQueues'] = array(
|
||||
// 'top_buttons' => array(
|
||||
// array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Queues'),
|
||||
// ),
|
||||
//);
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Queues'),
|
||||
),
|
||||
'where' => "",
|
||||
|
||||
'fill_in_additional_fields'=>true,
|
||||
'list_fields' => array(
|
||||
/* 'mass_update' => array (
|
||||
|
||||
),
|
||||
*/ 'object_image'=>array(
|
||||
'widget_class' => 'SubPanelIcon',
|
||||
'width' => '2%',
|
||||
),
|
||||
'name'=>array(
|
||||
'vname' => 'LBL_LIST_SUBJECT',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '68%',
|
||||
),
|
||||
'case_name'=>array(
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'target_record_key' => 'case_id',
|
||||
'target_module' => 'Cases',
|
||||
'module' => 'Cases',
|
||||
'vname' => 'LBL_LIST_CASE',
|
||||
'width' => '20%',
|
||||
'force_exists'=>true,
|
||||
'sortable'=>false,
|
||||
),
|
||||
'contact_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true,
|
||||
) ,
|
||||
/* 'parent_name'=>array(
|
||||
'vname' => 'LBL_LIST_RELATED_TO',
|
||||
'width' => '22%',
|
||||
'target_record_key' => 'parent_id',
|
||||
'target_module_key'=>'parent_type',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'sortable'=>false,
|
||||
),*/
|
||||
'date_modified'=>array(
|
||||
'vname' => 'LBL_DATE_MODIFIED',
|
||||
'width' => '10%',
|
||||
),
|
||||
/* 'edit_button'=>array(
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'width' => '2%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'width' => '2%',
|
||||
),
|
||||
'parent_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
),
|
||||
'parent_type'=>array(
|
||||
'usage'=>'query_only',
|
||||
),
|
||||
'filename'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
*/
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
111
modules/Emails/metadata/subpanels/ForUnlinkedEmailHistory.php
Executable file
111
modules/Emails/metadata/subpanels/ForUnlinkedEmailHistory.php
Executable file
@@ -0,0 +1,111 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'where' => "",
|
||||
|
||||
|
||||
'fill_in_additional_fields' => true,
|
||||
'list_fields' => array(
|
||||
'object_image'=>array(
|
||||
'widget_class' => 'SubPanelIcon',
|
||||
'width' => '2%',
|
||||
),
|
||||
'name' => array(
|
||||
'vname' => 'LBL_LIST_SUBJECT',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '30%',
|
||||
'parent_info' => true
|
||||
),
|
||||
'status' => array(
|
||||
'vname' => 'LBL_LIST_STATUS',
|
||||
'width' => '15%',
|
||||
),
|
||||
'reply_to_status' => array(
|
||||
'usage' => 'query_only',
|
||||
'force_exists' => true,
|
||||
),
|
||||
'contact_name'=>array(
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'target_record_key' => 'contact_id',
|
||||
'target_module' => 'Contacts',
|
||||
'module' => 'Contacts',
|
||||
'vname' => 'LBL_LIST_CONTACT',
|
||||
'width' => '11%',
|
||||
'sortable' => false,
|
||||
'force_exists' => true,
|
||||
),
|
||||
'contact_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
'contact_name_owner'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
'contact_name_mod'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
'parent_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
'parent_type'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
'date_modified' => array(
|
||||
'width' => '10%',
|
||||
),
|
||||
'assigned_user_name' => array (
|
||||
'name' => 'assigned_user_name',
|
||||
'vname' => 'LBL_LIST_ASSIGNED_TO_NAME',
|
||||
),
|
||||
'edit_button' => array(
|
||||
'vname' => 'LBL_EDIT_BUTTON',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'width' => '2%',
|
||||
),
|
||||
'filename' => array(
|
||||
'usage' => 'query_only',
|
||||
'force_exists' => true
|
||||
),
|
||||
), // end list_fields
|
||||
);
|
||||
?>
|
||||
45
modules/Emails/metadata/subpanels/ForUsers.php
Executable file
45
modules/Emails/metadata/subpanels/ForUsers.php
Executable file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
$layout_defs['ForUsers'] = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Users'),
|
||||
),
|
||||
);
|
||||
?>
|
||||
45
modules/Emails/subpanels/ForContacts.php
Executable file
45
modules/Emails/subpanels/ForContacts.php
Executable file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
$layout_defs['ForContacts'] = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Contacts'),
|
||||
),
|
||||
);
|
||||
?>
|
||||
114
modules/Emails/subpanels/ForHistory.php
Executable file
114
modules/Emails/subpanels/ForHistory.php
Executable file
@@ -0,0 +1,114 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'where' => "",
|
||||
|
||||
|
||||
'fill_in_additional_fields' => true,
|
||||
'list_fields' => array(
|
||||
'AD' => array (
|
||||
'widget_class' => 'SubPanelAdditionalDetailsLink',
|
||||
'vname' => ' ',
|
||||
'sortable' => false,
|
||||
'width' => 0,
|
||||
),
|
||||
'object_image'=>array(
|
||||
'widget_class' => 'SubPanelIcon',
|
||||
'width' => '2%',
|
||||
),
|
||||
'name' => array(
|
||||
'vname' => 'LBL_LIST_SUBJECT',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '30%',
|
||||
'parent_info' => true
|
||||
),
|
||||
'status' => array(
|
||||
'vname' => 'LBL_LIST_STATUS',
|
||||
'width' => '15%',
|
||||
),
|
||||
'reply_to_status' => array(
|
||||
'usage' => 'query_only',
|
||||
'force_exists' => true,
|
||||
'force_default' => 0,
|
||||
),
|
||||
'contact_name'=>array(
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'target_record_key' => 'contact_id',
|
||||
'target_module' => 'Contacts',
|
||||
'module' => 'Contacts',
|
||||
'vname' => 'LBL_LIST_CONTACT',
|
||||
'width' => '11%',
|
||||
'sortable' => false,
|
||||
'force_exists' => true,
|
||||
),
|
||||
'contact_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
'contact_name_owner'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
'contact_name_mod'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
'parent_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
'parent_type'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
'date_modified' => array(
|
||||
'width' => '10%',
|
||||
),
|
||||
'assigned_user_name' => array (
|
||||
'name' => 'assigned_user_name',
|
||||
'vname' => 'LBL_LIST_ASSIGNED_TO_NAME',
|
||||
),
|
||||
|
||||
'filename' => array(
|
||||
'usage' => 'query_only',
|
||||
'force_exists' => true
|
||||
),
|
||||
), // end list_fields
|
||||
);
|
||||
?>
|
||||
115
modules/Emails/subpanels/ForQueues.php
Executable file
115
modules/Emails/subpanels/ForQueues.php
Executable file
@@ -0,0 +1,115 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
//$layout_defs['ForQueues'] = array(
|
||||
// 'top_buttons' => array(
|
||||
// array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Queues'),
|
||||
// ),
|
||||
//);
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Queues'),
|
||||
),
|
||||
'where' => "",
|
||||
|
||||
'fill_in_additional_fields'=>true,
|
||||
'list_fields' => array(
|
||||
/* 'mass_update' => array (
|
||||
|
||||
),
|
||||
*/ 'object_image'=>array(
|
||||
'widget_class' => 'SubPanelIcon',
|
||||
'width' => '2%',
|
||||
),
|
||||
'name'=>array(
|
||||
'vname' => 'LBL_LIST_SUBJECT',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '68%',
|
||||
),
|
||||
'case_name'=>array(
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'target_record_key' => 'case_id',
|
||||
'target_module' => 'Cases',
|
||||
'module' => 'Cases',
|
||||
'vname' => 'LBL_LIST_CASE',
|
||||
'width' => '20%',
|
||||
'force_exists'=>true,
|
||||
'sortable'=>false,
|
||||
),
|
||||
'contact_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true,
|
||||
) ,
|
||||
/* 'parent_name'=>array(
|
||||
'vname' => 'LBL_LIST_RELATED_TO',
|
||||
'width' => '22%',
|
||||
'target_record_key' => 'parent_id',
|
||||
'target_module_key'=>'parent_type',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'sortable'=>false,
|
||||
),*/
|
||||
'date_modified'=>array(
|
||||
'vname' => 'LBL_DATE_MODIFIED',
|
||||
'width' => '10%',
|
||||
),
|
||||
/* 'edit_button'=>array(
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'width' => '2%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'width' => '2%',
|
||||
),
|
||||
'parent_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
),
|
||||
'parent_type'=>array(
|
||||
'usage'=>'query_only',
|
||||
),
|
||||
'filename'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
*/
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
45
modules/Emails/subpanels/ForUsers.php
Executable file
45
modules/Emails/subpanels/ForUsers.php
Executable file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
$layout_defs['ForUsers'] = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Users'),
|
||||
),
|
||||
);
|
||||
?>
|
||||
500
modules/Emails/vardefs.php
Executable file
500
modules/Emails/vardefs.php
Executable file
@@ -0,0 +1,500 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
$dictionary['Email'] = array(
|
||||
'table' => 'emails',
|
||||
'acl_fields'=>false,
|
||||
'comment' => 'Contains a record of emails sent to and from the Sugar application',
|
||||
'fields' => array (
|
||||
'id' => array (
|
||||
'name' => 'id',
|
||||
'vname' => 'LBL_ID',
|
||||
'type' => 'id',
|
||||
'required' => true,
|
||||
'reportable'=>true,
|
||||
'comment' => 'Unique identifier',
|
||||
),
|
||||
'date_entered' => array (
|
||||
'name' => 'date_entered',
|
||||
'vname' => 'LBL_DATE_ENTERED',
|
||||
'type' => 'datetime',
|
||||
'required'=>true,
|
||||
'comment' => 'Date record created',
|
||||
),
|
||||
'date_modified' => array (
|
||||
'name' => 'date_modified',
|
||||
'vname' => 'LBL_DATE_MODIFIED',
|
||||
'type' => 'datetime',
|
||||
'required'=>true,
|
||||
'comment' => 'Date record last modified',
|
||||
),
|
||||
'assigned_user_id' => array (
|
||||
'name' => 'assigned_user_id',
|
||||
'rname' => 'user_name',
|
||||
'id_name' => 'assigned_user_id',
|
||||
'vname' => 'LBL_ASSIGNED_TO',
|
||||
'type' => 'assigned_user_name',
|
||||
'table' => 'users',
|
||||
'isnull' => 'false',
|
||||
'reportable'=>true,
|
||||
'dbType' => 'id',
|
||||
'comment' => 'User ID that last modified record',
|
||||
),
|
||||
'assigned_user_name' => array (
|
||||
'name' => 'assigned_user_name',
|
||||
'vname' => 'LBL_ASSIGNED_TO',
|
||||
'type' => 'varchar',
|
||||
'reportable'=>false,
|
||||
'source'=> 'non-db',
|
||||
'table' => 'users',
|
||||
),
|
||||
'modified_user_id' => array (
|
||||
'name' => 'modified_user_id',
|
||||
'rname' => 'user_name',
|
||||
'id_name' => 'modified_user_id',
|
||||
'vname' => 'LBL_MODIFIED_BY',
|
||||
'type' => 'assigned_user_name',
|
||||
'table' => 'users',
|
||||
'isnull' => 'false',
|
||||
'reportable'=>true,
|
||||
'dbType' => 'id',
|
||||
'comment' => 'User ID that last modified record',
|
||||
),
|
||||
'created_by' => array (
|
||||
'name' => 'created_by',
|
||||
'vname' => 'LBL_CREATED_BY',
|
||||
'type' => 'id',
|
||||
'len'=> '36',
|
||||
'reportable' => false,
|
||||
'comment' => 'User name who created record',
|
||||
),
|
||||
'deleted' => array (
|
||||
'name' => 'deleted',
|
||||
'vname' => 'LBL_DELETED',
|
||||
'type' => 'bool',
|
||||
'required' => false,
|
||||
'reportable'=>false,
|
||||
'comment' => 'Record deletion indicator',
|
||||
),
|
||||
/**
|
||||
* DEPRECATED FOR 5.0
|
||||
'from_addr' => array (
|
||||
'name' => 'from_addr',
|
||||
'vname' => 'LBL_FROM',
|
||||
'type' => 'id',
|
||||
'comment' => 'Email address of the person sending the email',
|
||||
),
|
||||
'reply_to_addr' => array (
|
||||
'name' => 'reply_to_addr',
|
||||
'vname' => 'LBL_REPLY_TO_ADDRESS',
|
||||
'type' => 'id',
|
||||
'comment' => 'Email address of person indicated in the Reply-to email field',
|
||||
),
|
||||
'to_addrs' => array (
|
||||
'name' => 'to_addrs',
|
||||
'vname' => 'LBL_TO',
|
||||
'type' => 'id',
|
||||
'comment' => 'Email address(es) of person(s) to receive the email',
|
||||
),
|
||||
'cc_addrs' => array (
|
||||
'name' => 'cc_addrs',
|
||||
'vname' => 'LBL_CC',
|
||||
'type' => 'id',
|
||||
'comment' => 'Email address(es) of person(s) to receive a carbon copy of the email',
|
||||
),
|
||||
'bcc_addrs' => array (
|
||||
'name' => 'bcc_addrs',
|
||||
'vname' => 'LBL_BCC',
|
||||
'type' => 'id',
|
||||
'comment' => 'Email address(es) of person(s) to receive a blind carbon copy of the email',
|
||||
),
|
||||
*/
|
||||
|
||||
|
||||
'from_addr_name' => array (
|
||||
'name' => 'from_addr_name',
|
||||
'type' => 'varchar',
|
||||
'vname' => 'from_addr_name',
|
||||
'source'=> 'non-db',
|
||||
),
|
||||
'reply_to_addr' => array (
|
||||
'name' => 'reply_to_addr',
|
||||
'type' => 'varchar',
|
||||
'vname' => 'reply_to_addr',
|
||||
'source'=> 'non-db',
|
||||
),
|
||||
'to_addrs_names' => array (
|
||||
'name' => 'to_addrs_names',
|
||||
'type' => 'varchar',
|
||||
'vname' => 'to_addrs_names',
|
||||
'source'=> 'non-db',
|
||||
),
|
||||
'cc_addrs_names' => array (
|
||||
'name' => 'cc_addrs_names',
|
||||
'type' => 'varchar',
|
||||
'vname' => 'cc_addrs_names',
|
||||
'source'=> 'non-db',
|
||||
),
|
||||
'bcc_addrs_names' => array (
|
||||
'name' => 'bcc_addrs_names',
|
||||
'type' => 'varchar',
|
||||
'vname' => 'bcc_addrs_names',
|
||||
'source'=> 'non-db',
|
||||
),
|
||||
'raw_source' => array (
|
||||
'name' => 'raw_source',
|
||||
'type' => 'varchar',
|
||||
'vname' => 'raw_source',
|
||||
'source'=> 'non-db',
|
||||
),
|
||||
'description_html' => array (
|
||||
'name' => 'description_html',
|
||||
'type' => 'varchar',
|
||||
'vname' => 'description_html',
|
||||
'source'=> 'non-db',
|
||||
),
|
||||
'description' => array (
|
||||
'name' => 'description',
|
||||
'type' => 'varchar',
|
||||
'vname' => 'description',
|
||||
'source'=> 'non-db',
|
||||
),
|
||||
'date_sent' => array (
|
||||
'name' => 'date_sent',
|
||||
'vname' => 'LBL_DATE_SENT',
|
||||
'type' => 'datetime',
|
||||
'type' => 'datetime',
|
||||
),
|
||||
'message_id' => array (
|
||||
'name' => 'message_id',
|
||||
'vname' => 'LBL_MESSAGE_ID',
|
||||
'type' => 'varchar',
|
||||
'len' => 255,
|
||||
'comment' => 'ID of the email item obtained from the email transport system',
|
||||
),
|
||||
|
||||
'name' => array (
|
||||
'name' => 'name',
|
||||
'vname' => 'LBL_SUBJECT',
|
||||
'type' => 'varchar',
|
||||
'required' => false,
|
||||
'len' => '255',
|
||||
'comment' => 'The subject of the email',
|
||||
),
|
||||
'type' => array (
|
||||
'name' => 'type',
|
||||
'vname' => 'LBL_LIST_TYPE',
|
||||
'type' => 'enum',
|
||||
'options' => 'dom_email_types',
|
||||
'len' => '25',
|
||||
'massupdate'=>false,
|
||||
'comment' => 'Type of email (ex: draft)',
|
||||
),
|
||||
'status' => array (
|
||||
'name' => 'status',
|
||||
'vname' => 'LBL_STATUS',
|
||||
'type' => 'enum',
|
||||
'len' => '25',
|
||||
'options' => 'dom_email_status',
|
||||
),
|
||||
'flagged' => array (
|
||||
'name' => 'flagged',
|
||||
'vname' => 'LBL_EMAIL_FLAGGED',
|
||||
'type' => 'bool',
|
||||
'required' => false,
|
||||
'reportable'=>false,
|
||||
'comment' => 'flagged status',
|
||||
),
|
||||
'reply_to_status' => array (
|
||||
'name' => 'reply_to_status',
|
||||
'vname' => 'LBL_EMAIL_REPLY_TO_STATUS',
|
||||
'type' => 'bool',
|
||||
'required' => false,
|
||||
'reportable'=>false,
|
||||
'comment' => 'I you reply to an email then reply to status of original email is set',
|
||||
),
|
||||
'intent' => array (
|
||||
'name' => 'intent',
|
||||
'vname' => 'LBL_INTENT',
|
||||
'type' => 'varchar',
|
||||
'len' => 25,
|
||||
'default' => 'pick',
|
||||
'comment' => 'Target of action used in Inbound Email assignment',
|
||||
),
|
||||
'mailbox_id' => array (
|
||||
'name' => 'mailbox_id',
|
||||
'vname' => 'LBL_MAILBOX_ID',
|
||||
'type' => 'id',
|
||||
'len'=> '36',
|
||||
'reportable' => false,
|
||||
),
|
||||
'created_by_link' => array (
|
||||
'name' => 'created_by_link',
|
||||
'type' => 'link',
|
||||
'relationship' => 'emails_created_by',
|
||||
'vname' => 'LBL_CREATED_BY_USER',
|
||||
'link_type' => 'one',
|
||||
'module'=> 'Users',
|
||||
'bean_name'=> 'User',
|
||||
'source'=> 'non-db',
|
||||
),
|
||||
'modified_user_link' => array (
|
||||
'name' => 'modified_user_link',
|
||||
'type' => 'link',
|
||||
'relationship' => 'emails_modified_user',
|
||||
'vname' => 'LBL_MODIFIED_BY_USER',
|
||||
'link_type' => 'one',
|
||||
'module'=> 'Users',
|
||||
'bean_name'=> 'User',
|
||||
'source'=> 'non-db',
|
||||
),
|
||||
'assigned_user_link' => array (
|
||||
'name' => 'assigned_user_link',
|
||||
'type' => 'link',
|
||||
'relationship' => 'emails_assigned_user',
|
||||
'vname' => 'LBL_ASSIGNED_TO_USER',
|
||||
'link_type' => 'one',
|
||||
'module'=> 'Users',
|
||||
'bean_name'=> 'User',
|
||||
'source'=> 'non-db',
|
||||
),
|
||||
|
||||
'parent_name' => array (
|
||||
'name' => 'parent_name',
|
||||
'type' => 'varchar',
|
||||
'reportable'=>false,
|
||||
'source'=> 'non-db',
|
||||
),
|
||||
'parent_type' => array (
|
||||
'name' => 'parent_type',
|
||||
'type' => 'varchar',
|
||||
'reportable'=>false,
|
||||
'len' => '25',
|
||||
'comment' => 'Identifier of Sugar module to which this email is associated (deprecated as of 4.2)',
|
||||
),
|
||||
'parent_id' => array (
|
||||
'name' => 'parent_id',
|
||||
'type' => 'id',
|
||||
'len' => '36',
|
||||
'reportable'=>false,
|
||||
'comment' => 'ID of Sugar object referenced by parent_type (deprecated as of 4.2)',
|
||||
),
|
||||
|
||||
/* relationship collection attributes */
|
||||
/* added to support InboundEmail */
|
||||
'accounts' => array (
|
||||
'name' => 'accounts',
|
||||
'vname' => 'LBL_EMAILS_ACCOUNTS_REL',
|
||||
'type' => 'link',
|
||||
'relationship' => 'emails_accounts_rel',
|
||||
'module' => 'Accounts',
|
||||
'bean_name' => 'Account',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
'bugs' => array (
|
||||
'name' => 'bugs',
|
||||
'vname' => 'LBL_EMAILS_BUGS_REL',
|
||||
'type' => 'link',
|
||||
'relationship' => 'emails_bugs_rel',
|
||||
'module' => 'Bugs',
|
||||
'bean_name' => 'Bug',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
'cases' => array (
|
||||
'name' => 'cases',
|
||||
'vname' => 'LBL_EMAILS_CASES_REL',
|
||||
'type' => 'link',
|
||||
'relationship' => 'emails_cases_rel',
|
||||
'module' => 'Cases',
|
||||
'bean_name' => 'Case',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
'contacts' => array (
|
||||
'name' => 'contacts',
|
||||
'vname' => 'LBL_EMAILS_CONTACTS_REL',
|
||||
'type' => 'link',
|
||||
'relationship' => 'emails_contacts_rel',
|
||||
'module' => 'Contacts',
|
||||
'bean_name' => 'Contact',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
'leads' => array (
|
||||
'name' => 'leads',
|
||||
'vname' => 'LBL_EMAILS_LEADS_REL',
|
||||
'type' => 'link',
|
||||
'relationship' => 'emails_leads_rel',
|
||||
'module' => 'Leads',
|
||||
'bean_name' => 'Lead',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
'opportunities' => array (
|
||||
'name' => 'opportunities',
|
||||
'vname' => 'LBL_EMAILS_OPPORTUNITIES_REL',
|
||||
'type' => 'link',
|
||||
'relationship' => 'emails_opportunities_rel',
|
||||
'module' => 'Opportunities',
|
||||
'bean_name' => 'Opportunity',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
'project'=> array(
|
||||
'name' => 'project',
|
||||
'vname' => 'LBL_EMAILS_PROJECT_REL',
|
||||
'type' => 'link',
|
||||
'relationship' => 'emails_projects_rel',
|
||||
'module' => 'Project',
|
||||
'bean_name' => 'Project',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
'projecttask'=> array(
|
||||
'name' => 'projecttask',
|
||||
'vname' => 'LBL_EMAILS_PROJECT_TASK_REL',
|
||||
'type' => 'link',
|
||||
'relationship' => 'emails_project_task_rel',
|
||||
'module' => 'ProjectTask',
|
||||
'bean_name' => 'ProjectTask',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
'prospects'=> array(
|
||||
'name' => 'prospects',
|
||||
'vname' => 'LBL_EMAILS_PROSPECT_REL',
|
||||
'type' => 'link',
|
||||
'relationship' => 'emails_prospects_rel',
|
||||
'module' => 'Prospects',
|
||||
'bean_name' => 'Prospect',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
|
||||
|
||||
'tasks'=> array(
|
||||
'name' => 'tasks',
|
||||
'vname' => 'LBL_EMAILS_TASKS_REL',
|
||||
'type' => 'link',
|
||||
'relationship' => 'emails_tasks_rel',
|
||||
'module' => 'Tasks',
|
||||
'bean_name' => 'Task',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
'users'=> array(
|
||||
'name' => 'users',
|
||||
'vname' => 'LBL_EMAILS_USERS_REL',
|
||||
'type' => 'link',
|
||||
'relationship' => 'emails_users_rel',
|
||||
'module' => 'Users',
|
||||
'bean_name' => 'User',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
'notes' => array(
|
||||
'name' => 'notes',
|
||||
'vname' => 'LBL_EMAILS_NOTES_REL',
|
||||
'type' => 'link',
|
||||
'relationship' => 'emails_notes_rel',
|
||||
'module' => 'Notes',
|
||||
'bean_name' => 'Note',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
/* end relationship collections */
|
||||
|
||||
), /* end fields() array */
|
||||
'relationships' => array(
|
||||
'emails_assigned_user' => array(
|
||||
'lhs_module' => 'Users',
|
||||
'lhs_table' => 'users',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'Emails',
|
||||
'rhs_table' => 'emails',
|
||||
'rhs_key' => 'assigned_user_id',
|
||||
'relationship_type' => 'one-to-many'
|
||||
),
|
||||
'emails_modified_user' => array(
|
||||
'lhs_module' => 'Users',
|
||||
'lhs_table' => 'users',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'Emails',
|
||||
'rhs_table' => 'emails',
|
||||
'rhs_key' => 'modified_user_id',
|
||||
'relationship_type' => 'one-to-many'
|
||||
),
|
||||
'emails_created_by' => array(
|
||||
'lhs_module' => 'Users',
|
||||
'lhs_table' => 'users',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'Emails',
|
||||
'rhs_table' => 'emails',
|
||||
'rhs_key' => 'created_by',
|
||||
'relationship_type' => 'one-to-many'
|
||||
),
|
||||
'emails_notes_rel' => array(
|
||||
'lhs_module' => 'Emails',
|
||||
'lhs_table' => 'emails',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'Notes',
|
||||
'rhs_table' => 'notes',
|
||||
'rhs_key' => 'parent_id',
|
||||
'relationship_type' => 'one-to-many',
|
||||
),
|
||||
), // end relationships
|
||||
'indices' => array (
|
||||
array(
|
||||
'name' => 'emailspk',
|
||||
'type' => 'primary',
|
||||
'fields' => array('id'),
|
||||
),
|
||||
array(
|
||||
'name' => 'idx_email_name',
|
||||
'type' => 'index',
|
||||
'fields' => array('name')
|
||||
),
|
||||
array(
|
||||
'name' => 'idx_message_id',
|
||||
'type' => 'index',
|
||||
'fields' => array('message_id')
|
||||
),
|
||||
array(
|
||||
'name' => 'idx_email_parent_id',
|
||||
'type' => 'index',
|
||||
'fields' => array('parent_id')
|
||||
),
|
||||
array(
|
||||
'name' => 'idx_email_assigned',
|
||||
'type' => 'index',
|
||||
'fields' => array('assigned_user_id', 'type','status')
|
||||
),
|
||||
) // end indices
|
||||
);
|
||||
|
||||
VardefManager::createVardef('Emails','Email', array(
|
||||
));
|
||||
59
modules/Emails/views/view.classic.config.php
Executable file
59
modules/Emails/views/view.classic.config.php
Executable file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description:
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. All Rights
|
||||
* Reserved. Contributor(s): ______________________________________..
|
||||
*********************************************************************************/
|
||||
$view_config = array(
|
||||
'actions' => array(
|
||||
'index' => array(
|
||||
'show_header' => true,
|
||||
'show_subpanels' => false,
|
||||
'show_search' => false,
|
||||
'show_footer' => true,
|
||||
'show_javascript' => true,
|
||||
),
|
||||
'Compose' => array(
|
||||
'show_header' => true,
|
||||
'show_subpanels' => false,
|
||||
'show_search' => false,
|
||||
'show_footer' => true,
|
||||
'show_javascript' => true,
|
||||
),
|
||||
),
|
||||
);
|
||||
55
modules/Emails/views/view.modulelistmenu.php
Executable file
55
modules/Emails/views/view.modulelistmenu.php
Executable file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
require_once('include/MVC/View/views/view.modulelistmenu.php');
|
||||
|
||||
class EmailsViewModulelistmenu extends ViewModulelistmenu
|
||||
{
|
||||
public function display()
|
||||
{
|
||||
//last viewed
|
||||
$tracker = new Tracker();
|
||||
$history = $tracker->get_recently_viewed($GLOBALS['current_user']->id, array('Emails','EmailTemplates'));
|
||||
foreach ( $history as $key => $row ) {
|
||||
$history[$key]['item_summary_short'] = getTrackerSubstring($row['item_summary']);
|
||||
$history[$key]['image'] = SugarThemeRegistry::current()
|
||||
->getImage($row['module_name'],'border="0" align="absmiddle" alt="'.$row['item_summary'].'"');
|
||||
}
|
||||
$this->ss->assign('LAST_VIEWED',$history);
|
||||
|
||||
$this->ss->display('include/MVC/View/tpls/modulelistmenu.tpl');
|
||||
}
|
||||
}
|
||||
?>
|
||||
83
modules/Emails/views/view.quickcreate.php
Executable file
83
modules/Emails/views/view.quickcreate.php
Executable file
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
//FILE SUGARCRM flav=pro || flav=sales
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
require_once('include/MVC/View/views/view.quickcreate.php');
|
||||
require_once('modules/Emails/EmailUI.php');
|
||||
|
||||
class EmailsViewQuickcreate extends ViewQuickcreate
|
||||
{
|
||||
/**
|
||||
* @see ViewQuickcreate::display()
|
||||
*/
|
||||
public function display()
|
||||
{
|
||||
$userPref = $GLOBALS['current_user']->getPreference('email_link_type');
|
||||
$defaultPref = $GLOBALS['sugar_config']['email_default_client'];
|
||||
if($userPref != '')
|
||||
$client = $userPref;
|
||||
else
|
||||
$client = $defaultPref;
|
||||
|
||||
if ( $client == 'sugar' ) {
|
||||
$eUi = new EmailUI();
|
||||
if(!empty($this->bean->id) && !in_array($this->bean->object_name,array('EmailMan')) ) {
|
||||
$fullComposeUrl = "index.php?module=Emails&action=Compose&parent_id={$this->bean->id}&parent_type={$this->bean->module_dir}";
|
||||
$composeData = array('parent_id'=>$this->bean->id, 'parent_type' => $this->bean->module_dir);
|
||||
} else {
|
||||
$fullComposeUrl = "index.php?module=Emails&action=Compose";
|
||||
$composeData = array('parent_id'=>'', 'parent_type' => '');
|
||||
}
|
||||
|
||||
$j_quickComposeOptions = $eUi->generateComposePackageForQuickCreate($composeData, $fullComposeUrl);
|
||||
$json_obj = getJSONobj();
|
||||
$opts = $json_obj->decode($j_quickComposeOptions);
|
||||
$opts['menu_id'] = 'dccontent';
|
||||
|
||||
$ss = new Sugar_Smarty();
|
||||
$ss->assign('json_output', $json_obj->encode($opts));
|
||||
$ss->display('modules/Emails/templates/dceMenuQuickCreate.tpl');
|
||||
}
|
||||
else {
|
||||
$emailAddress = '';
|
||||
if(!empty($this->bean->id) && !in_array($this->bean->object_name,array('EmailMan')) ) {
|
||||
$emailAddress = $this->bean->emailAddress->getPrimaryAddress($this->bean);
|
||||
}
|
||||
echo "<script>document.location.href='mailto:$emailAddress';lastLoadedMenu=undefined;DCMenu.closeOverlay();</script>";
|
||||
die();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user