• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP EmailMarketing类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中EmailMarketing的典型用法代码示例。如果您正苦于以下问题:PHP EmailMarketing类的具体用法?PHP EmailMarketing怎么用?PHP EmailMarketing使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了EmailMarketing类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: testget_all_prospect_lists

 public function testget_all_prospect_lists()
 {
     $emailMarketing = new EmailMarketing();
     //execute the method and verify that it retunrs expected results
     $expected = "select prospect_lists.* from prospect_lists  left join prospect_list_campaigns on prospect_list_campaigns.prospect_list_id=prospect_lists.id where prospect_list_campaigns.deleted=0 and prospect_list_campaigns.campaign_id='' and prospect_lists.deleted=0 and prospect_lists.list_type not like 'exempt%'";
     $actual = $emailMarketing->get_all_prospect_lists();
     $this->assertSame($expected, $actual);
 }
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:8,代码来源:EmailMarketingTest.php


示例2: create_marketing_summary

function create_marketing_summary($focus)
{
    global $mod_strings, $app_strings;
    $colorclass = '';
    //create new marketing button input
    $new_mrkt_input = "<input id='wiz_new_mrkt_button' name='SUBMIT' ";
    $new_mrkt_input .= "onclick=\"this.form.return_module.value='Campaigns';";
    $new_mrkt_input .= "this.form.module.value='Campaigns';";
    $new_mrkt_input .= "this.form.record.value='';";
    $new_mrkt_input .= "this.form.return_module.value='Campaigns';";
    $new_mrkt_input .= "this.form.action.value='WizardMarketing';";
    $new_mrkt_input .= "this.form.return_action.value='WizardHome';";
    $new_mrkt_input .= "this.form.direct_step.value='1';";
    $new_mrkt_input .= "this.form.campaign_id.value='" . $focus->id . "';";
    $new_mrkt_input .= "this.form.return_id.value='" . $focus->id . "';\" ";
    $new_mrkt_input .= "class='button' value='" . $mod_strings['LBL_CREATE_NEW_MARKETING_EMAIL'] . "' type='submit'>";
    //create marketing email table
    $mrkt_tbl = '';
    $focus->load_relationship('emailmarketing');
    $mrkt_lists = $focus->emailmarketing->get();
    $mrkt_tbl = "<p><table  class='list view' width='100%' border='0' cellspacing='1' cellpadding='1'>";
    $mrkt_tbl .= "<tr class='detail view'><td colspan='3'><h4> " . $mod_strings['LBL_WIZ_MARKETING_TITLE'] . " </h4></td>" . "<td colspan=2 align='right'>{$new_mrkt_input}</td></tr>";
    $mrkt_tbl .= "<tr  class='listViewHRS1'><td scope='col' width='15%'><b>" . $mod_strings['LBL_MRKT_NAME'] . "</b></td><td width='15%' scope='col'><b>" . $mod_strings['LBL_FROM_MAILBOX_NAME'] . "</b></td><td width='15%' scope='col'><b>" . $mod_strings['LBL_STATUS_TEXT'] . "</b></td><td scope='col' colspan=2>&nbsp;</td></tr>";
    if (count($mrkt_lists) > 0) {
        $mrkt_focus = new EmailMarketing();
        foreach ($mrkt_lists as $mrkt_id) {
            $mrkt_focus->retrieve($mrkt_id);
            //create send test marketing button input
            $test_mrkt_input = "<input id='wiz_new_mrkt_button' name='SUBMIT'  ";
            $test_mrkt_input .= "onclick=\"this.form.return_module.value='Campaigns'; ";
            $test_mrkt_input .= "this.form.module.value='Campaigns'; ";
            $test_mrkt_input .= "this.form.record.value='';";
            $test_mrkt_input .= "this.form.return_module.value='Campaigns'; ";
            $test_mrkt_input .= "this.form.action.value='QueueCampaign'; ";
            $test_mrkt_input .= "this.form.return_action.value='WizardHome'; ";
            $test_mrkt_input .= "this.form.wiz_mass.value='" . $mrkt_focus->id . "'; ";
            $test_mrkt_input .= "this.form.mode.value='test'; ";
            $test_mrkt_input .= "this.form.direct_step.value='1'; ";
            $test_mrkt_input .= "this.form.record.value='" . $focus->id . "'; ";
            $test_mrkt_input .= "this.form.return_id.value='" . $focus->id . "';\" ";
            $test_mrkt_input .= "class='button' value='" . $mod_strings['LBL_TEST_BUTTON_LABEL'] . "' type='submit'>";
            //create send marketing button input
            $send_mrkt_input = "<input id='wiz_new_mrkt_button' name='SUBMIT'  ";
            $send_mrkt_input .= "onclick=\"this.form.return_module.value='Campaigns'; ";
            $send_mrkt_input .= "this.form.module.value='Campaigns'; ";
            $send_mrkt_input .= "this.form.record.value='';";
            $send_mrkt_input .= "this.form.return_module.value='Campaigns'; ";
            $send_mrkt_input .= "this.form.action.value='QueueCampaign'; ";
            $send_mrkt_input .= "this.form.return_action.value='WizardHome'; ";
            $send_mrkt_input .= "this.form.wiz_mass.value='" . $mrkt_focus->id . "'; ";
            $send_mrkt_input .= "this.form.mode.value='send'; ";
            $send_mrkt_input .= "this.form.direct_step.value='1'; ";
            $send_mrkt_input .= "this.form.record.value='" . $focus->id . "'; ";
            $send_mrkt_input .= "this.form.return_id.value='" . $focus->id . "';\" ";
            $send_mrkt_input .= "class='button' value='" . $mod_strings['LBL_SEND_EMAIL'] . "' type='submit'>";
            if ($colorclass == "class='evenListRowS1'") {
                $colorclass = "class='oddListRowS1'";
            } else {
                $colorclass = "class='evenListRowS1'";
            }
            if (isset($mrkt_focus->name) && !empty($mrkt_focus->name)) {
                $mrkt_tbl .= "<tr {$colorclass}>";
                $mrkt_tbl .= "<td scope='row' width='40%'><a href='index.php?action=WizardMarketing&module=Campaigns&return_module=Campaigns&return_action=WizardHome";
                $mrkt_tbl .= "&return_id=" . $focus->id . "&campaign_id=" . $focus->id . "&record=" . $mrkt_focus->id . "'>" . $mrkt_focus->name . "</a></td>";
                $mrkt_tbl .= "<td scope='row' width='25%'>" . $mrkt_focus->from_name . "</td>";
                $mrkt_tbl .= "<td scope='row' width='15%'>" . $mrkt_focus->status . "</td>";
                $mrkt_tbl .= "<td scope='row' width='10%'>{$test_mrkt_input}</td>";
                $mrkt_tbl .= "<td scope='row' width='10%'>{$send_mrkt_input}</td>";
                $mrkt_tbl .= "</tr>";
            }
        }
    } else {
        $mrkt_tbl .= "<tr><td colspan='3'>" . $mod_strings['LBL_NONE'] . "</td></tr>";
    }
    $mrkt_tbl .= "</table></p>";
    return $mrkt_tbl;
}
开发者ID:netconstructor,项目名称:sugarcrm_dev,代码行数:77,代码来源:WizardHome.php


示例3: get_number_seperators

}
if (isset($_REQUEST['return_action'])) {
    $ss->assign("RETURN_ACTION", $_REQUEST['return_action']);
}
if (isset($_REQUEST['return_id'])) {
    $ss->assign("RETURN_ID", $_REQUEST['return_id']);
}
// handle Create $module then Cancel
$ss->assign('CAMPAIGN_ID', $campaign_focus->id);
$seps = get_number_seperators();
$ss->assign("NUM_GRP_SEP", $seps[0]);
$ss->assign("DEC_SEP", $seps[1]);
/**************************** MARKETING UI DIV Stuff *******************/
//$campaign_focus->load_relationship('emailmarketing');
//$mrkt_ids = $campaign_focus->emailmarketing->get();
$mrkt_focus = new EmailMarketing();
//if record param exists and it is not empty, then retrieve this bean
if (isset($_REQUEST['record']) and !empty($_REQUEST['record'])) {
    $mrkt_focus->retrieve($_REQUEST['record']);
} else {
    //check to see if this campaign has an email marketing already attached, and if so, create duplicate
    $campaign_focus->load_relationship('emailmarketing');
    $mrkt_lists = $campaign_focus->emailmarketing->get();
    if (!empty($mrkt_lists)) {
        //reverse array so we always use the most recent one:
        $mrkt_lists = array_reverse($mrkt_lists);
        $mrkt_focus->retrieve($mrkt_lists[0]);
        $mrkt_focus->id = '';
        $mrkt_focus->name = $mod_strings['LBL_COPY_OF'] . ' ' . $mrkt_focus->name;
    }
}
开发者ID:aldridged,项目名称:gtg-sugar,代码行数:31,代码来源:WizardMarketing.php


示例4: verify_campaign

 function verify_campaign($marketing_id)
 {
     if (!isset($this->verified_email_marketing_ids[$marketing_id])) {
         if (!class_exists('EmailMarketing')) {
         }
         $email_marketing = new EmailMarketing();
         $ret = $email_marketing->retrieve($marketing_id);
         if (empty($ret)) {
             $GLOBALS['log']->fatal('Error retrieving marketing message for the email campaign. marketing_id = ' . $marketing_id);
             return false;
         }
         //verify the email template.
         if (empty($email_marketing->template_id)) {
             $GLOBALS['log']->fatal('Error retrieving template for the email campaign. marketing_id = ' . $marketing_id);
             return false;
         }
         if (!class_exists('EmailTemplate')) {
         }
         $emailtemplate = new EmailTemplate();
         $ret = $emailtemplate->retrieve($email_marketing->template_id);
         if (empty($ret)) {
             $GLOBALS['log']->fatal('Error retrieving template for the email campaign. template_id = ' . $email_marketing->template_id);
             return false;
         }
         if (empty($emailtemplate->subject) and empty($emailtemplate->body) and empty($emailtemplate->body_html)) {
             $GLOBALS['log']->fatal('Email template is empty. email_template_id=' . $email_marketing->template_id);
             return false;
         }
     }
     $this->verified_email_marketing_ids[$marketing_id] = 1;
     return true;
 }
开发者ID:jgera,项目名称:sugarcrm_dev,代码行数:32,代码来源:EmailMan.php


示例5: elseif

    if ($_REQUEST['wiz_home_next_step'] == 3) {
        //user has chosen to save and schedule this campaign for email
        $master = 'send';
    } elseif ($_REQUEST['wiz_home_next_step'] == 2) {
        //user has chosen to save and send this campaign in test mode
        $master = 'test';
    } else {
        //user has chosen to simply save
        $master = 'save';
    }
} else {
    //default to just saving and exiting wizard
    $master = 'save';
}
$prefix = 'wiz_step3_';
$marketing = new EmailMarketing();
if (isset($_REQUEST['record']) && !empty($_REQUEST['record'])) {
    $marketing->retrieve($_REQUEST['record']);
}
if (!$marketing->ACLAccess('Save')) {
    ACLController::displayNoAccess(true);
    sugar_cleanup(true);
}
if (!empty($_REQUEST['assigned_user_id']) && $marketing->assigned_user_id != $_REQUEST['assigned_user_id'] && $_POST['assigned_user_id'] != $current_user->id) {
    $check_notify = TRUE;
} else {
    $check_notify = FALSE;
}
foreach ($_REQUEST as $key => $val) {
    if (strstr($key, $prefix) && strpos($key, $prefix) == 0) {
        $newkey = substr($key, strlen($prefix));
开发者ID:NALSS,项目名称:SuiteCRM,代码行数:31,代码来源:WizardMarketingSave.php


示例6: EmailMarketing

 * 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']);
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:31,代码来源:Delete.php


示例7: array

        $query .= " and prospect_lists.deleted=0 ";
        $query .= " and prospect_lists.list_type='test' ";
        $query .= " and plc.deleted=0 ";
        $query .= " and plc.campaign_id='{$campaign_id}'";
        $query .= " and email_marketing.campaign_id='{$campaign_id}'";
        $query .= " and email_marketing.deleted=0 ";
        $query .= " and email_marketing.all_prospect_lists=0 ";
        $seed = array();
        $result = $focus->db->query($query);
        while (($row = $focus->db->fetchByAssoc($result)) != null) {
            $bean = new EmailMarketing();
            $bean->retrieve($row['email_marketing_id']);
            $bean->mode = 'test';
            $seed[] = $bean;
        }
        $query = " select email_marketing.id email_marketing_id from email_marketing ";
        $query .= " WHERE email_marketing.campaign_id='{$campaign_id}'";
        $query .= " and email_marketing.deleted=0 ";
        $query .= " and email_marketing.all_prospect_lists=1 ";
        $result = $focus->db->query($query);
        while (($row = $focus->db->fetchByAssoc($result)) != null) {
            $bean = new EmailMarketing();
            $bean->retrieve($row['email_marketing_id']);
            $bean->mode = 'test';
            $seed[] = $bean;
        }
        $ListView->processListView($seed, "main", "EMAILMARKETING");
    } else {
        $ListView->processListView($focus, "main", "EMAILMARKETING");
    }
}
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:31,代码来源:Schedule.php


示例8: EmailMarketing

 *
 * 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 and "Supercharged by SuiteCRM" logo. If the display of the logos is not
 * reasonably feasible for  technical reasons, the Appropriate Legal Notices must
 * display the words  "Powered by SugarCRM" and "Supercharged by SuiteCRM".
 ********************************************************************************/

global $db;

$campaignId = $db->quote($_POST['campaignId']);
$marketingId = $db->quote($_POST['marketingId']);
if(!empty($_POST['templateId'])) {
    $templateId = $db->quote($_POST['templateId']);
}

//$campaign = new Campaign();
//$campaign->retrieve($campaignId);

$marketing = new EmailMarketing();
$marketing->retrieve($marketingId);
$marketing->campaign_id = $campaignId;
if(!empty($_POST['templateId'])) {
    $marketing->template_id = $templateId;
}
$marketing->save();

$_SESSION['campaignWizardSelectedMarketingId'] = $marketing->id;

echo json_encode($_POST);
开发者ID:auf,项目名称:crm_auf_org,代码行数:30,代码来源:WizardCampaignSave.php


示例9: EmailMarketing

/*********************************************************************************
 * 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");
$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']);
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:31,代码来源:DetailView.php


示例10: elseif

    if ($_REQUEST['wiz_home_next_step'] == 3) {
        //user has chosen to save and schedule this campaign for email
        $master = 'send';
    } elseif ($_REQUEST['wiz_home_next_step'] == 2) {
        //user has chosen to save and send this campaign in test mode
        $master = 'test';
    } else {
        //user has chosen to simply save
        $master = 'save';
    }
} else {
    //default to just saving and exiting wizard
    $master = 'save';
}
$prefix = 'wiz_step3_';
$marketing = new EmailMarketing();
if (isset($_REQUEST['record']) && !empty($_REQUEST['record'])) {
    $marketing->retrieve($_REQUEST['record']);
} else {
    if (!empty($_SESSION['campaignWizard'][$_REQUEST['campaign_id']]['defaultSelectedMarketingId'])) {
        $marketing->retrieve($_SESSION['campaignWizard'][$_REQUEST['campaign_id']]['defaultSelectedMarketingId']);
    }
}
if (!$marketing->ACLAccess('Save')) {
    ACLController::displayNoAccess(true);
    sugar_cleanup(true);
}
if (!empty($_REQUEST['assigned_user_id']) && $marketing->assigned_user_id != $_REQUEST['assigned_user_id'] && $_POST['assigned_user_id'] != $current_user->id) {
    $check_notify = TRUE;
} else {
    $check_notify = FALSE;
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:31,代码来源:WizardMarketingSave.php


示例11: get_number_seperators

if (isset($_REQUEST['return_module'])) $ss->assign("RETURN_MODULE", $_REQUEST['return_module']);
if (isset($_REQUEST['return_action'])) $ss->assign("RETURN_ACTION", $_REQUEST['return_action']);
if (isset($_REQUEST['return_id'])) $ss->assign("RETURN_ID", $_REQUEST['return_id']);
// handle Create $module then Cancel
$ss->assign('CAMPAIGN_ID', $campaign_focus->id);

$seps = get_number_seperators();
$ss->assign("NUM_GRP_SEP", $seps[0]);
$ss->assign("DEC_SEP", $seps[1]);


/**************************** MARKETING UI DIV Stuff *******************/
//$campaign_focus->load_relationship('emailmarketing');
//$mrkt_ids = $campaign_focus->emailmarketing->get();

$mrkt_focus = new EmailMarketing();

//override marketing by session stored selection earlier..

if(isset($_REQUEST['func']) && $_REQUEST['func'] == 'createEmailMarketing') {
    unset($_SESSION['campaignWizardSelectedMarketingId']);
}
else {
    //check to see if this campaign has an email marketing already attached, and if so, create duplicate
    $campaign_focus->load_relationship('emailmarketing');
    $mrkt_lists = $campaign_focus->emailmarketing->get();
}

if(!empty($_SESSION['campaignWizardSelectedMarketingId']) && !in_array($_SESSION['campaignWizardSelectedMarketingId'], $mrkt_lists)) {
    unset($_SESSION['campaignWizardSelectedMarketingId']);
}
开发者ID:auf,项目名称:crm_auf_org,代码行数:31,代码来源:WizardMarketing.php


示例12: array

/**
 * To make your changes upgrade safe create a file called leadCapture_override.php and place the changes there
 */
$users = array('PUT A RANDOM KEY FROM THE WEBSITE HERE' => array('name' => 'PUT THE USER_NAME HERE', 'pass' => 'PUT THE USER_HASH FOR THE RESPECTIVE USER HERE'));
if (isset($_POST['campaign_id']) && !empty($_POST['campaign_id'])) {
    //adding the client ip address
    $_POST['client_id_address'] = query_client_ip();
    $campaign_id = $_POST['campaign_id'];
    $campaign = new Campaign();
    $camp_query = "select name,id from campaigns where id='{$campaign_id}'";
    $camp_query .= " and deleted=0";
    $camp_result = $campaign->db->query($camp_query);
    $camp_data = $campaign->db->fetchByAssoc($camp_result);
    // Bug 41292 - have to select marketing_id for new lead
    $db = DBManagerFactory::getInstance();
    $marketing = new EmailMarketing();
    $marketing_query = $marketing->create_new_list_query('date_start desc, date_modified desc', "campaign_id = '{$campaign_id}' and status = 'active' and date_start < " . $db->convert('', 'today'), array('id'));
    $marketing_result = $db->limitQuery($marketing_query, 0, 1, true);
    $marketing_data = $db->fetchByAssoc($marketing_result);
    // .Bug 41292
    if (isset($_REQUEST['assigned_user_id']) && !empty($_REQUEST['assigned_user_id'])) {
        $current_user = new User();
        $current_user->retrieve($_REQUEST['assigned_user_id']);
    }
    if (isset($camp_data) && $camp_data != null) {
        $leadForm = new LeadFormBase();
        $lead = new Lead();
        $prefix = '';
        if (!empty($_POST['prefix'])) {
            $prefix = $_POST['prefix'];
        }
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:31,代码来源:WebToLeadCapture.php


示例13: EmailMarketing

 * these Appropriate Legal Notices must retain the display of the "Powered by
 * SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
 * reasonably feasible for  technical reasons, the Appropriate Legal Notices must
 * display the words  "Powered by SugarCRM" and "Supercharged by SuiteCRM".
 ********************************************************************************/
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'])) {
    SugarApplication::redirect('index.php?action=WizardMarketing&module=Campaigns&return_module=Campaigns&return_action=WizardHome&return_id=' . $_REQUEST['parent_id'] . '&campaign_id=' . $_REQUEST['parent_id'] . '&marketing_id=' . $_REQUEST['record'] . '&func=editEmailMarketing');
    return;
    $focus->retrieve($_REQUEST['record']);
}
if (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
    $focus->id = "";
}
global $theme;
$GLOBALS['log']->info("EmailMarketing Edit View");
$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']);
}
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:31,代码来源:EditView.php


示例14: foreach

}
if (isset($_REQUEST['from_wiz'])) {
    $from_wiz = true;
}
//if campaign status is 'sending' disallow this step.
if (!empty($campaign->status) && $campaign->status == 'sending') {
    $err_messages[] = $mod_strings['ERR_SENDING_NOW'];
}
$current_date = $campaign->db->now();
//start scheduling now.....
foreach ($_POST['mass'] as $message_id) {
    //fetch email marketing definition.
    if (!class_exists('EmailMarketing')) {
        require_once 'modules/EmailMarketing/EmailMarketing.php';
    }
    $marketing = new EmailMarketing();
    $marketing->retrieve($message_id);
    //make sure that the marketing message has a mailbox.
    //
    if (empty($marketing->inbound_email_id)) {
        echo "<p>";
        echo "<h4>{$mod_strings['ERR_NO_MAILBOX']}</h4>";
        echo "<BR><a href='index.php?module=EmailMarketing&action=EditView&record={$marketing->id}'>{$marketing->name}</a>";
        echo "</p>";
        sugar_die('');
    }
    global $timedate;
    $mergedvalue = $timedate->merge_date_time($marketing->date_start, $marketing->time_start);
    if ($test) {
        $send_date_time = $timedate->getNow()->get("-60 seconds")->asDb();
    } else {
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:31,代码来源:QueueCampaign.php


示例15: EmailMarketing

 * 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);
开发者ID:aldridged,项目名称:gtg-sugar,代码行数:31,代码来源:EditView.php


示例16: EmailMarketing

 }
 //fetch user that scheduled the campaign.
 if (empty($current_user) or $row['user_id'] != $current_user->id) {
     $current_user->retrieve($row['user_id']);
 }
 if (!$emailman->verify_campaign($row['marketing_id'])) {
     $GLOBALS['log']->fatal('Error verifying templates for the campaign, exiting');
     continue;
 }
 //verify the email template too..
 //find the template associated with marketing message. make sure that template has a subject and
 //a non-empty body
 if (!isset($template_status[$row['marketing_id']])) {
     if (!class_exists('EmailMarketing')) {
     }
     $current_emailmarketing = new EmailMarketing();
     $current_emailmarketing->retrieve($row['marketing_id']);
     if (!class_exists('EmailTemplate')) {
     }
     $current_emailtemplate = new EmailTemplate();
     $current_emailtemplate->retrieve($current_emailmarketing->template_id);
 }
 //acquire a lock.
 //if the database does not support repeatable read isolation by default, we might get data that does not meet
 //the criteria in the original query, and we care most about the in_queue_date and process_date_time,
 //if they are null or in past(older than 24 horus) then we are okay.
 $lock_query = "UPDATE emailman SET in_queue=1, in_queue_date=" . $db->now() . " WHERE id = " . intval($row['id']);
 $lock_query .= " AND (in_queue ='0' OR in_queue IS NULL OR ( in_queue ='1' AND in_queue_date <= " . $db->convert($db->quoted($timedate->fromString("-1 day")->asDb()), "datetime") . "))";
 //if the query fails to execute.. terminate campaign email process.
 $lock_result = $db->query($lock_query, true, 'Error acquiring a lock for emailman entry.');
 $lock_count = $db->getAffectedRowCount($lock_result);
开发者ID:NALSS,项目名称:SuiteCRM,代码行数:31,代码来源:EmailManDelivery.php


示例17: EmailMarketing

    if (!$marketingId) {
        if (!empty($_SESSION['campaignWizard'][$campaignId]['defaultSelectedMarketingId']) && $func != 'createEmailMarketing') {
            $marketingId = $_SESSION['campaignWizard'][$campaignId]['defaultSelectedMarketingId'];
        } else {
            if ($func != 'createEmailMarketing') {
                $marketing = new EmailMarketing();
                $marketing->save();
                $marketingId = $marketing->id;
            }
        }
    }
    if (!empty($_POST['templateId'])) {
        $templateId = $db->quote($_POST['templateId']);
    }
    //$campaign = new Campaign();
    //$campaign->retrieve($campaignId);
    $marketing = new EmailMarketing();
    $marketing->retrieve($marketingId);
    $marketing->campaign_id = $campaignId;
    if (!empty($_POST['templateId'])) {
        $marketing->template_id = $templateId;
    }
    if ($func != 'createEmailMarketing') {
        $marketing->save();
    }
    $_SESSION['campaignWizard'][$campaignId]['defaultSelectedMarketingId'] = $marketing->id;
    $return = $_POST;
    $return['templateValidationMessages'] = getTemplateValidationMessages($marketing->template_id);
    $return['marketingValidationMessages'] = $marketing->validate();
    echo json_encode($return);
}
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:31,代码来源:WizardCampaignSave.php



注:本文中的EmailMarketing类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP EmailMessage类代码示例发布时间:2022-05-23
下一篇:
PHP EmailFolder类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap