$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(); $smarty->assign('chartResources', $resources); echo $smarty->fetch('modules/Campaigns/TrackDetailView.tpl'); require_once 'include/SubPanel/SubPanelTiles.php'; $subpanel = new SubPanelTiles($focus, 'Campaigns'); //if latest marketing id is empty, or if it is set to 'all'', then do no filtering, otherwise filter.. //.. out the chart and subpanels by marketing id if (empty($latest_marketing_id) || $latest_marketing_id === 'all') {
$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(); $smarty->assign('chartResources', $resources); echo $smarty->fetch('modules/Campaigns/TrackDetailView.tpl'); require_once 'include/SubPanel/SubPanelTiles.php'; $subpanel = new SubPanelTiles($focus, 'Campaigns'); //if latest marketing id is empty, or if it is set to 'all'', then do no filtering, otherwise filter.. //.. out the chart and subpanels by marketing id if (empty($latest_marketing_id) || $latest_marketing_id === 'all') {