This commit is contained in:
2024-04-27 09:23:34 +02:00
commit 11e713ca6f
11884 changed files with 3263371 additions and 0 deletions

View 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']);
?>

View File

@@ -0,0 +1,94 @@
<!--
/*********************************************************************************
* 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".
********************************************************************************/
/*********************************************************************************
********************************************************************************/
-->
<!-- BEGIN: main -->
{ERROR_STRING}
<form name="DetailView" method="POST" action="index.php">
<input type="hidden" name="module" value="EmailMarketing">
<input type="hidden" name="record" value="{ID}">
<input type="hidden" name="action" value="DetailView">
<input type="hidden" name="campaign_id" value="{CAMPAIGN_ID}">
<input type="hidden" name="return_module" value="{RETURN_MODULE}">
<input type="hidden" name="return_id" value="{RETURN_ID}">
<input type="hidden" name="return_action" value="{RETURN_ACTION}">
<input type="hidden" name="isDuplicate" value="">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<input title="{APP.LBL_EDIT_BUTTON_TITLE}" accessKey="{APP.LBL_EDIT_BUTTON_KEY}" class="button" onclick="this.form.return_module.value='EmailMarketing'; this.form.return_action.value='DetailView'; this.form.return_id.value='{ID}'; this.form.action.value='EditView'" type="submit" name="Edit" value=" {APP.LBL_EDIT_BUTTON_LABEL} ">
<input title="{APP.LBL_DUPLICATE_BUTTON_TITLE}" accessKey="{APP.LBL_DUPLICATE_BUTTON_KEY}" class="button" onclick="this.form.return_module.value='Campaigns'; this.form.return_action.value='DetailView'; this.form.return_id.value='{CAMPAIGN_ID}';this.form.isDuplicate.value=true; this.form.action.value='EditView';" type="submit" name="Duplicate" value=" {APP.LBL_DUPLICATE_BUTTON_LABEL} ">
<input title="{APP.LBL_DELETE_BUTTON_TITLE}" accessKey="{APP.LBL_DELETE_BUTTON_KEY}" class="button" onclick="this.form.return_module.value='Campaigns'; this.form.return_action.value='DetailView'; this.form.return_id.value='{CAMPAIGN_ID}';this.form.action.value='Delete'; return confirm('{APP.NTC_DELETE_CONFIRMATION}')" type="submit" name="Delete" value=" {APP.LBL_DELETE_BUTTON_LABEL} ">
</td>
<td align="right" nowrap><span class="required">{APP.LBL_REQUIRED_SYMBOL}</span> {APP.NTC_REQUIRED}</td>
<td align='right'>{ADMIN_EDIT}</td>
</tr>
</table>
<div class="detail view">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="15%" scope="row"><slot>{MOD.LBL_NAME}</slot></td>
<td width="35%"><slot>{NAME}&nbsp;</slot></td>
<td scope="row"><slot>{MOD.LBL_STATUS_TEXT}</slot></td>
<td><slot>{STATUS}&nbsp;</slot></td>
</tr>
<tr>
<td scope="row"><slot>{MOD.LBL_FROM_MAILBOX_NAME}</slot></td>
<td><slot>{FROM_MAILBOX_NAME}&nbsp;</slot></td>
<td scope="row"><slot>{MOD.LBL_FROM_NAME}</slot></td>
<td><slot>{FROM_NAME}&nbsp;</slot></td>
</tr>
<tr>
<td scope="row"><slot>{MOD.LBL_START_DATE_TIME}</slot></td>
<td><slot>{DATE_START}&nbsp;{TIME_START}</slot></td>
<td scope="row"><slot>{MOD.LBL_TEMPLATE}</slot></td>
<td>{EMAIL_TEMPLATE}&nbsp;</td>
</tr>
<tr>
<td scope="row"><slot>{MOD.LBL_MESSAGE_FOR}</slot></td>
<td><slot>{MESSAGE_FOR}&nbsp;</slot></td>
<td scope="row"><slot>&nbsp;</slot></td>
<td><slot>&nbsp;</slot></td>
</tr>
</table>
</div>
</form>
{JAVASCRIPT}
<!-- END: main -->

View 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]."&nbsp;&lt;{$emails[$focus->inbound_email_id]}&gt;");
}
$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();
?>

View File

@@ -0,0 +1,225 @@
<!--
/*********************************************************************************
* 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".
********************************************************************************/
/*********************************************************************************
********************************************************************************/
-->
<!-- BEGIN: main -->
{ERROR_STRING}
<form name="EditView" method="POST" action="index.php">
<input type="hidden" name="module" value="EmailMarketing">
<input type="hidden" name="record" value="{ID}">
<input type="hidden" name="action">
<input type="hidden" name="campaign_id" value="{CAMPAIGN_ID}">
<input type="hidden" name="return_module" value="{RETURN_MODULE}">
<input type="hidden" name="return_id" value="{RETURN_ID}">
<input type="hidden" name="return_action" value="{RETURN_ACTION}">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<input title="{APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{APP.LBL_SAVE_BUTTON_KEY}" class="button" onclick="this.form.action.value='Save'; return verify_data(this.form,'EditView')" type="submit" name="button" value=" {APP.LBL_SAVE_BUTTON_LABEL} " >
<input title="{APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="this.form.action.value='{RETURN_ACTION}'; this.form.module.value='{RETURN_MODULE}'; this.form.record.value='{RETURN_ID}'" type="submit" name="button" value=" {APP.LBL_CANCEL_BUTTON_LABEL} ">
</td>
<td align="right" nowrap><span class="required">{APP.LBL_REQUIRED_SYMBOL}</span> {APP.NTC_REQUIRED}</td>
<td align='right'>{ADMIN_EDIT}</td>
</tr>
</table>
<div class="edit view">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="15%" scope="row"><slot>{MOD.LBL_NAME} <span class="required">{APP.LBL_REQUIRED_SYMBOL}</span></slot></td>
<td width="35%" ><slot><input name='name' {DISABLED} tabindex='1' size='25' maxlength='25' type="text" value="{NAME}"></slot></td>
<td scope="row"><slot>{MOD.LBL_STATUS_TEXT} <span class="required">{APP.LBL_REQUIRED_SYMBOL}</span></slot></td>
<td ><slot><select tabindex='2' id='status' name='status'>{STATUS_OPTIONS}</select></slot></td>
</tr>
<tr>
<td scope="row"><slot>{MOD.LBL_FROM_MAILBOX_NAME}</slot></td>
<td ><slot><select id='inbound_email_id' tabindex='1' onchange='set_from_email_and_name(this);' name='inbound_email_id'>{MAILBOXES}</select>&nbsp;<SPAN id='from_email' style="font-style:italic">{DEFAULT_FROM_EMAIL}</SPAN></slot></td>
<td scope="row"><slot>{MOD.LBL_FROM_NAME} <span class="required">{APP.LBL_REQUIRED_SYMBOL}</span></slot></td>
<td class="datafield"><slot><input name='from_name' id='from_name' tabindex='2' size='25' maxlength='25' type="text" value="{FROM_NAME}"></slot></td>
</tr>
<tr>
<td scope="row"><slot>{MOD.LBL_START_DATE_TIME} <span class="required">{APP.LBL_REQUIRED_SYMBOL}</span></slot></td>
<td class="datafield"><slot><table cellpadding="0" cellspacing="0"><tr><td nowrap><input name='date_start' onblur="parseDate(this, '{CALENDAR_DATEFORMAT}');" id='jscal_field' size='11' tabindex='1' maxlength='10' type="text" value="{DATE_START}"> <img src="index.php?entryPoint=getImage&themeName={THEME}&imageName=jscalendar.gif" alt="{CALENDAR_DATEFORMAT}" id="jscal_trigger" align="absmiddle">&nbsp;</td>
<td nowrap><input type="text" size='5' maxlength='5' name='time_start' tabindex="1" value="{TIME_START}"/>{TIME_MERIDIEM}</td></tr><tr><td nowrap><span class="dateFormat">{USER_DATEFORMAT}</span></td><td nowrap><span class="dateFormat">{TIME_FORMAT}</span></td></tr></table></slot></td>
<td scope="row"><slot>{MOD.LBL_TEMPLATE} <span class="required">{APP.LBL_REQUIRED_SYMBOL}</span></slot></td>
<td class="datafield">
<slot>
<select id="template_id" name='template_id' tabindex='2' onchange="show_edit_template_link(this);">{EMAIL_TEMPLATE_OPTIONS}</select>
&nbsp;
<A href="javascript:open_email_template_form()" >{MOD.LBL_CREATE_EMAIL_TEMPLATE}</A>
<span name='edit_template' id='edit_template' style="{EDIT_TEMPLATE}">&nbsp;<A href="javascript:edit_email_template_form()" >{MOD.LBL_EDIT_EMAIL_TEMPLATE}</A>
</span>
</slot>
</td>
</tr>
<tr>
<td width="15%" scope="row"><slot>{MOD.LBL_MESSAGE_FOR} <span class="required">{APP.LBL_REQUIRED_SYMBOL}</span></slot></td>
<td width="35%" class="datafield"><slot><input type="checkbox" tabindex='1' onclick="toggle_message_for(this);" id="all_prospect_lists" {ALL_PROSPECT_LISTS_CHECKED} name='all_prospect_lists'>{MOD.LBL_ALL_PROSPECT_LISTS}</slot></td>
<td scope="row"><slot>&nbsp;</slot></td>
<td><slot>&nbsp;</slot></td>
</tr>
<tr>
<td scope="row"><slot>&nbsp;</slot></td>
<td width="35%" class="datafield"><slot><select {MESSAGE_FOR_DISABLED} tabindex='1' multiple size="5" id="message_for" name='message_for[]'>{SCOPE_OPTIONS}</select></slot></td>
<td scope="row"><slot>&nbsp;</slot></td>
<td><slot>&nbsp;</slot></td>
</tr>
<tr>
<td scope="row"><slot>&nbsp;</slot></td>
<td><slot>&nbsp;</slot></td>
<td scope="row"><slot>&nbsp;</slot></td>
<td><slot>&nbsp;</slot></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</form>
<script type="text/javascript">
Calendar.setup ({
inputField : "jscal_field", ifFormat : "{CALENDAR_DATEFORMAT}", showsTime : false, button : "jscal_trigger", singleClick : true, step : 1
});
function show_edit_template_link(field) {
var field1=document.getElementById('edit_template');
if (field.selectedIndex == 0) {
field1.style.visibility="hidden";
}
else {
field1.style.visibility="visible";
}
}
function refresh_email_template_list(template_id, template_name) {
var field=document.getElementById('template_id');
var bfound=0;
for (var i=0; i < field.options.length; i++) {
if (field.options[i].value == template_id) {
if (field.options[i].selected==false) {
field.options[i].selected=true;
}
field.options[i].text = template_name;
bfound=1;
}
}
//add item to selection list.
if (bfound == 0) {
var newElement=document.createElement('option');
newElement.text=template_name;
newElement.value=template_id;
field.options.add(newElement);
newElement.selected=true;
}
//enable the edit button.
var field1=document.getElementById('edit_template');
field1.style.visibility="visible";
}
function open_email_template_form() {
URL="index.php?module=EmailTemplates&action=EditView&campaign_id={CAMPAIGN_ID}";
URL+="&show_js=1";
windowName = 'email_template';
windowFeatures = 'width=800' + ',height=600' + ',resizable=1,scrollbars=1';
win = window.open(URL, windowName, windowFeatures);
if(window.focus)
{
// put the focus on the popup if the browser supports the focus() method
win.focus();
}
}
function edit_email_template_form() {
var field=document.getElementById('template_id');
URL="index.php?module=EmailTemplates&action=EditView&campaign_id={CAMPAIGN_ID}";
if (field.options[field.selectedIndex].value != 'undefined') {
URL+="&record="+field.options[field.selectedIndex].value;
}
URL+="&show_js=1";
windowName = 'email_template';
windowFeatures = 'width=800' + ',height=600' + ',resizable=1,scrollbars=1';
win = window.open(URL, windowName, windowFeatures);
if(window.focus)
{
// put the focus on the popup if the browser supports the focus() method
win.focus();
}
}
function toggle_message_for(all_prospects_checkbox) {
message_for = document.getElementById('message_for');
if (all_prospects_checkbox.checked) {
message_for.disabled=true;
} else {
message_for.disabled=false;
}
}
var from_emails=new Array({FROM_EMAILS});
function set_from_email_and_name(mailbox) {
from_email_span = document.getElementById('from_email');
from_name = document.getElementById('from_name');
for (i=0;i<=from_emails.length; i++) {
if ((mailbox.value=='' && from_emails[i] =='EMPTY') || from_emails[i] == mailbox.value) {
var j=i+1;
from_email_span.innerHTML=from_emails[j+1];
if (from_name.value=='') {
from_name.value=from_emails[j];
}
return;
}
}
}
</script>
{JAVASCRIPT}
<!-- END: main -->

View 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();
?>

View 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;
}
}
?>

View 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
View 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
View 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);
}
?>

View File

@@ -0,0 +1,64 @@
<!--
/*********************************************************************************
* 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".
********************************************************************************/
/*********************************************************************************
********************************************************************************/
-->
<!-- BEGIN: main -->
<table cellpadding="0" cellspacing="0" width="100%" border="0" class="list view">
<tr height="20" >
<td scope="col" width="25%" >{MOD.LBL_LIST_NAME}</td>
<td scope="col" width="15%" >{MOD.LBL_LIST_DATE_START}</td>
<td scope="col" width="15%" >{MOD.LBL_LIST_STATUS}</td>
<td colspan="2" scope="col" width="45%" >{MOD.LBL_LIST_TEMPLATE_NAME}</td>
</tr>
<!-- BEGIN: row -->
<tr height="20" class="{ROW_COLOR}S1">
<td scope="row" valign=TOP><a href="{URL_PREFIX}index.php?action=EditView&module=EmailMarketing&record={EMAILMARKETING.ID}" >{EMAILMARKETING.NAME}</a></td>
<td scope="row" valign=TOP>{EMAILMARKETING.DATE_START}</td>
<td scope="row" valign=TOP>{EMAILMARKETING.STATUS}</td>
<td scope="row" valign=TOP><a href="{URL_PREFIX}index.php?action=DetailView&module=EmailTemplates&record={EMAILMARKETING.TEMPLATE_ID}" >{EMAILMARKETING.TEMPLATE_NAME}</a></td>
<td nowrap align="right" valign=TOP><a class="listViewTdToolsS1" href="{URL_PREFIX}index.php?action=EditView&module=EmailMarketing&record={EMAILMARKETING.ID}{RETURN_URL}">{EDIT_INLINE_PNG}</a>&nbsp;<a class="listViewTdToolsS1" href="{URL_PREFIX}index.php?action=EditView&module=EmailMarketing&record={EMAILMARKETING.ID}{RETURN_URL}">{APP.LNK_EDIT}</a> &nbsp; <a class="listViewTdToolsS1" href="{URL_PREFIX}index.php?action=Delete&module=EmailMarketing&record={EMAILMARKETING.ID}{RETURN_URL}">{REMOVE_INLINE_PNG}</a>&nbsp;<a class="listViewTdToolsS1" href="{URL_PREFIX}index.php?action=Delete&module=EmailMarketing&record={EMAILMARKETING.ID}{RETURN_URL}">{APP.LNK_REMOVE}</a></td>
</tr>
<!-- END: row -->
</table>
<!-- END: main -->

View 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");
?>

View 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,
),
);
?>

View 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',
);
?>

View 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',
);
?>

View 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(),
),
)
);
?>

View 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'
),
),
);
?>

View 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'
),
),
);
?>

View 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'),
),
);
?>