Exemplo n.º 1
0
 /**
  * Called from process(). This method will display the footer on the page.
  */
 public function displayFooter()
 {
     if (empty($this->responseTime)) {
         $this->_calculateFooterMetrics();
     }
     global $sugar_config;
     global $app_strings;
     global $mod_strings;
     $themeObject = SugarThemeRegistry::current();
     //decide whether or not to show themepicker, default is to show
     $showThemePicker = true;
     if (isset($sugar_config['showThemePicker'])) {
         $showThemePicker = $sugar_config['showThemePicker'];
     }
     echo "<!-- crmprint -->";
     $jsalerts = new jsAlerts();
     if (!isset($_SESSION['isMobile'])) {
         echo $jsalerts->getScript();
     }
     $ss = new Sugar_Smarty();
     $ss->assign("AUTHENTICATED", isset($_SESSION["authenticated_user_id"]));
     $ss->assign('MOD', return_module_language($GLOBALS['current_language'], 'Users'));
     $bottomLinkList = array();
     if (isset($this->action) && $this->action != "EditView") {
         $bottomLinkList['print'] = array($app_strings['LNK_PRINT'] => getPrintLink());
     }
     $bottomLinkList['backtotop'] = array($app_strings['LNK_BACKTOTOP'] => 'javascript:SUGAR.util.top();');
     $bottomLinksStr = "";
     foreach ($bottomLinkList as $key => $value) {
         foreach ($value as $text => $link) {
             $href = $link;
             if (substr($link, 0, 11) == "javascript:") {
                 $onclick = " onclick=\"" . substr($link, 11) . "\"";
                 $href = "javascript:void(0)";
             } else {
                 $onclick = "";
             }
             $imageURL = SugarThemeRegistry::current()->getImageURL($key . '.gif');
             $bottomLinksStr .= "<a href=\"{$href}\"";
             $bottomLinksStr .= isset($onclick) ? $onclick : "";
             $bottomLinksStr .= "><img src='{$imageURL}' alt=''>";
             //keeping alt blank on purpose for 508 (text will be read instead)
             $bottomLinksStr .= " " . $text . "</a>";
         }
     }
     $ss->assign("BOTTOMLINKS", $bottomLinksStr);
     if (SugarConfig::getInstance()->get('calculate_response_time', false)) {
         $ss->assign('STATISTICS', $this->_getStatistics());
     }
     // Under the License referenced above, you are required to leave in all copyright statements in both
     // the code and end-user application.
     $copyright = '&copy; 2004-2012 SugarCRM Inc. The Program is provided AS IS, without warranty.  Licensed under <a href="LICENSE.txt" target="_blank" class="copyRightLink">AGPLv3</a>.<br>This program is free software; you can redistribute it and/or modify it under the terms of the <br><a href="LICENSE.txt" target="_blank" class="copyRightLink"> GNU Affero General Public License version 3</a> as published by the Free Software Foundation, including the additional permission set forth in the source code header.<br>';
     // The interactive user interfaces in modified source and object code
     // versions of this program must display Appropriate Legal Notices, as
     // required under Section 5 of the GNU General Public License version
     // 3. In accordance with Section 7(b) of the GNU General Public License
     // version 3, these Appropriate Legal Notices must retain the display
     // of the "Powered by SugarCRM" logo. If the display of the logo is
     // not reasonably feasible for technical reasons, the Appropriate
     // Legal Notices must display the words "Powered by SugarCRM".
     $attribLinkImg = "<img style='margin-top: 2px' border='0' width='120' height='34' src='include/images/poweredby_sugarcrm_65.png' alt='Powered By SugarCRM'>\n";
     // handle resizing of the company logo correctly on the fly
     $companyLogoURL = $themeObject->getImageURL('company_logo.png');
     $companyLogoURL_arr = explode('?', $companyLogoURL);
     $companyLogoURL = $companyLogoURL_arr[0];
     $company_logo_attributes = sugar_cache_retrieve('company_logo_attributes');
     if (!empty($company_logo_attributes)) {
         $ss->assign("COMPANY_LOGO_MD5", $company_logo_attributes[0]);
         $ss->assign("COMPANY_LOGO_WIDTH", $company_logo_attributes[1]);
         $ss->assign("COMPANY_LOGO_HEIGHT", $company_logo_attributes[2]);
     } else {
         // Always need to md5 the file
         $ss->assign("COMPANY_LOGO_MD5", md5_file($companyLogoURL));
         list($width, $height) = getimagesize($companyLogoURL);
         if ($width > 212 || $height > 40) {
             $resizePctWidth = ($width - 212) / 212;
             $resizePctHeight = ($height - 40) / 40;
             if ($resizePctWidth > $resizePctHeight) {
                 $resizeAmount = $width / 212;
             } else {
                 $resizeAmount = $height / 40;
             }
             $ss->assign("COMPANY_LOGO_WIDTH", round($width * (1 / $resizeAmount)));
             $ss->assign("COMPANY_LOGO_HEIGHT", round($height * (1 / $resizeAmount)));
         } else {
             $ss->assign("COMPANY_LOGO_WIDTH", $width);
             $ss->assign("COMPANY_LOGO_HEIGHT", $height);
         }
         // Let's cache the results
         sugar_cache_put('company_logo_attributes', array($ss->get_template_vars("COMPANY_LOGO_MD5"), $ss->get_template_vars("COMPANY_LOGO_WIDTH"), $ss->get_template_vars("COMPANY_LOGO_HEIGHT")));
     }
     $ss->assign("COMPANY_LOGO_URL", getJSPath($companyLogoURL) . "&logo_md5=" . $ss->get_template_vars("COMPANY_LOGO_MD5"));
     // Bug 38594 - Add in Trademark wording
     $copyright .= 'SugarCRM is a trademark of SugarCRM, Inc. All other company and product names may be trademarks of the respective companies with which they are associated.<br />';
     //rrs bug: 20923 - if this image does not exist as per the license, then the proper image will be displayed regardless, so no need
     //to display an empty image here.
     if (file_exists('include/images/poweredby_sugarcrm_65.png')) {
         $copyright .= $attribLinkImg;
     }
     // End Required Image
     $ss->assign('COPYRIGHT', $copyright);
     // here we allocate the help link data
     $help_actions_blacklist = array('Login');
     // we don't want to show a context help link here
     if (!in_array($this->action, $help_actions_blacklist)) {
         $url = 'javascript:void(window.open(\'index.php?module=Administration&action=SupportPortal&view=documentation&version=' . $GLOBALS['sugar_version'] . '&edition=' . $GLOBALS['sugar_flavor'] . '&lang=' . $GLOBALS['current_language'] . '&help_module=' . $this->module . '&help_action=' . $this->action . '&key=' . $GLOBALS['server_unique_key'] . '\'))';
         $label = (isset($GLOBALS['app_list_strings']['moduleList'][$this->module]) ? $GLOBALS['app_list_strings']['moduleList'][$this->module] : $this->module) . ' ' . $app_strings['LNK_HELP'];
         $ss->assign('HELP_LINK', SugarThemeRegistry::current()->getLink($url, $label, "id='help_link_two'", 'help-dashlet.png', 'class="icon"', null, null, '', 'left'));
     }
     // end
     $ss->display(SugarThemeRegistry::current()->getTemplate('footer.tpl'));
 }
Exemplo n.º 2
0
$subpanel = $_REQUEST['subpanel'];
$record = $_REQUEST['record'];
$module = $_REQUEST['module'];
$collection = array();
if (isset($_REQUEST['collection_basic']) && $_REQUEST['collection_basic'][0] != 'null') {
    $_REQUEST['collection_basic'] = explode(',', $_REQUEST['collection_basic'][0]);
    $collection = $_REQUEST['collection_basic'];
}
if (empty($_REQUEST['inline'])) {
    insert_popup_header($theme);
}
//require_once('include/SubPanel/SubPanelDefinitions.php');
//require_once($beanFiles[$beanList[$_REQUEST['module']]]);
//$focus=new $beanList[$_REQUEST['module']];
//$focus->retrieve($record);
include 'custom/include/SubPanel/SubPanel.php';
$layout_def_key = '';
if (!empty($_REQUEST['layout_def_key'])) {
    $layout_def_key = $_REQUEST['layout_def_key'];
}
$subpanel_object = new CustomSubPanel($module, $record, $subpanel, null, $layout_def_key, $collection);
$subpanel_object->setTemplateFile('custom/include/SubPanel/SubPanelDynamic.html');
echo empty($_REQUEST['inline']) ? $subpanel_object->get_buttons() : '';
$subpanel_object->display();
$jsAlerts = new jsAlerts();
if (!isset($_SESSION['isMobile'])) {
    echo $jsAlerts->getScript();
}
if (empty($_REQUEST['inline'])) {
    insert_popup_footer($theme);
}
Exemplo n.º 3
0
 /**
  * This method will be called from the controller and is not meant to be overridden.
  */
 public function process()
 {
     LogicHook::initialize();
     $this->_checkModule();
     //trackView has to be here in order to track for breadcrumbs
     $this->_trackView();
     //For the ajaxUI, we need to use output buffering to return the page in an ajax friendly format
     if ($this->_getOption('json_output')) {
         ob_start();
         if (!empty($_REQUEST['ajax_load']) && !empty($_REQUEST['loadLanguageJS'])) {
             echo $this->_getModLanguageJS();
         }
     }
     if ($this->_getOption('show_header')) {
         $this->displayHeader();
     } else {
         $this->renderJavascript();
     }
     $this->_buildModuleList();
     $this->preDisplay();
     $this->displayErrors();
     $this->display();
     if (!empty($this->module)) {
         $GLOBALS['logic_hook']->call_custom_logic($this->module, 'after_ui_frame');
     } else {
         $GLOBALS['logic_hook']->call_custom_logic('', 'after_ui_frame');
     }
     // We have to update jsAlerts as soon as possible
     if (!isset($_SESSION['isMobile']) && ($this instanceof ViewList || $this instanceof ViewDetail || $this instanceof ViewEdit)) {
         $jsAlerts = new jsAlerts();
         echo $jsAlerts->getScript();
     }
     if ($this->_getOption('show_subpanels') && !empty($_REQUEST['record'])) {
         $this->_displaySubPanels();
     }
     if ($this->action === 'Login') {
         //this is needed for a faster loading login page ie won't render unless the tables are closed
         ob_flush();
     }
     if ($this->_getOption('show_footer')) {
         $this->displayFooter();
     }
     $GLOBALS['logic_hook']->call_custom_logic('', 'after_ui_footer');
     if ($this->_getOption('json_output')) {
         $content = ob_get_clean();
         $module = $this->module;
         $ajax_ret = array('content' => mb_detect_encoding($content) == "UTF-8" ? $content : utf8_encode($content), 'menu' => array('module' => $module, 'label' => translate($module), $this->getMenu($module)), 'title' => $this->getBrowserTitle(), 'action' => isset($_REQUEST['action']) ? $_REQUEST['action'] : "", 'record' => isset($_REQUEST['record']) ? $_REQUEST['record'] : "", 'favicon' => $this->getFavicon());
         if (SugarThemeRegistry::current()->name == 'Classic' || SugarThemeRegistry::current()->classic) {
             $ajax_ret['moduleList'] = $this->displayHeader(true);
         }
         if (empty($this->responseTime)) {
             $this->_calculateFooterMetrics();
         }
         $ajax_ret['responseTime'] = $this->responseTime;
         $json = getJSONobj();
         echo $json->encode($ajax_ret);
         $GLOBALS['app']->headerDisplayed = false;
         ob_flush();
     }
     //Do not track if there is no module or if module is not a String
     $this->_track();
 }
Exemplo n.º 4
0
    /**
     * Show a popup and/or desktop notification alert for related users with related Event information.
     * Call in jsAlerts class and use original jsAlerts for show notifications.
     *
     * @global ??? $current_user
     * @global ??? $timedate
     * @global ??? $app_list_strings
     * @global ??? $db
     * @global ??? $sugar_config
     * @global ??? $app_strings
     * @param jsAlerts $alert caller jsAlerts object
     * @param boolean $checkDecline (optional) Send email if user accept status is not decline. Default is TRUE.
     * @return ???
     */
    public static function addNotifications(jsAlerts $alert, $checkDecline = true)
    {
        global $current_user, $timedate, $app_list_strings, $db, $sugar_config, $app_strings;

        if (empty($current_user->id)) {
            return;
        }

        // Create separate variable to hold timedate value
        // These timedates need to be in the user time zone as the
        // datetime returned by the Bean below is in the user time zone
        $alertDateTimeNow = $timedate->getNow(true)->asDb(false);

        // cn: get a boundary limiter
        $dateTimeMax = $timedate->getNow(true)->modify("+{$app_list_strings['reminder_max_time']} seconds")->asDb(false);
        $dateTimeNow = $timedate->getNow(true)->asDb(false);

        $dateTimeNow = $db->convert($db->quoted($dateTimeNow), 'datetime');
        $dateTimeMax = $db->convert($db->quoted($dateTimeMax), 'datetime');

        // Original jsAlert used to a meeting integration.

        ///////////////////////////////////////////////////////////////////////
        ////	MEETING INTEGRATION
        $meetingIntegration = null;
        if (isset($sugar_config['meeting_integration']) && !empty($sugar_config['meeting_integration'])) {
            if (!class_exists($sugar_config['meeting_integration'])) {
                require_once("modules/{$sugar_config['meeting_integration']}/{$sugar_config['meeting_integration']}.php");
            }
            $meetingIntegration = new $sugar_config['meeting_integration']();
        }
        ////	END MEETING INTEGRATION
        ///////////////////////////////////////////////////////////////////////

        $popupReminders = BeanFactory::getBean('Reminders')->get_full_list('', "reminders.popup = 1");

        if ($popupReminders) {
            foreach ($popupReminders as $popupReminder) {
                $relatedEvent = BeanFactory::getBean($popupReminder->related_event_module, $popupReminder->related_event_module_id);
                if ($relatedEvent &&
                    (!isset($relatedEvent->status) || $relatedEvent->status == 'Planned') &&
                    (!isset($relatedEvent->date_start) || (strtotime($relatedEvent->date_start) >= strtotime(self::unQuoteTime($dateTimeNow)) && strtotime($relatedEvent->date_start) <= strtotime(self::unQuoteTime($dateTimeMax)))) &&
                    (!$checkDecline || ($checkDecline && !self::isDecline($relatedEvent, BeanFactory::getBean('Users', $current_user->id))))
                ) {
                    // The original popup/alert reminders check the accept_status field in related users/leads/contacts etc. and filtered these users who not decline this event.
                    $invitees = BeanFactory::getBean('Reminders_Invitees')->get_full_list('', "reminders_invitees.reminder_id = '{$popupReminder->id}' AND reminders_invitees.related_invitee_module_id = '{$current_user->id}'");
                    if ($invitees) {
                        foreach ($invitees as $invitee) {
                            // need to concatenate since GMT times can bridge two local days
                            $timeStart = strtotime($db->fromConvert(isset($relatedEvent->date_start) ? $relatedEvent->date_start : date(TimeDate::DB_DATETIME_FORMAT), 'datetime'));
                            $timeRemind = $popupReminder->timer_popup;
                            $timeStart -= $timeRemind;

                            $url = 'index.php?action=DetailView&module=' . $popupReminder->related_event_module . '&record=' . $popupReminder->related_event_module_id;
                            $instructions = $app_strings['MSG_JS_ALERT_MTG_REMINDER_MEETING_MSG'];

                            if ($popupReminder->related_event_module == 'Meetings') {
                                ///////////////////////////////////////////////////////////////////
                                ////	MEETING INTEGRATION
                                if (!empty($meetingIntegration) && $meetingIntegration->isIntegratedMeeting($popupReminder->related_event_module_id)) {
                                    $url = $meetingIntegration->miUrlGetJsAlert((array)$popupReminder);
                                    $instructions = $meetingIntegration->miGetJsAlertInstructions();
                                }
                                ////	END MEETING INTEGRATION
                                ///////////////////////////////////////////////////////////////////
                            }

                            $meetingName = from_html(isset($relatedEvent->name) ? $relatedEvent->name : $app_strings['MSG_JS_ALERT_MTG_REMINDER_NO_EVENT_NAME']);
                            $desc1 = from_html(isset($relatedEvent->description) ? $relatedEvent->description : $app_strings['MSG_JS_ALERT_MTG_REMINDER_NO_DESCRIPTION']);
                            $location = from_html(isset($relatedEvent->location) ? $relatedEvent->location : $app_strings['MSG_JS_ALERT_MTG_REMINDER_NO_LOCATION']);

                            $relatedToMeeting = $alert->getRelatedName($popupReminder->related_event_module, $popupReminder->related_event_module_id);

                            $description = empty($desc1) ? '' : $app_strings['MSG_JS_ALERT_MTG_REMINDER_AGENDA'] . $desc1 . "\n";
                            $description = $description . "\n" . $app_strings['MSG_JS_ALERT_MTG_REMINDER_STATUS'] . (isset($relatedEvent->status) ? $relatedEvent->status : '') . "\n" . $app_strings['MSG_JS_ALERT_MTG_REMINDER_RELATED_TO'] . $relatedToMeeting;


                            if (isset($relatedEvent->date_start)) {
                                $time_dbFromConvert = $db->fromConvert($relatedEvent->date_start, 'datetime');
                                $time = $timedate->to_display_date_time($time_dbFromConvert);
                                if (!$time) {
                                    $time = $relatedEvent->date_start;
                                }
                                if (!$time) {
                                    $time = $app_strings['MSG_JS_ALERT_MTG_REMINDER_NO_START_DATE'];
                                }
                            } else {
                                $time = $app_strings['MSG_JS_ALERT_MTG_REMINDER_NO_START_DATE'];
                            }

                            // standard functionality
                            $alert->addAlert($app_strings['MSG_JS_ALERT_MTG_REMINDER_MEETING'], $meetingName,
                                $app_strings['MSG_JS_ALERT_MTG_REMINDER_TIME'] . $time,
                                $app_strings['MSG_JS_ALERT_MTG_REMINDER_LOC'] . $location .
                                $description .
                                $instructions,
                                $timeStart - strtotime($alertDateTimeNow),
                                $url
                            );
                        }
                    }
                }
            }
        }
    }
Exemplo n.º 5
0
 public function testGetDeclinedAlertsForUser()
 {
     global $app_list_strings;
     $app_list_strings['reminder_max_time'] = 5000;
     $m = $this->createNewMeeting();
     //Decline the meeting
     $query = "UPDATE meetings_users SET deleted = 0, accept_status = 'decline' " . "WHERE meeting_id = '{$m->id}' AND user_id = '{$this->_user->id}'";
     $m->db->query($query);
     $alerts = new jsAlerts();
     $script = $alerts->getScript();
     $this->assertNotRegExp("/addAlert.*\"{$m->name}\"/", $script);
 }
Exemplo n.º 6
0
 /**
  * Called from process(). This method will display the footer on the page.
  */
 public function displayFooter()
 {
     if (empty($this->responseTime)) {
         $this->_calculateFooterMetrics();
     }
     global $sugar_config;
     global $app_strings;
     //decide whether or not to show themepicker, default is to show
     $showThemePicker = true;
     if (isset($sugar_config['showThemePicker'])) {
         $showThemePicker = $sugar_config['showThemePicker'];
     }
     echo "<!-- crmprint -->";
     $jsalerts = new jsAlerts();
     if (!isset($_SESSION['isMobile'])) {
         echo $jsalerts->getScript();
     }
     $ss = new Sugar_Smarty();
     $ss->assign("AUTHENTICATED", isset($_SESSION["authenticated_user_id"]));
     $ss->assign('MOD', return_module_language($GLOBALS['current_language'], 'Users'));
     $bottomLinkList = array();
     if (isset($this->action) && $this->action != "EditView") {
         $bottomLinkList['print'] = array($app_strings['LNK_PRINT'] => 'javascript:void window.open(\'index.php?' . $GLOBALS['request_string'] . '\',\'printwin\',\'menubar=1,status=0,resizable=1,scrollbars=1,toolbar=0,location=1\')');
     }
     $bottomLinkList['backtotop'] = array($app_strings['LNK_BACKTOTOP'] => '#top');
     $bottomLinksStr = "";
     foreach ($bottomLinkList as $key => $value) {
         foreach ($value as $text => $link) {
             $href = $link;
             if (substr($link, 0, 11) == "javascript:") {
                 $onclick = " onclick=\"" . substr($link, 11) . "\"";
                 $href = "#";
             } else {
                 $onclick = "";
             }
             $imageURL = SugarThemeRegistry::current()->getImageURL($key . '.gif');
             $bottomLinksStr .= "<a href=\"{$href}\"";
             $bottomLinksStr .= isset($onclick) ? $onclick : "";
             $bottomLinksStr .= "><img src='{$imageURL}' alt='{$text}'></a>";
             $bottomLinksStr .= " <a href=\"{$href}\" class=\"bottomLink\"";
             $bottomLinksStr .= isset($onclick) ? $onclick : "";
             $bottomLinksStr .= ">" . $text . "</a>";
         }
     }
     $ss->assign("BOTTOMLINKS", $bottomLinksStr);
     if (SugarConfig::getInstance()->get('calculate_response_time', false)) {
         $ss->assign('STATISTICS', $this->_getStatistics());
     }
     // Under the License referenced above, you are required to leave in all copyright statements in both
     // the code and end-user application.
     $copyright = '&copy; 2004-2011 SugarCRM Inc. The Program is provided AS IS, without warranty.  Licensed under <a href="LICENSE.txt" target="_blank" class="copyRightLink">AGPLv3</a>.<br>This program is free software; you can redistribute it and/or modify it under the terms of the <br><a href="LICENSE.txt" target="_blank" class="copyRightLink"> GNU Affero General Public License version 3</a> as published by the Free Software Foundation, including the additional permission set forth in the source code header.<br>';
     // The interactive user interfaces in modified source and object code
     // versions of this program must display Appropriate Legal Notices, as
     // required under Section 5 of the GNU General Public License version
     // 3. In accordance with Section 7(b) of the GNU General Public License
     // version 3, these Appropriate Legal Notices must retain the display
     // of the "Powered by SugarCRM" logo. If the display of the logo is
     // not reasonably feasible for technical reasons, the Appropriate
     // Legal Notices must display the words "Powered by SugarCRM".
     $attribLinkImg = "<img style='margin-top: 2px' border='0' width='106' height='23' src='include/images/poweredby_sugarcrm.png' alt='Powered By SugarCRM'>\n";
     // Bug 38594 - Add in Trademark wording
     $copyright .= 'SugarCRM is a trademark of SugarCRM, Inc. All other company and product names may be trademarks of the respective companies with which they are associated.<br />';
     //rrs bug: 20923 - if this image does not exist as per the license, then the proper image will be displaye regardless, so no need
     //to display an empty image here.
     if (file_exists('include/images/poweredby_sugarcrm.png')) {
         $copyright .= $attribLinkImg;
     }
     // End Required Image
     $ss->assign('COPYRIGHT', $copyright);
     $ss->display(SugarThemeRegistry::current()->getTemplate('footer.tpl'));
 }
Exemplo n.º 7
0
    echo '<link rel="stylesheet" type="text/css" media="all" href="themes/' . $theme . '/calendar-win2k-cold-1.css?s=' . $sugar_version . '&c=' . $sugar_config['js_custom_version'] . '">';
    echo '<script>jscal_today = ' . 1000 * strtotime($timedate->handle_offset(gmdate('Y-m-d H:i:s', gmmktime()), 'Y-m-d H:i:s')) . '; if(typeof app_strings == "undefined") app_strings = new Array();</script>';
    echo '<script type="text/javascript" src="jscalendar/calendar.js?s=' . $sugar_version . '&c=' . $sugar_config['js_custom_version'] . '"></script>';
    echo '<script type="text/javascript" src="jscalendar/lang/calendar-en.js?s=' . $sugar_version . '&c=' . $sugar_config['js_custom_version'] . '"></script>';
    echo '<script type="text/javascript" src="jscalendar/calendar-setup_3.js?s=' . $sugar_version . '&c=' . $sugar_config['js_custom_version'] . '"></script>';
    echo '<script src="include/javascript/yui/YAHOO.js?s=' . $sugar_version . '&c=' . $sugar_config['js_custom_version'] . '"></script>';
    echo '<script src="include/javascript/yui/log.js?s=' . $sugar_version . '&c=' . $sugar_config['js_custom_version'] . '"></script>';
    echo '<script src="include/javascript/yui/dom.js?s=' . $sugar_version . '&c=' . $sugar_config['js_custom_version'] . '"></script>';
    echo '<script src="include/javascript/yui/event.js?s=' . $sugar_version . '&c=' . $sugar_config['js_custom_version'] . '"></script>';
    echo '<script src="include/javascript/yui/animation.js?s=' . $sugar_version . '&c=' . $sugar_config['js_custom_version'] . '"></script>';
    echo '<script src="include/javascript/yui/connection.js?s=' . $sugar_version . '&c=' . $sugar_config['js_custom_version'] . '"></script>';
    echo '<script src="include/javascript/yui/dragdrop.js?s=' . $sugar_version . '&c=' . $sugar_config['js_custom_version'] . '"></script>';
    echo '<script src="include/javascript/yui/ygDDList.js?s=' . $sugar_version . '&c=' . $sugar_config['js_custom_version'] . '"></script>';
    echo '<script type="text/javascript" src="include/javascript/sugar_3.js?s=' . $sugar_version . '&c=' . $sugar_config['js_custom_version'] . '"></script>';
    echo $timedate->get_javascript_validation();
    $jsalerts = new jsAlerts();
    if (!is_file($sugar_config['cache_dir'] . 'jsLanguage/' . $current_language . '.js')) {
        require_once 'include/language/jsLanguage.php';
        jsLanguage::createAppStringsCache($current_language);
    }
    echo '<script type="text/javascript" src="' . $sugar_config['cache_dir'] . 'jsLanguage/' . $current_language . '.js?s=' . $sugar_version . '&c=' . $sugar_config['js_custom_version'] . '&j=' . $sugar_config['js_lang_version'] . '"></script>';
    if (!is_file($sugar_config['cache_dir'] . 'jsLanguage/' . $currentModule . '/' . $current_language . '.js')) {
        require_once 'include/language/jsLanguage.php';
        jsLanguage::createModuleStringsCache($currentModule, $current_language);
    }
    echo '<script type="text/javascript" src="' . $sugar_config['cache_dir'] . 'jsLanguage/' . $currentModule . '/' . $current_language . '.js?s=' . $sugar_version . '&c=' . $sugar_config['js_custom_version'] . '&j=' . $sugar_config['js_lang_version'] . '"></script>';
}
// Set module shortcuts menu to an empty array, in case
// we don't have access to the module
if (!isset($module_menu)) {
    $module_menu = array();
 /**
  * Called from process(). This method will display the footer on the page.
  */
 function displayFooter()
 {
     if (empty($this->responseTime)) {
         $this->calculateFooterMetrics();
     }
     global $sugar_config;
     global $app_strings;
     //decide whether or not to show themepicker, default is to show
     $showThemePicker = true;
     if (isset($sugar_config['showThemePicker'])) {
         $showThemePicker = $sugar_config['showThemePicker'];
     }
     echo "<!-- crmprint -->";
     $jsalerts = new jsAlerts();
     if (!isset($_SESSION['isMobile'])) {
         echo $jsalerts->getScript();
     }
     $ss = new Sugar_Smarty();
     $ss->assign("AUTHENTICATED", isset($_SESSION["authenticated_user_id"]));
     $ss->assign('MOD', return_module_language($GLOBALS['current_language'], 'Users'));
     if (SugarConfig::getInstance()->get('calculate_response_time', false)) {
         $ss->assign('STATISTICS', $this->_getStatistics());
     }
     // Under the License referenced above, you are required to leave in all copyright statements in both
     // the code and end-user application.
     $copyright = '&copy; 2004-2009 SugarCRM Inc. The Program is provided AS IS, without warranty.  Licensed under <a href="LICENSE.txt" target="_blank" class="copyRightLink">GPLv3</a>.<br>This program is free software; you can redistribute it and/or modify it under the terms of the <br><a href="LICENSE.txt" target="_blank" class="copyRightLink"> GNU General Public License version 3</a> as published by the Free Software Foundation including the additional permission set forth in the source code header.<br>';
     // The interactive user interfaces in modified source and object code
     // versions of this program must display Appropriate Legal Notices, as
     // required under Section 5 of the GNU General Public License version
     // 3. In accordance with Section 7(b) of the GNU General Public License
     // version 3, these Appropriate Legal Notices must retain the display
     // of the "Powered by SugarCRM" logo. If the display of the logo is
     // not reasonably feasible for technical reasons, the Appropriate
     // Legal Notices must display the words "Powered by SugarCRM".
     $attribLinkImg = "<img style='margin-top: 2px' border='0' width='106' height='23' src='include/images/poweredby_sugarcrm.png' alt='Powered By SugarCRM'>\n";
     //rrs bug: 20923 - if this image does not exist as per the license, then the proper image will be displaye regardless, so no need
     //to display an empty image here.
     if (file_exists('include/images/poweredby_sugarcrm.png')) {
         $copyright .= $attribLinkImg;
     }
     // End Required Image
     $ss->assign('COPYRIGHT', $copyright);
     $ss->display(SugarThemeRegistry::current()->getTemplate('footer.tpl'));
 }