* 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; -->
/** * 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">'; }
/** * 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"; } }
/** * 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 /> <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); } */ } }
/** * Handler for 'start run' event. * */ protected function startRun() { $this->write('<html ' . get_language_header() . '><body>'); }
/** * 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 { $html .= '<td>' . $seed1->{$master_field} . '</td>'; } } } else { $html .= '<td></td>'; } } if (isset($value) && !empty($value)) { $resultIds[] = array('name' => $seed2->module_name, 'value' => $value); $seed2->retrieve($value); foreach ($related_fields as $related_field) { if (isset($seed2->{$related_field})) { if ($seed2->field_name_map[$related_field]['type'] == 'enum') { //pull in the translated dom $html .= '<td>' . $app_list_strings[$seed2->field_name_map[$related_field]['options']][$seed2->{$related_field}] . '</td>'; } else { $html .= '<td>' . $seed2->{$related_field} . '</td>'; } } else { $html .= '<td></td>'; } } } $html .= '</tr>'; } $html .= "</table></body></html>"; } $result = base64_encode($html); return array('html' => $result, 'name_value_list' => $resultIds, 'error' => $error); }
/** * @see SugarView::display() */ public function display() { global $mod_strings, $current_user, $locale, $sugar_config, $app_list_strings, $sugar_version; $themeObject = SugarThemeRegistry::current(); $css = $themeObject->getCSS(); $this->ss->assign('SUGAR_CSS', $css); $favicon = $themeObject->getImageURL('sugar_icon.ico', false); $this->ss->assign('FAVICON_URL', getJSPath($favicon)); $this->ss->assign('CSS', '<link rel="stylesheet" type="text/css" href="' . SugarThemeRegistry::current()->getCSSURL('wizard.css') . '" />'); $this->ss->assign('JAVASCRIPT', user_get_validate_record_js() . user_get_chooser_js() . user_get_confsettings_js()); $this->ss->assign('PRINT_URL', 'index.php?' . $GLOBALS['request_string']); $this->ss->assign('SKIP_WELCOME', isset($_REQUEST['skipwelcome']) && $_REQUEST['skipwelcome'] == 1); $this->ss->assign('ID', $current_user->id); $this->ss->assign('USER_NAME', $current_user->user_name); $this->ss->assign('FIRST_NAME', $current_user->first_name); $this->ss->assign('SUGAR_VERSION', $sugar_version); $this->ss->assign('LAST_NAME', $current_user->last_name); $this->ss->assign('TITLE', $current_user->title); $this->ss->assign('DEPARTMENT', $current_user->department); $this->ss->assign('REPORTS_TO_ID', $current_user->reports_to_id); $this->ss->assign('REPORTS_TO_NAME', $current_user->reports_to_name); $this->ss->assign('PHONE_HOME', $current_user->phone_home); $this->ss->assign('PHONE_MOBILE', $current_user->phone_mobile); $this->ss->assign('PHONE_WORK', $current_user->phone_work); $this->ss->assign('PHONE_OTHER', $current_user->phone_other); $this->ss->assign('PHONE_FAX', $current_user->phone_fax); $this->ss->assign('EMAIL1', $current_user->email1); $this->ss->assign('EMAIL2', $current_user->email2); $this->ss->assign('ADDRESS_STREET', $current_user->address_street); $this->ss->assign('ADDRESS_CITY', $current_user->address_city); $this->ss->assign('ADDRESS_STATE', $current_user->address_state); $this->ss->assign('ADDRESS_POSTALCODE', $current_user->address_postalcode); $this->ss->assign('ADDRESS_COUNTRY', $current_user->address_country); $configurator = new Configurator(); if ($configurator->config['passwordsetting']['SystemGeneratedPasswordON'] || $configurator->config['passwordsetting']['forgotpasswordON']) { $this->ss->assign('REQUIRED_EMAIL_ADDRESS', '1'); } else { $this->ss->assign('REQUIRED_EMAIL_ADDRESS', '0'); } // 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(); $messenger_type = '<select tabindex="5" name="messenger_type">'; $messenger_type .= get_select_options_with_id($app_list_strings['messenger_type_dom'], $current_user->messenger_type); $messenger_type .= '</select>'; $this->ss->assign('MESSENGER_TYPE_OPTIONS', $messenger_type); $this->ss->assign('MESSENGER_ID', $current_user->messenger_id); // set default settings $use_real_names = $current_user->getPreference('use_real_names'); if (empty($use_real_names)) { $current_user->setPreference('use_real_names', 'on'); } $current_user->setPreference('reminder_time', 1800); $current_user->setPreference('email_reminder_time', 3600); $current_user->setPreference('mailmerge_on', 'on'); //// Timezone if (empty($current_user->id)) { // remove default timezone for new users(set later) $current_user->user_preferences['timezone'] = ''; } $userTZ = $current_user->getPreference('timezone'); if (empty($userTZ) && !$current_user->is_group && !$current_user->portal_only) { $userTZ = TimeDate::guessTimezone(); $current_user->setPreference('timezone', $userTZ); } 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')); }
/** * @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; }
{ $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;
/** * 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">'; }
} $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
/** * @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'); }
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'];
/** * 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; }
/** * 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"; } }
// else $smarty->assign('createGroupFolderStyle', $createGroupFolderStyle); $smarty->assign('editGroupFolderStyle', $editGroupFolderStyle); $smarty->assign('groupFolderName', $groupFolderName); $json = getJSONobj(); $smarty->assign('group_folder_array', $json->encode($groupFoldersOrig)); $smarty->assign('group_folder_options', get_select_options_with_id($groupFolders, $addToGroupFolder)); $groupFolderTeamId = ""; if (!empty($focus->id)) { $groupFolderTeamId = $focus->team_id; } require_once 'include/SugarFields/Fields/Teamset/EmailSugarFieldTeamsetCollection.php'; $teamSetField = new EmailSugarFieldTeamsetCollection($focus, $ie->field_defs, "get_non_private_teams_array"); //$teamSetField = new EmailSugarFieldTeamset($focus->module_dir, $focus->id); $code = $teamSetField->get_code(); $sqs_objects = $teamSetField->createQuickSearchCode(false); $quicksearch_js = '<script type="text/javascript" language="javascript">sqs_objects = ' . $json->encode($sqs_objects) . '</script>'; /* require_once('include/SugarFields/Fields/Teamset/SugarFieldTeamset.php'); $teamSetField = new SugarFieldTeamset('Teamset'); $teamSetField->add_user_private_team = false; $teamSetField->objectBean = $focus; $teamSetField->initClassicView($ie->field_defs); $code = $teamSetField->getClassicView(); */ $smarty->assign('JAVASCRIPT', $quicksearch_js); $smarty->assign("TEAM_SET_FIELD", $code); $smarty->assign("langHeader", get_language_header()); $smarty->assign('CSS', SugarThemeRegistry::current()->getCSS()); $smarty->assign('languageStrings', getVersionedScript("cache/jsLanguage/{$GLOBALS['current_language']}.js", $GLOBALS['sugar_config']['js_lang_version'])); echo $smarty->fetch("modules/Emails/templates/_createGroupFolder.tpl");