/** * Create HTML form to enter a new record with the minimum necessary fields. * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. * All Rights Reserved. * Contributor(s): ______________________________________.. */ function get_new_record_form() { global $app_strings; global $app_list_strings; global $mod_strings; global $currentModule; global $current_user; global $timedate; $the_form = get_left_form_header($mod_strings['LBL_NEW_FORM_TITLE']); $form = new XTemplate('modules/Campaigns/Forms.html'); $module_select = empty($_REQUEST['module_select']) ? '' : $_REQUEST['module_select']; $form->assign('MOD', $mod_strings); $form->assign('APP', $app_strings); $form->assign('THEME', SugarThemeRegistry::current()->__toString()); $form->assign("JAVASCRIPT", get_set_focus_js() . get_validate_record_js()); $form->assign("STATUS_OPTIONS", get_select_options_with_id($app_list_strings['campaign_status_dom'], "Planning")); $form->assign("TYPE_OPTIONS", get_select_options_with_id($app_list_strings['campaign_type_dom'], "")); $form->assign("USER_ID", $current_user->id); $form->assign("TEAM_ID", sprintf('<input type="hidden" name="team_id" value="%s">', $current_user->default_team)); $form->assign("CALENDAR_LANG", "en"); $form->assign("USER_DATEFORMAT", '(' . $timedate->get_user_date_format() . ')'); $form->assign("CALENDAR_DATEFORMAT", $timedate->get_cal_date_format()); $form->parse('main'); $the_form .= $form->text('main'); $focus = BeanFactory::getBean('Campaigns'); $javascript = new javascript(); $javascript->setFormName('quick_save'); $javascript->setSugarBean($focus); $javascript->addRequiredFields(''); $jscript = $javascript->getScript(); $the_form .= $jscript . get_left_form_footer(); return $the_form; }
/** * @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 = Administration::getSettings(); $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', true, true)); $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'); }
} else { $xtpl->assign('TIME_SEPARATOR', ':'); } $xtpl->assign('TIME_FORMAT', '(' . $time_format . ')'); $xtpl->assign('USER_DATEFORMAT', '(' . $timedate->get_user_date_format() . ')'); $xtpl->assign('CALENDAR_DATEFORMAT', $timedate->get_cal_date_format()); // standard assigns $xtpl->assign('MOD', $mod_strings); $xtpl->assign('APP', $app_strings); $xtpl->assign('THEME', SugarThemeRegistry::current()->__toString()); $xtpl->assign('GRIDLINE', $gridline); if ($use_adv) { $javascript->script .= 'toggleAdv();'; $xtpl->assign('JAVASCRIPT', get_set_focus_js() . $javascript->getScript()); } else { $xtpl->assign('JAVASCRIPT', get_set_focus_js() . $javascript->getScript()); } $xtpl->assign('RETURN_MODULE', 'Schedulers'); $xtpl->assign('RETURN_ID', $focus->id); $xtpl->assign('RETURN_ACTION', 'DetailView'); // module specific $xtpl->assign('ID', $focus->id); $xtpl->assign('NAME', $focus->name); if ($focus->catch_up == 1) { $xtpl->assign('CATCH_UP_CHECKED', 'CHECKED'); } // job if (strstr($focus->job, 'url::')) { $job_url = str_replace('url::', '', $focus->job); } else { $job_url = 'http://';
} $xtpl->assign('hasGrpFld', $focus->groupfolder_id == null ? '' : 'checked="1"'); $xtpl->assign('LEAVEMESSAGESONMAILSERVER_STYLE', $leaveMessagesOnMailServerStyle); $xtpl->assign('LEAVEMESSAGESONMAILSERVER', get_select_options_with_id($app_list_strings['dom_int_bool'], $leaveMessagesOnMailServer)); $distributionMethod = get_select_options_with_id($app_list_strings['dom_email_distribution_for_auto_create'], $distrib_method); $xtpl->assign('DISTRIBUTION_METHOD', $distributionMethod); $xtpl->assign('CREATE_CASE_ROW_STYLE', $createCaseRowStyle); $xtpl->assign('CREATE_CASE_EMAIL_TEMPLATE_OPTIONS', get_select_options_with_id($email_templates_arr, $create_case_email_template)); if (!empty($create_case_email_template)) { $xtpl->assign("CREATE_CASE_EDIT_TEMPLATE", "visibility:inline"); } else { $xtpl->assign("CREATE_CASE_EDIT_TEMPLATE", "visibility:hidden"); } $quicksearch_js = ""; //$javascript = get_set_focus_js(). $javascript->getScript() . $quicksearch_js; $xtpl->assign('JAVASCRIPT', get_set_focus_js() . $javascript->getScript() . $quicksearch_js); require_once 'include/Smarty/plugins/function.sugar_help.php'; $tipsStrings = array('LBL_SSL_DESC', 'LBL_ASSIGN_TO_TEAM_DESC', 'LBL_ASSIGN_TO_GROUP_FOLDER_DESC', 'LBL_FROM_ADDR_DESC', 'LBL_CREATE_CASE_HELP', 'LBL_CREATE_CASE_REPLY_TEMPLATE_HELP', 'LBL_ALLOW_OUTBOUND_GROUP_USAGE_DESC', 'LBL_AUTOREPLY_HELP', 'LBL_FILTER_DOMAIN_DESC', 'LBL_MAX_AUTO_REPLIES_DESC'); $smarty = null; $tips = array(); foreach ($tipsStrings as $string) { if (!empty($mod_strings[$string])) { $tips[$string] = smarty_function_sugar_help(array('text' => $mod_strings[$string]), $smarty); } } $xtpl->assign('TIPS', $tips); // WINDOWS work arounds //if(is_windows()) { // $xtpl->assign('MAYBE', '<style> div.maybe { display:none; }</style>'); //} // PARSE AND PRINT
echo get_form_header($mod_strings['LBL_RELEASE'] . " " . $focus->name . ' ' . $header_text, $edit_button, false); $GLOBALS['log']->info("Releases edit view"); $xtpl = new XTemplate('modules/Releases/EditView.html'); $xtpl->assign("MOD", $mod_strings); $xtpl->assign("APP", $app_strings); if (isset($_REQUEST['return_module'])) { $xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']); } if (isset($_REQUEST['return_action'])) { $xtpl->assign("RETURN_ACTION", $_REQUEST['return_action']); } if (isset($_REQUEST['return_id'])) { $xtpl->assign("RETURN_ID", $_REQUEST['return_id']); } $xtpl->assign("PRINT_URL", "index.php?" . $GLOBALS['request_string']); $xtpl->assign("JAVASCRIPT", get_set_focus_js()); $xtpl->assign("ID", $focus->id); $xtpl->assign('NAME', $focus->name); $xtpl->assign('STATUS', $focus->status); if (empty($focus->list_order)) { $xtpl->assign('LIST_ORDER', count($focus->get_releases(FALSE, 'All')) + 1); } else { $xtpl->assign('LIST_ORDER', $focus->list_order); } $xtpl->assign('STATUS_OPTIONS', get_select_options_with_id($app_list_strings['release_status_dom'], $focus->status)); // adding custom fields: require_once 'modules/DynamicFields/templates/Files/EditView.php'; $xtpl->parse("main"); $xtpl->out("main"); $javascript = new javascript(); $javascript->setFormName('EditView');
// handle Create $module then Cancel if (empty($_REQUEST['return_id'])) { $xtpl->assign("RETURN_ACTION", 'index'); } if (isset($_REQUEST['campaign_id'])) { $xtpl->assign("CAMPAIGN_ID", $_REQUEST['campaign_id']); } $xtpl->assign("THEME", $theme); $xtpl->assign("IMAGE_PATH", $image_path); $xtpl->assign("PRINT_URL", "index.php?" . $GLOBALS['request_string']); require_once 'include/QuickSearchDefaults.php'; $qsd = new QuickSearchDefaults(); $sqs_objects = array('assigned_user_name' => $qsd->getQSUser()); $quicksearch_js = $qsd->getQSScripts(); $quicksearch_js .= '<script type="text/javascript" language="javascript">sqs_objects = ' . $json->encode($sqs_objects) . '</script>'; $xtpl->assign("JAVASCRIPT", get_set_focus_js() . get_validate_record_js() . $quicksearch_js); if (empty($focus->assigned_user_id) && empty($focus->id)) { $focus->assigned_user_id = $current_user->id; } if (empty($focus->assigned_name) && empty($focus->id)) { $focus->assigned_user_name = $current_user->user_name; } $xtpl->assign("ASSIGNED_USER_OPTIONS", get_select_options_with_id(get_user_array(TRUE, "Active", $focus->assigned_user_id), $focus->assigned_user_id)); $xtpl->assign("ASSIGNED_USER_NAME", $focus->assigned_user_name); $xtpl->assign("ASSIGNED_USER_ID", $focus->assigned_user_id); $xtpl->assign("DATE_ENTERED", $focus->date_entered); $xtpl->assign("DATE_MODIFIED", $focus->date_modified); $xtpl->assign("CREATED_BY", $focus->created_by_name); $xtpl->assign("MODIFIED_BY", $focus->modified_by_name); $xtpl->assign("ID", $focus->id); $xtpl->assign("NAME", $focus->name);
} } if ($focus->campaign_id) { $campaign_id = $focus->campaign_id; } else { $campaign_id = $_REQUEST['campaign_id']; } $xtpl->assign("CAMPAIGN_ID", $campaign_id); if (empty($time_ampm) || empty($focus->time_start)) { $time_start = $focus->time_start; } else { $split = $timedate->splitTime($focus->time_start, $timedate->get_time_format()); $time_start = $split['h'] . $timedate->timeSeparator() . $split['m']; } $xtpl->assign("PRINT_URL", "index.php?" . $GLOBALS['request_string']); $xtpl->assign("JAVASCRIPT", get_set_focus_js() . get_validate_record_js()); $xtpl->assign("DATE_ENTERED", $focus->date_entered); $xtpl->assign("DATE_MODIFIED", $focus->date_modified); $xtpl->assign("ID", $focus->id); $xtpl->assign("NAME", $focus->name); $xtpl->assign("FROM_NAME", $focus->from_name); $xtpl->assign("FROM_ADDR", $focus->from_addr); $xtpl->assign("REPLY_NAME", $focus->reply_to_name); $xtpl->assign("REPLY_ADDR", $focus->reply_to_addr); $xtpl->assign("DATE_START", $focus->date_start); $xtpl->assign("TIME_START", $time_start); $xtpl->assign("TIME_FORMAT", '(' . $timedate->get_user_time_format() . ')'); $email_templates_arr = get_bean_select_array(true, 'EmailTemplate', 'name', "(type IS NULL OR type='' OR type='campaign')", 'name'); if ($focus->template_id) { $xtpl->assign("TEMPLATE_ID", $focus->template_id); $xtpl->assign("EMAIL_TEMPLATE_OPTIONS", get_select_options_with_id($email_templates_arr, $focus->template_id));
/** * @see SugarView::display() */ public function display() { global $mod_strings, $app_strings, $app_list_strings; require_once "modules/Configurator/metadata/SugarpdfSettingsdefs.php"; if (file_exists('custom/modules/Configurator/metadata/SugarpdfSettingsdefs.php')) { require_once 'custom/modules/Configurator/metadata/SugarpdfSettingsdefs.php'; } if (!empty($_POST['save'])) { // Save the logos $error = $this->checkUploadImage(); if (empty($error)) { $focus = new Administration(); foreach ($SugarpdfSettings as $k => $v) { if ($v['type'] == 'password') { if (isset($_POST[$k])) { $_POST[$k] = blowfishEncode(blowfishGetKey($k), $_POST[$k]); } } } if (!empty($_POST["sugarpdf_pdf_class"]) && $_POST["sugarpdf_pdf_class"] != PDF_CLASS) { // clear the cache for quotes detailview in order to switch the pdf class. if (is_file($cachedfile = sugar_cached('modules/Quotes/DetailView.tpl'))) { unlink($cachedfile); } } $focus->saveConfig(); header('Location: index.php?module=Administration&action=index'); } } if (!empty($_POST['restore'])) { $focus = new Administration(); foreach ($_POST as $key => $val) { $prefix = $focus->get_config_prefix($key); if (in_array($prefix[0], $focus->config_categories)) { $result = $focus->db->query("SELECT count(*) AS the_count FROM config WHERE category = '{$prefix[0]}' AND name = '{$prefix[1]}'"); $row = $focus->db->fetchByAssoc($result); if ($row['the_count'] != 0) { $focus->db->query("DELETE FROM config WHERE category = '{$prefix[0]}' AND name = '{$prefix[1]}'"); } } } header('Location: index.php?module=Configurator&action=SugarpdfSettings'); } echo getClassicModuleTitle("Administration", array("<a href='index.php?module=Administration&action=index'>" . translate('LBL_MODULE_NAME', 'Administration') . "</a>", $mod_strings['LBL_PDFMODULE_NAME']), false); $pdf_class = array("TCPDF" => "TCPDF", "EZPDF" => "EZPDF"); $this->ss->assign('APP_LIST', $app_list_strings); $this->ss->assign("JAVASCRIPT", get_set_focus_js()); $this->ss->assign("SugarpdfSettings", $SugarpdfSettings); $this->ss->assign("pdf_enable_ezpdf", PDF_ENABLE_EZPDF); if (PDF_ENABLE_EZPDF == "0" && PDF_CLASS == "EZPDF") { $error = "ERR_EZPDF_DISABLE"; $this->ss->assign("selected_pdf_class", "TCPDF"); } else { $this->ss->assign("selected_pdf_class", PDF_CLASS); } $this->ss->assign("pdf_class", $pdf_class); if (!empty($error)) { $this->ss->assign("error", $mod_strings[$error]); } if (!function_exists('imagecreatefrompng')) { $this->ss->assign("GD_WARNING", 1); } else { $this->ss->assign("GD_WARNING", 0); } $this->ss->display('modules/Configurator/tpls/SugarpdfSettings.tpl'); require_once "include/javascript/javascript.php"; $javascript = new javascript(); $javascript->setFormName("ConfigureSugarpdfSettings"); foreach ($SugarpdfSettings as $k => $v) { if (isset($v["required"]) && $v["required"] == true) { $javascript->addFieldGeneric($k, "varchar", $v['label'], TRUE, ""); } } echo $javascript->getScript(); }
/** * display * This method makes the Smarty variable assignments and then displays the * generated view. * @param $showTitle boolean value indicating whether or not to show a title on the resulting page * @param $ajaxSave boolean value indicating whether or not the operation is an Ajax save request * @return HTML display for view as String */ function display($showTitle = true, $ajaxSave = false) { global $mod_strings, $sugar_config, $app_strings, $app_list_strings, $theme, $current_user; if (isset($this->defs['templateMeta']['javascript'])) { if (is_array($this->defs['templateMeta']['javascript'])) { //$this->th->ss->assign('externalJSFile', 'modules/' . $this->module . '/metadata/editvewdefs.js'); $this->th->ss->assign('externalJSFile', $this->defs['templateMeta']['javascript']); } else { $this->th->ss->assign('scriptBlocks', $this->defs['templateMeta']['javascript']); } } $this->th->ss->assign('id', $this->fieldDefs['id']['value']); $this->th->ss->assign('offset', $this->offset + 1); $this->th->ss->assign('APP', $app_strings); $this->th->ss->assign('MOD', $mod_strings); $this->th->ss->assign('fields', $this->fieldDefs); $this->th->ss->assign('sectionPanels', $this->sectionPanels); $this->th->ss->assign('config', $sugar_config); $this->th->ss->assign('returnModule', $this->returnModule); $this->th->ss->assign('returnAction', $this->returnAction); $this->th->ss->assign('returnId', $this->returnId); $this->th->ss->assign('isDuplicate', $this->isDuplicate); $this->th->ss->assign('def', $this->defs); $this->th->ss->assign('useTabs', isset($this->defs['templateMeta']['useTabs']) && isset($this->defs['templateMeta']['tabDefs']) ? $this->defs['templateMeta']['useTabs'] : false); $this->th->ss->assign('maxColumns', isset($this->defs['templateMeta']['maxColumns']) ? $this->defs['templateMeta']['maxColumns'] : 2); $this->th->ss->assign('module', $this->module); $this->th->ss->assign('headerTpl', isset($this->defs['templateMeta']['form']['headerTpl']) ? $this->defs['templateMeta']['form']['headerTpl'] : 'include/' . $this->view . '/header.tpl'); $this->th->ss->assign('footerTpl', isset($this->defs['templateMeta']['form']['footerTpl']) ? $this->defs['templateMeta']['form']['footerTpl'] : 'include/' . $this->view . '/footer.tpl'); $this->th->ss->assign('current_user', $current_user); $this->th->ss->assign('bean', $this->focus); $this->th->ss->assign('isAuditEnabled', $this->focus->is_AuditEnabled()); $this->th->ss->assign('gridline', $current_user->getPreference('gridline') == 'on' ? '1' : '0'); $this->th->ss->assign('tabDefs', isset($this->defs['templateMeta']['tabDefs']) ? $this->defs['templateMeta']['tabDefs'] : false); $this->th->ss->assign('VERSION_MARK', getVersionedPath('')); global $js_custom_version; global $sugar_version; $this->th->ss->assign('SUGAR_VERSION', $sugar_version); $this->th->ss->assign('JS_CUSTOM_VERSION', $js_custom_version); //this is used for multiple forms on one page if (!empty($this->formName)) { $form_id = $this->formName; $form_name = $this->formName; } else { $form_id = $this->view; $form_name = $this->view; } if ($ajaxSave && empty($this->formName)) { $form_id = 'form_' . $this->view . '_' . $this->module; $form_name = $form_id; $this->view = $form_name; //$this->defs['templateMeta']['form']['buttons'] = array(); //$this->defs['templateMeta']['form']['buttons']['ajax_save'] = array('id' => 'AjaxSave', 'customCode'=>'<input type="button" class="button" value="Save" onclick="this.form.action.value=\'AjaxFormSave\';return saveForm(\''.$form_name.'\', \'multiedit_form_{$module}\', \'Saving {$module}...\');"/>'); } $form_name = $form_name == 'QuickCreate' ? "QuickCreate_{$this->module}" : $form_name; $form_id = $form_id == 'QuickCreate' ? "QuickCreate_{$this->module}" : $form_id; if (isset($this->defs['templateMeta']['preForm'])) { $this->th->ss->assign('preForm', $this->defs['templateMeta']['preForm']); } if (isset($this->defs['templateMeta']['form']['closeFormBeforeCustomButtons'])) { $this->th->ss->assign('closeFormBeforeCustomButtons', $this->defs['templateMeta']['form']['closeFormBeforeCustomButtons']); } if (isset($this->defs['templateMeta']['form']['enctype'])) { $this->th->ss->assign('enctype', 'enctype="' . $this->defs['templateMeta']['form']['enctype'] . '"'); } //for SugarFieldImage, we must set form enctype to "multipart/form-data" foreach ($this->fieldDefs as $field) { if (isset($field['type']) && $field['type'] == 'image') { $this->th->ss->assign('enctype', 'enctype="multipart/form-data"'); break; } } $this->th->ss->assign('showDetailData', $this->showDetailData); $this->th->ss->assign('showSectionPanelsTitles', $this->showSectionPanelsTitles); $this->th->ss->assign('form_id', $form_id); $this->th->ss->assign('form_name', $form_name); $this->th->ss->assign('set_focus_block', get_set_focus_js()); $this->th->ss->assign('form', isset($this->defs['templateMeta']['form']) ? $this->defs['templateMeta']['form'] : null); $this->th->ss->assign('includes', isset($this->defs['templateMeta']['includes']) ? $this->defs['templateMeta']['includes'] : null); $this->th->ss->assign('view', $this->view); //Calculate time & date formatting (may need to calculate this depending on a setting) global $timedate; $this->th->ss->assign('CALENDAR_DATEFORMAT', $timedate->get_cal_date_format()); $this->th->ss->assign('USER_DATEFORMAT', $timedate->get_user_date_format()); $time_format = $timedate->get_user_time_format(); $this->th->ss->assign('TIME_FORMAT', $time_format); $date_format = $timedate->get_cal_date_format(); $time_separator = ':'; if (preg_match('/\\d+([^\\d])\\d+([^\\d]*)/s', $time_format, $match)) { $time_separator = $match[1]; } // Create Smarty variables for the Calendar picker widget $t23 = strpos($time_format, '23') !== false ? '%H' : '%I'; if (!isset($match[2]) || $match[2] == '') { $this->th->ss->assign('CALENDAR_FORMAT', $date_format . ' ' . $t23 . $time_separator . '%M'); } else { $pm = $match[2] == 'pm' ? '%P' : '%p'; $this->th->ss->assign('CALENDAR_FORMAT', $date_format . ' ' . $t23 . $time_separator . '%M' . $pm); } $this->th->ss->assign('CALENDAR_FDOW', $current_user->get_first_day_of_week()); $this->th->ss->assign('TIME_SEPARATOR', $time_separator); $seps = get_number_seperators(); $this->th->ss->assign('NUM_GRP_SEP', $seps[0]); $this->th->ss->assign('DEC_SEP', $seps[1]); if ($this->view == 'EditView') { $height = $current_user->getPreference('text_editor_height'); $width = $current_user->getPreference('text_editor_width'); $height = isset($height) ? $height : '300px'; $width = isset($width) ? $width : '95%'; $this->th->ss->assign('RICH_TEXT_EDITOR_HEIGHT', $height); $this->th->ss->assign('RICH_TEXT_EDITOR_WIDTH', $width); } else { $this->th->ss->assign('RICH_TEXT_EDITOR_HEIGHT', '100px'); $this->th->ss->assign('RICH_TEXT_EDITOR_WIDTH', '95%'); } $this->th->ss->assign('SHOW_VCR_CONTROL', $this->showVCRControl); $str = $this->showTitle($showTitle); //Use the output filter to trim the whitespace $this->th->ss->load_filter('output', 'trimwhitespace'); $str .= $this->th->displayTemplate($this->module, $form_name, $this->tpl, $ajaxSave, $this->defs); /* BEGIN - SECURITY GROUPS */ //if popup select add panel if user is a member of multiple groups to metadataFile global $sugar_config; if (isset($sugar_config['securitysuite_popup_select']) && $sugar_config['securitysuite_popup_select'] == true && empty($this->focus->fetched_row['id']) && $this->focus->module_dir != "Users" && $this->focus->module_dir != "SugarFeed") { //there are cases such as uploading an attachment to an email template where the request module may //not be the same as the current bean module. If that happens we can just skip it //however...let quickcreate through if ($this->view != 'QuickCreate' && (empty($_REQUEST['module']) || $_REQUEST['module'] != $this->focus->module_dir)) { return $str; } require_once 'modules/SecurityGroups/SecurityGroup.php'; $groupFocus = new SecurityGroup(); $security_modules = $groupFocus->getSecurityModules(); if (in_array($this->focus->module_dir, array_keys($security_modules))) { global $current_user; $group_count = $groupFocus->getMembershipCount($current_user->id); if ($group_count > 1) { $groups = $groupFocus->getUserSecurityGroups($current_user->id); $group_options = ''; foreach ($groups as $group) { $group_options .= '<option value="' . $group['id'] . '" label="' . $group['name'] . '" selected="selected">' . $group['name'] . '</option>'; } //multilingual support global $current_language; $ss_mod_strings = return_module_language($current_language, 'SecurityGroups'); $lbl_securitygroups_select = $ss_mod_strings['LBL_GROUP_SELECT']; $lbl_securitygroups = $ss_mod_strings['LBL_LIST_FORM_TITLE']; $group_panel = <<<EOQ <div class="edit view edit508 " id="detailpanel_securitygroups"> <h4> {$lbl_securitygroups_select} </h4> <table width="100%" cellspacing="1" cellpadding="0" border="0" class="edit view panelContainer" id="LBL_PANEL_SECURITYGROUPS"> <tbody><tr> <td width="12.5%" valign="top" scope="col" id="account_type_label"> {$lbl_securitygroups}: </td> <td width="37.5%" valign="top"> <select title="" id="securitygroup_list" name="securitygroup_list[]" multiple="multiple" size="{$group_count}"> {$group_options} </select> </td> </tr> </tbody></table> </div> EOQ; $group_panel = preg_replace("/[\r\n]+/", "", $group_panel); $group_panel_append = <<<EOQ <script> \$('#{$form_name}_tabs div:first').append(\$('{$group_panel}')); </script> EOQ; $str .= $group_panel_append; } } } /* END - SECURITY GROUPS */ return $str; }
/** * @see SugarView::display() */ public function display() { global $current_user, $mod_strings, $app_strings, $app_list_strings, $sugar_config, $locale; $configurator = new Configurator(); $sugarConfig = SugarConfig::getInstance(); $focus = new Administration(); $configurator->parseLoggerSettings(); $focus->retrieveSettings(); if (!empty($_POST['restore'])) { $configurator->restoreConfig(); } $this->ss->assign('MOD', $mod_strings); $this->ss->assign('APP', $app_strings); $this->ss->assign('APP_LIST', $app_list_strings); $this->ss->assign('config', $configurator->config); $this->ss->assign('error', $configurator->errors); $this->ss->assign('THEMES', SugarThemeRegistry::availableThemes()); $this->ss->assign('LANGUAGES', get_languages()); $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("settings", $focus->settings); $this->ss->assign("mail_sendtype_options", get_select_options_with_id($app_list_strings['notifymail_sendtype'], $focus->settings['mail_sendtype'])); if (!empty($focus->settings['proxy_on'])) { $this->ss->assign("PROXY_CONFIG_DISPLAY", 'inline'); } else { $this->ss->assign("PROXY_CONFIG_DISPLAY", 'none'); } if (!empty($focus->settings['proxy_auth'])) { $this->ss->assign("PROXY_AUTH_DISPLAY", 'inline'); } else { $this->ss->assign("PROXY_AUTH_DISPLAY", 'none'); } if (!empty($configurator->config['logger']['level'])) { $this->ss->assign('log_levels', get_select_options_with_id(LoggerManager::getLoggerLevels(), $configurator->config['logger']['level'])); } else { $this->ss->assign('log_levels', get_select_options_with_id(LoggerManager::getLoggerLevels(), '')); } if (!empty($configurator->config['logger']['file']['suffix'])) { $this->ss->assign('filename_suffix', get_select_options_with_id(SugarLogger::$filename_suffix, $configurator->config['logger']['file']['suffix'])); } else { $this->ss->assign('filename_suffix', get_select_options_with_id(SugarLogger::$filename_suffix, '')); } echo $this->getModuleTitle(); $this->ss->display('modules/Configurator/tpls/EditView.tpl'); $javascript = new javascript(); $javascript->setFormName("ConfigureSettings"); $javascript->addFieldGeneric("notify_fromaddress", "email", $mod_strings['LBL_NOTIFY_FROMADDRESS'], TRUE, ""); $javascript->addFieldGeneric("notify_subject", "varchar", $mod_strings['LBL_NOTIFY_SUBJECT'], TRUE, ""); $javascript->addFieldGeneric("proxy_host", "varchar", $mod_strings['LBL_PROXY_HOST'], TRUE, ""); $javascript->addFieldGeneric("proxy_port", "int", $mod_strings['LBL_PROXY_PORT'], TRUE, ""); $javascript->addFieldGeneric("proxy_password", "varchar", $mod_strings['LBL_PROXY_PASSWORD'], TRUE, ""); $javascript->addFieldGeneric("proxy_username", "varchar", $mod_strings['LBL_PROXY_USERNAME'], TRUE, ""); echo $javascript->getScript(); }
/** * @see SugarView::display() */ public function display() { global $current_user, $mod_strings, $app_strings, $app_list_strings, $sugar_config, $locale; $configurator = new Configurator(); $sugarConfig = SugarConfig::getInstance(); $focus = new Administration(); $configurator->parseLoggerSettings(); $focus->retrieveSettings(); if (!empty($_POST['restore'])) { $configurator->restoreConfig(); } $this->ss->assign('MOD', $mod_strings); $this->ss->assign('APP', $app_strings); $this->ss->assign('APP_LIST', $app_list_strings); $this->ss->assign('config', $configurator->config); $this->ss->assign('error', $configurator->errors); $this->ss->assign("AUTO_REFRESH_INTERVAL_OPTIONS", get_select_options_with_id($app_list_strings['dashlet_auto_refresh_options_admin'], isset($configurator->config['dashlet_auto_refresh_min']) ? $configurator->config['dashlet_auto_refresh_min'] : 30)); $this->ss->assign('LANGUAGES', get_languages()); $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("settings", $focus->settings); $this->ss->assign("mail_sendtype_options", get_select_options_with_id($app_list_strings['notifymail_sendtype'], $focus->settings['mail_sendtype'])); if (!empty($focus->settings['proxy_on'])) { $this->ss->assign("PROXY_CONFIG_DISPLAY", 'inline'); } else { $this->ss->assign("PROXY_CONFIG_DISPLAY", 'none'); } if (!empty($focus->settings['proxy_auth'])) { $this->ss->assign("PROXY_AUTH_DISPLAY", 'inline'); } else { $this->ss->assign("PROXY_AUTH_DISPLAY", 'none'); } if (!empty($configurator->config['logger']['level'])) { $this->ss->assign('log_levels', get_select_options_with_id(LoggerManager::getLoggerLevels(), $configurator->config['logger']['level'])); } else { $this->ss->assign('log_levels', get_select_options_with_id(LoggerManager::getLoggerLevels(), '')); } if (!empty($configurator->config['lead_conv_activity_opt'])) { $this->ss->assign('lead_conv_activities', get_select_options_with_id(Lead::getActivitiesOptions(), $configurator->config['lead_conv_activity_opt'])); } else { $this->ss->assign('lead_conv_activities', get_select_options_with_id(Lead::getActivitiesOptions(), '')); } if (!empty($configurator->config['logger']['file']['suffix'])) { $this->ss->assign('filename_suffix', get_select_options_with_id(SugarLogger::$filename_suffix, $configurator->config['logger']['file']['suffix'])); } else { $this->ss->assign('filename_suffix', get_select_options_with_id(SugarLogger::$filename_suffix, '')); } if (isset($configurator->config['logger_visible'])) { $this->ss->assign('logger_visible', $configurator->config['logger_visible']); } else { $this->ss->assign('logger_visible', true); } $ebay_site_ids = array('0' => 'eBay United States', '2' => 'eBay Canada (English)', '3' => 'eBay UK', '15' => 'eBay Australia', '16' => 'eBay Austria', '23' => 'eBay Belgium (French)', '71' => 'eBay France', '77' => 'eBay Germany', '100' => 'eBay Motors', '101' => 'eBay Italy', '123' => 'eBay Belgium (Dutch)', '146' => 'eBay Netherlands', '186' => 'eBay Spain', '193' => 'eBay Switzerland', '201' => 'eBay Hong Kong', '203' => 'eBay India', '205' => 'eBay Ireland', '207' => 'eBay Malaysia', '210' => 'eBay Canada (French)', '211' => 'eBay Philippines', '212' => 'eBay Poland', '216' => 'eBay Singapore'); $this->ss->assign("EBAY_SITE_ID_OPTIONS", get_select_options_with_id($ebay_site_ids, isset($configurator->config['ebay_primary_site_id']) ? $configurator->config['ebay_primary_site_id'] : 0)); require_once 'modules/xeBayOrders/xeBayOrder.php'; $this->ss->assign("EBAY_SHIPPING_SERVICE_OPTIONS", get_select_options_with_id(getShippingServiceDropDown(), isset($configurator->config['ebay_shipping_service']) ? $configurator->config['ebay_shipping_service'] : 'HKBAM')); $this->ss->assign("EBAY_EXPRESS_CARRIER_OPTIONS", get_select_options_with_id(getExpressCarrierDropDown(), isset($configurator->config['ebay_express_carrier']) ? $configurator->config['ebay_express_carrier'] : 'default')); echo $this->getModuleTitle(false); $this->ss->display('modules/Configurator/tpls/EditView.tpl'); $javascript = new javascript(); $javascript->setFormName("ConfigureSettings"); $javascript->addFieldGeneric("notify_fromaddress", "email", $mod_strings['LBL_NOTIFY_FROMADDRESS'], TRUE, ""); $javascript->addFieldGeneric("notify_subject", "varchar", $mod_strings['LBL_NOTIFY_SUBJECT'], TRUE, ""); $javascript->addFieldGeneric("proxy_host", "varchar", $mod_strings['LBL_PROXY_HOST'], TRUE, ""); $javascript->addFieldGeneric("proxy_port", "int", $mod_strings['LBL_PROXY_PORT'], TRUE, ""); $javascript->addFieldGeneric("proxy_password", "varchar", $mod_strings['LBL_PROXY_PASSWORD'], TRUE, ""); $javascript->addFieldGeneric("proxy_username", "varchar", $mod_strings['LBL_PROXY_USERNAME'], TRUE, ""); echo $javascript->getScript(); }
<?php require_once 'XTemplate/xtpl.php'; require_once 'include/formbase.php'; require_once 'modules/ZuckerReportParameter/ReportParameter.php'; require_once 'modules/ZuckerReportParameter/Forms.php'; global $app_strings; global $app_list_strings; global $mod_strings; global $current_user; global $current_language; echo get_set_focus_js(); $mod_list_strings = return_mod_list_strings_language($current_language, "ZuckerReports"); $focus = new ReportParameter(); if (isset($_REQUEST['record']) && !empty($_REQUEST['record'])) { $focus->retrieve($_REQUEST['record']); $friendly_name = $focus->friendly_name; $default_name = $focus->default_name; $default_value = $focus->default_value; $description = $focus->description; $range_name = $focus->range_name; $range_options = $focus->range_options; $title = $mod_strings['LBL_MODULE_NAME'] . ": " . $focus->default_name; } else { $title = $mod_strings['LBL_PARAM_NEW']; } if (!empty($_REQUEST['friendly_name'])) { $friendly_name = $_REQUEST['friendly_name']; } if (!empty($_REQUEST['default_name'])) { $default_name = $_REQUEST['default_name'];
$xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']); } if (isset($_REQUEST['return_action'])) { $xtpl->assign("RETURN_ACTION", $_REQUEST['return_action']); } if (isset($_REQUEST['return_id'])) { $xtpl->assign("RETURN_ID", $_REQUEST['return_id']); } // handle Create $module then Cancel if (empty($_REQUEST['return_id'])) { $xtpl->assign("RETURN_ACTION", 'index'); } $xtpl->assign("THEME", $theme); $xtpl->assign("IMAGE_PATH", $image_path); $xtpl->assign("PRINT_URL", "index.php?" . $GLOBALS['request_string']); $javascript = get_set_focus_js() . get_validate_record_js(); $xtpl->assign("JAVASCRIPT", $javascript); $xtpl->assign("ID", $focus->id); $xtpl->assign("DOCUMENT_NAME", $focus->document_name); $xtpl->assign("DESCRIPTION", $focus->description); $xtpl->assign("FILENAME_TEXT", $focus->filename); $xtpl->assign("REVISION", $focus->latest_revision); $xtpl->assign("OLD_ID", $old_id); if (isset($focus->id)) { $xtpl->assign("FILE_OR_HIDDEN", "hidden"); if (!isset($_REQUEST['isDuplicate']) || empty($_REQUEST['isDuplicate'])) { $xtpl->assign("DISABLED", "disabled"); } } else { $xtpl->assign("FILE_OR_HIDDEN", "file"); }
public function setupAll($showTitle = false, $ajaxSave = false, $moduleName = '', $readonly = false) { global $mod_strings, $sugar_config, $app_strings, $app_list_strings, $theme, $current_user; if (isset($this->defs['templateMeta']['javascript'])) { if (is_array($this->defs['templateMeta']['javascript'])) { $this->th->ss->assign('externalJSFile', $this->defs['templateMeta']['javascript']); } else { $this->th->ss->assign('scriptBlocks', $this->defs['templateMeta']['javascript']); } } $this->setupOriginalEditView(); $this->th->ss->assign('id', $this->fieldDefs['id']['value']); $this->th->ss->assign('offset', $this->offset + 1); $this->th->ss->assign('APP', $app_strings); $this->th->ss->assign('MOD', $mod_strings); $this->th->ss->assign('footerTpl', isset($this->defs['templateMeta']['form']['footerTpl']) ? $this->defs['templateMeta']['form']['footerTpl'] : null); $this->fieldDefs = $this->setDefaultAllFields($this->fieldDefs); // default editview if ($readonly) { $this->fieldDefs = $this->setReadOnlyAllFields($this->fieldDefs); } else { $this->fieldDefs = $this->processReadOnlyFields($this->fieldDefs); $this->fieldDefs = $this->processRequiredFields($this->fieldDefs); } $this->th->ss->assign('fields', $this->fieldDefs); $this->sectionPanels = $this->processSectionPanels($this->sectionPanels); $this->th->ss->assign('sectionPanels', $this->sectionPanels); $this->th->ss->assign('config', $sugar_config); $this->th->ss->assign('returnModule', $this->returnModule); $this->th->ss->assign('returnAction', $this->returnAction); $this->th->ss->assign('returnId', $this->returnId); $this->th->ss->assign('isDuplicate', $this->isDuplicate); $this->th->ss->assign('def', $this->defs); $this->th->ss->assign('useTabs', isset($this->defs['templateMeta']['useTabs']) && isset($this->defs['templateMeta']['tabDefs']) ? $this->defs['templateMeta']['useTabs'] : false); $this->th->ss->assign('maxColumns', isset($this->defs['templateMeta']['maxColumns']) ? $this->defs['templateMeta']['maxColumns'] : 2); $this->th->ss->assign('module', $moduleName); $this->th->ss->assign('current_user', $current_user); $this->th->ss->assign('bean', $this->focus); $this->th->ss->assign('gridline', $current_user->getPreference('gridline') == 'on' ? '1' : '0'); $this->th->ss->assign('tabDefs', isset($this->defs['templateMeta']['tabDefs']) ? $this->defs['templateMeta']['tabDefs'] : false); $this->th->ss->assign('VERSION_MARK', getVersionedPath('')); if (isset($this->relationshipChart[$moduleName])) { foreach ($this->relationshipChart[$moduleName] as $relName => $ssName) { $this->bean->load_relationship($relName); $tempBeanList = $this->bean->{$relName}->getBeans(); $this->th->ss->assign($ssName, $tempBeanList); } } global $js_custom_version; global $sugar_version; $this->th->ss->assign('SUGAR_VERSION', $sugar_version); $this->th->ss->assign('JS_CUSTOM_VERSION', $js_custom_version); //this is used for multiple forms on one page if (!empty($this->formName)) { $form_id = $this->formName; $form_name = $this->formName; } else { $form_id = $this->view; $form_name = $this->view; } if ($ajaxSave && empty($this->formName)) { $form_id = 'form_' . $this->view . '_' . $moduleName; $form_name = $form_id; $this->view = $form_name; } $form_name = $form_name == 'QuickCreate' ? "QuickCreate_{$moduleName}" : $form_name; $form_id = $form_id == 'QuickCreate' ? "QuickCreate_{$moduleName}" : $form_id; if (isset($this->defs['templateMeta']['preForm'])) { $this->th->ss->assign('preForm', $this->defs['templateMeta']['preForm']); } if (isset($this->defs['templateMeta']['form']['closeFormBeforeCustomButtons'])) { $this->th->ss->assign('closeFormBeforeCustomButtons', $this->defs['templateMeta']['form']['closeFormBeforeCustomButtons']); } if (isset($this->defs['templateMeta']['form']['enctype'])) { $this->th->ss->assign('enctype', 'enctype="' . $this->defs['templateMeta']['form']['enctype'] . '"'); } //for SugarFieldImage, we must set form enctype to "multipart/form-data" foreach ($this->fieldDefs as $field) { if (isset($field['type']) && $field['type'] == 'image') { $this->th->ss->assign('enctype', 'enctype="multipart/form-data"'); break; } } $this->th->ss->assign('showDetailData', $this->showDetailData); $this->th->ss->assign('showSectionPanelsTitles', $this->showSectionPanelsTitles); $this->th->ss->assign('form_id', $form_id); $this->th->ss->assign('form_name', $form_name); //$form_name change by id form showCaseForm $this->th->ss->assign('set_focus_block', get_set_focus_js()); $this->th->ss->assign('form', isset($this->defs['templateMeta']['form']) ? $this->defs['templateMeta']['form'] : null); $this->th->ss->assign('includes', isset($this->defs['templateMeta']['includes']) ? $this->defs['templateMeta']['includes'] : null); $this->th->ss->assign('view', $this->view); $admin = new Administration(); $admin->retrieveSettings(); if (isset($admin->settings['portal_on']) && $admin->settings['portal_on']) { $this->th->ss->assign("PORTAL_ENABLED", true); } else { $this->th->ss->assign("PORTAL_ENABLED", false); } //Calculate time & date formatting (may need to calculate this depending on a setting) global $timedate; $this->th->ss->assign('CALENDAR_DATEFORMAT', $timedate->get_cal_date_format()); $this->th->ss->assign('USER_DATEFORMAT', $timedate->get_user_date_format()); $time_format = $timedate->get_user_time_format(); $this->th->ss->assign('TIME_FORMAT', $time_format); $date_format = $timedate->get_cal_date_format(); $time_separator = ':'; if (preg_match('/\\d+([^\\d])\\d+([^\\d]*)/s', $time_format, $match)) { $time_separator = $match[1]; } // Create Smarty variables for the Calendar picker widget $t23 = strpos($time_format, '23') !== false ? '%H' : '%I'; if (!isset($match[2]) || $match[2] == '') { $this->th->ss->assign('CALENDAR_FORMAT', $date_format . ' ' . $t23 . $time_separator . '%M'); } else { $pm = $match[2] == 'pm' ? '%P' : '%p'; $this->th->ss->assign('CALENDAR_FORMAT', $date_format . ' ' . $t23 . $time_separator . '%M' . $pm); } $this->th->ss->assign('CALENDAR_FDOW', $current_user->get_first_day_of_week()); $this->th->ss->assign('TIME_SEPARATOR', $time_separator); $seps = get_number_seperators(); $this->th->ss->assign('NUM_GRP_SEP', $seps[0]); $this->th->ss->assign('DEC_SEP', $seps[1]); if ($this->view == 'EditView' || $this->view == 'BpmView') { $height = $current_user->getPreference('text_editor_height'); $width = $current_user->getPreference('text_editor_width'); $height = isset($height) ? $height : '300px'; $width = isset($width) ? $width : '95%'; $this->th->ss->assign('RICH_TEXT_EDITOR_HEIGHT', $height); $this->th->ss->assign('RICH_TEXT_EDITOR_WIDTH', $width); } else { $this->th->ss->assign('RICH_TEXT_EDITOR_HEIGHT', '100px'); $this->th->ss->assign('RICH_TEXT_EDITOR_WIDTH', '95%'); } $this->th->ss->assign('SHOW_VCR_CONTROL', $this->showVCRControl); $str = $this->showTitle($showTitle); $ajaxSave = false; //Use the output filter to trim the whitespace $this->th->ss->load_filter('output', 'trimwhitespace'); $form_name = $this->view; if ($this->th->checkTemplate($this->bean->module_name, $this->view) && !empty($this->dyn_uid)) { $nameTemplateTmp = $this->dyn_uid; } else { $nameTemplateTmp = 'PMSEDetailView'; } $this->th->buildTemplate($this->bean->module_name, $nameTemplateTmp, $this->tpl, $ajaxSave, $this->defs); $this->th->deleteTemplate($this->bean->module_name, $form_name); $newTplFile = $this->th->cacheDir . $this->th->templateDir . $this->bean->module_name . '/' . $nameTemplateTmp . '.tpl'; $str .= $this->th->ss->fetch($newTplFile); return $str; }
/** * Create HTML form to enter a new record with the minimum necessary fields. * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. * All Rights Reserved. * Contributor(s): ______________________________________.. */ function get_new_record_form() { global $app_strings; global $app_list_strings; global $mod_strings; global $currentModule; global $theme; global $current_user; $the_form = get_left_form_header($mod_strings['LBL_NEW_FORM_TITLE']); $form = new XTemplate('modules/Campaigns/Forms.html'); global $timedate; $module_select = empty($_REQUEST['module_select']) ? '' : $_REQUEST['module_select']; $form->assign('MOD', $mod_strings); $form->assign('APP', $app_strings); $form->assign('THEME', $theme); $form->assign("JAVASCRIPT", get_set_focus_js() . get_validate_record_js()); $form->assign("STATUS_OPTIONS", get_select_options_with_id($app_list_strings['campaign_status_dom'], "Planning")); $form->assign("TYPE_OPTIONS", get_select_options_with_id($app_list_strings['campaign_type_dom'], "")); $form->assign("USER_ID", $current_user->id); $form->assign("CALENDAR_LANG", "en"); $form->assign("USER_DATEFORMAT", '(' . $timedate->get_user_date_format() . ')'); $form->assign("CALENDAR_DATEFORMAT", $timedate->get_cal_date_format()); $form->parse('main'); $the_form .= $form->text('main'); require_once 'modules/Campaigns/Campaign.php'; $focus = new Campaign(); require_once 'include/javascript/javascript.php'; $javascript = new javascript(); $javascript->setFormName('quick_save'); $javascript->setSugarBean($focus); $javascript->addRequiredFields(''); $jscript = $javascript->getScript(); $the_form .= $jscript . get_left_form_footer(); return $the_form; }
$GLOBALS['log']->info("Document revision edit view"); $xtpl = new XTemplate('modules/DocumentRevisions/EditView.html'); $xtpl->assign("MOD", $mod_strings); $xtpl->assign("APP", $app_strings); if (isset($_REQUEST['return_module'])) { $xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']); } if (isset($_REQUEST['return_action'])) { $xtpl->assign("RETURN_ACTION", $_REQUEST['return_action']); } if (isset($_REQUEST['return_id'])) { $xtpl->assign("RETURN_ID", $_REQUEST['return_id']); } $xtpl->assign("THEME", $theme); $xtpl->assign("IMAGE_PATH", $image_path); $xtpl->assign("PRINT_URL", "index.php?" . $GLOBALS['request_string']); $xtpl->assign("JAVASCRIPT", get_set_focus_js() . get_validate_record_document_revision_js()); $focus->fill_document_name_revision($_REQUEST['return_id']); $xtpl->assign("ID", $focus->id); $xtpl->assign("DOCUMENT_NAME", $_REQUEST['document_name']); $xtpl->assign("CURRENT_REVISION", $_REQUEST['document_revision']); $xtpl->assign("FILE_URL", UploadFile::get_url($_REQUEST['document_filename'], $_REQUEST['document_revision_id'])); $xtpl->parse("main"); $xtpl->out("main"); //implements required fields check based on the required fields list defined in the bean. require_once 'include/javascript/javascript.php'; $javascript = new javascript(); $javascript->setFormName('DocumentRevisionEditView'); $javascript->setSugarBean($focus); $javascript->addAllFields(''); echo $javascript->getScript();
$xtpl->assign('APP', $app_strings); if (isset($_REQUEST['error_string'])) { $xtpl->assign('ERROR_STRING', '<span class="error">Error: ' . $_REQUEST['error_string'] . '</span>'); } if (isset($_REQUEST['return_module'])) { $xtpl->assign('RETURN_MODULE', $_REQUEST['return_module']); } if (isset($_REQUEST['return_action'])) { $xtpl->assign('RETURN_ACTION', $_REQUEST['return_action']); } if (isset($_REQUEST['return_id'])) { $xtpl->assign('RETURN_ID', $_REQUEST['return_id']); } else { $xtpl->assign('RETURN_ACTION', 'ListView'); } $xtpl->assign('JAVASCRIPT', get_set_focus_js() . user_get_validate_record_js() . user_get_chooser_js() . user_get_confsettings_js() . '<script type="text/javascript" language="Javascript" src="modules/Users/User.js"></script>'); $xtpl->assign('IMAGE_PATH', $image_path); $xtpl->assign('PRINT_URL', 'index.php?' . $GLOBALS['request_string']); $xtpl->assign('ID', $focus->id); $xtpl->assign('USER_NAME', $focus->user_name); $xtpl->assign('FIRST_NAME', $focus->first_name); $xtpl->assign('LAST_NAME', $focus->last_name); $xtpl->assign('TITLE', $focus->title); $xtpl->assign('DEPARTMENT', $focus->department); $xtpl->assign('REPORTS_TO_ID', $focus->reports_to_id); $xtpl->assign('REPORTS_TO_NAME', $focus->reports_to_name); $xtpl->assign('PHONE_HOME', $focus->phone_home); $xtpl->assign('PHONE_MOBILE', $focus->phone_mobile); $xtpl->assign('PHONE_WORK', $focus->phone_work); $xtpl->assign('PHONE_OTHER', $focus->phone_other); $xtpl->assign('PHONE_FAX', $focus->phone_fax);
header('Location: index.php?module=Administration&action=index'); } $focus->retrieveSettings(); if (!empty($_POST['restore'])) { $configurator->restoreConfig(); } require_once 'include/SugarLogger/SugarLogger.php'; $sugar_smarty = new Sugar_Smarty(); $sugar_smarty->assign('MOD', $mod_strings); $sugar_smarty->assign('APP', $app_strings); $sugar_smarty->assign('APP_LIST', $app_list_strings); $sugar_smarty->assign('config', $configurator->config); $sugar_smarty->assign('error', $configurator->errors); $sugar_smarty->assign('THEMES', SugarThemeRegistry::availableThemes()); $sugar_smarty->assign('LANGUAGES', get_languages()); $sugar_smarty->assign("JAVASCRIPT", get_set_focus_js() . get_configsettings_js()); $sugar_smarty->assign('company_logo', SugarThemeRegistry::current()->getImageURL('company_logo.png')); $sugar_smarty->assign("settings", $focus->settings); $sugar_smarty->assign("mail_sendtype_options", get_select_options_with_id($app_list_strings['notifymail_sendtype'], $focus->settings['mail_sendtype'])); if (!empty($focus->settings['proxy_on'])) { $sugar_smarty->assign("PROXY_CONFIG_DISPLAY", 'inline'); } else { $sugar_smarty->assign("PROXY_CONFIG_DISPLAY", 'none'); } if (!empty($focus->settings['proxy_auth'])) { $sugar_smarty->assign("PROXY_AUTH_DISPLAY", 'inline'); } else { $sugar_smarty->assign("PROXY_AUTH_DISPLAY", 'none'); } if (!function_exists('mcrypt_cbc')) { $sugar_smarty->assign("LDAP_ENC_KEY_READONLY", 'readonly');
$xtpl->assign('MOD', $mod_strings); $xtpl->assign('APP', $app_strings); $xtpl->assign('CANCEL_SCRIPT', 'window.close()'); if (isset($_REQUEST['return_module'])) { $xtpl->assign('RETURN_MODULE', $_REQUEST['return_module']); } if (isset($_REQUEST['return_action'])) { $xtpl->assign('RETURN_ACTION', $_REQUEST['return_action']); } if (isset($_REQUEST['return_id'])) { $xtpl->assign('RETURN_ID', $_REQUEST['return_id']); } // handle Create $module then Cancel if (empty($_REQUEST['return_id'])) { $xtpl->assign('RETURN_ACTION', 'index'); } $xtpl->assign('INPOPUPWINDOW', 'true'); $xtpl->assign('PRINT_URL', 'index.php?' . $GLOBALS['request_string']); $xtpl->assign('JAVASCRIPT', get_set_focus_js()); $xtpl->assign('ID', $focus->id); $xtpl->assign('NAME', $focus->name); $xtpl->assign('SIGNATURE_TEXT', !empty($focus->signature_html) ? $focus->signature_html : $focus->signature); if (isset($_REQUEST['the_user_id'])) { $xtpl->assign('THE_USER_ID', $_REQUEST['the_user_id']); } $tiny = new SugarTinyMCE(); $xtpl->assign("tinyjs", $tiny->getInstance('sigText')); $xtpl->parse('main.textarea'); //Add Custom Fields $xtpl->parse('main'); $xtpl->out('main');
$ss->assign("CANNED_SEARCH_OPTIONS", get_select_options_with_id($app_list_strings['kbdocument_canned_search'], '')); } ////////////////////////////////// Browse Section /////////////////////////////////////// //print out the needed script tags for tree echo " <link rel='stylesheet' href='vendor/ytree/TreeView/css/folders/tree.css'>\n <script language='JavaScript' src='vendor/ytree/TreeView/TreeView.js'></script>\n <script language='JavaScript' src='vendor/ytree/TreeView/TaskNode.js'></script>\n <script language='JavaScript' src='vendor/ytree/treeutil.js'></script>"; $ss->assign('BROWSETAB', return_browse_tab()); ////////////////////////////////// Advanced Search Section /////////////////////////////////////// require_once 'include/QuickSearchDefaults.php'; require_once 'include/json_config.php'; $json_config = new json_config(); $json = getJSONobj(); $qsd = QuickSearchDefaults::getQuickSearchDefaults(); $qsd->setFormName('FTSFormAdvanced'); $sqs_objects = array('FTSFormAdvanced_tag_name' => getQSTags('FTSFormAdvanced'), 'FTSFormAdvanced_team_name' => $qsd->getQSTeam(), 'FTSFormAdvanced_kbdoc_approver_name' => getQSApprover('FTSFormAdvanced'), 'FTSFormAdvanced_kbarticle_author_name' => getQSAuthor('FTSFormAdvanced'), 'filename' => getQSFileName(), 'file_mime_type' => getQSMimeType()); $quicksearch_js = '<script type="text/javascript" language="javascript">sqs_objects = ' . $json->encode($sqs_objects) . '; enableQS();</script>'; $javascript = get_set_focus_js() . $quicksearch_js; $ss->assign("JAVASCRIPT", $javascript); $ss->assign('ADVANCEDTAB', return_advanced_tab($focus, $json, $json_config)); /////////////////////////////////////////////////////////////////////////////////////////////// //display results $ss->display("modules/KBDocuments/SearchHome.html"); /**perform_advanced_search * * This method populates parameters for creating the full text search query from the post * returns full text search query * @param $focus sugarbean instance */ function perform_advanced_search($focus, $default = false) { //create array of available search parameters. $searchVars = array();
$popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'EditView', 'field_to_name_array' => array('id' => 'assigned_user_id', 'user_name' => 'assigned_user_name')); $json = getJSONobj(); $xtpl->assign('encoded_assigned_users_popup_request_data', $json->encode($popup_request_data)); if (!empty($focus->assigned_user_name)) { $xtpl->assign("ASSIGNED_USER_NAME", $focus->assigned_user_name); } $xtpl->assign("assign_user_select", SugarThemeRegistry::current()->getImage('id-ff-select')); $xtpl->assign("assign_user_clear", SugarThemeRegistry::current()->getImage('id-ff-clear')); //Assign qsd script require_once 'include/QuickSearchDefaults.php'; $qsd = new QuickSearchDefaults(); $sqs_objects = array('EditView_assigned_user_name' => $qsd->getQSUser()); $quicksearch_js = '<script type="text/javascript" language="javascript">sqs_objects = ' . $json->encode($sqs_objects) . '; enableQS();</script>'; $xtpl->assign("CANCEL_SCRIPT", $cancel_script); $xtpl->assign("PRINT_URL", "index.php?" . $GLOBALS['request_string']); $xtpl->assign("JAVASCRIPT", get_set_focus_js() . $quicksearch_js); if (!is_file($GLOBALS['sugar_config']['cache_dir'] . 'jsLanguage/' . $GLOBALS['current_language'] . '.js')) { require_once 'include/language/jsLanguage.php'; jsLanguage::createAppStringsCache($GLOBALS['current_language']); } $jsLang = '<script type="text/javascript" src="' . $GLOBALS['sugar_config']['cache_dir'] . 'jsLanguage/' . $GLOBALS['current_language'] . '.js?s=' . $GLOBALS['sugar_version'] . '&c=' . $GLOBALS['sugar_config']['js_custom_version'] . '&j=' . $GLOBALS['sugar_config']['js_lang_version'] . '"></script>'; $xtpl->assign("JSLANG", $jsLang); $xtpl->assign("ID", $focus->id); if (isset($focus->name)) { $xtpl->assign("NAME", $focus->name); } else { $xtpl->assign("NAME", ""); } if (isset($focus->description)) { $xtpl->assign("DESCRIPTION", $focus->description); } else {
/** * display * This method makes the Smarty variable assignments and theautocomplete_ajax'vars the * generated view. * @param $showTitle boolean value indicating whether or not to show a title on the resulting page * @param $ajaxSave boolean value indicating whether or not the operation is an Ajax save request * @return HTML display for view as String */ function display($showTitle = true, $ajaxSave = false) { global $mod_strings, $sugar_config, $app_strings, $app_list_strings, $theme, $current_user; if (isset($this->defs['templateMeta']['javascript'])) { if (is_array($this->defs['templateMeta']['javascript'])) { //$this->th->ss->assign('externalJSFile', 'modules/' . $this->module . '/metadata/editvewdefs.js'); $this->th->ss->assign('externalJSFile', $this->defs['templateMeta']['javascript']); } else { $this->th->ss->assign('scriptBlocks', $this->defs['templateMeta']['javascript']); } } $this->th->ss->assign('id', $this->fieldDefs['id']['value']); $this->th->ss->assign('offset', $this->offset + 1); $this->th->ss->assign('APP', $app_strings); $this->th->ss->assign('MOD', $mod_strings); $this->th->ss->assign('fields', $this->fieldDefs); $this->th->ss->assign('sectionPanels', $this->sectionPanels); $this->th->ss->assign('config', $sugar_config); $this->th->ss->assign('returnModule', $this->returnModule); $this->th->ss->assign('returnAction', $this->returnAction); $this->th->ss->assign('returnId', $this->returnId); $this->th->ss->assign('isDuplicate', $this->isDuplicate); $this->th->ss->assign('def', $this->defs); $this->th->ss->assign('useTabs', isset($this->defs['templateMeta']['useTabs']) ? $this->defs['templateMeta']['useTabs'] : false); $this->th->ss->assign('maxColumns', isset($this->defs['templateMeta']['maxColumns']) ? $this->defs['templateMeta']['maxColumns'] : 2); $this->th->ss->assign('module', $this->module); $this->th->ss->assign('headerTpl', isset($this->defs['templateMeta']['form']['headerTpl']) ? $this->defs['templateMeta']['form']['headerTpl'] : 'include/' . $this->view . '/header.tpl'); $this->th->ss->assign('footerTpl', isset($this->defs['templateMeta']['form']['footerTpl']) ? $this->defs['templateMeta']['form']['footerTpl'] : 'include/' . $this->view . '/footer.tpl'); $this->th->ss->assign('current_user', $current_user); $this->th->ss->assign('bean', $this->focus); $this->th->ss->assign('isAuditEnabled', $this->focus->is_AuditEnabled()); $this->th->ss->assign('gridline', $current_user->getPreference('gridline') == 'on' ? '1' : '0'); global $js_custom_version; global $sugar_version; $this->th->ss->assign('SUGAR_VERSION', $sugar_version); $this->th->ss->assign('JS_CUSTOM_VERSION', $js_custom_version); //this is used for multiple forms on one page if (!empty($this->formName)) { $form_id = $this->formName; $form_name = $this->formName; } else { $form_id = $this->view; $form_name = $this->view; } if ($ajaxSave && empty($this->formName)) { $form_id = 'form_' . $this->view . '_' . $this->module; $form_name = $form_id; $this->view = $form_name; //$this->defs['templateMeta']['form']['buttons'] = array(); //$this->defs['templateMeta']['form']['buttons']['ajax_save'] = array('id' => 'AjaxSave', 'customCode'=>'<input type="button" class="button" value="Save" onclick="this.form.action.value=\'AjaxFormSave\';return saveForm(\''.$form_name.'\', \'multiedit_form_{$module}\', \'Saving {$module}...\');"/>'); } $form_name = $form_name == 'QuickCreate' ? "QuickCreate_{$this->module}" : $form_name; $form_id = $form_id == 'QuickCreate' ? "QuickCreate_{$this->module}" : $form_id; if (isset($this->defs['templateMeta']['preForm'])) { $this->th->ss->assign('preForm', $this->defs['templateMeta']['preForm']); } if (isset($this->defs['templateMeta']['form']['closeFormBeforeCustomButtons'])) { $this->th->ss->assign('closeFormBeforeCustomButtons', $this->defs['templateMeta']['form']['closeFormBeforeCustomButtons']); } if (isset($this->defs['templateMeta']['form']['enctype'])) { $this->th->ss->assign('enctype', 'enctype="' . $this->defs['templateMeta']['form']['enctype'] . '"'); } //for SugarFieldImage, we must set form enctype to "multipart/form-data" foreach ($this->fieldDefs as $field) { if (isset($field['type']) && $field['type'] == 'image') { $this->th->ss->assign('enctype', 'enctype="multipart/form-data"'); break; } } $this->th->ss->assign('showDetailData', $this->showDetailData); $this->th->ss->assign('showSectionPanelsTitles', $this->showSectionPanelsTitles); $this->th->ss->assign('form_id', $form_id); $this->th->ss->assign('form_name', $form_name); $this->th->ss->assign('set_focus_block', get_set_focus_js()); $this->th->ss->assign('form', isset($this->defs['templateMeta']['form']) ? $this->defs['templateMeta']['form'] : null); $this->th->ss->assign('includes', isset($this->defs['templateMeta']['includes']) ? $this->defs['templateMeta']['includes'] : null); $this->th->ss->assign('view', $this->view); //Calculate time & date formatting (may need to calculate this depending on a setting) global $timedate; $this->th->ss->assign('CALENDAR_DATEFORMAT', $timedate->get_cal_date_format()); $this->th->ss->assign('USER_DATEFORMAT', $timedate->get_user_date_format()); $time_format = $timedate->get_user_time_format(); $this->th->ss->assign('TIME_FORMAT', $time_format); $date_format = $timedate->get_cal_date_format(); $time_separator = ':'; if (preg_match('/\\d+([^\\d])\\d+([^\\d]*)/s', $time_format, $match)) { $time_separator = $match[1]; } // Create Smarty variables for the Calendar picker widget $t23 = strpos($time_format, '23') !== false ? '%H' : '%I'; if (!isset($match[2]) || $match[2] == '') { $this->th->ss->assign('CALENDAR_FORMAT', $date_format . ' ' . $t23 . $time_separator . '%M'); } else { $pm = $match[2] == 'pm' ? '%P' : '%p'; $this->th->ss->assign('CALENDAR_FORMAT', $date_format . ' ' . $t23 . $time_separator . '%M' . $pm); } $this->th->ss->assign('TIME_SEPARATOR', $time_separator); $seps = get_number_seperators(); $this->th->ss->assign('NUM_GRP_SEP', $seps[0]); $this->th->ss->assign('DEC_SEP', $seps[1]); if ($this->view == 'EditView') { $height = $current_user->getPreference('text_editor_height'); $width = $current_user->getPreference('text_editor_width'); $height = isset($height) ? $height : '300px'; $width = isset($width) ? $width : '95%'; $this->th->ss->assign('RICH_TEXT_EDITOR_HEIGHT', $height); $this->th->ss->assign('RICH_TEXT_EDITOR_WIDTH', $width); } else { $this->th->ss->assign('RICH_TEXT_EDITOR_HEIGHT', '100px'); $this->th->ss->assign('RICH_TEXT_EDITOR_WIDTH', '95%'); } $this->th->ss->assign('SHOW_VCR_CONTROL', $this->showVCRControl); $str = $this->showTitle($showTitle); //Use the output filter to trim the whitespace $this->th->ss->load_filter('output', 'trimwhitespace'); $str .= $this->th->displayTemplate($this->module, $form_name, $this->tpl, $ajaxSave, $this->defs); return $str; }
$sugar_smarty = new Sugar_Smarty(); $errors = array(); if (!array_key_exists('aod', $cfg->config)) { $cfg->config['aod'] = array('enable_aod' => ''); } if (isset($_REQUEST['do']) && $_REQUEST['do'] == 'save') { $cfg->config['aod']['enable_aod'] = !empty($_REQUEST['enable_aod']); $cfg->saveConfig(); header('Location: index.php?module=Administration&action=index'); exit; } $sugar_smarty->assign('MOD', $mod_strings); $sugar_smarty->assign('APP', $app_strings); $sugar_smarty->assign('APP_LIST', $app_list_strings); $sugar_smarty->assign('LANGUAGES', get_languages()); $sugar_smarty->assign("JAVASCRIPT", get_set_focus_js()); $sugar_smarty->assign('config', $cfg->config['aod']); $sugar_smarty->assign('error', $errors); $buttons = <<<EOQ <input title="{$app_strings['LBL_SAVE_BUTTON_TITLE']}" accessKey="{$app_strings['LBL_SAVE_BUTTON_KEY']}" class="button primary" type="submit" name="save" onclick="return check_form('ConfigureSettings');" value=" {$app_strings['LBL_SAVE_BUTTON_LABEL']} " > <input title="{$mod_strings['LBL_CANCEL_BUTTON_TITLE']}" onclick="document.location.href='index.php?module=Administration&action=index'" class="button" type="button" name="cancel" value=" {$app_strings['LBL_CANCEL_BUTTON_LABEL']} " > EOQ; $sugar_smarty->assign("BUTTONS", $buttons); $sugar_smarty->display('custom/modules/Administration/AODAdmin.tpl'); $javascript = new javascript();
/** * @see SugarView::display() */ public function display() { global $current_user, $mod_strings, $app_strings, $app_list_strings, $sugar_config, $locale; $configurator = new Configurator(); $sugarConfig = SugarConfig::getInstance(); $configurator->parseLoggerSettings(); $focus = Administration::getSettings(); /* if(!empty($_POST['restore'])){ $configurator->restoreConfig(); } */ $this->ss->assign('MOD', $mod_strings); $this->ss->assign('APP', $app_strings); $this->ss->assign('APP_LIST', $app_list_strings); $this->ss->assign('config', $configurator->config); $this->ss->assign('error', $configurator->errors); $this->ss->assign("AUTO_REFRESH_INTERVAL_OPTIONS", get_select_options_with_id($app_list_strings['dashlet_auto_refresh_options_admin'], isset($configurator->config['dashlet_auto_refresh_min']) ? $configurator->config['dashlet_auto_refresh_min'] : 30)); $this->ss->assign('LANGUAGES', get_languages()); $this->ss->assign("JAVASCRIPT", get_set_focus_js() . get_configsettings_js()); $this->ss->assign('company_logo', SugarThemeRegistry::current()->getImageURL('company_logo.png', true, true)); $this->ss->assign("settings", $focus->settings); $this->ss->assign("mail_sendtype_options", get_select_options_with_id($app_list_strings['notifymail_sendtype'], $focus->settings['mail_sendtype'])); if (!empty($focus->settings['proxy_on'])) { $this->ss->assign("PROXY_CONFIG_DISPLAY", 'inline'); } else { $this->ss->assign("PROXY_CONFIG_DISPLAY", 'none'); } if (!empty($focus->settings['proxy_auth'])) { $this->ss->assign("PROXY_AUTH_DISPLAY", 'inline'); } else { $this->ss->assign("PROXY_AUTH_DISPLAY", 'none'); } $ini_session_val = ini_get('session.gc_maxlifetime'); if (!empty($focus->settings['system_session_timeout'])) { $this->ss->assign("SESSION_TIMEOUT", $focus->settings['system_session_timeout']); } else { $this->ss->assign("SESSION_TIMEOUT", $ini_session_val); } if (!empty($configurator->config['logger']['level'])) { $this->ss->assign('log_levels', get_select_options_with_id(LoggerManager::getLoggerLevels(), $configurator->config['logger']['level'])); } else { $this->ss->assign('log_levels', get_select_options_with_id(LoggerManager::getLoggerLevels(), '')); } if (!empty($configurator->config['lead_conv_activity_opt'])) { $this->ss->assign('lead_conv_activities', get_select_options_with_id(Lead::getActivitiesOptions(), $configurator->config['lead_conv_activity_opt'])); } else { $this->ss->assign('lead_conv_activities', get_select_options_with_id(Lead::getActivitiesOptions(), '')); } if (!empty($configurator->config['logger']['file']['suffix'])) { $this->ss->assign('filename_suffix', get_select_options_with_id(SugarLogger::$filename_suffix, $configurator->config['logger']['file']['suffix'])); } else { $this->ss->assign('filename_suffix', get_select_options_with_id(SugarLogger::$filename_suffix, '')); } if (isset($configurator->config['logger_visible'])) { $this->ss->assign('logger_visible', $configurator->config['logger_visible']); } else { $this->ss->assign('logger_visible', true); } $this->ss->assign('list_entries_per_listview_help', str_replace('{{listEntriesNum}}', '50', $mod_strings['TPL_LIST_ENTRIES_PER_LISTVIEW_HELP'])); $this->ss->assign('list_entries_per_subpanel_help', str_replace('{{subpanelEntriesNum}}', '25', $mod_strings['TPL_LIST_ENTRIES_PER_SUBPANEL_HELP'])); echo $this->getModuleTitle(false); $this->ss->display('modules/Configurator/tpls/EditView.tpl'); $javascript = new javascript(); $javascript->setFormName("ConfigureSettings"); $javascript->addFieldGeneric("notify_fromaddress", "email", $mod_strings['LBL_NOTIFY_FROMADDRESS'], TRUE, ""); $javascript->addFieldGeneric("notify_subject", "varchar", $mod_strings['LBL_NOTIFY_SUBJECT'], TRUE, ""); $javascript->addFieldGeneric("proxy_host", "varchar", $mod_strings['LBL_PROXY_HOST'], TRUE, ""); $javascript->addFieldGeneric("proxy_port", "int", $mod_strings['LBL_PROXY_PORT'], TRUE, ""); $javascript->addFieldGeneric("proxy_password", "varchar", $mod_strings['LBL_PROXY_PASSWORD'], TRUE, ""); $javascript->addFieldGeneric("proxy_username", "varchar", $mod_strings['LBL_PROXY_USERNAME'], TRUE, ""); $javascript->addFieldRange("system_session_timeout", "int", $mod_strings['SESSION_TIMEOUT'], TRUE, "", 0, $ini_session_val); echo $javascript->getScript(); }