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

PHP ProspectList类代码示例

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

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



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

示例1: action_addToProspectList

 protected function action_addToProspectList()
 {
     global $beanList;
     require_once 'modules/Relationships/Relationship.php';
     require_once 'modules/ProspectLists/ProspectList.php';
     $prospectList = new ProspectList();
     $prospectList->retrieve($_REQUEST['prospect_id']);
     $module = new $beanList[$this->bean->report_module]();
     $key = Relationship::retrieve_by_modules($this->bean->report_module, 'ProspectLists', $GLOBALS['db']);
     if (!empty($key)) {
         $sql = $this->bean->build_report_query();
         $result = $this->bean->db->query($sql);
         $beans = array();
         while ($row = $this->bean->db->fetchByAssoc($result)) {
             if (isset($row[$module->table_name . '_id'])) {
                 $beans[] = $row[$module->table_name . '_id'];
             }
         }
         if (!empty($beans)) {
             foreach ($prospectList->field_defs as $field => $def) {
                 if ($def['type'] == 'link' && !empty($def['relationship']) && $def['relationship'] == $key) {
                     $prospectList->load_relationship($field);
                     $prospectList->{$field}->add($beans);
                 }
             }
         }
     }
     die;
 }
开发者ID:isrealconsulting,项目名称:ic-suite,代码行数:29,代码来源:controller.php


示例2: checkAccess

 public function checkAccess($thisReport)
 {
     require_once 'modules/ProspectLists/ProspectList.php';
     $newProspectList = new ProspectList();
     // fill with results:
     $newProspectList->load_relationships();
     $linkedFields = $newProspectList->get_linked_fields();
     $foundModule = false;
     foreach ($linkedFields as $linkedField => $linkedFieldData) {
         if ($newProspectList->{$linkedField}->_relationship->rhs_module == $thisReport->report_module) {
             $foundModule = true;
         }
     }
     return $foundModule ? true : false;
 }
开发者ID:ambientelivre,项目名称:GeneratorTargetList,代码行数:15,代码来源:ktargetlistexport.php


示例3: createProspectList

 public static function createProspectList($id = '', $aParams = array())
 {
     $time = mt_rand();
     $oProspectList = new ProspectList();
     $oProspectList->name = 'ProspectList' . $time;
     if (!empty($id)) {
         $oProspectList->id = $id;
     }
     if (!empty($aParams)) {
         foreach ($aParams as $key => $val) {
             $oProspectList->{$key} = $val;
         }
     }
     $oProspectList->save();
     self::$_aCreatedProspectLists[] = $oProspectList;
     self::$_aCreatedProspectListsIds[] = $oProspectList->id;
     return $oProspectList;
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:18,代码来源:SugarTestProspectListsUtilities.php


示例4: javascript

$ss->assign("SAVE_CONFIRM_MESSAGE", $mod_strings['LBL_CONFIRM_SEND_SAVE']);
$javascript = new javascript();
$javascript->setFormName('wizform');
$javascript->setSugarBean($mrkt_focus);
$javascript->addAllFields('');
echo $javascript->getScript();
/**************************** Final Step UI DIV *******************/
//Grab the prospect list of type default
$default_pl_focus = ' ';
$campaign_focus->load_relationship('prospectlists');
$prospectlists = $campaign_focus->prospectlists->get();
$pl_count = 0;
$pl_lists = 0;
if (!empty($prospectlists)) {
    foreach ($prospectlists as $prospect_id) {
        $pl_focus = new ProspectList();
        $pl_focus->retrieve($prospect_id);
        if ($pl_focus->list_type == 'default' || $pl_focus->list_type == 'seed') {
            $default_pl_focus = $pl_focus;
            // get count of all attached target types
            $pl_count = $default_pl_focus->get_entry_count();
        }
        $pl_lists = $pl_lists + 1;
    }
}
//if count is 0, then hide inputs and and print warning message
if ($pl_count == 0) {
    if ($pl_lists == 0) {
        //print no target list warning
        $ss->assign("WARNING_MESSAGE", $mod_strings['LBL_NO_TARGETS_WARNING']);
    } else {
开发者ID:aldridged,项目名称:gtg-sugar,代码行数:31,代码来源:WizardMarketing.php


示例5: process_subscriptions_from_request

function process_subscriptions_from_request($campaign_name)
{
    global $mod_strings;
    $pl_list = array();
    //process default target list
    $create_new = true;
    $pl_subs = new ProspectList($campaign_name);
    if (!empty($_REQUEST['wiz_step3_subscription_list_id'])) {
        //if subscription list is specified then attach
        $pl_subs->retrieve($_REQUEST['wiz_step3_subscription_list_id']);
        //check to see name matches the bean, if not, then the user has chosen to create new bean
        if ($pl_subs->name == $_REQUEST['wiz_step3_subscription_name']) {
            $pl_list[] = $pl_subs;
            $create_new = false;
        }
    }
    //create new bio if one was not retrieved succesfully
    if ($create_new) {
        //use default name if one has not been specified
        $name = $campaign_name . " " . $mod_strings['LBL_SUBSCRIPTION_LIST'];
        if (isset($_REQUEST['wiz_step3_subscription_name']) && !empty($_REQUEST['wiz_step3_subscription_name'])) {
            $name = $_REQUEST['wiz_step3_subscription_name'];
        }
        //if subscription list is not specified then create and attach default one
        $pl_subs->name = $name;
        $pl_subs->list_type = 'default';
        $pl_subs->assigned_user_id = $GLOBALS['current_user']->id;
        $pl_subs->save();
        $pl_list[] = $pl_subs;
    }
    //process exempt target list
    $create_new = true;
    $pl_un_subs = new ProspectList();
    if (!empty($_REQUEST['wiz_step3_unsubscription_list_id'])) {
        //if unsubscription list is specified then attach
        $pl_un_subs->retrieve($_REQUEST['wiz_step3_unsubscription_list_id']);
        //check to see name matches the bean, if not, then the user has chosen to create new bean
        if ($pl_un_subs->name == $_REQUEST['wiz_step3_unsubscription_name']) {
            $pl_list[] = $pl_un_subs;
            $create_new = false;
        }
    }
    //create new bean if one was not retrieved succesfully
    if ($create_new) {
        //use default name if one has not been specified
        $name = $campaign_name . " " . $mod_strings['LBL_UNSUBSCRIPTION_LIST'];
        if (isset($_REQUEST['wiz_step3_unsubscription_name']) && !empty($_REQUEST['wiz_step3_unsubscription_name'])) {
            $name = $_REQUEST['wiz_step3_unsubscription_name'];
        }
        //if unsubscription list is not specified then create and attach default one
        $pl_un_subs->name = $name;
        $pl_un_subs->list_type = 'exempt';
        $pl_un_subs->assigned_user_id = $GLOBALS['current_user']->id;
        $pl_un_subs->save();
        $pl_list[] = $pl_un_subs;
    }
    //process test target list
    $pl_test = new ProspectList();
    $create_new = true;
    if (!empty($_REQUEST['wiz_step3_test_list_id'])) {
        //if test list is specified then attach
        $pl_test->retrieve($_REQUEST['wiz_step3_test_list_id']);
        //check to see name matches the bean, if not, then the user has chosen to create new bean
        if ($pl_test->name == $_REQUEST['wiz_step3_test_name']) {
            $pl_list[] = $pl_test;
            $create_new = false;
        }
    }
    //create new bio if one was not retrieved succesfully
    if ($create_new) {
        //use default name if one has not been specified
        $name = $campaign_name . " " . $mod_strings['LBL_TEST_LIST'];
        if (isset($_REQUEST['wiz_step3_test_name']) && !empty($_REQUEST['wiz_step3_test_name'])) {
            $name = $_REQUEST['wiz_step3_test_name'];
        }
        //if test list is not specified then create and attach default one
        $pl_test->name = $name;
        $pl_test->list_type = 'test';
        $pl_test->assigned_user_id = $GLOBALS['current_user']->id;
        $pl_test->save();
        $pl_list[] = $pl_test;
    }
    return $pl_list;
}
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:84,代码来源:WizardNewsletterSave.php


示例6: ProspectList

        global $current_user;
        global $mod_strings;
        //if no prospect lists are attached, then lets create a subscription and unsubscription
        //default prospect lists as these are required for newsletters.
        //create subscription list
        $subs = new ProspectList();
        $subs->name = $focus->name . ' ' . $mod_strings['LBL_SUBSCRIPTION_LIST'];
        $subs->assigned_user_id = $current_user->id;
        $subs->list_type = "default";
        $subs->save();
        $focus->prospectlists->add($subs->id);
        //create unsubscription list
        $unsubs = new ProspectList();
        $unsubs->name = $focus->name . ' ' . $mod_strings['LBL_UNSUBSCRIPTION_LIST'];
        $unsubs->assigned_user_id = $current_user->id;
        $unsubs->list_type = "exempt";
        $unsubs->save();
        $focus->prospectlists->add($unsubs->id);
        //create unsubscription list
        $test_subs = new ProspectList();
        $test_subs->name = $focus->name . ' ' . $mod_strings['LBL_TEST_LIST'];
        $test_subs->assigned_user_id = $current_user->id;
        $test_subs->list_type = "test";
        $test_subs->save();
        $focus->prospectlists->add($test_subs->id);
    }
    //save new relationships
    $focus->save();
}
//finish newsletter processing
handleRedirect($focus->id, 'Campaigns');
开发者ID:rgauss,项目名称:sugarcrm_dev,代码行数:31,代码来源:Save.php


示例7: unsubscribe

    function unsubscribe($campaign, $focus) {
        $relationship = strtolower($focus->getObjectName()).'s';
        //--grab all the list for this campaign id
        $pl_qry ="select id, list_type from prospect_lists where id in (select prospect_list_id from prospect_list_campaigns ";
        $pl_qry .= "where campaign_id = '$campaign') and deleted = 0 ";
        $pl_qry_result = $focus->db->query($pl_qry);
        //build the array with list information
        $pl_arr = array();
        $GLOBALS['log']->debug("In Campaigns Util, about to run query: ".$pl_qry);
    	while ($row = $focus->db->fetchByAssoc($pl_qry_result)){$pl_arr[] = $row;}

        //retrieve lists that this user belongs to
        $curr_pl_qry ="select prospect_list_id, related_id  from prospect_lists_prospects ";
        $curr_pl_qry .="where related_id = '$focus->id'  and deleted = 0 ";
        $GLOBALS['log']->debug("In Campaigns Util, unsubscribe function about to run query: ".$curr_pl_qry );
        $curr_pl_qry_result = $focus->db->query($curr_pl_qry);

        //build the array with current user list information
        $curr_pl_arr = array();
        while ($row = $focus->db->fetchByAssoc($curr_pl_qry_result)){$curr_pl_arr[] = $row;}
         //check to see if user is already there in prospect list
        $already_here = 'false';
        $exempt_id = '';

        foreach($curr_pl_arr as $user_list){
        	foreach($pl_arr as $v){
        		//if list is exempt list
            	if($v['list_type'] == 'exempt'){
            		//save the exempt list id for later use
            		$exempt_id = $v['id'];
					//check to see if user is already in this exempt list
            		if(in_array($v['id'], $user_list)){
                		$already_here = 'true';
            		}

                	break 2;
            	}
        	}
        }

        //unsubscribe subscripted newsletter
        foreach($pl_arr as $subscription_list){
			//create a new instance of the prospect list
        	$exempt_list = new ProspectList();
        	$exempt_list->retrieve($subscription_list['id']);
        	$exempt_list->load_relationship($relationship);
			//if list type is default, then delete the relationship
            //if list type is exempt, then add the relationship to unsubscription list
            if($subscription_list['list_type'] == 'exempt') {
		        $exempt_list->$relationship->add($focus->id);
            }elseif($subscription_list['list_type'] == 'default' || $subscription_list['list_type'] == 'test'){
            	//if list type is default or test, then delete the relationship
            	//$exempt_list->$relationship->delete($subscription_list['id'],$focus->id);
            }

        }

        if($already_here =='true'){
            //do nothing, user is already exempted

        }else{
            //user is not exempted yet , so add to unsubscription list


            $exempt_result = $exempt_list->retrieve($exempt_id);
            if($exempt_result == null)
            {//error happened while retrieving this list
                return;
            }
            $GLOBALS['log']->debug("In Campaigns Util, loading relationship: ".$relationship);
            $exempt_list->load_relationship($relationship);
            $exempt_list->$relationship->add($focus->id);
        }

    }
开发者ID:auf,项目名称:crm_auf_org,代码行数:75,代码来源:utils.php


示例8: ProspectList

 ********************************************************************************/
require_once 'XTemplate/xtpl.php';
require_once 'data/Tracker.php';
require_once 'modules/ProspectLists/ProspectList.php';
require_once 'modules/ProspectLists/Forms.php';
global $timedate;
global $app_strings;
global $app_list_strings;
global $mod_strings;
global $current_user;
global $sugar_version, $sugar_config;
// Unimplemented until jscalendar language files are fixed
// global $current_language;
// global $default_language;
// global $cal_codes;
$focus = new ProspectList();
if (isset($_REQUEST['record'])) {
    $focus->retrieve($_REQUEST['record']);
}
global $theme;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
require_once $theme_path . 'layout_utils.php';
$GLOBALS['log']->info("Prospect List Edit View");
echo "\n<p>\n";
echo get_module_title($mod_strings['LBL_MODULE_ID'], $mod_strings['LBL_MODULE_NAME'] . ": " . $focus->name, true);
echo "\n</p>\n";
$xtpl = new XTemplate('modules/ProspectLists/EditView.html');
$xtpl->assign("MOD", $mod_strings);
$xtpl->assign("APP", $app_strings);
$json = getJSONobj();
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:31,代码来源:EditView.php


示例9: testbean_implements

 public function testbean_implements()
 {
     $prospectList = new ProspectList();
     $this->assertEquals(false, $prospectList->bean_implements(''));
     //test with blank value
     $this->assertEquals(false, $prospectList->bean_implements('test'));
     //test with invalid value
     $this->assertEquals(true, $prospectList->bean_implements('ACL'));
     //test with valid value
 }
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:10,代码来源:ProspectListTest.php


示例10: createTargeList

 function createTargeList($listname, $campaign_id = '')
 {
     global $current_user, $db;
     $results = $this->getSelectionResults(array());
     if (count($results > 0)) {
         require_once 'modules/ProspectLists/ProspectList.php';
         $newProspectList = new ProspectList();
         $newProspectList->name = $listname;
         $newProspectList->list_type = 'default';
         $newProspectList->assigned_user_id = $current_user->id;
         $newProspectList->save();
         // add to campaign
         if ($campaign_id != '') {
             require_once 'modules/Campaigns/Campaign.php';
             $thisCampaign = new Campaign();
             $thisCampaign->retrieve($campaign_id);
             $thisCampaign->load_relationships();
             $campaignLinkedFields = $thisCampaign->get_linked_fields();
             foreach ($campaignLinkedFields as $linkedField => $linkedFieldData) {
                 if ($thisCampaign->{$linkedField}->_relationship->rhs_module == 'ProspectList') {
                     $thisCampaign->{$linkedField}->add($newProspectList->id);
                 }
             }
         }
         // fill with results:
         $newProspectList->load_relationships();
         $linkedFields = $newProspectList->get_linked_fields();
         foreach ($linkedFields as $linkedField => $linkedFieldData) {
             if ($newProspectList->{$linkedField}->_relationship->rhs_module == $this->report_module) {
                 foreach ($results as $thisRecord) {
                     $newProspectList->{$linkedField}->add($thisRecord['sugarRecordId']);
                 }
             } elseif ($newProspectList->{$linkedField}->_relationship->rhs_module == 'Campaigns' and $campaign_id != '') {
                 $newProspectList->{$linkedField}->add($campaign_id);
             }
         }
     }
 }
开发者ID:shoaib-fazal16,项目名称:dumpster,代码行数:38,代码来源:KReport.php


示例11: execute


//.........这里部分代码省略.........
                     fwrite($f, ob_get_clean());
                     fwrite($f, file_get_contents("modules/ZuckerListingTemplate/lists/footer.html"));
                     fclose($f);
                 } else {
                     $this->report_result_type = "INLINE";
                     $this->report_result = ob_get_clean();
                 }
             } else {
                 if ($format == "SIMPLEHTML") {
                     $date = date("ymd_His");
                     $this->report_result_type = "FILE";
                     $this->report_result_name = $date . "_" . $this->name . ".html";
                     $this->report_result_name = strtolower(join("_", explode(" ", $this->report_result_name)));
                     $this->report_result = $this->archive_dir . "/" . $this->report_result_name;
                     $f = fopen($this->report_result, "w");
                     fwrite($f, "<!DOCTYPE html PUBLIC \"-//W3C//DTD html 4.01 Transitional//EN\">\n");
                     fwrite($f, "<html><body><table border=\"1\">");
                     if ($this->include_header && !empty($list_fields)) {
                         fwrite($f, "\n<tr>");
                         foreach ($list_fields as $col_name) {
                             fwrite($f, "<th>" . $col_name . "</th>");
                         }
                         fwrite($f, "</tr>");
                     }
                     foreach ($list_data as $list_row) {
                         fwrite($f, "\n<tr>");
                         foreach (array_keys($list_row->list_view_data) as $col_name) {
                             $field = $list_row->list_view_data[$col_name];
                             if (empty($field)) {
                                 fwrite($f, "<td>&nbsp;</td>");
                             } else {
                                 fwrite($f, "<td>" . $this->format_value_for_html($field) . "</td>");
                             }
                         }
                         fwrite($f, "</tr>");
                     }
                     fwrite($f, "\n</table></body></html>");
                     fclose($f);
                 } else {
                     if ($format == "CSV") {
                         $date = date("ymd_His");
                         $this->report_result_type = "FILE";
                         $this->report_result_name = $date . "_" . $this->name . ".csv";
                         $this->report_result_name = strtolower(join("_", explode(" ", $this->report_result_name)));
                         $this->report_result = $this->archive_dir . "/" . $this->report_result_name;
                         $f = fopen($this->report_result, "w");
                         if ($this->include_header && count($list_data) > 0) {
                             $row = $list_data[0];
                             foreach (array_keys($row->list_view_data) as $col_name) {
                                 fwrite($f, $col_name);
                                 fwrite($f, $this->col_delim);
                             }
                             fwrite($f, $this->row_delim);
                         }
                         foreach ($list_data as $list_row) {
                             foreach (array_keys($list_row->list_view_data) as $col_name) {
                                 $field = $list_row->list_view_data[$col_name];
                                 $pieces = explode("\n", $field);
                                 $cleaned_pieces = array();
                                 foreach ($pieces as $piece) {
                                     $cleaned_pieces[] = trim($piece);
                                 }
                                 fwrite($f, join(" ", $cleaned_pieces));
                                 if ($i != count($list_row->list_view_data) - 1) {
                                     fwrite($f, $this->col_delim);
                                 }
                             }
                             fwrite($f, $this->row_delim);
                         }
                         fclose($f);
                     }
                 }
             }
         } else {
             if ($format == "PROSPECTLIST") {
                 require_once "modules/ProspectLists/ProspectList.php";
                 $pl = new ProspectList();
                 $pl->name = empty($_REQUEST["prospect_list_name"]) ? $this->name : $_REQUEST["prospect_list_name"];
                 $pl->save();
                 foreach ($rows as $row) {
                     if ($row->object_name == "Contact") {
                         $pl->set_relationship('prospect_lists_prospects', array("related_type" => "Contacts", "related_id" => $row->id, 'prospect_list_id' => $pl->id));
                     } else {
                         if ($row->object_name == "Lead") {
                             $pl->set_relationship('prospect_lists_prospects', array("related_type" => "Leads", "related_id" => $row->id, 'prospect_list_id' => $pl->id));
                         } else {
                             if ($row->object_name == "Prospect") {
                                 $pl->set_relationship('prospect_lists_prospects', array("related_type" => "Prospects", "related_id" => $row->id, 'prospect_list_id' => $pl->id));
                             }
                         }
                     }
                 }
                 $this->report_result = "index.php?module=ProspectLists&action=DetailView&record=" . $pl->id;
                 $this->report_result_type = "FORWARD";
             }
         }
         $result = true;
     }
     return $result;
 }
开发者ID:omusico,项目名称:sugar_work,代码行数:101,代码来源:ListingTemplate.php


示例12: ProspectList

 * 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-2006 SugarCRM, Inc.;
 * All Rights Reserved.
 * Contributor(s): ______________________________________.
 ********************************************************************************/
/*********************************************************************************
 * Description:  TODO: To be written.
 * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
 * All Rights Reserved.
 * Contributor(s): ______________________________________..
 ********************************************************************************/
require_once 'modules/ProspectLists/ProspectList.php';
$focus = new ProspectList();
$focus->retrieve($_POST['record']);
if (!empty($_POST['assigned_user_id']) && $focus->assigned_user_id != $_POST['assigned_user_id'] && $_POST['assigned_user_id'] != $current_user->id) {
    $check_notify = TRUE;
} else {
    $check_notify = FALSE;
}
foreach ($focus->column_fields as $field) {
    if (isset($_POST[$field])) {
        $value = $_POST[$field];
        $focus->{$field} = $value;
    }
}
foreach ($focus->additional_column_fields as $field) {
    if (isset($_POST[$field])) {
        $value = $_POST[$field];
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:31,代码来源:Save.php


示例13: createTargeList

 function createTargeList($listname, $campaign_id = '')
 {
     global $current_user, $db;
     $results = $this->getSelectionResults(array());
     if (count($results > 0)) {
         require_once 'modules/ProspectLists/ProspectList.php';
         $newProspectList = new ProspectList();
         $newProspectList->name = $listname;
         $newProspectList->list_type = 'default';
         $newProspectList->assigned_user_id = $current_user->id;
         $db = DBManagerFactory::getInstance();
         /*
         $sugarQuery = new SugarQuery();
         $sugarQuery->select('id');
         $sugarQuery->from(BeanFactory::getBean('Accounts'));
         $sugarQuery->where()->equals('name',$newProspectList->name);
         $id_prospect = $sugarQuery->execute();
         $id_prospect = $id_prospect[0];         
         */
         $sql = "SELECT id, name from prospect_lists where deleted = '0' and name = '" . $newProspectList->name . "' limit 1";
         $result = $db->query($sql);
         if ($db->getRowCount($result) > 0) {
             if ($row = $db->fetchByAssoc($result)) {
                 $newProspectList->id = $row['id'];
             }
         }
         if ($newProspectList->save()) {
             /* Força update do campo da base de dados com o sql do relatório */
             $sql = 'UPDATE prospect_lists SET sql_query = "' . str_replace('"', "'", $_SESSION['kreport_sql']) . '" where id = "' . $newProspectList->id . '"';
             $result = $db->query($sql);
             if ($result) {
                 $GLOBALS['log']->debug("Atualizou prospect list sql");
             } else {
                 $GLOBALS['log']->debug("Falha ao atualizar prospect list sql");
             }
             /* Fim */
         }
         // add to campaign
         if ($campaign_id != '') {
             require_once 'modules/Campaigns/Campaign.php';
             $thisCampaign = new Campaign();
             $thisCampaign->retrieve($campaign_id);
             $thisCampaign->load_relationships();
             $campaignLinkedFields = $thisCampaign->get_linked_fields();
             foreach ($campaignLinkedFields as $linkedField => $linkedFieldData) {
                 if ($thisCampaign->{$linkedField}->_relationship->rhs_module == 'ProspectList') {
                     $thisCampaign->{$linkedField}->add($newProspectList->id);
                 }
             }
         }
         // fill with results:
         $newProspectList->load_relationships();
         $linkedFields = $newProspectList->get_linked_fields();
         foreach ($linkedFields as $linkedField => $linkedFieldData) {
             if ($newProspectList->{$linkedField}->_relationship->rhs_module == $this->report_module) {
                 foreach ($results as $thisRecord) {
                     $newProspectList->{$linkedField}->add($thisRecord['sugarRecordId']);
                 }
             } elseif ($newProspectList->{$linkedField}->_relationship->rhs_module == 'Campaigns' and $campaign_id != '') {
                 $newProspectList->{$linkedField}->add($campaign_id);
             }
         }
     }
 }
开发者ID:ambientelivre,项目名称:GeneratorTargetList,代码行数:64,代码来源:KReport.php


示例14: create_target_summary

function create_target_summary($focus)
{
    global $mod_strings, $app_strings, $app_list_strings;
    $colorclass = '';
    $camp_type = $focus->campaign_type;
    //create schedule table
    $pltbl = '';
    //set the title based on campaign type
    $target_title = $mod_strings['LBL_TARGET_LISTS'];
    if ($camp_type == 'NewsLetter') {
        $target_title = $mod_strings['LBL_NAVIGATION_MENU_SUBSCRIPTIONS'];
    }
    $focus->load_relationship('prospectlists');
    $pl_lists = $focus->prospectlists->get();
    $pl_tbl = "<p><table align='center' class='list view' width='100%' border='0' cellspacing='1' cellpadding='1'>";
    $pl_tbl .= "<tr class='detail view'><td colspan='4'><h4> " . $target_title . " </h4></td></tr>";
    $pl_tbl .= "<tr class='listViewHRS1'><td width='50%' scope='col'><b>" . $mod_strings['LBL_LIST_NAME'] . "</b></td><td width='30%' scope='col'><b>" . $mod_strings['LBL_LIST_TYPE'] . "</b></td>";
    $pl_tbl .= "<td width='15%' scope='col'><b>" . $mod_strings['LBL_TOTAL_ENTRIES'] . "</b></td><td width='5%' scope='col'>&nbsp;</td></tr>";
    if (count($pl_lists) > 0) {
        $pl_focus = new ProspectList();
        foreach ($pl_lists as $pl_id) {
            if ($colorclass == "class='evenListRowS1'") {
                $colorclass = "class='oddListRowS1'";
            } else {
                $colorclass = "class='evenListRowS1'";
            }
            $pl_focus->retrieve($pl_id);
            //set the list type if this is a newsletter
            $type = $pl_focus->list_type;
            if ($camp_type == 'NewsLetter') {
                if ($pl_focus->list_type == 'default' || $pl_focus->list_type == 'seed') {
                    $type = $mod_strings['LBL_SUBSCRIPTION_TYPE_NAME'];
                }
                if ($pl_focus->list_type == 'exempt') {
                    $type = $mod_strings['LBL_UNSUBSCRIPTION_TYPE_NAME'];
                }
                if ($pl_focus->list_type == 'test') {
                    $type = $mod_strings['LBL_TEST_TYPE_NAME'];
                }
            } else {
                $type = $app_list_strings['prospect_list_type_dom'][$pl_focus->list_type];
            }
            if (isset($pl_focus->id) && !empty($pl_focus->id)) {
                $pl_tbl .= "<tr {$colorclass}>";
                $pl_tbl .= "<td scope='row' width='50%'><a href='index.php?action=DetailView&module=ProspectLists&return_module=Campaigns&return_action=WizardHome&return_id=" . $focus->id . "&record=" . $pl_focus->id . "'>";
                $pl_tbl .= $pl_focus->name . "</a></td>";
                $pl_tbl .= "<td scope='row' width='30%'>{$type}</td>";
                $pl_tbl .= "<td scope='row' width='15%'>" . $pl_focus->get_entry_count() . "</td>";
                $pl_tbl .= "<td scope='row' width='5%' align='right'><a href='index.php?action=EditView&module=ProspectLists&return_module=Campaigns&return_action=WizardHome&return_id=" . $focus->id . "&record=" . $pl_focus->id . "'>";
                $pl_tbl .= SugarThemeRegistry::current()->getImage('edit_inline', 'border=0', null, null, ".gif", $mod_strings['LBL_EDIT_INLINE']) . "</a>&nbsp;";
                $pl_tbl .= "<a href='index.php?action=DetailView&module=ProspectLists&return_module=Campaigns&return_action=WizardHome&return_id=" . $focus->id . "&record=" . $pl_focus->id . "'>";
                $pl_tbl .= SugarThemeRegistry::current()->getImage('view_inline', 'border=0', null, null, ".gif", $mod_strings['LBL_VIEW_INLINE']) . "</a></td>";
            }
        }
    } else {
        $pl_tbl .= "<tr><td class='{$colorclass}' scope='row' colspan='2'>" . $mod_strings['LBL_NONE'] . "</td></tr>";
    }
    $pl_tbl .= "</table></p>";
    return $pl_tbl;
}
开发者ID:netconstructor,项目名称:sugarcrm_dev,代码行数:60,代码来源:WizardHome.php


示例15: ProspectList

 * Contributor(s): ______________________________________..
 ********************************************************************************/
$focus = new ProspectList();
$focus->retrieve($_POST['record']);
if (!empty($_POST['assigned_user_id']) && $focus->assigned_user_id != $_POST['assigned_user_id'] && $_POST['assigned_user_id'] != $current_user->id) {
    $check_notify = TRUE;
} else {
    $check_notify = FALSE;
}
require_once 'include/formbase.php';
$focus = populateFromPost('', $focus);
$focus->save($check_notify);
$return_id = $focus->id;
//Bug 33675 Duplicate target list
if (!empty($_REQUEST['duplicateId'])) {
    $copyFromProspectList = new ProspectList();
    $copyFromProspectList->retrieve($_REQUEST['duplicateId']);
    $relations = $copyFromProspectList->retrieve_relationships('prospect_lists_prospects', array('prospect_list_id' => $_REQUEST['duplicateId']), 'related_id, related_type');
    if (count($relations) > 0) {
        foreach ($relations as $rel) {
            $rel['prospect_list_id'] = $return_id;
            $focus->set_relationship('prospect_lists_prospects', $rel, true);
        }
    }
    $focus->save();
}
if (isset($_POST['return_module']) && $_POST['return_module'] != "") {
    $return_module = $_POST['return_module'];
} else {
    $return_module = "ProspectLists";
}
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:31,代码来源:Save.php


示例16: foreach

        }
    }
} else {
    //this is not a newlsetter campaign, so fill in target list table
    //create array for javascript, this will help to display the option text, not the value
    $dom_txt = ' ';
    foreach ($app_list_strings['prospect_list_type_dom'] as $key => $val) {
        $dom_txt .= "if(trgt_type_text =='{$key}'){trgt_type_text='{$val}';}";
    }
    $ss->assign("PL_DOM_STMT", $dom_txt);
    $trgt_count = 0;
    $trgt_html = ' ';
    if (count($prospect_lists) > 0) {
        foreach ($prospect_lists as $pl_id) {
            //retrieve prospect list
            $pl = new ProspectList();
            $pl_focus = $pl->retrieve($pl_id);
            $trgt_html .= "<div id='existing_trgt" . $trgt_count . "'> <table class='tabDetailViewDL2' width='100%'>";
            $trgt_html .= "<td width='25%'> <input id='existing_target_name" . $trgt_count . "' type='hidden' type='text' size='60' maxlength='255' name='existing_target_name" . $trgt_count . "'  value='" . $pl_focus->name . "' >" . $pl_focus->name . "</td>";
            $trgt_html .= "<td width='25%'><input type='hidden' size='60' maxlength='255' name='existing_tracker_list_type" . $trgt_count . "'   id='existing_tracker_list_type" . $trgt_count . "' value='" . $pl_focus->list_type . "' >" . $app_list_strings['prospect_list_type_dom'][$pl_focus->list_type];
            $trgt_html .= "<input type='hidden' name='added_target_id" . $trgt_count . "' id='added_target_id" . $trgt_count . "' value='" . $pl_focus->id . "' ></td>";
            $trgt_html .= "<td><a href='#' onclick=\"javascript:remove_existing_target('existing_trgt" . $trgt_count . "','" . $pl_focus->id . "'); \" >  ";
            $trgt_html .= "<img src='" . SugarThemeRegistry::current()->getImageURL("delete_inline.gif") . "' border='0' alt='rem' align='absmiddle' border='0' height='12' width='12'>" . $mod_strings['LBL_REMOVE'] . "</a></td></tr></table></div>";
            $trgt_count = $trgt_count + 1;
        }
        $trgt_html .= "<div id='no_targets'></div>";
    } else {
        $trgt_html .= "<div id='no_targets'><table width='100%' border='0' cellspacing='0' cellpadding='0'><tr class='evenListRowS1'><td>" . $mod_strings['LBL_NONE'] . "</td></tr></table></div>";
    }
    $ss->assign('EXISTING_TARGETS', $trgt_html);
}
开发者ID:klr2003,项目名称:sourceread,代码行数:31,代码来源:WizardNewsletter.php


示例17: ProspectList

 * 
 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
 * SW2-130, Cupertino, CA 95014, USA. or at email address [email protected].
 * 
 * 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 ProspectList();
if (!isset($_REQUEST['record'])) {
    sugar_die("A record number must be specified to delete the prospect list.");
}
$focus->retrieve($_REQUEST['record']);
if (!$focus->ACLAccess('Delete')) {
    ACLController::displayNoAccess(true);
    sugar_cleanup(true);
}
$focus->mark_deleted($_REQUEST['record']);
header("Location: index.php?module=" . $_REQUEST['return_module'] . "&action=" . $_REQUEST['return_action'] . "&record=" . $_REQUEST['return_id']);
开发者ID:thsonvt,项目名称:sugarcrm_dev,代码行数:31,代码来源:Delete.php


示例18: ProspectList

 * 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 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".
 ********************************************************************************/
/*********************************************************************************
 * Description:  TODO: To be written.
 * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
 * All Rights Reserved.
 * Contributor(s): ______________________________________..
 ********************************************************************************/
global $mod_strings;
$focus = new ProspectList();
$focus->retrieve($_POST['record']);
if (isset($_POST['isDuplicate']) && $_POST['isDuplicate'] == true) {
    $focus->id = '';
    $focus->name = $mod_strings['LBL_COPY_PREFIX'] . ' ' . $focus->name;
    $focus->save();
    $return_id = $focus->id;
    //duplicate the linked items.
    $query = "select * from prospect_lists_prospects where prospect_list_id = '" . $_POST['record'] . "'";
    $result = $focus->db->query($query);
    if ($result != null) {
        while (($row = $focus->db->fetchByAssoc($result)) != null) {
            $iquery = "INSERT INTO prospect_lists_prospects (id,prospe 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP Protocol类代码示例发布时间:2022-05-23
下一篇:
PHP Property类代码示例发布时间: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