コード例 #1
0
ファイル: Save2.php プロジェクト: razorinc/sugarcrm-example
    $report = new SubpanelFromReports($saved);
    $report->run_query();
    $sql = $report->query_list[0];
    $GLOBALS['log']->debug("Save2:Report Query=" . $sql);
    $result = $report->db->query($sql);
    while ($row = $report->db->fetchByAssoc($result)) {
        $focus->{$relationship_attr_name}->add($row['primaryid']);
    }
}
$refreshsubpanel = true;
if (isset($_REQUEST['return_type']) && $_REQUEST['return_type'] == 'report') {
    save_from_report($_REQUEST['subpanel_id'], $_REQUEST['record'], $_REQUEST['module'], $_REQUEST['subpanel_field_name']);
} else {
    if (isset($_REQUEST['return_type']) && $_REQUEST['return_type'] == 'addtoprospectlist') {
        $GLOBALS['log']->debug(print_r($_REQUEST, true));
        add_prospects_to_prospect_list(urldecode($_REQUEST['query']), $_REQUEST['parent_module'], $_REQUEST['parent_type'], $_REQUEST['subpanel_id'], $_REQUEST['child_id'], $_REQUEST['link_attribute'], $_REQUEST['link_type']);
        $refreshsubpanel = false;
    } else {
        if (isset($_REQUEST['return_type']) && $_REQUEST['return_type'] == 'addcampaignlog') {
            //if param is set to "addcampaignlog", then we need to create a campaign log entry
            //for each campaign id passed in.
            //get list of campaign's selected'
            if (isset($_REQUEST['subpanel_id']) && !empty($_REQUEST['subpanel_id'])) {
                $campaign_ids = $_REQUEST['subpanel_id'];
                global $beanFiles;
                global $beanList;
                //retrieve current bean
                $bean_name = $beanList[$_REQUEST['module']];
                require_once $beanFiles[$bean_name];
                $focus = new $bean_name();
                $focus->retrieve($_REQUEST['record']);
コード例 #2
0
ファイル: Save2.php プロジェクト: butschster/sugarcrm_dev
 *
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
 * these Appropriate Legal Notices must retain the display of the "Powered by
 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
 * technical reasons, the Appropriate Legal Notices must display the words
 * "Powered by SugarCRM".
 ********************************************************************************/
require_once 'include/formbase.php';
$refreshsubpanel = true;
if (isset($_REQUEST['return_type']) && $_REQUEST['return_type'] == 'report') {
    save_from_report($_REQUEST['subpanel_id'], $_REQUEST['record'], $_REQUEST['module'], $_REQUEST['subpanel_field_name']);
} else {
    if (isset($_REQUEST['return_type']) && $_REQUEST['return_type'] == 'addtoprospectlist') {
        Log::debug(print_r($_REQUEST, true));
        if (!empty($_REQUEST['prospect_list_id']) and !empty($_REQUEST['prospect_ids'])) {
            add_prospects_to_prospect_list($_REQUEST['prospect_list_id'], $_REQUEST['prospect_ids']);
        } else {
            $parent = BeanFactory::getBean($_REQUEST['module'], $_REQUEST['record']);
            add_to_prospect_list(urldecode($_REQUEST['subpanel_module_name']), $_REQUEST['parent_module'], $_REQUEST['parent_type'], $_REQUEST['subpanel_id'], $_REQUEST['child_id'], $_REQUEST['link_attribute'], $_REQUEST['link_type'], $parent);
        }
        $refreshsubpanel = false;
    } else {
        if (isset($_REQUEST['return_type']) && $_REQUEST['return_type'] == 'addcampaignlog') {
            //if param is set to "addcampaignlog", then we need to create a campaign log entry
            //for each campaign id passed in.
            // Get a list of campaigns selected.
            if (isset($_REQUEST['subpanel_id']) && !empty($_REQUEST['subpanel_id'])) {
                $campaign_ids = $_REQUEST['subpanel_id'];
                global $beanFiles;
                global $beanList;
                //retrieve current bean