/**
  * @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 />';
 }
예제 #3
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');