/**
  * @see DashletGenericChart::display()
  */
 public function display()
 {
     require_once 'modules/Campaigns/Charts.php';
     $roi_chart = new campaign_charts();
     $chartStr = $roi_chart->campaign_response_roi($GLOBALS['app_list_strings']['roi_type_dom'], $GLOBALS['app_list_strings']['roi_type_dom'], $this->campaign_id[0], null, true, true, true, $this->id);
     $returnStr = $chartStr;
     return $this->getTitle('<div align="center"></div>') . '<div align="center">' . $returnStr . '</div>' . $this->processAutoRefresh();
 }
 /**
  * @see DashletGenericChart::display()
  */
 public function display()
 {
     require_once 'modules/Campaigns/Charts.php';
     $roi_chart = new campaign_charts();
     $chartStr = $roi_chart->campaign_response_roi($GLOBALS['app_list_strings']['roi_type_dom'], $GLOBALS['app_list_strings']['roi_type_dom'], $this->campaign_id[0], null, true, true, true, $this->id);
     $returnStr = '<script type="text/javascript" src="' . getJSPath('include/javascript/swfobject.js') . '"></script>' . $chartStr;
     return $this->getTitle('<div align="center"></div>') . '<div align="center">' . $returnStr . '</div><br />';
 }
        if (!empty($selected_marketing_id) && $selected_marketing_id == $row['id']) {
            $options_str .=' selected>'. $row['name'] .'</option>';
        }else{
            $options_str .=' >'. $row['name'] .'</option>';
        }
     }
    //populate the dropdown
    $xtpl->assign("MKT_DROP_DOWN",$options_str);

  */
//add chart
$seps = array("-", "/");
$dates = array(date($GLOBALS['timedate']->dbDayFormat), $GLOBALS['timedate']->dbDayFormat);
$dateFileNameSafe = str_replace($seps, "_", $dates);
$cache_file_name_roi = $current_user->getUserPrivGuid() . "_campaign_response_by_roi_" . $dateFileNameSafe[0] . "_" . $dateFileNameSafe[1] . ".xml";
$chart = new campaign_charts();
//ob_start();
//if marketing id has been selected, then set "latest_marketing_id" to the selected value
//latest marketing id will be passed in to filter the charts and subpanels
if (!empty($selected_marketing_id)) {
    $latest_marketing_id = $selected_marketing_id;
}
if (empty($latest_marketing_id) || $latest_marketing_id === 'all') {
    $xtpl->assign("MY_CHART_ROI", $chart->campaign_response_roi_popup($app_list_strings['roi_type_dom'], $app_list_strings['roi_type_dom'], $campaign_id, sugar_cached("xml/") . $cache_file_name_roi, true));
} else {
    $xtpl->assign("MY_CHART_ROI", $chart->campaign_response_roi_popup($app_list_strings['roi_type_dom'], $app_list_strings['roi_type_dom'], $campaign_id, sugar_cached("xml/") . $cache_file_name_roi, true));
}
//$output_html .= ob_get_contents();
//ob_end_clean();
//_ppd($xtpl);
//end chart
        if (!empty($selected_marketing_id) && $selected_marketing_id == $row['id']) {
            $options_str .=' selected>'. $row['name'] .'</option>';
        }else{
            $options_str .=' >'. $row['name'] .'</option>';
        }    
     }
    //populate the dropdown    
    $xtpl->assign("MKT_DROP_DOWN",$options_str);
    
  */
//add chart
$seps = array("-", "/");
$dates = array(date($GLOBALS['timedate']->dbDayFormat), $GLOBALS['timedate']->dbDayFormat);
$dateFileNameSafe = str_replace($seps, "_", $dates);
$cache_file_name_roi = $current_user->getUserPrivGuid() . "_campaign_response_by_roi_" . $dateFileNameSafe[0] . "_" . $dateFileNameSafe[1] . ".xml";
$chart = new campaign_charts();
//ob_start();
//if marketing id has been selected, then set "latest_marketing_id" to the selected value
//latest marketing id will be passed in to filter the charts and subpanels
//_pp($sugar_config['tmp_dir'].$cache_file_name_roi);
if (!empty($selected_marketing_id)) {
    $latest_marketing_id = $selected_marketing_id;
}
if (empty($latest_marketing_id) || $latest_marketing_id === 'all') {
    $xtpl->assign("MY_CHART_ROI", $chart->campaign_response_roi_popup($app_list_strings['roi_type_dom'], $app_list_strings['roi_type_dom'], $campaign_id, $sugar_config['tmp_dir'] . $cache_file_name_roi, true));
} else {
    $xtpl->assign("MY_CHART_ROI", $chart->campaign_response_roi_popup($app_list_strings['roi_type_dom'], $app_list_strings['roi_type_dom'], $campaign_id, $sugar_config['tmp_dir'] . $cache_file_name_roi, true));
}
//$output_html .= ob_get_contents();
//ob_end_clean();
//_ppd($xtpl);
        } else {
            $options_str .= ' >' . $row['name'] . '</option>';
        }
    }
    $options_str .= "</select>";
    //populate the dropdown
    $smarty->assign("FILTER_LABEL", $mod_strings['LBL_FILTER_CHART_BY']);
    $smarty->assign("MKT_DROP_DOWN", $options_str);
}
//add chart
$seps = array("-", "/");
$dates = array(date($GLOBALS['timedate']->dbDayFormat), $GLOBALS['timedate']->dbDayFormat);
$dateFileNameSafe = str_replace($seps, "_", $dates);
$cache_file_name = $current_user->getUserPrivGuid() . "_campaign_response_by_activity_type_" . $dateFileNameSafe[0] . "_" . $dateFileNameSafe[1] . ".xml";
$cache_file_name_roi = $current_user->getUserPrivGuid() . "_campaign_response_by_roi_" . $dateFileNameSafe[0] . "_" . $dateFileNameSafe[1] . ".xml";
$chart = new campaign_charts();
//if marketing id has been selected, then set "latest_marketing_id" to the selected value
//latest marketing id will be passed in to filter the charts and subpanels
if (!empty($selected_marketing_id)) {
    $latest_marketing_id = $selected_marketing_id;
}
if (empty($latest_marketing_id) || $latest_marketing_id === 'all') {
    $smarty->assign("MY_CHART", $chart->campaign_response_by_activity_type($app_list_strings['campainglog_activity_type_dom'], $app_list_strings['campainglog_target_type_dom'], $focus->id, sugar_cached("xml/{$cache_file_name}"), true));
} else {
    $smarty->assign("MY_CHART", $chart->campaign_response_by_activity_type($app_list_strings['campainglog_activity_type_dom'], $app_list_strings['campainglog_target_type_dom'], $focus->id, sugar_cached("xml/{$cache_file_name}"), true, $latest_marketing_id));
}
//end chart
//custom chart code
require_once 'include/SugarCharts/SugarChartFactory.php';
$sugarChart = SugarChartFactory::getInstance();
$resources = $sugarChart->getChartResources();
Example #6
0
    } else {
        $smarty->assign("CURRENCY", $currency->getDefaultISO4217() . ' ' . $currency->getDefaultCurrencySymbol());
    }
} else {
    $smarty->assign("CURRENCY", $currency->getDefaultISO4217() . ' ' . $currency->getDefaultCurrencySymbol());
}
global $current_user;
if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) {
    $smarty->assign("ADMIN_EDIT", "<a href='index.php?action=index&module=DynamicLayout&from_action=" . $_REQUEST['action'] . "&from_module=" . $_REQUEST['module'] . "&record=" . $_REQUEST['record'] . "'>" . SugarThemeRegistry::current()->getImage("EditLayout", "border='0' align='bottom'", null, null, '.gif', $mod_strings['LBL_EDIT_LAYOUT']) . "</a>");
}
$detailView->processListNavigation($xtpl, "CAMPAIGN", $offset, $focus->is_AuditEnabled());
// adding custom fields:
global $xtpl;
$xtpl = $smarty;
require_once 'modules/DynamicFields/templates/Files/DetailView.php';
//add chart
$seps = array("-", "/");
$dates = array(date($GLOBALS['timedate']->dbDayFormat), $GLOBALS['timedate']->dbDayFormat);
$dateFileNameSafe = str_replace($seps, "_", $dates);
//$cache_file_name	= $current_user->getUserPrivGuid()."_campaign_response_by_activity_type_".$dateFileNameSafe[0]."_".$dateFileNameSafe[1].".xml";
$cache_file_name_roi = $current_user->getUserPrivGuid() . "_campaign_response_by_roi_" . $dateFileNameSafe[0] . "_" . $dateFileNameSafe[1] . ".xml";
$chart = new campaign_charts();
//_ppd($roi_vals);
$smarty->assign("MY_CHART_ROI", $chart->campaign_response_roi($app_list_strings['roi_type_dom'], $app_list_strings['roi_type_dom'], $focus->id, true, true));
//end chart
//custom chart code
require_once 'include/SugarCharts/SugarChartFactory.php';
$sugarChart = SugarChartFactory::getInstance();
$resources = $sugarChart->getChartResources();
$smarty->assign('chartResources', $resources);
echo $smarty->fetch('modules/Campaigns/RoiDetailView.tpl');
Example #7
0
        } else {
            $options_str .= ' >' . $row['name'] . '</option>';
        }
    }
    $options_str .= "</select>";
    //populate the dropdown
    $smarty->assign("FILTER_LABEL", $mod_strings['LBL_FILTER_CHART_BY']);
    $smarty->assign("MKT_DROP_DOWN", $options_str);
}
//add chart
$seps = array("-", "/");
$dates = array(date($GLOBALS['timedate']->dbDayFormat), $GLOBALS['timedate']->dbDayFormat);
$dateFileNameSafe = str_replace($seps, "_", $dates);
$cache_file_name = $current_user->getUserPrivGuid() . "_campaign_response_by_activity_type_" . $dateFileNameSafe[0] . "_" . $dateFileNameSafe[1] . ".xml";
$cache_file_name_roi = $current_user->getUserPrivGuid() . "_campaign_response_by_roi_" . $dateFileNameSafe[0] . "_" . $dateFileNameSafe[1] . ".xml";
$chart = new campaign_charts();
//if marketing id has been selected, then set "latest_marketing_id" to the selected value
//latest marketing id will be passed in to filter the charts and subpanels
if (!empty($selected_marketing_id)) {
    $latest_marketing_id = $selected_marketing_id;
}
if (empty($latest_marketing_id) || $latest_marketing_id === 'all') {
    $smarty->assign("MY_CHART", $chart->campaign_response_by_activity_type($app_list_strings['campainglog_activity_type_dom'], $app_list_strings['campainglog_target_type_dom'], $focus->id, $sugar_config['tmp_dir'] . $cache_file_name, true));
} else {
    $smarty->assign("MY_CHART", $chart->campaign_response_by_activity_type($app_list_strings['campainglog_activity_type_dom'], $app_list_strings['campainglog_target_type_dom'], $focus->id, $sugar_config['tmp_dir'] . $cache_file_name, true, $latest_marketing_id));
}
//end chart
//custom chart code
require_once 'include/SugarCharts/SugarChartFactory.php';
$sugarChart = SugarChartFactory::getInstance();
$resources = $sugarChart->getChartResources();