示例#1
0
        $modListHeader = query_module_access_list($current_user);
    }
}
if (array_key_exists($_REQUEST['module'], $modListHeader) || in_array($_REQUEST['module'], $modInvisList) || (array_key_exists("Activities", $modListHeader) || array_key_exists("Calendar", $modListHeader)) && in_array($_REQUEST['module'], $modInvisListActivities) || $_REQUEST['module'] == "iFrames" && isset($_REQUEST['record'])) {
    // Only include the file if there is a file.  User login does not have a filename but does have a module.
    if (!empty($currentModuleFile)) {
        ///////////////////////////////////////////////////////////////////////
        ////	DISPLAY REQUESTED PAGE
        $GLOBALS['log']->debug('--------->  BEGING INCLUDING REQUESTED PAGE: [' . $currentModuleFile . ']  <------------');
        include $currentModuleFile;
        $GLOBALS['log']->debug('--------->  END INCLUDING REQUESTED PAGE: [' . $currentModuleFile . ']  <------------');
        ////	END DISPLAY REQUESTED PAGE
        ///////////////////////////////////////////////////////////////////////
    }
    if (isset($focus) && is_subclass_of($focus, 'SugarBean') && $focus->bean_implements('ACL')) {
        ACLController::addJavascript($focus->module_dir, '', $focus->isOwner($current_user->id));
    }
} else {
    // avoid js error when set_focus is not defined
    echo '<script>function set_focus(){return;}</script><p class="error">Warning: You do not have permission to access this module.</p>';
}
if (!$skipFooters) {
    echo "<!-- crmprint -->";
    echo $jsalerts->getScript();
    include 'themes/' . $theme . '/footer.php';
    if (!isset($_SESSION['avail_themes'])) {
        $_SESSION['avail_themes'] = serialize(get_themes());
    }
    if (!isset($_SESSION['avail_languages'])) {
        $_SESSION['avail_languages'] = serialize(get_languages());
    }
    } else {
        $xtpl->assign("CURRENCY", $currency->getDefaultISO4217() . ' ' . $currency->getDefaultCurrencySymbol());
    }
} else {
    $xtpl->assign("CURRENCY", $currency->getDefaultISO4217() . ' ' . $currency->getDefaultCurrencySymbol());
}
global $current_user;
if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) {
    $xtpl->assign("ADMIN_EDIT", "<a href='index.php?action=index&module=DynamicLayout&from_action=" . $_REQUEST['action'] . "&from_module=" . $_REQUEST['module'] . "&record=" . $_REQUEST['record'] . "'>" . get_image($image_path . "EditLayout", "border='0' alt='Edit Layout' align='bottom'") . "</a>");
}
$detailView->processListNavigation($xtpl, "OPPORTUNITY", $offset, $focus->is_AuditEnabled());
// adding custom fields:
require_once 'modules/DynamicFields/templates/Files/DetailView.php';
$xtpl->parse("main.open_source");
$xtpl->parse("main");
$xtpl->out("main");
$sub_xtpl = $xtpl;
$old_contents = ob_get_contents();
ob_end_clean();
ob_start();
echo $old_contents;
require_once 'include/SubPanel/SubPanelTiles.php';
$subpanel = new SubPanelTiles($focus, 'Opportunities');
echo $subpanel->display();
echo ACLController::addJavascript($focus->module_dir, '', $focus->assigned_user_name == $current_user->user_name);
require_once 'modules/SavedSearch/SavedSearch.php';
$savedSearch = new SavedSearch();
$json = getJSONobj();
$savedSearchSelects = $json->encode(array($GLOBALS['app_strings']['LBL_SAVED_SEARCH_SHORTCUT'] . '<br>' . $savedSearch->getSelect('Opportunities')));
$str = "<script>\nYAHOO.util.Event.addListener(window, 'load', SUGAR.util.fillShortcuts, {$savedSearchSelects});\n</script>";
echo $str;