Add php files
This commit is contained in:
68
modules/EmailMarketing/Delete.php
Executable file
68
modules/EmailMarketing/Delete.php
Executable file
@@ -0,0 +1,68 @@
|
||||
<?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 EmailMarketing();
|
||||
|
||||
if(!isset($_REQUEST['record'])) {
|
||||
sugar_die("A record number must be specified to delete the marketing campaign.");
|
||||
}
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
if(!$focus->ACLAccess('Delete')){
|
||||
ACLController::displayNoAccess(true);
|
||||
sugar_cleanup(true);
|
||||
}
|
||||
$focus->mark_deleted($_REQUEST['record']);
|
||||
|
||||
if(isset($_REQUEST['record']))
|
||||
{
|
||||
$query = "DELETE FROM emailman WHERE marketing_id ='" . $_REQUEST['record'] ."'";
|
||||
$focus->db->query($query);
|
||||
}
|
||||
|
||||
header("Location: index.php?module=".$_REQUEST['return_module']."&action=".$_REQUEST['return_action']."&record=".$_REQUEST['return_id']);
|
||||
?>
|
||||
178
modules/EmailMarketing/DetailView.php
Executable file
178
modules/EmailMarketing/DetailView.php
Executable file
@@ -0,0 +1,178 @@
|
||||
<?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/EmailMarketing/Forms.php');
|
||||
|
||||
global $app_strings;
|
||||
global $app_list_strings;
|
||||
global $mod_strings;
|
||||
global $current_user;
|
||||
|
||||
// Unimplemented until jscalendar language files are fixed
|
||||
// global $current_language;
|
||||
// global $default_language;
|
||||
// global $cal_codes;
|
||||
|
||||
$focus = new EmailMarketing();
|
||||
|
||||
if(isset($_REQUEST['record'])) {
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
}
|
||||
|
||||
global $theme;
|
||||
|
||||
|
||||
|
||||
$GLOBALS['log']->info("EmailMarketing Edit View");
|
||||
//echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME'].": ".$focus->name, true);
|
||||
|
||||
$xtpl=new XTemplate ('modules/EmailMarketing/DetailView.html');
|
||||
|
||||
$xtpl->assign("MOD", $mod_strings);
|
||||
$xtpl->assign("APP", $app_strings);
|
||||
|
||||
if (isset($_REQUEST['return_module'])) {
|
||||
$xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']);
|
||||
} else {
|
||||
$xtpl->assign("RETURN_MODULE", 'Campaigns');
|
||||
}
|
||||
if (isset($_REQUEST['return_action'])) {
|
||||
$xtpl->assign("RETURN_ACTION", $_REQUEST['return_action']);
|
||||
} else {
|
||||
$xtpl->assign("RETURN_ACTION", 'DetailView');
|
||||
}
|
||||
if (isset($_REQUEST['return_id'])) {
|
||||
$xtpl->assign("RETURN_ID", $_REQUEST['return_id']);
|
||||
} else {
|
||||
if (!empty($focus->campaign_id)) {
|
||||
$xtpl->assign("RETURN_ID", $focus->campaign_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($focus->campaign_id) {
|
||||
$campaign_id=$focus->campaign_id;
|
||||
}
|
||||
else {
|
||||
$campaign_id=$_REQUEST['campaign_id'];
|
||||
}
|
||||
$xtpl->assign("CAMPAIGN_ID", $campaign_id);
|
||||
|
||||
|
||||
$xtpl->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']);
|
||||
$xtpl->assign("JAVASCRIPT", get_set_focus_js());
|
||||
$xtpl->assign("DATE_ENTERED", $focus->date_entered);
|
||||
$xtpl->assign("DATE_MODIFIED", $focus->date_modified);
|
||||
$xtpl->assign("ID", $focus->id);
|
||||
$xtpl->assign("NAME", $focus->name);
|
||||
$xtpl->assign("FROM_NAME", $focus->from_name);
|
||||
$xtpl->assign("FROM_ADDR", $focus->from_addr);
|
||||
$xtpl->assign("DATE_START", $focus->date_start);
|
||||
$xtpl->assign("TIME_START", $focus->time_start);
|
||||
|
||||
$email_templates_arr = get_bean_select_array(true, 'EmailTemplate','name');
|
||||
if($focus->template_id) {
|
||||
$xtpl->assign("EMAIL_TEMPLATE", $email_templates_arr[$focus->template_id]);
|
||||
}
|
||||
|
||||
//include campaign utils..
|
||||
require_once('modules/Campaigns/utils.php');
|
||||
if (empty($_REQUEST['campaign_name'])) {
|
||||
|
||||
$campaign = new Campaign();
|
||||
$campaign->retrieve($campaign_id);
|
||||
$campaign_name=$campaign->name;
|
||||
} else {
|
||||
$campaign_name=$_REQUEST['campaign_name'];
|
||||
}
|
||||
|
||||
$params = array();
|
||||
$params[] = "<a href='index.php?module=Campaigns&action=index'>{$mod_strings['LNK_CAMPAIGN_LIST']}</a>";
|
||||
$params[] = "<a href='index.php?module=Campaigns&action=DetailView&record={$campaign_id}'>{$campaign_name}</a>";
|
||||
$params[] = $focus->name;
|
||||
|
||||
echo getClassicModuleTitle($focus->module_dir, $params, true);
|
||||
|
||||
if (!empty($focus->all_prospect_lists)) {
|
||||
$xtpl->assign("MESSAGE_FOR", $mod_strings['LBL_ALL_PROSPECT_LISTS']);
|
||||
} else {
|
||||
$xtpl->assign("MESSAGE_FOR", $mod_strings['LBL_RELATED_PROSPECT_LISTS']);
|
||||
}
|
||||
|
||||
if (!empty($focus->status)) {
|
||||
$xtpl->assign("STATUS",$app_list_strings['email_marketing_status_dom'][$focus->status]);
|
||||
}
|
||||
$emails=array();
|
||||
$mailboxes=get_campaign_mailboxes($emails);
|
||||
//_ppd($emails[$focus->inbound_email_id]);
|
||||
if (!empty($focus->inbound_email_id) && isset($mailboxes[$focus->inbound_email_id])) {
|
||||
$xtpl->assign("FROM_MAILBOX_NAME", $mailboxes[$focus->inbound_email_id]." <{$emails[$focus->inbound_email_id]}>");
|
||||
}
|
||||
|
||||
$xtpl->parse("main");
|
||||
$xtpl->out("main");
|
||||
|
||||
|
||||
$javascript = new javascript();
|
||||
$javascript->setFormName('EditView');
|
||||
$javascript->setSugarBean($focus);
|
||||
$javascript->addAllFields('');
|
||||
echo $javascript->getScript();
|
||||
|
||||
require_once('include/SubPanel/SubPanelTiles.php');
|
||||
$subpanel = new SubPanelTiles($focus, 'EmailMarketing');
|
||||
|
||||
if ($focus->all_prospect_lists == 1) {
|
||||
$subpanel->subpanel_definitions->exclude_tab('prospectlists');
|
||||
}
|
||||
else {
|
||||
$subpanel->subpanel_definitions->exclude_tab('allprospectlists');
|
||||
|
||||
}
|
||||
|
||||
echo $subpanel->display();
|
||||
|
||||
?>
|
||||
224
modules/EmailMarketing/EditView.php
Executable file
224
modules/EmailMarketing/EditView.php
Executable file
@@ -0,0 +1,224 @@
|
||||
<?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/EmailMarketing/Forms.php');
|
||||
|
||||
|
||||
global $timedate;
|
||||
global $app_strings;
|
||||
global $app_list_strings;
|
||||
global $mod_strings;
|
||||
global $current_user;
|
||||
|
||||
// Unimplemented until jscalendar language files are fixed
|
||||
// global $current_language;
|
||||
// global $default_language;
|
||||
// global $cal_codes;
|
||||
|
||||
$focus = new EmailMarketing();
|
||||
if(isset($_REQUEST['record'])) {
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
|
||||
$focus->id = "";
|
||||
}
|
||||
global $theme;
|
||||
|
||||
|
||||
|
||||
$GLOBALS['log']->info("EmailMarketing Edit View");
|
||||
//echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME'].": ".$focus->name, true);
|
||||
$xtpl=new XTemplate ('modules/EmailMarketing/EditView.html');
|
||||
if(!ACLController::checkAccess('EmailTemplates', 'edit', true)){
|
||||
unset($mod_strings['LBL_CREATE_EMAIL_TEMPLATE']);
|
||||
unset($mod_strings['LBL_EDIT_EMAIL_TEMPLATE']);
|
||||
}
|
||||
$xtpl->assign("MOD", $mod_strings);
|
||||
$xtpl->assign("APP", $app_strings);
|
||||
$xtpl->assign("THEME", SugarThemeRegistry::current()->__toString());
|
||||
// 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("USER_DATEFORMAT", '('. $timedate->get_user_date_format().')');
|
||||
$xtpl->assign("CALENDAR_DATEFORMAT", $timedate->get_cal_date_format());
|
||||
$xtpl->assign("TIME_MERIDIEM", $timedate->AMPMMenu('', $focus->time_start));
|
||||
|
||||
if (isset($_REQUEST['return_module'])) {
|
||||
$xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']);
|
||||
} else {
|
||||
$xtpl->assign("RETURN_MODULE", 'Campaigns');
|
||||
}
|
||||
if (isset($_REQUEST['return_action'])) {
|
||||
$xtpl->assign("RETURN_ACTION", $_REQUEST['return_action']);
|
||||
} else {
|
||||
$xtpl->assign("RETURN_ACTION", 'DetailView');
|
||||
}
|
||||
if (isset($_REQUEST['return_id'])) {
|
||||
$xtpl->assign("RETURN_ID", $_REQUEST['return_id']);
|
||||
} else {
|
||||
if (!empty($focus->campaign_id)) {
|
||||
$xtpl->assign("RETURN_ID", $focus->campaign_id);
|
||||
}
|
||||
}
|
||||
|
||||
if($focus->campaign_id) {
|
||||
$campaign_id=$focus->campaign_id;
|
||||
}
|
||||
else {
|
||||
$campaign_id=$_REQUEST['campaign_id'];
|
||||
}
|
||||
$xtpl->assign("CAMPAIGN_ID", $campaign_id);
|
||||
|
||||
|
||||
$xtpl->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']);
|
||||
$xtpl->assign("JAVASCRIPT", get_set_focus_js().get_validate_record_js());
|
||||
$xtpl->assign("DATE_ENTERED", $focus->date_entered);
|
||||
$xtpl->assign("DATE_MODIFIED", $focus->date_modified);
|
||||
$xtpl->assign("ID", $focus->id);
|
||||
$xtpl->assign("NAME", $focus->name);
|
||||
$xtpl->assign("FROM_NAME", $focus->from_name);
|
||||
$xtpl->assign("FROM_ADDR", $focus->from_addr);
|
||||
$xtpl->assign("DATE_START", $focus->date_start);
|
||||
$xtpl->assign("TIME_START", $focus->time_start);
|
||||
$xtpl->assign("TIME_FORMAT", '('. $timedate->get_user_time_format().')');
|
||||
|
||||
$email_templates_arr = get_bean_select_array(true, 'EmailTemplate','name','','name');
|
||||
if($focus->template_id) {
|
||||
$xtpl->assign("TEMPLATE_ID", $focus->template_id);
|
||||
$xtpl->assign("EMAIL_TEMPLATE_OPTIONS", get_select_options_with_id($email_templates_arr, $focus->template_id));
|
||||
$xtpl->assign("EDIT_TEMPLATE","visibility:inline");
|
||||
}
|
||||
else {
|
||||
$xtpl->assign("EMAIL_TEMPLATE_OPTIONS", get_select_options_with_id($email_templates_arr, ""));
|
||||
$xtpl->assign("EDIT_TEMPLATE","visibility:hidden");
|
||||
}
|
||||
|
||||
//include campaign utils..
|
||||
require_once('modules/Campaigns/utils.php');
|
||||
if (empty($_REQUEST['campaign_name'])) {
|
||||
|
||||
$campaign = new Campaign();
|
||||
$campaign->retrieve($campaign_id);
|
||||
$campaign_name=$campaign->name;
|
||||
} else {
|
||||
$campaign_name=$_REQUEST['campaign_name'];
|
||||
}
|
||||
|
||||
$params = array();
|
||||
$params[] = "<a href='index.php?module=Campaigns&action=index'>{$mod_strings['LNK_CAMPAIGN_LIST']}</a>";
|
||||
$params[] = "<a href='index.php?module=Campaigns&action=DetailView&record={$campaign_id}'>{$campaign_name}</a>";
|
||||
if(empty($focus->id)){
|
||||
$params[] = $GLOBALS['app_strings']['LBL_CREATE_BUTTON_LABEL']." ".$mod_strings['LBL_MODULE_NAME'];
|
||||
}else{
|
||||
$params[] = "<a href='index.php?module={$focus->module_dir}&action=DetailView&record={$focus->id}'>{$focus->name}</a>";
|
||||
$params[] = $GLOBALS['app_strings']['LBL_EDIT_BUTTON_LABEL'];
|
||||
}
|
||||
|
||||
echo getClassicModuleTitle($focus->module_dir, $params, true);
|
||||
$scope_options=get_message_scope_dom($campaign_id,$campaign_name,$focus->db);
|
||||
$prospectlists=array();
|
||||
if (isset($focus->all_prospect_lists) && $focus->all_prospect_lists==1) {
|
||||
$xtpl->assign("ALL_PROSPECT_LISTS_CHECKED","checked");
|
||||
$xtpl->assign("MESSAGE_FOR_DISABLED","disabled");
|
||||
}
|
||||
else {
|
||||
//get select prospect list.
|
||||
if (!empty($focus->id)) {
|
||||
$focus->load_relationship('prospectlists');
|
||||
$prospectlists=$focus->prospectlists->get();
|
||||
};
|
||||
}
|
||||
if (empty($prospectlists)) $prospectlists=array();
|
||||
if (empty($scope_options)) $scope_options=array();
|
||||
$xtpl->assign("SCOPE_OPTIONS", get_select_options_with_id($scope_options, $prospectlists));
|
||||
|
||||
$emails=array();
|
||||
$mailboxes=get_campaign_mailboxes($emails);
|
||||
$mailboxes_with_from_name = get_campaign_mailboxes($emails, false);
|
||||
|
||||
//add empty options.
|
||||
$emails['']='nobody@example.com';
|
||||
$mailboxes['']='';
|
||||
|
||||
//inbound_email_id
|
||||
$default_email_address='nobody@example.com';
|
||||
$from_emails = '';
|
||||
foreach ($mailboxes_with_from_name as $id=>$name) {
|
||||
if (!empty($from_emails)) {
|
||||
$from_emails.=',';
|
||||
}
|
||||
if ($id=='') {
|
||||
$from_emails.="'EMPTY','$name','$emails[$id]'";
|
||||
} else {
|
||||
$from_emails.="'$id','$name','$emails[$id]'";
|
||||
}
|
||||
if ($id==$focus->inbound_email_id) {
|
||||
$default_email_address=$emails[$id];
|
||||
}
|
||||
}
|
||||
$xtpl->assign("FROM_EMAILS",$from_emails);
|
||||
$xtpl->assign("DEFAULT_FROM_EMAIL",$default_email_address);
|
||||
|
||||
if (empty($focus->inbound_email_id)) {
|
||||
$xtpl->assign("MAILBOXES", get_select_options_with_id($mailboxes, ''));
|
||||
} else {
|
||||
$xtpl->assign("MAILBOXES", get_select_options_with_id($mailboxes, $focus->inbound_email_id));
|
||||
}
|
||||
|
||||
$xtpl->assign("STATUS_OPTIONS", get_select_options_with_id($app_list_strings['email_marketing_status_dom'], $focus->status));
|
||||
|
||||
$xtpl->parse("main");
|
||||
$xtpl->out("main");
|
||||
|
||||
|
||||
|
||||
$javascript = new javascript();
|
||||
$javascript->setFormName('EditView');
|
||||
$javascript->setSugarBean($focus);
|
||||
$javascript->addAllFields('');
|
||||
echo $javascript->getScript();
|
||||
?>
|
||||
172
modules/EmailMarketing/EmailMarketing.php
Executable file
172
modules/EmailMarketing/EmailMarketing.php
Executable file
@@ -0,0 +1,172 @@
|
||||
<?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:
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class EmailMarketing extends SugarBean {
|
||||
|
||||
var $field_name_map;
|
||||
|
||||
var $id;
|
||||
var $deleted;
|
||||
var $date_entered;
|
||||
var $date_modified;
|
||||
var $modified_user_id;
|
||||
var $created_by;
|
||||
var $name;
|
||||
var $from_addr;
|
||||
var $from_name;
|
||||
var $reply_to_name;
|
||||
var $reply_to_addr;
|
||||
var $date_start;
|
||||
var $time_start;
|
||||
var $template_id;
|
||||
var $campaign_id;
|
||||
var $all_prospect_lists;
|
||||
var $status;
|
||||
var $inbound_email_id;
|
||||
|
||||
var $table_name = 'email_marketing';
|
||||
var $object_name = 'EmailMarketing';
|
||||
var $module_dir = 'EmailMarketing';
|
||||
|
||||
var $new_schema = true;
|
||||
|
||||
function EmailMarketing()
|
||||
{
|
||||
parent::SugarBean();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
function retrieve($id) {
|
||||
parent::retrieve($id);
|
||||
|
||||
global $timedate;
|
||||
$date_start_array=explode(" ",trim($this->date_start));
|
||||
if (count($date_start_array)==2) {
|
||||
$this->time_start = $date_start_array[1];
|
||||
$this->date_start = $date_start_array[0];
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
function get_summary_text()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
function create_export_query($order_by, $where)
|
||||
{
|
||||
return $this->create_new_list_query($order_by, $where);
|
||||
}
|
||||
|
||||
function get_list_view_data(){
|
||||
|
||||
$temp_array = $this->get_list_view_array();
|
||||
|
||||
$id = $temp_array['ID'];
|
||||
$template_id = $temp_array['TEMPLATE_ID'];
|
||||
|
||||
//mode is set by schedule.php from campaigns module.
|
||||
if (!isset($this->mode) or empty($this->mode) or $this->mode!='test') {
|
||||
$this->mode='rest';
|
||||
}
|
||||
|
||||
if ($temp_array['ALL_PROSPECT_LISTS']==1) {
|
||||
$query="SELECT name from prospect_lists ";
|
||||
$query.=" INNER JOIN prospect_list_campaigns plc ON plc.prospect_list_id = prospect_lists.id";
|
||||
$query.=" WHERE plc.campaign_id='{$temp_array['CAMPAIGN_ID']}'";
|
||||
$query.=" AND prospect_lists.deleted=0";
|
||||
$query.=" AND plc.deleted=0";
|
||||
if ($this->mode=='test') {
|
||||
$query.=" AND prospect_lists.list_type='test'";
|
||||
} else {
|
||||
$query.=" AND prospect_lists.list_type!='test'";
|
||||
}
|
||||
} else {
|
||||
$query="SELECT name from prospect_lists ";
|
||||
$query.=" INNER JOIN email_marketing_prospect_lists empl ON empl.prospect_list_id = prospect_lists.id";
|
||||
$query.=" WHERE empl.email_marketing_id='{$id}'";
|
||||
$query.=" AND prospect_lists.deleted=0";
|
||||
$query.=" AND empl.deleted=0";
|
||||
if ($this->mode=='test') {
|
||||
$query.=" AND prospect_lists.list_type='test'";
|
||||
} else {
|
||||
$query.=" AND prospect_lists.list_type!='test'";
|
||||
}
|
||||
}
|
||||
$res = $this->db->query($query);
|
||||
while (($row = $this->db->fetchByAssoc($res)) != null) {
|
||||
if (!empty($temp_array['PROSPECT_LIST_NAME'])) {
|
||||
$temp_array['PROSPECT_LIST_NAME'].="<BR>";
|
||||
}
|
||||
$temp_array['PROSPECT_LIST_NAME'].=$row['name'];
|
||||
}
|
||||
return $temp_array;
|
||||
}
|
||||
|
||||
function bean_implements($interface){
|
||||
switch($interface){
|
||||
case 'ACL':return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function get_all_prospect_lists() {
|
||||
|
||||
$query="select prospect_lists.* from prospect_lists ";
|
||||
$query.=" left join prospect_list_campaigns on prospect_list_campaigns.prospect_list_id=prospect_lists.id";
|
||||
$query.=" where prospect_list_campaigns.deleted=0";
|
||||
$query.=" and prospect_list_campaigns.campaign_id='$this->campaign_id'";
|
||||
$query.=" and prospect_lists.deleted=0";
|
||||
$query.=" and prospect_lists.list_type not like 'exempt%'";
|
||||
|
||||
return $query;
|
||||
}
|
||||
}
|
||||
?>
|
||||
97
modules/EmailMarketing/Forms.php
Executable file
97
modules/EmailMarketing/Forms.php
Executable file
@@ -0,0 +1,97 @@
|
||||
<?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 get_validate_record_js () {
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
|
||||
$err_missing_required_fields = $app_strings['ERR_MISSING_REQUIRED_FIELDS'];
|
||||
$err_lbl_send_message= $mod_strings['LBL_MESSAGE_FOR'];
|
||||
$the_script = <<<EOQ
|
||||
|
||||
<script type="text/javascript" language="Javascript">
|
||||
<!-- to hide script contents from old browsers
|
||||
|
||||
function trim(s) {
|
||||
while (s.substring(0,1) == " ") {
|
||||
s = s.substring(1, s.length);
|
||||
}
|
||||
while (s.substring(s.length-1, s.length) == ' ') {
|
||||
s = s.substring(0,s.length-1);
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
function verify_data(form,formname) {
|
||||
if (!check_form(formname))
|
||||
return false;
|
||||
|
||||
var isError = false;
|
||||
var errorMessage = "";
|
||||
|
||||
var thecheckbox=document.getElementById('all_prospect_lists');
|
||||
var theselectbox=document.getElementById('message_for');
|
||||
|
||||
if (!thecheckbox.checked && theselectbox.selectedIndex < 0) {
|
||||
isError=true;
|
||||
errorMessage="$err_lbl_send_message";
|
||||
}
|
||||
|
||||
if (isError == true) {
|
||||
alert("$err_missing_required_fields" + errorMessage);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// end hiding contents from old browsers -->
|
||||
</script>
|
||||
|
||||
EOQ;
|
||||
|
||||
return $the_script;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Create HTML form to enter a new record with the minimum necessary fields.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
*/
|
||||
|
||||
?>
|
||||
56
modules/EmailMarketing/Menu.php
Executable file
56
modules/EmailMarketing/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: TODO To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
global $mod_strings, $app_strings;
|
||||
$module_menu = Array(
|
||||
Array("index.php?module=Campaigns&action=EditView&return_module=Campaigns&return_action=index", $mod_strings['LNK_NEW_CAMPAIGN'],"CreateCampaigns"),
|
||||
Array("index.php?module=Campaigns&action=index&return_module=Campaigns&return_action=index", $mod_strings['LNK_CAMPAIGN_LIST'],"Campaigns"),
|
||||
Array("index.php?module=ProspectLists&action=EditView&return_module=ProspectLists&return_action=DetailView", $mod_strings['LNK_NEW_PROSPECT_LIST'],"CreateProspectLists"),
|
||||
Array("index.php?module=ProspectLists&action=index&return_module=ProspectLists&return_action=index", $mod_strings['LNK_PROSPECT_LIST_LIST'],"ProspectLists"),
|
||||
Array("index.php?module=Prospects&action=EditView&return_module=Prospects&return_action=DetailView", $mod_strings['LNK_NEW_PROSPECT'],"CreateProspects"),
|
||||
Array("index.php?module=Prospects&action=index&return_module=Prospects&return_action=index", $mod_strings['LNK_PROSPECT_LIST'],"Prospects"),
|
||||
|
||||
|
||||
);
|
||||
?>
|
||||
141
modules/EmailMarketing/Save.php
Executable file
141
modules/EmailMarketing/Save.php
Executable file
@@ -0,0 +1,141 @@
|
||||
<?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 $timedate;
|
||||
global $current_user;
|
||||
if(!empty($_POST['meridiem'])){
|
||||
$_POST['time_start'] = $timedate->merge_time_meridiem($_POST['time_start'],$timedate->get_time_format(true), $_POST['meridiem']);
|
||||
}
|
||||
|
||||
if(empty($_REQUEST['time_start'])) {
|
||||
$_REQUEST['date_start'] = $_REQUEST['date_start'] . ' 00:00';
|
||||
$_POST['date_start'] = $_POST['date_start'] . ' 00:00';
|
||||
} else {
|
||||
$_REQUEST['date_start'] = $_REQUEST['date_start'] . ' ' . $_REQUEST['time_start'];
|
||||
$_POST['date_start'] = $_POST['date_start'] . ' ' . $_POST['time_start'];
|
||||
}
|
||||
|
||||
$marketing = new EmailMarketing();
|
||||
if (isset($_POST['record']) && !empty($_POST['record'])) {
|
||||
$marketing->retrieve($_POST['record']);
|
||||
}
|
||||
if(!$marketing->ACLAccess('Save')){
|
||||
ACLController::displayNoAccess(true);
|
||||
sugar_cleanup(true);
|
||||
}
|
||||
|
||||
if (!empty($_POST['assigned_user_id']) && ($marketing->assigned_user_id != $_POST['assigned_user_id']) && ($_POST['assigned_user_id'] != $current_user->id)) {
|
||||
$check_notify = TRUE;
|
||||
}
|
||||
else {
|
||||
$check_notify = FALSE;
|
||||
}
|
||||
foreach($marketing->column_fields as $field)
|
||||
{
|
||||
if ($field == 'all_prospect_lists') {
|
||||
if(isset($_POST[$field]) && $_POST[$field]='on' )
|
||||
{
|
||||
$marketing->$field = 1;
|
||||
} else {
|
||||
$marketing->$field = 0;
|
||||
}
|
||||
}else {
|
||||
if(isset($_POST[$field]))
|
||||
{
|
||||
$value = $_POST[$field];
|
||||
$marketing->$field = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach($marketing->additional_column_fields as $field)
|
||||
{
|
||||
if(isset($_POST[$field]))
|
||||
{
|
||||
$value = $_POST[$field];
|
||||
$marketing->$field = $value;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$marketing->campaign_id = $_REQUEST['campaign_id'];
|
||||
$marketing->save($check_notify);
|
||||
|
||||
//add prospect lists to campaign.
|
||||
$marketing->load_relationship('prospectlists');
|
||||
$prospectlists=$marketing->prospectlists->get();
|
||||
if ($marketing->all_prospect_lists==1) {
|
||||
//remove all related prospect lists.
|
||||
if (!empty($prospectlists)) {
|
||||
$marketing->prospectlists->delete($marketing->id);
|
||||
}
|
||||
} else {
|
||||
if (is_array($_REQUEST['message_for'])) {
|
||||
foreach ($_REQUEST['message_for'] as $prospect_list_id) {
|
||||
|
||||
$key=array_search($prospect_list_id,$prospectlists);
|
||||
if ($key === null or $key === false) {
|
||||
$marketing->prospectlists->add($prospect_list_id);
|
||||
} else {
|
||||
unset($prospectlists[$key]);
|
||||
}
|
||||
}
|
||||
if (count($prospectlists) != 0) {
|
||||
foreach ($prospectlists as $key=>$list_id) {
|
||||
$marketing->prospectlists->delete($marketing->id,$list_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if($_REQUEST['action'] != 'WizardMarketingSave'){
|
||||
$header_URL = "Location: index.php?action=DetailView&module=Campaigns&record={$_REQUEST['campaign_id']}";
|
||||
$GLOBALS['log']->debug("about to post header URL of: $header_URL");
|
||||
header($header_URL);
|
||||
}
|
||||
?>
|
||||
89
modules/EmailMarketing/SubPanelView.php
Executable file
89
modules/EmailMarketing/SubPanelView.php
Executable file
@@ -0,0 +1,89 @@
|
||||
<?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 $app_strings;
|
||||
//we don't want the parent module's string file, but rather the string file specifc to this subpanel
|
||||
global $current_language;
|
||||
$current_module_strings = return_module_language($current_language, 'EmailMarketing');
|
||||
|
||||
global $currentModule;
|
||||
|
||||
global $theme;
|
||||
global $focus;
|
||||
global $action;
|
||||
|
||||
|
||||
|
||||
|
||||
// focus_list is the means of passing data to a SubPanelView.
|
||||
global $focus_list;
|
||||
|
||||
$button = "<form action='index.php' method='post' name='MKForm' id='MKForm'>\n";
|
||||
$button .= "<input type='hidden' name='module' value='EmailMarketing'>\n";
|
||||
$button .= "<input type='hidden' name='campaign_id' value='$focus->id'>\n";
|
||||
$button .= "<input type='hidden' name='return_module' value='".$currentModule."'>\n";
|
||||
$button .= "<input type='hidden' name='return_action' value='DetailView'>\n";
|
||||
$button .= "<input type='hidden' name='return_id' value='".$focus->id."'>\n";
|
||||
$button .= "<input type='hidden' name='action'>\n";
|
||||
|
||||
$button .= "<input title='".$app_strings['LBL_NEW_BUTTON_TITLE']."' accessyKey='".$app_strings['LBL_NEW_BUTTON_KEY']."' class='button' onclick=\"this.form.action.value='EditView'\" type='submit' name='New' value=' ".$app_strings['LBL_NEW_BUTTON_LABEL']." '>\n";
|
||||
|
||||
$button .= "</form>\n";
|
||||
|
||||
$ListView = new ListView();
|
||||
$ListView->initNewXTemplate('modules/EmailMarketing/SubPanelView.html', $current_module_strings);
|
||||
|
||||
$ListView->xTemplateAssign("EDIT_INLINE_PNG", SugarThemeRegistry::current()->getImage('edit_inline','align="absmiddle" alt="'.$app_strings['LNK_EDIT'].'" border="0"'));
|
||||
$ListView->xTemplateAssign("REMOVE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline','align="absmiddle" alt="'.$app_strings['LNK_REMOVE'].'" border="0"'));
|
||||
|
||||
$ListView->xTemplateAssign("RETURN_URL", "&return_module=".$currentModule."&return_action=DetailView&return_id=".$focus->id);
|
||||
$ListView->setHeaderTitle($current_module_strings['LBL_MODULE_NAME'] );
|
||||
$ListView->setHeaderText($button);
|
||||
$ListView->processListView($focus_list, "main", "EMAILMARKETING");
|
||||
|
||||
?>
|
||||
57
modules/EmailMarketing/field_arrays.php
Executable file
57
modules/EmailMarketing/field_arrays.php
Executable file
@@ -0,0 +1,57 @@
|
||||
<?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['EmailMarketing'] = array ('column_fields' => array (
|
||||
'id', 'date_entered', 'date_modified',
|
||||
'modified_user_id', 'created_by', 'name',
|
||||
'from_addr', 'from_name', 'reply_to_name', 'reply_to_addr', 'date_start','time_start', 'template_id', 'campaign_id','status','inbound_email_id','all_prospect_lists',
|
||||
),
|
||||
'list_fields' => array (
|
||||
'id','name','date_start','time_start', 'template_id', 'status','all_prospect_lists','campaign_id',
|
||||
),
|
||||
'required_fields' => array (
|
||||
'name'=>1, 'from_name'=>1,'from_addr'=>1, 'date_start'=>1,'time_start'=>1,
|
||||
'template_id'=>1, 'status'=>1,
|
||||
),
|
||||
);
|
||||
?>
|
||||
107
modules/EmailMarketing/language/en_us.lang.php
Executable file
107
modules/EmailMarketing/language/en_us.lang.php
Executable file
@@ -0,0 +1,107 @@
|
||||
<?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_REPLY_ADDR' => '"Reply-to" Address: ',
|
||||
'LBL_REPLY_NAME' => '"Reply-to" Name: ',
|
||||
|
||||
'LBL_MODULE_NAME' => 'Email Marketing',
|
||||
'LBL_MODULE_TITLE' => 'Email Marketing: Home',
|
||||
'LBL_LIST_FORM_TITLE' => 'Email Marketing Campaigns',
|
||||
'LBL_NAME' => 'Name: ',
|
||||
'LBL_LIST_NAME' => 'Name',
|
||||
'LBL_LIST_FROM_ADDR' => 'From Email',
|
||||
'LBL_LIST_DATE_START' => 'Start Date',
|
||||
'LBL_LIST_TEMPLATE_NAME' => 'Email Template',
|
||||
'LBL_LIST_STATUS' => 'Status',
|
||||
'LBL_STATUS' => 'Status',
|
||||
'LBL_STATUS_TEXT' => 'Status:' ,
|
||||
'LBL_TEMPLATE_NAME'=>'Template Name',
|
||||
'LBL_DATE_ENTERED' => 'Date Entered',
|
||||
'LBL_DATE_MODIFIED' => 'Date Modified',
|
||||
'LBL_MODIFIED' => 'Modified by: ',
|
||||
'LBL_CREATED' => 'Created by: ',
|
||||
'LBL_MESSAGE_FOR' => 'Send This Message To:',
|
||||
'LBL_MESSAGE_FOR_ID' => 'Message For',
|
||||
|
||||
'LBL_FROM_NAME' => 'From Name: ',
|
||||
'LBL_FROM_ADDR' => 'From Email Address: ',
|
||||
'LBL_DATE_START' => 'Start Date',
|
||||
'LBL_TIME_START' => 'Start Time',
|
||||
'LBL_START_DATE_TIME' => 'Start Date & Time: ',
|
||||
'LBL_TEMPLATE' => 'Email Template: ',
|
||||
|
||||
'LBL_MODIFIED_BY' => 'Modified by: ',
|
||||
'LBL_CREATED_BY' => 'Created by: ',
|
||||
'LBL_DATE_CREATED' => 'Created date: ',
|
||||
'LBL_DATE_LAST_MODIFIED' => 'Modified date: ',
|
||||
|
||||
'LNK_NEW_CAMPAIGN' => 'Create Campaign',
|
||||
'LNK_CAMPAIGN_LIST' => 'Campaigns',
|
||||
'LNK_NEW_PROSPECT_LIST' => 'Create Target List',
|
||||
'LNK_PROSPECT_LIST_LIST' => 'Target Lists',
|
||||
'LNK_NEW_PROSPECT' => 'Create Target',
|
||||
'LNK_PROSPECT_LIST' => 'Targets',
|
||||
'LBL_DEFAULT_SUBPANEL_TITLE'=>'Email Marketing',
|
||||
'LBL_CREATE_EMAIL_TEMPLATE'=> 'Create',
|
||||
'LBL_EDIT_EMAIL_TEMPLATE'=> 'Edit',
|
||||
'LBL_FROM_MAILBOX'=>'From Mailbox',
|
||||
'LBL_FROM_MAILBOX_NAME'=>'Use Mailbox:',
|
||||
'LBL_PROSPECT_LIST_SUBPANEL_TITLE'=>'Target Lists',
|
||||
'LBL_ALL_PROSPECT_LISTS'=>'Select to choose all Target List(s) in the Campaign.',
|
||||
'LBL_RELATED_PROSPECT_LISTS'=>'All Target List(s) related to this message.',
|
||||
'LBL_PROSPECT_LIST_NAME'=>'Target List Name',
|
||||
'LBL_LIST_PROSPECT_LIST_NAME'=>'Targeted Lists',
|
||||
'LBL_MODULE_SEND_TEST'=>'Campaign: Send Test',
|
||||
'LBL_MODULE_SEND_EMAILS'=>'Campaign: Send Emails',
|
||||
'LBL_SCHEDULE_MESSAGE_TEST'=>'Please select the campaign messages that you would like to test:',
|
||||
'LBL_SCHEDULE_MESSAGE_EMAILS'=>'Please select the campaign messages that you would like to schedule for distribution on the specified start date and time:',
|
||||
'LBL_SCHEDULE_BUTTON_TITLE'=>'Send',
|
||||
'LBL_SCHEDULE_BUTTON_LABEL'=>'Send',
|
||||
'LBL_SCHEDULE_BUTTON_KEY'=>'T',
|
||||
|
||||
|
||||
|
||||
);
|
||||
?>
|
||||
95
modules/EmailMarketing/language/pl_pl.lang.php
Executable file
95
modules/EmailMarketing/language/pl_pl.lang.php
Executable file
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Public License Version
|
||||
* 1.1.3 ("License"); You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* The Original Code is: SugarCRM Open Source
|
||||
* The Initial Developer of the Original Code is SugarCRM, Inc.
|
||||
* Portions created by SugarCRM are Copyright (C) 2004-2005 SugarCRM, Inc.;
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
* pl_pl.lang.ext.php,v for SugarCRM 4.5.1-->>
|
||||
* Translator: Krzysztof Morawski
|
||||
* All Rights Reserved.
|
||||
* Any bugs report welcome: krzysiek<at>kmmgroup<dot>pl
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
$mod_strings = array (
|
||||
'LBL_REPLY_ADDR' => 'Adres "Odpowiedź Do": ',
|
||||
'LBL_REPLY_NAME' => 'Nazwa "Odpowiedź Do": ',
|
||||
|
||||
'LBL_MODULE_NAME' => 'Mailing marketingowy',
|
||||
'LBL_MODULE_TITLE' => 'Mailing marketingowy: Strona główna',
|
||||
'LBL_LIST_FORM_TITLE' => 'Mailing marketingowy kampanie',
|
||||
'LBL_NAME' => 'Nazwa: ',
|
||||
'LBL_LIST_NAME' => 'Nazwa',
|
||||
'LBL_LIST_FROM_ADDR' => 'Od (email)',
|
||||
'LBL_LIST_DATE_START' => 'Data rozpoczęcia',
|
||||
'LBL_LIST_TEMPLATE_NAME' => 'Przykładowy email',
|
||||
'LBL_LIST_STATUS' => 'Status',
|
||||
'LBL_STATUS' => 'Status',
|
||||
'LBL_STATUS_TEXT' => 'Status:' ,
|
||||
'LBL_TEMPLATE_NAME'=>'Nazwa wzoru',
|
||||
'LBL_DATE_ENTERED' => 'Data wprowadzenia',
|
||||
'LBL_DATE_MODIFIED' => 'Data zmodyfikowania',
|
||||
'LBL_MODIFIED' => 'Zmodyfikowano przez: ',
|
||||
'LBL_CREATED' => 'Utworzone przez: ',
|
||||
'LBL_MESSAGE_FOR' => 'Wyślij wiadomość do:' ,
|
||||
'LBL_MESSAGE_FOR_ID' => 'Wiadomość do' ,
|
||||
|
||||
'LBL_FROM_NAME' => 'Od (nazwa): ',
|
||||
'LBL_FROM_ADDR' => 'Od (adres email): ',
|
||||
'LBL_DATE_START' => 'Data rozpoczęcia',
|
||||
'LBL_TIME_START' => 'Czas rozpoczęcia',
|
||||
'LBL_START_DATE_TIME' => 'Data i czas rozpoczęcia: ',
|
||||
'LBL_TEMPLATE' => 'Przykładowy email: ',
|
||||
|
||||
'LBL_MODIFIED_BY' => 'Zmodyfikowano przez: ',
|
||||
'LBL_CREATED_BY' => 'Utworzone przez: ',
|
||||
'LBL_DATE_CREATED' => 'Data utworzenia: ',
|
||||
'LBL_DATE_LAST_MODIFIED' => 'Data modyfikacji: ',
|
||||
|
||||
'LNK_NEW_CAMPAIGN' => 'Utwórz kampanie',
|
||||
'LNK_CAMPAIGN_LIST' => 'Kampanie',
|
||||
'LNK_NEW_PROSPECT_LIST' => 'Utwórz listę potencjalnych odbiorców',
|
||||
'LNK_PROSPECT_LIST_LIST' => 'Lista potencjalnych odbiorców',
|
||||
'LNK_NEW_PROSPECT' => 'Utwórz potencjalnego odbiorcę',
|
||||
'LNK_PROSPECT_LIST' => 'Potencjalni odbiorcy',
|
||||
'LBL_DEFAULT_SUBPANEL_TITLE'=>'Mailing marketingowy',
|
||||
'LBL_CREATE_EMAIL_TEMPLATE'=> 'Utwórz',
|
||||
'LBL_EDIT_EMAIL_TEMPLATE'=> 'Edytuj',
|
||||
'LBL_FROM_MAILBOX'=>'Ze Skrzynki',
|
||||
'LBL_FROM_MAILBOX_NAME'=>'Użyj Skrzynki:',
|
||||
'LBL_PROSPECT_LIST_SUBPANEL_TITLE'=>'Listy docelowe',
|
||||
'LBL_ALL_PROSPECT_LISTS'=>'Wszystkie Listy docelowe w kampanii.',
|
||||
'LBL_RELATED_PROSPECT_LISTS'=>'Wszystkie listy docelowe powiązane z tą wiadmością.',
|
||||
'LBL_PROSPECT_LIST_NAME'=>'Nazwa listy docelowej',
|
||||
'LBL_LIST_PROSPECT_LIST_NAME'=>'Określone listy docelowe',
|
||||
'LBL_MODULE_SEND_TEST'=>'Kampania: wyślij test',
|
||||
'LBL_MODULE_SEND_EMAILS'=>'Kampania: Wyślij test',
|
||||
'LBL_SCHEDULE_MESSAGE_TEST'=>'Wybierz wiadomość kampanii, którą chcesz wysłać jako test:',
|
||||
'LBL_SCHEDULE_MESSAGE_EMAILS'=>'Wybierz wiadomości kampanii, które zamierzasz wysłać o określonej godzinie danego dnia:',
|
||||
'LBL_SCHEDULE_BUTTON_TITLE'=>'Wyślij',
|
||||
'LBL_SCHEDULE_BUTTON_LABEL'=>'Wyślij',
|
||||
'LBL_SCHEDULE_BUTTON_KEY'=>'T',
|
||||
|
||||
|
||||
|
||||
);
|
||||
?>
|
||||
66
modules/EmailMarketing/metadata/subpaneldefs.php
Executable file
66
modules/EmailMarketing/metadata/subpaneldefs.php
Executable file
@@ -0,0 +1,66 @@
|
||||
<?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['EmailMarketing'] = array(
|
||||
// list of what Subpanels to show in the DetailView
|
||||
'subpanel_setup' => array(
|
||||
'prospectlists' => array(
|
||||
'order' => 10,
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'name',
|
||||
'module' => 'ProspectLists',
|
||||
'get_subpanel_data'=>'prospectlists',
|
||||
'set_subpanel_data'=>'prospectlists',
|
||||
'subpanel_name' => 'default',
|
||||
'title_key' => 'LBL_PROSPECT_LIST_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(),
|
||||
),
|
||||
'allprospectlists' => array(
|
||||
'order' => 20,
|
||||
'module' => 'ProspectLists',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'name',
|
||||
'get_subpanel_data'=>'function:get_all_prospect_lists',
|
||||
'set_subpanel_data'=>'prospectlists',
|
||||
'subpanel_name' => 'default',
|
||||
'title_key' => 'LBL_PROSPECT_LIST_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
88
modules/EmailMarketing/metadata/subpanels/default.php
Executable file
88
modules/EmailMarketing/metadata/subpanels/default.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".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
'list_fields'=> array(
|
||||
'name' => array(
|
||||
'vname' => 'LBL_LIST_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '40%',
|
||||
),
|
||||
'date_start'=>array(
|
||||
'vname' => 'LBL_LIST_DATE_START',
|
||||
'width' => '20%',
|
||||
|
||||
),
|
||||
'status'=>array(
|
||||
'vname' => 'LBL_LIST_STATUS',
|
||||
'width' => '15%',
|
||||
),
|
||||
'template_name'=>array(
|
||||
'vname' => 'LBL_LIST_TEMPLATE_NAME',
|
||||
'width' => '15%',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'target_record_key' => 'template_id',
|
||||
'target_module' => 'EmailTemplates',
|
||||
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'vname' => 'LBL_EDIT_BUTTON',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'EmailMarketing',
|
||||
'width' => '5%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'vname' => 'LBL_REMOVE',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => 'EmailMarketing',
|
||||
'width' => '5%',
|
||||
),
|
||||
'time_start'=>array(
|
||||
'usage'=>'query_only'
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
87
modules/EmailMarketing/subpanels/default.php
Executable file
87
modules/EmailMarketing/subpanels/default.php
Executable file
@@ -0,0 +1,87 @@
|
||||
<?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(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
'list_fields'=> array(
|
||||
'name' => array(
|
||||
'vname' => 'LBL_LIST_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '40%',
|
||||
),
|
||||
'date_start'=>array(
|
||||
'widget_class' => 'SubPanelConcat',
|
||||
'vname' => 'LBL_LIST_DATE_START',
|
||||
'width' => '20%',
|
||||
'source'=> array('date_start',' ','time_start'),
|
||||
),
|
||||
'status'=>array(
|
||||
'vname' => 'LBL_LIST_STATUS',
|
||||
'width' => '15%',
|
||||
),
|
||||
'template_name'=>array(
|
||||
'vname' => 'LBL_LIST_TEMPLATE_NAME',
|
||||
'width' => '15%',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'target_record_key' => 'template_id',
|
||||
'target_module' => 'EmailTemplates',
|
||||
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'EmailMarketing',
|
||||
'width' => '5%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => 'EmailMarketing',
|
||||
'width' => '5%',
|
||||
),
|
||||
'time_start'=>array(
|
||||
'usage'=>'query_only'
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
225
modules/EmailMarketing/vardefs.php
Executable file
225
modules/EmailMarketing/vardefs.php
Executable file
@@ -0,0 +1,225 @@
|
||||
<?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['EmailMarketing'] = array('table' => 'email_marketing'
|
||||
,'fields' => array (
|
||||
'id' =>
|
||||
array (
|
||||
'name' => 'id',
|
||||
'vname' => 'LBL_NAME',
|
||||
'type' => 'id',
|
||||
'required'=>true,
|
||||
),
|
||||
'deleted' => array (
|
||||
'name' => 'deleted',
|
||||
'vname' => 'LBL_CREATED_BY',
|
||||
'type' => 'bool',
|
||||
'required' => false,
|
||||
'reportable'=>false,
|
||||
),
|
||||
'date_entered' =>
|
||||
array (
|
||||
'name' => 'date_entered',
|
||||
'vname' => 'LBL_DATE_ENTERED',
|
||||
'type' => 'datetime',
|
||||
'required'=>true,
|
||||
),
|
||||
'date_modified' =>
|
||||
array (
|
||||
'name' => 'date_modified',
|
||||
'vname' => 'LBL_DATE_MODIFIED',
|
||||
'type' => 'datetime',
|
||||
'required'=>true,
|
||||
),
|
||||
'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',
|
||||
'dbType' => 'id'
|
||||
),
|
||||
'created_by' =>
|
||||
array (
|
||||
'name' => 'created_by',
|
||||
'rname' => 'user_name',
|
||||
'id_name' => 'modified_user_id',
|
||||
'vname' => 'LBL_CREATED_BY',
|
||||
'type' => 'assigned_user_name',
|
||||
'table' => 'users',
|
||||
'isnull' => 'false',
|
||||
'dbType' => 'id'
|
||||
),
|
||||
'name' =>
|
||||
array (
|
||||
'name' => 'name',
|
||||
'vname' => 'LBL_NAME',
|
||||
'type' => 'varchar',
|
||||
'len' => '255',
|
||||
'importable' => 'required',
|
||||
),
|
||||
'from_name' => //starting from 4.0 from_name is obsolete..replaced with inbound_email_id
|
||||
array (
|
||||
'name' => 'from_name',
|
||||
'vname' => 'LBL_FROM_NAME',
|
||||
'type' => 'varchar',
|
||||
'len' => '100',
|
||||
'importable' => 'required',
|
||||
),
|
||||
'from_addr' =>
|
||||
array (
|
||||
'name' => 'from_addr',
|
||||
'vname' => 'LBL_FROM_ADDR',
|
||||
'type' => 'varchar',
|
||||
'len' => '100',
|
||||
'importable' => 'required',
|
||||
),
|
||||
'reply_to_name' =>
|
||||
array (
|
||||
'name' => 'reply_to_name',
|
||||
'vname' => 'LBL_REPLY_NAME',
|
||||
'type' => 'varchar',
|
||||
'len' => '100',
|
||||
),
|
||||
'reply_to_addr' =>
|
||||
array (
|
||||
'name' => 'reply_to_addr',
|
||||
'vname' => 'LBL_REPLY_ADDR',
|
||||
'type' => 'varchar',
|
||||
'len' => '100',
|
||||
),
|
||||
'inbound_email_id' =>
|
||||
array (
|
||||
'name' => 'inbound_email_id',
|
||||
'vname' => 'LBL_FROM_MAILBOX',
|
||||
'type' => 'varchar',
|
||||
'len' => '36',
|
||||
),
|
||||
'date_start' =>
|
||||
array (
|
||||
'name' => 'date_start',
|
||||
'vname' => 'LBL_DATE_START',
|
||||
'type' => 'datetime',
|
||||
'importable' => 'required',
|
||||
),
|
||||
|
||||
'template_id' =>
|
||||
array (
|
||||
'name' => 'template_id',
|
||||
'vname' => 'LBL_TEMPLATE',
|
||||
'type' => 'id',
|
||||
'required'=>true,
|
||||
'importable' => 'required',
|
||||
),
|
||||
'status' =>
|
||||
array (
|
||||
'name' => 'status',
|
||||
'vname' => 'LBL_STATUS',
|
||||
'type' => 'enum',
|
||||
'len' => 25,
|
||||
'required'=>true,
|
||||
'options' => 'email_marketing_status_dom',
|
||||
'importable' => 'required',
|
||||
),
|
||||
'campaign_id' =>
|
||||
array (
|
||||
'name' => 'campaign_id',
|
||||
'vname' => 'LBL_CAMPAIGN_ID',
|
||||
'type' => 'id',
|
||||
'isnull' => true,
|
||||
'required'=>false,
|
||||
),
|
||||
'all_prospect_lists' => array (
|
||||
'name' => 'all_prospect_lists',
|
||||
'vname' => 'LBL_ALL_PROSPECT_LISTS',
|
||||
'type' => 'bool',
|
||||
'default'=> 0,
|
||||
),
|
||||
//no-db-fields.
|
||||
'template_name' =>
|
||||
array (
|
||||
'name' => 'template_name',
|
||||
'rname' => 'name',
|
||||
'id_name' => 'template_id',
|
||||
'vname' => 'LBL_TEMPLATE_NAME',
|
||||
'type' => 'relate',
|
||||
'table' => 'email_templates',
|
||||
'isnull' => 'true',
|
||||
'module' => 'EmailTemplates',
|
||||
'dbType' => 'varchar',
|
||||
'link'=>'emailtemplate',
|
||||
'len' => '255',
|
||||
'source'=>'non-db',
|
||||
),
|
||||
'prospect_list_name' =>
|
||||
array (
|
||||
'name' => 'prospect_list_name',
|
||||
'vname' => 'LBL_PROSPECT_LIST_NAME',
|
||||
'type' => 'varchar',
|
||||
'len'=>100,
|
||||
'source'=>'non-db',
|
||||
),
|
||||
|
||||
//related fields.
|
||||
'prospectlists'=> array (
|
||||
'name' => 'prospectlists',
|
||||
'type' => 'link',
|
||||
'relationship' => 'email_marketing_prospect_lists',
|
||||
'source'=>'non-db',
|
||||
),
|
||||
'emailtemplate'=> array (
|
||||
'name' => 'emailtemplate',
|
||||
'type' => 'link',
|
||||
'relationship' => 'email_template_email_marketings',
|
||||
'source'=>'non-db',
|
||||
),
|
||||
),
|
||||
'indices' => array (
|
||||
array('name' =>'emmkpk', 'type' =>'primary', 'fields'=>array('id')),
|
||||
array('name' =>'idx_emmkt_name', 'type'=>'index', 'fields'=>array('name')),
|
||||
array('name' =>'idx_emmkit_del', 'type'=>'index', 'fields'=>array('deleted')),
|
||||
),
|
||||
'relationships' => array (
|
||||
'email_template_email_marketings' => array('lhs_module'=> 'EmailTemplates', 'lhs_table'=> 'email_templates', 'lhs_key' => 'id',
|
||||
'rhs_module'=> 'EmailMarketing', 'rhs_table'=> 'email_marketing', 'rhs_key' => 'template_id',
|
||||
'relationship_type'=>'one-to-many'),
|
||||
),
|
||||
);
|
||||
?>
|
||||
Reference in New Issue
Block a user