当前位置: 首页>>代码示例>>PHP>>正文


PHP get_language_header函数代码示例

本文整理汇总了PHP中get_language_header函数的典型用法代码示例。如果您正苦于以下问题:PHP get_language_header函数的具体用法?PHP get_language_header怎么用?PHP get_language_header使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_language_header函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: die

 * 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".
 ********************************************************************************/
global $sugar_version, $js_custom_version;
if (!isset($install_script) || !$install_script) {
    die('Unable to process script directly.');
}
// setup session variables (and their defaults) if this page has not yet been submitted
if (!isset($_SESSION['license_submitted']) || !$_SESSION['license_submitted']) {
    $_SESSION['setup_license_accept'] = false;
}
$checked = isset($_SESSION['setup_license_accept']) && !empty($_SESSION['setup_license_accept']) ? 'checked="on"' : '';
require_once "install/install_utils.php";
$license_file = getLicenseContents("LICENSE.txt");
$langHeader = get_language_header();
$out = <<<EOQ
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html {$langHeader}>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   <meta http-equiv="Content-Style-Type" content="text/css">
   <title>{$mod_strings['LBL_WIZARD_TITLE']} {$mod_strings['LBL_LICENSE_ACCEPTANCE']}</title>
   <link REL="SHORTCUT ICON" HREF="include/images/sugar_icon.ico">
   <link rel="stylesheet" href="install/install.css" type="text/css">
   <script src="cache/include/javascript/sugar_grp1_yui.js?s={$sugar_version}&c={$js_custom_version}"></script>
   <script type="text/javascript">
    <!--
    if ( YAHOO.env.ua )
        UA = YAHOO.env.ua;
    -->
开发者ID:thsonvt,项目名称:sugarcrm_dev,代码行数:31,代码来源:license.php

示例2: insert_popup_header

/**
 * Create a header for a popup.
 *
 * @todo refactor this into the base Popup_Picker class
 *
 * @param  $theme string the name of the current theme, ignorred to use SugarThemeRegistry::current() instead.
 * @return string HTML
 */
function insert_popup_header($theme = null, $includeJS = true)
{
    global $app_strings, $sugar_config;
    $themeCSS = SugarThemeRegistry::current()->getCSS();
    $langHeader = get_language_header();
    //The SugarView will insert the header now, this function should no longer do the actual head element.
    if ($includeJS) {
        echo <<<EOHTML
<!DOCTYPE HTML>
<html {$langHeader}>
<head>
EOHTML;
    }
    if (isset($sugar_config['meta_tags']) && isset($sugar_config['meta_tags']['IE_COMPAT_MODE'])) {
        echo $sugar_config['meta_tags']['IE_COMPAT_MODE'];
    }
    echo "<title>{$app_strings['LBL_BROWSER_TITLE']}</title>" . $themeCSS;
    if ($includeJS) {
        $charset = isset($app_strings['LBL_CHARSET']) ? $app_strings['LBL_CHARSET'] : $sugar_config['default_charset'];
        echo '<meta http-equiv="Content-Type" content="text/html; charset="{$charset}">';
        echo '<script type="text/javascript" src="' . getJSPath('cache/include/javascript/sugar_grp1_yui.js') . '"></script>';
        echo '<script type="text/javascript" src="' . getJSPath('cache/include/javascript/sugar_grp1.js') . '"></script>';
    }
    /* Fix to include files required to make pop-ups responsive */
    echo '<meta http-equiv="X-UA-Compatible" content="IE=edge">';
    echo '<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />';
    echo '<link href="themes/SuiteR/css/bootstrap.min.css" rel="stylesheet">';
    echo '<link href="themes/SuiteR/css/colourSelector.php" rel="stylesheet">';
    echo '</head>';
    echo '<body class="popupBody">';
}
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:39,代码来源:layout_utils.php

示例3: _displayJavascript

    /**
     * Called from process(). This method will display the correct javascript.
     */
    protected function _displayJavascript()
    {
        global $locale, $sugar_config, $timedate;
        if ($this->_getOption('show_javascript')) {
            if (!$this->_getOption('show_header')) {
                $langHeader = get_language_header();
                echo <<<EOHTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html {$langHeader}>
<head>
EOHTML;
            }
            $js_vars = array("sugar_cache_dir" => "cache/");
            if (isset($this->bean->module_dir)) {
                $js_vars['module_sugar_grp1'] = $this->bean->module_dir;
            }
            if (isset($_REQUEST['action'])) {
                $js_vars['action_sugar_grp1'] = $_REQUEST['action'];
            }
            echo '<script>jscal_today = 1000*' . $timedate->asUserTs($timedate->getNow()) . '; if(typeof app_strings == "undefined") app_strings = new Array();</script>';
            if (!is_file(sugar_cached("include/javascript/sugar_grp1.js")) || !is_file(sugar_cached("include/javascript/sugar_grp1_yui.js")) || !is_file(sugar_cached("include/javascript/sugar_grp1_jquery.js"))) {
                $_REQUEST['root_directory'] = ".";
                require_once "jssource/minify_utils.php";
                ConcatenateFiles(".");
            }
            echo getVersionedScript('cache/include/javascript/sugar_grp1_jquery.js');
            echo getVersionedScript('cache/include/javascript/sugar_grp1_yui.js');
            echo getVersionedScript('cache/include/javascript/sugar_grp1.js');
            echo getVersionedScript('include/javascript/calendar.js');
            // output necessary config js in the top of the page
            $config_js = $this->getSugarConfigJS();
            if (!empty($config_js)) {
                echo "<script>\n" . implode("\n", $config_js) . "</script>\n";
            }
            if (isset($sugar_config['email_sugarclient_listviewmaxselect'])) {
                echo "<script>SUGAR.config.email_sugarclient_listviewmaxselect = {$GLOBALS['sugar_config']['email_sugarclient_listviewmaxselect']};</script>";
            }
            $image_server = defined('TEMPLATE_URL') ? TEMPLATE_URL . '/' : '';
            echo '<script type="text/javascript">SUGAR.themes.image_server="' . $image_server . '";</script>';
            // cn: bug 12274 - create session-stored key to defend against CSRF
            echo '<script type="text/javascript">var name_format = "' . $locale->getLocaleFormatMacro() . '";</script>';
            echo self::getJavascriptValidation();
            if (!is_file(sugar_cached('jsLanguage/') . $GLOBALS['current_language'] . '.js')) {
                require_once 'include/language/jsLanguage.php';
                jsLanguage::createAppStringsCache($GLOBALS['current_language']);
            }
            echo getVersionedScript('cache/jsLanguage/' . $GLOBALS['current_language'] . '.js', $GLOBALS['sugar_config']['js_lang_version']);
            echo $this->_getModLanguageJS();
            if (isset($sugar_config['disc_client']) && $sugar_config['disc_client']) {
                echo getVersionedScript('modules/Sync/headersync.js');
            }
            //echo out the $js_vars variables as javascript variables
            echo "<script type='text/javascript'>\n";
            foreach ($js_vars as $var => $value) {
                echo "var {$var} = '{$value}';\n";
            }
            echo "</script>\n";
        }
    }
开发者ID:omusico,项目名称:sugar_work,代码行数:62,代码来源:SugarView.php

示例4: prepForOutbound

    /**
     * handles Charset translation for all visual parts of the email.
     * @param string charset Default = ''
     */
    function prepForOutbound()
    {
        global $locale;
        if ($this->preppedForOutbound == false) {
            //bug 28534. We should not set it to true to circumvent the following conversion as each email is independent.
            //$this->preppedForOutbound = true; // flag so we don't redo this
            $OBCharset = $locale->getPrecedentPreference('default_email_charset');
            // handle disclosure
            if ($this->disclosureEnabled) {
                $this->Body .= "<br />&nbsp;<br />{$this->disclosureText}";
                $this->AltBody .= "\r\r{$this->disclosureText}";
            }
            // body text
            $this->Body = from_html($locale->translateCharset(trim($this->Body), 'UTF-8', $OBCharset));
            $this->AltBody = from_html($locale->translateCharset(trim($this->AltBody), 'UTF-8', $OBCharset));
            $subjectUTF8 = from_html(trim($this->Subject));
            $subject = $locale->translateCharset($subjectUTF8, 'UTF-8', $OBCharset);
            $this->Subject = $locale->translateCharset($subjectUTF8, 'UTF-8', $OBCharset);
            // HTML email RFC compliance
            if ($this->ContentType == "text/html") {
                if (strpos($this->Body, '<html') === false) {
                    $langHeader = get_language_header();
                    $head = <<<eoq
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" {$langHeader}>
<head>
\t<meta http-equiv="Content-Type" content="text/html; charset={$OBCharset}" />
<title>{$subject}</title>
</head>
<body>
eoq;
                    $this->Body = $head . $this->Body . "</body></html>";
                }
            }
            // Headers /////////////////////////////////
            // the below is done in PHPMailer::CreateHeader();
            //$this->Subject			= $locale->translateCharsetMIME(trim($this->Subject), 'UTF-8', $locale->getPrecedentPreference('default_email_charset'));
            $this->FromName = $locale->translateCharset(trim($this->FromName), 'UTF-8', $OBCharset);
            /*
            foreach($this->ReplyTo as $k => $v) {
            	$this->ReplyTo[$k][1] = $locale->translateCharset(trim($v[1]), 'UTF-8', $OBCharset);
            }
            // TO: fields
            foreach($this->to as $k => $toArr) {
            	$this->to[$k][1]	= $locale->translateCharset(trim($toArr[1]), 'UTF-8', $OBCharset);
            }
            // CC: fields
            foreach($this->cc as $k => $ccAddr) {
            	$this->cc[$k][1]	= $locale->translateCharset(trim($ccAddr[1]), 'UTF-8', $OBCharset);
            }
            // BCC: fields
            foreach($this->bcc as $k => $bccAddr) {
            	$this->bcc[$k][1]	= $locale->translateCharset(trim($bccAddr[1]), 'UTF-8', $OBCharset);
            }
            */
        }
    }
开发者ID:omusico,项目名称:sugar_work,代码行数:61,代码来源:SugarPHPMailer.php

示例5: startRun

 /**
  * Handler for 'start run' event.
  *
  */
 protected function startRun()
 {
     $this->write('<html ' . get_language_header() . '><body>');
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:8,代码来源:HTML.php

示例6: get_mailmerge_document2

/**
 * Enter description here...
 *
 * @param String $session -- Session ID returned by a previous call to login.
 * @param unknown_type $file_name
 * @param unknown_type $fields
 * @return unknown
 */
function get_mailmerge_document2($session, $file_name, $fields)
{
    global $beanList, $beanFiles, $app_list_strings, $app_strings;
    $error = new SoapError();
    if (!validate_authenticated($session)) {
        $GLOBALS['log']->error('invalid_login');
        $error->set_error('invalid_login');
        return array('result' => '', 'error' => $error->get_soap_array());
    }
    if (!preg_match('/^sugardata[\\.\\d\\s]+\\.php$/', $file_name)) {
        $GLOBALS['log']->error($app_strings['ERR_NO_SUCH_FILE'] . " ({$file_name})");
        $error->set_error('no_records');
        return array('result' => '', 'error' => $error->get_soap_array());
    }
    $html = '';
    $file_name = sugar_cached('MergedDocuments/') . pathinfo($file_name, PATHINFO_BASENAME);
    $master_fields = array();
    $related_fields = array();
    if (file_exists($file_name)) {
        include $file_name;
        $class1 = $merge_array['master_module'];
        $beanL = $beanList[$class1];
        $bean1 = $beanFiles[$beanL];
        require_once $bean1;
        $seed1 = new $beanL();
        if (!empty($merge_array['related_module'])) {
            $class2 = $merge_array['related_module'];
            $beanR = $beanList[$class2];
            $bean2 = $beanFiles[$beanR];
            require_once $bean2;
            $seed2 = new $beanR();
        }
        //parse fields
        //$token1 = strtolower($class1);
        if ($class1 == 'Prospects') {
            $class1 = 'CampaignProspects';
        }
        foreach ($fields as $field) {
            $pos = strpos(strtolower($field), strtolower($class1));
            $pos2 = strpos(strtolower($field), strtolower($class2));
            if ($pos !== false) {
                $fieldName = str_replace(strtolower($class1) . '_', '', strtolower($field));
                array_push($master_fields, $fieldName);
            } else {
                if ($pos2 !== false) {
                    $fieldName = str_replace(strtolower($class2) . '_', '', strtolower($field));
                    array_push($related_fields, $fieldName);
                }
            }
        }
        $html = '<html ' . get_language_header() . '><body><table border = 1><tr>';
        foreach ($master_fields as $master_field) {
            $html .= '<td>' . $class1 . '_' . $master_field . '</td>';
        }
        foreach ($related_fields as $related_field) {
            $html .= '<td>' . $class2 . '_' . $related_field . '</td>';
        }
        $html .= '</tr>';
        $ids = $merge_array['ids'];
        $resultIds = array();
        $is_prospect_merge = $seed1->object_name == 'Prospect';
        if ($is_prospect_merge) {
            $pSeed = $seed1;
        }
        foreach ($ids as $key => $value) {
            if ($is_prospect_merge) {
                $seed1 = $pSeed->retrieveTarget($key);
            } else {
                $seed1->retrieve($key);
            }
            $resultIds[] = array('name' => $seed1->module_name, 'value' => $key);
            $html .= '<tr>';
            foreach ($master_fields as $master_field) {
                if (isset($seed1->{$master_field})) {
                    if ($seed1->field_name_map[$master_field]['type'] == 'enum') {
                        //pull in the translated dom
                        $html .= '<td>' . $app_list_strings[$seed1->field_name_map[$master_field]['options']][$seed1->{$master_field}] . '</td>';
                    } else {
                        if ($seed1->field_name_map[$master_field]['type'] == 'multienum') {
                            if (isset($app_list_strings[$seed1->field_name_map[$master_field]['options']])) {
                                $items = unencodeMultienum($seed1->{$master_field});
                                $output = array();
                                foreach ($items as $item) {
                                    if (!empty($app_list_strings[$seed1->field_name_map[$master_field]['options']][$item])) {
                                        array_push($output, $app_list_strings[$seed1->field_name_map[$master_field]['options']][$item]);
                                    }
                                }
                                // foreach
                                $encoded_output = encodeMultienumValue($output);
                                $html .= "<td>{$encoded_output}</td>";
                            }
                        } else {
//.........这里部分代码省略.........
开发者ID:sunmo,项目名称:snowlotus,代码行数:101,代码来源:SoapSugarUsers.php

示例7: display


//.........这里部分代码省略.........
        if (!$current_user->getPreference('ut')) {
            $this->ss->assign('PROMPTTZ', ' checked');
        }
        $this->ss->assign('TIMEZONE_CURRENT', $userTZ);
        $this->ss->assign('TIMEZONEOPTIONS', TimeDate::getTimezoneList());
        //// Numbers and Currency display
        require_once 'modules/Currencies/ListCurrency.php';
        $currency = new ListCurrency();
        // 10/13/2006 Collin - Changed to use Localization.getConfigPreference
        // This was the problem- Previously, the "-99" currency id always assumed
        // to be defaulted to US Dollars.  However, if someone set their install to use
        // Euro or other type of currency then this setting would not apply as the
        // default because it was being overridden by US Dollars.
        $cur_id = $locale->getPrecedentPreference('currency', $current_user);
        if ($cur_id) {
            $selectCurrency = $currency->getSelectOptions($cur_id);
            $this->ss->assign("CURRENCY", $selectCurrency);
        } else {
            $selectCurrency = $currency->getSelectOptions();
            $this->ss->assign("CURRENCY", $selectCurrency);
        }
        $currenciesArray = $locale->currencies;
        $currenciesVars = $this->correctCurrenciesSymbolsSort($currenciesArray);
        $currencySymbolsJs = <<<eoq
var currencies = new Object;
{$currenciesVars}
function setSymbolValue(id) {
\tdocument.getElementById('symbol').value = currencies[id];
}
eoq;
        $this->ss->assign('currencySymbolJs', $currencySymbolsJs);
        // fill significant digits dropdown
        $significantDigits = $locale->getPrecedentPreference('default_currency_significant_digits', $current_user);
        $sigDigits = '';
        for ($i = 0; $i <= 6; $i++) {
            if ($significantDigits == $i) {
                $sigDigits .= "<option value=\"{$i}\" selected=\"true\">{$i}</option>";
            } else {
                $sigDigits .= "<option value=\"{$i}\">{$i}</option>";
            }
        }
        $this->ss->assign('sigDigits', $sigDigits);
        $num_grp_sep = $current_user->getPreference('num_grp_sep');
        $dec_sep = $current_user->getPreference('dec_sep');
        $this->ss->assign("NUM_GRP_SEP", empty($num_grp_sep) ? $sugar_config['default_number_grouping_seperator'] : $num_grp_sep);
        $this->ss->assign("DEC_SEP", empty($dec_sep) ? $sugar_config['default_decimal_seperator'] : $dec_sep);
        $this->ss->assign('getNumberJs', $locale->getNumberJs());
        //// Name display format
        $this->ss->assign('default_locale_name_format', $locale->getLocaleFormatMacro($current_user));
        $this->ss->assign('getNameJs', $locale->getNameJs());
        $this->ss->assign('TIMEOPTIONS', get_select_options_with_id($sugar_config['time_formats'], $current_user->_userPreferenceFocus->getDefaultPreference('default_time_format')));
        $this->ss->assign('DATEOPTIONS', get_select_options_with_id($sugar_config['date_formats'], $current_user->_userPreferenceFocus->getDefaultPreference('default_date_format')));
        $this->ss->assign("MAIL_SENDTYPE", get_select_options_with_id($app_list_strings['notifymail_sendtype'], $current_user->getPreference('mail_sendtype')));
        $this->ss->assign("NEW_EMAIL", $current_user->emailAddress->getEmailAddressWidgetEditView($current_user->id, $current_user->module_dir));
        $this->ss->assign('EMAIL_LINK_TYPE', get_select_options_with_id($app_list_strings['dom_email_link_type'], $current_user->getPreference('email_link_type')));
        $selectedLocaleNameFormat = $current_user->_userPreferenceFocus->getDefaultPreference('default_locale_name_format');
        if (array_key_exists($selectedLocaleNameFormat, $sugar_config['name_formats'])) {
            $selectedLocaleNameFormat = $sugar_config['default_locale_name_format'];
        }
        $this->ss->assign('NAMEOPTIONS', get_select_options_with_id($locale->getUsableLocaleNameOptions($sugar_config['name_formats']), $selectedLocaleNameFormat));
        // email smtp
        $systemOutboundEmail = new OutboundEmail();
        $systemOutboundEmail = $systemOutboundEmail->getSystemMailerSettings();
        $mail_smtpserver = $systemOutboundEmail->mail_smtpserver;
        $mail_smtptype = $systemOutboundEmail->mail_smtptype;
        $mail_smtpport = $systemOutboundEmail->mail_smtpport;
        $mail_smtpssl = $systemOutboundEmail->mail_smtpssl;
        $mail_smtpdisplay = $systemOutboundEmail->mail_smtpdisplay;
        $mail_smtpuser = "";
        $mail_smtppass = "";
        $hide_if_can_use_default = true;
        $mail_smtpauth_req = true;
        if (!empty($mail_smtpserver) && !empty($mail_smtptype)) {
            if (!$systemOutboundEmail->isAllowUserAccessToSystemDefaultOutbound()) {
                $mail_smtpauth_req = $systemOutboundEmail->mail_smtpauth_req;
                $userOverrideOE = $systemOutboundEmail->getUsersMailerForSystemOverride($current_user->id);
                if ($userOverrideOE != null) {
                    $mail_smtpuser = $userOverrideOE->mail_smtpuser;
                    $mail_smtppass = $userOverrideOE->mail_smtppass;
                }
                if (!$mail_smtpauth_req && (empty($systemOutboundEmail->mail_smtpserver) || empty($systemOutboundEmail->mail_smtpuser) || empty($systemOutboundEmail->mail_smtppass))) {
                    $hide_if_can_use_default = true;
                } else {
                    $hide_if_can_use_default = false;
                }
            }
        }
        $isAdmin = is_admin($current_user);
        $this->ss->assign('IS_ADMIN', $isAdmin);
        $this->ss->assign("mail_smtpdisplay", $mail_smtpdisplay);
        $this->ss->assign("mail_smtpuser", $mail_smtpuser);
        $this->ss->assign("mail_smtppass", $mail_smtppass);
        $this->ss->assign('mail_smtpserver', $mail_smtpserver);
        $this->ss->assign("mail_smtpauth_req", $mail_smtpauth_req);
        $this->ss->assign('MAIL_SMTPPORT', $mail_smtpport);
        $this->ss->assign('MAIL_SMTPSSL', $mail_smtpssl);
        $this->ss->assign('HIDE_IF_CAN_USE_DEFAULT_OUTBOUND', $hide_if_can_use_default);
        $this->ss->assign('langHeader', get_language_header());
        $this->ss->display($this->getCustomFilePathIfExists('modules/Users/tpls/wizard.tpl'));
    }
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:101,代码来源:view.wizard.php

示例8: getOutput

    /**
     * @param $header install page head
     * @param $form install page form step
     * @return string install page
     */
    private function getOutput($header, $form, $sugar_md, $mod_strings)
    {
        $langHeader = get_language_header();
        $out = <<<EOQ
    <!DOCTYPE HTML>
    <html {$langHeader}>
    {$header}
    <body onload="//document.getElementById('button_next2').focus();">
        <!--SuiteCRM installer-->
        <div id="install_container">
            <div id="install_box">
                <div id='licenseDiv'></div>
                <header id="install_header">
                    <div class="install_img">
                        <a href="https://suitecrm.com" target="_blank">
                            <img src="{$sugar_md}" alt="SuiteCRM">
                        </a>
                    </div>
                    <div id="steps">
                        <p>{$mod_strings['LBL_STEP2']}</p>
                        <i class="icon-progress-0" id="complete"></i>
                        <i class="icon-progress-1" id="complete"></i>
                        <i class="icon-progress-2"></i>
                    </div>
                </header>
                {$form}
            </div>

            <footer id="install_footer">
                <p id="footer_links"><a href="https://suitecrm.com" target="_blank">Visit suitecrm.com</a> | <a href="https://suitecrm.com/index.php?option=com_kunena&view=category&Itemid=1137&layout=list" target="_blank">Support Forums</a> | <a href="https://suitecrm.com/wiki/index.php/Installation" target="_blank">Installation Guide</a> | <a href="LICENSE.txt" target="_blank">License</a>
            </footer>
        </div>
    </body>
    </html>
EOQ;
        return $out;
    }
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:42,代码来源:installConfig.php

示例9: array

{
    $help_items = array();
    $help_item = new HelpItem();
    $help_item->title = 'Registration';
    $help_item->text = <<<HEREDOC_END
TODO
HEREDOC_END;
    $help_items[] = $help_item;
    $str = format_help_items($help_items);
    return $str;
}
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php 
get_language_header();
?>
>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   <meta http-equiv="Content-Style-Type" content="text/css">
   <title>SugarCRM Install Help</title>
   <link rel="stylesheet" href="install/install.css" type="text/css" />
</head>
<body>
<?php 
if (isset($_GET['step'])) {
    switch ($_GET['step']) {
        case 1:
            echo help_step_1_html();
            break;
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:31,代码来源:installHelp.php

示例10: insert_popup_header

/**
 * Create a header for a popup.
 *
 * @todo refactor this into the base Popup_Picker class
 *
 * @param  $theme string the name of the current theme, ignorred to use SugarThemeRegistry::current() instead.
 * @return string HTML
 */
function insert_popup_header($theme = null, $includeJS = true)
{
    global $app_strings, $sugar_config;
    $themeCSS = SugarThemeRegistry::current()->getCSS();
    $langHeader = get_language_header();
    //The SugarView will insert the header now, this function should no longer do the actual head element.
    if ($includeJS) {
        echo <<<EOHTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html {$langHeader}>
<head>
EOHTML;
    }
    if (isset($sugar_config['meta_tags']) && isset($sugar_config['meta_tags']['IE_COMPAT_MODE'])) {
        echo $sugar_config['meta_tags']['IE_COMPAT_MODE'];
    }
    echo "<title>{$app_strings['LBL_BROWSER_TITLE']}</title>" . $themeCSS;
    if ($includeJS) {
        $charset = isset($app_strings['LBL_CHARSET']) ? $app_strings['LBL_CHARSET'] : $sugar_config['default_charset'];
        echo '<meta http-equiv="Content-Type" content="text/html; charset="{$charset}">';
        echo '<script type="text/javascript" src="' . getJSPath('storage/cache/include/javascript/sugar_grp1_yui.js') . '"></script>';
        echo '<script type="text/javascript" src="' . getJSPath('storage/cache/include/javascript/sugar_grp1.js') . '"></script>';
        echo '</head>';
    }
    echo '<body class="popupBody">';
}
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:34,代码来源:layout_utils.php

示例11: Sugar_Smarty

 }
 $sugar_smarty = new Sugar_Smarty();
 //go to the support portal if the file is not found.
 // FG - Bug 39820 - Devs can write help files also in english, so skip check for language not equals "en_us" !
 if (file_exists($helpPath)) {
     $sugar_smarty->assign('helpFileExists', TRUE);
     $sugar_smarty->assign('MOD', $mod_strings);
     $sugar_smarty->assign('modulename', $send_module);
     $sugar_smarty->assign('helpPath', $helpPath);
     $sugar_smarty->assign('currentURL', getCurrentURL());
     $sugar_smarty->assign('title', $mod_strings['LBL_SUGARCRM_HELP'] . " - " . $send_module);
     $sugar_smarty->assign('styleSheet', SugarThemeRegistry::current()->getCSS());
     $sugar_smarty->assign('table', "<table class='tabForm'><tr><td>");
     $sugar_smarty->assign('endtable', "</td></tr></table>");
     $sugar_smarty->assign('charset', $app_strings['LBL_CHARSET']);
     $sugar_smarty->assign('langHeader', get_language_header());
     echo $sugar_smarty->fetch('modules/Administration/SupportPortal.tpl');
 } else {
     if (empty($send_module)) {
         $send_module = 'toc';
     }
     $dev_status = 'GA';
     //If there is an alphabetic portion between the decimal prefix and integer suffix, then use the
     //value there as the dev_status value
     $dev_status = getVersionStatus($GLOBALS['sugar_version']);
     $send_version = getMajorMinorVersion($GLOBALS['sugar_version']);
     $editionMap = array('ENT' => 'Enterprise', 'PRO' => 'Professional', 'CE' => 'Community_Edition');
     if (!empty($editionMap[$send_edition])) {
         $send_edition = $editionMap[$send_edition];
     }
     //map certain modules
开发者ID:jgera,项目名称:sugarcrm_dev,代码行数:31,代码来源:SupportPortal.php

示例12: display

 /**
  * @see SugarView::display()
  */
 public function display()
 {
     global $current_user, $mod_strings, $app_list_strings, $sugar_config, $locale, $sugar_version;
     if (!is_admin($current_user)) {
         sugar_die($GLOBALS['app_strings']['ERR_NOT_ADMIN']);
     }
     $themeObject = SugarThemeRegistry::current();
     $configurator = new Configurator();
     $sugarConfig = SugarConfig::getInstance();
     $focus = new Administration();
     $focus->retrieveSettings();
     $ut = $GLOBALS['current_user']->getPreference('ut');
     if (empty($ut)) {
         $this->ss->assign('SKIP_URL', 'index.php?module=Users&action=Wizard&skipwelcome=1');
     } else {
         $this->ss->assign('SKIP_URL', 'index.php?module=Home&action=index');
     }
     // Always mark that we have got past this point
     $focus->saveSetting('system', 'adminwizard', 1);
     $css = $themeObject->getCSS();
     $favicon = $themeObject->getImageURL('sugar_icon.ico', false);
     $this->ss->assign('FAVICON_URL', getJSPath($favicon));
     $this->ss->assign('SUGAR_CSS', $css);
     $this->ss->assign('MOD_USERS', return_module_language($GLOBALS['current_language'], 'Users'));
     $this->ss->assign('CSS', '<link rel="stylesheet" type="text/css" href="' . SugarThemeRegistry::current()->getCSSURL('wizard.css') . '" />');
     $this->ss->assign('LANGUAGES', get_languages());
     $this->ss->assign('config', $sugar_config);
     $this->ss->assign('SUGAR_VERSION', $sugar_version);
     $this->ss->assign('settings', $focus->settings);
     $this->ss->assign('exportCharsets', get_select_options_with_id($locale->getCharsetSelect(), $sugar_config['default_export_charset']));
     $this->ss->assign('getNameJs', $locale->getNameJs());
     $this->ss->assign('NAMEFORMATS', $locale->getUsableLocaleNameOptions($sugar_config['name_formats']));
     $this->ss->assign('JAVASCRIPT', get_set_focus_js() . get_configsettings_js());
     $this->ss->assign('company_logo', SugarThemeRegistry::current()->getImageURL('company_logo.png'));
     $this->ss->assign('mail_smtptype', $focus->settings['mail_smtptype']);
     $this->ss->assign('mail_smtpserver', $focus->settings['mail_smtpserver']);
     $this->ss->assign('mail_smtpport', $focus->settings['mail_smtpport']);
     $this->ss->assign('mail_smtpuser', $focus->settings['mail_smtpuser']);
     $this->ss->assign('mail_smtppass', $focus->settings['mail_smtppass']);
     $this->ss->assign('mail_smtpauth_req', $focus->settings['mail_smtpauth_req'] ? "checked='checked'" : '');
     $this->ss->assign('MAIL_SSL_OPTIONS', get_select_options_with_id($app_list_strings['email_settings_for_ssl'], $focus->settings['mail_smtpssl']));
     $this->ss->assign('notify_allow_default_outbound_on', !empty($focus->settings['notify_allow_default_outbound']) && $focus->settings['notify_allow_default_outbound'] == 2 ? 'CHECKED' : '');
     $this->ss->assign('THEME', SugarThemeRegistry::current()->__toString());
     // get javascript
     ob_start();
     $this->options['show_javascript'] = true;
     $this->renderJavascript();
     $this->options['show_javascript'] = false;
     $this->ss->assign("SUGAR_JS", ob_get_contents() . $themeObject->getJS());
     ob_end_clean();
     $this->ss->assign('langHeader', get_language_header());
     $this->ss->assign('START_PAGE', !empty($_REQUEST['page']) ? $_REQUEST['page'] : 'welcome');
     $this->ss->display('modules/Configurator/tpls/adminwizard.tpl');
 }
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:57,代码来源:view.adminwizard.php

示例13: header

                if (empty($lead)) {
                    echo '<input type="hidden" name="error" value="1">';
                }
                echo '</form><script language="javascript" type="text/javascript">document.redirect.submit();</script>';
                echo '</body></html>';
            } else {
                header("Location: {$redirect_url}");
                die;
            }
        } else {
            echo $mod_strings['LBL_THANKS_FOR_SUBMITTING_LEAD'];
        }
        sugar_cleanup();
        // die to keep code from running into redirect case below
        die;
    } else {
        echo $mod_strings['LBL_SERVER_IS_CURRENTLY_UNAVAILABLE'];
    }
}
if (!empty($_POST['redirect'])) {
    if (headers_sent()) {
        echo '<html ' . get_language_header() . '><head><title>SugarCRM</title></head><body>';
        echo '<form name="redirect" action="' . $_POST['redirect'] . '" method="GET">';
        echo '</form><script language="javascript" type="text/javascript">document.redirect.submit();</script>';
        echo '</body></html>';
    } else {
        header("Location: {$_POST['redirect']}");
        die;
    }
}
echo $mod_strings['LBL_SERVER_IS_CURRENTLY_UNAVAILABLE'];
开发者ID:netconstructor,项目名称:sugarcrm_dev,代码行数:31,代码来源:WebToLeadCapture.php

示例14: forceRfcComplianceOnHtmlBody

    /**
     * HTML message bodies must include a doctype and appropriate html, head, and body elements to be RFC compliant.
     * Enforces this compliance by wrapping the body with the compliant document structure if the body is not found
     * to be compliant.
     *
     * @note This is flawed because the absence of "<html" doesn't also indicate the absence of "</body>" or "</html>".
     *       Yet, the assumption is that it is an indication of said absence. Thus, there is a potential for the
     *       document body to become invalid HTML.
     *
     * @param string $body required The HTML body to test for compliance and modify, if necessary.
     * @return string The compliant HTML body.
     */
    protected function forceRfcComplianceOnHtmlBody($body)
    {
        if (strpos($body, "<html") === false) {
            $subject = $this->headers->getSubject();
            // used for the document title
            $charset = $this->config->getCharset();
            // used for the document charset
            $language = get_language_header();
            // prepend the document head and append the footer elements to the body
            $body = <<<eoq
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" {$language}>
<head>
<meta http-equiv="Content-Type" content="text/html; charset={$charset}" />
<title>{$subject}</title>
</head>
<body>
{$body}
</body>
</html>
eoq;
        }
        return $body;
    }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:36,代码来源:SmtpMailer.php

示例15: _displayJavascript

    /**
     * Called from process(). This method will display the correct javascript.
     */
    protected function _displayJavascript()
    {
        global $locale, $sugar_config, $timedate;
        if ($this->_getOption('show_javascript')) {
            if (!$this->_getOption('show_header')) {
                $langHeader = get_language_header();
                echo <<<EOHTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html {$langHeader}>
<head>
EOHTML;
            }
            $js_vars = array("sugar_cache_dir" => "cache/");
            if (isset($this->bean->module_dir)) {
                $js_vars['module_sugar_grp1'] = $this->bean->module_dir;
            }
            if (isset($_REQUEST['action'])) {
                $js_vars['action_sugar_grp1'] = $_REQUEST['action'];
            }
            echo '<script>jscal_today = 1000*' . $timedate->asUserTs($timedate->getNow()) . '; if(typeof app_strings == "undefined") app_strings = new Array();</script>';
            // Make sure the necessary cache files are in place
            $jsFiles = array("sugar_grp1.js", "sugar_grp1_yui.js", "sugar_grp1_jquery.js");
            ensureJSCacheFilesExist($jsFiles);
            echo getVersionedScript('cache/include/javascript/sugar_grp1_jquery.js');
            echo getVersionedScript('cache/include/javascript/sugar_grp1_yui.js');
            echo getVersionedScript('cache/include/javascript/sugar_grp1.js');
            $version_mark = getVersionedPath(null);
            echo '<script>SUGAR = SUGAR || {}; SUGAR.VERSION_MARK = ' . json_encode($version_mark) . ';</script>';
            // output necessary config js in the top of the page
            $config_js = $this->getSugarConfigJS();
            if (!empty($config_js)) {
                echo "<script>\n" . implode("\n", $config_js) . "</script>\n";
            }
            // CSRF form token
            echo $this->getCsrfFormTokenJscript();
            if (isset($sugar_config['email_sugarclient_listviewmaxselect'])) {
                echo "<script>SUGAR.config.email_sugarclient_listviewmaxselect = {$GLOBALS['sugar_config']['email_sugarclient_listviewmaxselect']};</script>";
            }
            $image_server = defined('TEMPLATE_URL') ? TEMPLATE_URL . '/' : '';
            echo '<script type="text/javascript">SUGAR.themes.image_server="' . $image_server . '";</script>';
            // cn: bug 12274 - create session-stored key to defend against CSRF
            echo '<script type="text/javascript">var name_format = "' . $locale->getLocaleFormatMacro() . '";</script>';
            echo self::getJavascriptValidation();
            if (!is_file(sugar_cached('jsLanguage/') . $GLOBALS['current_language'] . '.js')) {
                require_once 'include/language/jsLanguage.php';
                jsLanguage::createAppStringsCache($GLOBALS['current_language']);
            }
            echo getVersionedScript('cache/jsLanguage/' . $GLOBALS['current_language'] . '.js', $GLOBALS['sugar_config']['js_lang_version']);
            echo $this->_getModLanguageJS();
            echo getVersionedScript('include/javascript/productTour.js');
            if (isset($sugar_config['disc_client']) && $sugar_config['disc_client']) {
                echo getVersionedScript('modules/Sync/headersync.js');
            }
            if (!is_file(sugar_cached("Expressions/functions_cache.js"))) {
                $GLOBALS['updateSilent'] = true;
                include "include/Expressions/updatecache.php";
            }
            if (inDeveloperMode()) {
                echo getVersionedScript('cache/Expressions/functions_cache_debug.js');
            } else {
                echo getVersionedScript('cache/Expressions/functions_cache.js');
            }
            require_once "include/Expressions/DependencyManager.php";
            echo "\n" . '<script type="text/javascript">' . DependencyManager::getJSUserVariables($GLOBALS['current_user']) . "</script>\n";
            //echo out the $js_vars variables as javascript variables
            echo "<script type='text/javascript'>\n";
            foreach ($js_vars as $var => $value) {
                echo "var {$var} = '{$value}';\n";
            }
            echo "</script>\n";
        }
    }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:75,代码来源:SugarView.php


注:本文中的get_language_header函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。