/** * @see SugarView::display() */ public function display() { global $mod_strings, $app_strings, $app_list_strings; $this->ss->assign("ERROR_TEXT", $app_strings['LBL_EMPTY_VCARD']); if (isset($_REQUEST['error'])) { switch ($_REQUEST['error']) { case 'vcardErrorFilesize': $error = 'LBL_VCARD_ERROR_FILESIZE'; break; case 'vcardErrorRequired': $error = 'LBL_EMPTY_REQUIRED_VCARD'; break; default: $error = 'LBL_VCARD_ERROR_DEFAULT'; break; } $this->ss->assign("ERROR", $app_strings[$error]); } $this->ss->assign("HEADER", $app_strings['LBL_IMPORT_VCARD']); $this->ss->assign("MODULE", $_REQUEST['module']); $params = []; $params[] = "<a href='index.php?module={$_REQUEST['module']}&action=index'>{$mod_strings['LBL_MODULE_NAME']}</a>"; $params[] = $app_strings['LBL_IMPORT_VCARD_BUTTON_LABEL']; echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], $params, true); $this->ss->display($this->getCustomFilePathIfExists('include/MVC/View/tpls/Importvcard.tpl')); }
/** * display the form */ public function display() { global $mod_strings, $app_list_strings, $app_strings, $current_user; $error = ""; if (!is_admin($current_user)) { sugar_die($GLOBALS['app_strings']['ERR_NOT_ADMIN']); } $fontManager = new FontManager(); if (!$fontManager->listFontFiles()) { $error = implode("<br>", $fontManager->errors); } $this->ss->assign("MODULE_TITLE", getClassicModuleTitle($mod_strings['LBL_MODULE_ID'], array($mod_strings['LBL_FONTMANAGER_TITLE']), false)); if (!empty($_REQUEST['error'])) { $error .= "<br>" . $_REQUEST['error']; } $this->ss->assign("error", $error); $this->ss->assign("MOD", $mod_strings); $this->ss->assign("APP", $app_strings); $this->ss->assign("JAVASCRIPT", $this->_getJS()); if (isset($_REQUEST['return_action'])) { $this->ss->assign("RETURN_ACTION", $_REQUEST['return_action']); } else { $this->ss->assign("RETURN_ACTION", 'SugarpdfSettings'); } $this->ss->assign("K_PATH_FONTS", K_PATH_FONTS); // YUI List $this->ss->assign("COLUMNDEFS", $this->getYuiColumnDefs($fontManager->fontList)); $this->ss->assign("DATASOURCE", $this->getYuiDataSource($fontManager->fontList)); $this->ss->assign("RESPONSESCHEMA", $this->getYuiResponseSchema()); //display $this->ss->display('modules/Configurator/tpls/fontmanager.tpl'); }
/** * @see SugarView::display() */ public function display() { global $mod_strings, $app_strings, $app_list_strings; $this->ss->assign("ERROR_TEXT", $app_strings['LBL_EMPTY_VCARD']); $this->ss->assign("HEADER", $app_strings['LBL_IMPORT_VCARD']); $this->ss->assign("MODULE", $_REQUEST['module']); $params = array(); $params[] = "<a href='index.php?module={$_REQUEST['module']}&action=index'>{$mod_strings['LBL_MODULE_NAME']}</a>"; $params[] = $app_strings['LBL_IMPORT_VCARD_BUTTON_LABEL']; echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], $params, true); $this->ss->display($this->getCustomFilePathIfExists('include/MVC/View/tpls/Importvcard.tpl')); }
/** * @see SugarView::display() */ public function display() { global $mod_strings, $app_strings; $admin = Administration::getSettings(); require 'modules/Trackers/config.php'; /////////////////////////////////////////////////////////////////////////////// //// HANDLE CHANGES if (isset($_POST['process'])) { if ($_POST['process'] == 'true') { foreach ($tracker_config as $entry) { if (isset($entry['bean'])) { //If checkbox is unchecked, we add the entry into the config table; otherwise delete it if (empty($_POST[$entry['name']])) { $admin->saveSetting('tracker', $entry['name'], 1); } else { $db = DBManagerFactory::getInstance(); $db->query("DELETE FROM config WHERE category = 'tracker' and name = '" . $entry['name'] . "'"); } } } //foreach //save the tracker prune interval if (!empty($_POST['tracker_prune_interval'])) { $admin->saveSetting('tracker', 'prune_interval', $_POST['tracker_prune_interval']); } //save log slow queries and slow query interval $configurator = new Configurator(); $configurator->saveConfig(); } //if header('Location: index.php?module=Administration&action=index'); } echo getClassicModuleTitle("Administration", array("<a href='index.php?module=Administration&action=index'>" . translate('LBL_MODULE_NAME', 'Administration') . "</a>", translate('LBL_TRACKER_SETTINGS', 'Administration')), false); $trackerManager = TrackerManager::getInstance(); $disabledMonitors = $trackerManager->getDisabledMonitors(); $trackerEntries = array(); foreach ($tracker_config as $entry) { if (isset($entry['bean'])) { $disabled = !empty($disabledMonitors[$entry['name']]); $trackerEntries[$entry['name']] = array('label' => $mod_strings['LBL_' . strtoupper($entry['name']) . '_DESC'], 'helpLabel' => $mod_strings['LBL_' . strtoupper($entry['name']) . '_HELP'], 'disabled' => $disabled); } } $configurator = new Configurator(); $this->ss->assign('config', $configurator->config); $config_strings = return_module_language($GLOBALS['current_language'], 'Configurator'); $mod_strings['LOG_SLOW_QUERIES'] = $config_strings['LOG_SLOW_QUERIES']; $mod_strings['SLOW_QUERY_TIME_MSEC'] = $config_strings['SLOW_QUERY_TIME_MSEC']; $this->ss->assign('mod', $mod_strings); $this->ss->assign('app', $app_strings); $this->ss->assign('trackerEntries', $trackerEntries); $this->ss->assign('tracker_prune_interval', !empty($admin->settings['tracker_prune_interval']) ? $admin->settings['tracker_prune_interval'] : 30); $this->ss->display('modules/Trackers/tpls/TrackerSettings.tpl'); }
public function testgetClassicModuleTitle() { //execute the method and test if it returns html and contains the values provided in parameters //with show_create false, generates less html $html1 = getClassicModuleTitle('users', array('Users Home')); $this->assertGreaterThan(0, strlen($html1)); $this->assertContains('Users Home', $html1); //with show_create true, generates more html $html2 = getClassicModuleTitle('users', array('Users Home'), true); $this->assertGreaterThan(0, strlen($html2)); $this->assertContains('Users Home', $html2); $this->assertGreaterThan(strlen($html1), strlen($html2)); }
function display() { global $mod_strings, $timedate, $app_strings; include_once 'modules/Reports/schedule/save_schedule.php'; $smarty = new Sugar_Smarty(); $smarty->assign('MOD', $mod_strings); $smarty->assign('APP', $app_strings); $smarty->assign('PAGE_TITLE', getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_SCHEDULE_EMAIL']), false)); $smarty->assign('STYLESHEET', SugarThemeRegistry::current()->getCSS()); $smarty->assign("CALENDAR_LANG", substr($GLOBALS['current_language'], 0, 2)); $smarty->assign("CALENDAR_DATEFORMAT", $timedate->get_cal_date_format()); $smarty->assign("PRINT_URL", "index.php?" . $GLOBALS['request_string']); $smarty->assign("RECORD", $_REQUEST['id']); $cache_dir = !empty($GLOBALS['sugar_config']['cache_dir']) ? rtrim($GLOBALS['sugar_config']['cache_dir'], '/\\') : 'cache'; $smarty->assign('CACHE_DIR', $cache_dir); $refreshPage = isset($_REQUEST['refreshPage']) ? $_REQUEST['refreshPage'] : "true"; $smarty->assign("REFRESH_PAGE", $refreshPage); $time_interval_select = translate('DROPDOWN_SCHEDULE_INTERVALS', 'Reports'); $time_format = $timedate->get_user_time_format(); $smarty->assign("TIME_FORMAT", $time_format); $smarty->assign("TIMEDATE_JS", self::getJavascriptValidation()); require_once 'modules/Reports/schedule/ReportSchedule.php'; $rs = new ReportSchedule(); $schedule = $rs->get_report_schedule_for_user($_REQUEST['id']); if ($schedule) { $smarty->assign('SCHEDULE_ID', $schedule['id']); $smarty->assign('DATE_START', $timedate->to_display_date_time($schedule['date_start'], true)); if ($schedule['active']) { $smarty->assign('SCHEDULE_ACTIVE_CHECKED', 'checked'); } $smarty->assign('NEXT_RUN', $timedate->to_display_date_time($schedule['next_run'])); $smarty->assign('TIME_INTERVAL_SELECT', get_select_options_with_id($time_interval_select, $schedule['time_interval'])); $smarty->assign('SCHEDULE_TYPE', $schedule['schedule_type']); } else { $smarty->assign('NEXT_RUN', $mod_strings['LBL_NONE']); $smarty->assign('TIME_INTERVAL_SELECT', get_select_options_with_id($time_interval_select, '')); if (isset($_REQUEST['schedule_type']) && $_REQUEST['schedule_type'] != "") { $smarty->assign('SCHEDULE_TYPE', $_REQUEST['schedule_type']); } } $smarty->assign('CURRENT_LANGUAGE', $GLOBALS['current_language']); $smarty->assign('JS_VERSION', $GLOBALS['js_version_key']); $smarty->assign('JS_CUSTOM_VERSION', $GLOBALS['sugar_config']['js_custom_version']); $smarty->assign('JS_LANGUAGE_VERSION', $GLOBALS['sugar_config']['js_lang_version']); //$this->_displayJavascript(); $html = $smarty->fetch('modules/Reports/tpls/AddSchedule.tpl'); echo $html; }
/** * display the form */ public function display() { global $mod_strings, $app_list_strings, $app_strings, $current_user; if (!is_admin($current_user)) { sugar_die($GLOBALS['app_strings']['ERR_NOT_ADMIN']); } $error = $this->addFont(); $this->ss->assign("MODULE_TITLE", getClassicModuleTitle($mod_strings['LBL_MODULE_ID'], array($mod_strings['LBL_ADDFONTRESULT_TITLE']), false)); if ($error) { $this->ss->assign("error", $this->log); } else { $this->ss->assign("info", $this->log); } $this->ss->assign("MOD", $mod_strings); $this->ss->assign("APP", $app_strings); //display $this->ss->display('modules/Configurator/tpls/addFontResult.tpl'); }
/** * @see SugarView::display() */ public function display() { require_once "include/JSON.php"; $json = new JSON(); global $mod_strings; $title = getClassicModuleTitle("Administration", array("<a href='index.php?module=Administration&action=index'>{$mod_strings['LBL_MODULE_NAME']}</a>", translate('LBL_CONFIGURE_SHORTCUT_BAR')), false); $msg = ""; $GLOBALS['log']->info("Administration ConfigureShortcutBar view"); $quickCreateModules = $this->getQuickCreateModules(); //If save is set, save then let the user know if the save worked. if (!empty($_REQUEST['enabled_modules'])) { $toDecode = html_entity_decode($_REQUEST['enabled_modules'], ENT_QUOTES); // get the enabled $enabledModules = array_flip(json_decode($toDecode)); $successful = $this->saveChangesToQuickCreateMetadata($quickCreateModules['enabled'], $quickCreateModules['disabled'], $enabledModules); if ($successful) { MetaDataManager::refreshSectionCache(array(MetaDataManager::MM_MODULES)); echo "true"; } else { echo translate("LBL_SAVE_FAILED"); } } else { $enabled = $this->sortEnabledModules($quickCreateModules['enabled']); $enabled = $this->filterAndFormatModuleList($enabled); ksort($quickCreateModules['disabled']); $disabled = $this->filterAndFormatModuleList($quickCreateModules['disabled']); $this->ss->assign('APP', $GLOBALS['app_strings']); $this->ss->assign('MOD', $GLOBALS['mod_strings']); $this->ss->assign('title', $title); $this->ss->assign('enabled_modules', $json->encode($enabled)); $this->ss->assign('disabled_modules', $json->encode($disabled)); $this->ss->assign('description', translate("LBL_CONFIGURE_SHORTCUT_BAR")); $this->ss->assign('msg', $msg); $returnModule = !empty($_REQUEST['return_module']) ? $_REQUEST['return_module'] : 'Administration'; $returnAction = !empty($_REQUEST['return_action']) ? $_REQUEST['return_action'] : 'index'; $this->ss->assign('RETURN_MODULE', $returnModule); $this->ss->assign('RETURN_ACTION', $returnAction); echo $this->ss->fetch('modules/Administration/templates/ShortcutBar.tpl'); } }
/** * display the form */ public function display() { global $mod_strings, $app_list_strings, $app_strings, $current_user; if (!is_admin($current_user)) { sugar_die($GLOBALS['app_strings']['ERR_NOT_ADMIN']); } $this->ss->assign("MODULE_TITLE", getClassicModuleTitle($mod_strings['LBL_MODULE_ID'], array($mod_strings['LBL_ADDFONT_TITLE']), true)); if (!empty($_REQUEST['error'])) { $this->ss->assign("error", $_REQUEST['error']); } $this->ss->assign("MOD", $mod_strings); $this->ss->assign("APP", $app_strings); if (isset($_REQUEST['return_action'])) { $this->ss->assign("RETURN_ACTION", $_REQUEST['return_action']); } else { $this->ss->assign("RETURN_ACTION", 'FontManager'); } $this->ss->assign("STYLE_LIST", array("regular" => $mod_strings["LBL_FONT_REGULAR"], "italic" => $mod_strings["LBL_FONT_ITALIC"], "bold" => $mod_strings["LBL_FONT_BOLD"], "boldItalic" => $mod_strings["LBL_FONT_BOLDITALIC"])); $this->ss->assign("ENCODING_TABLE", array_combine(explode(",", PDF_ENCODING_TABLE_LIST), explode(",", PDF_ENCODING_TABLE_LABEL_LIST))); //display $this->ss->display('modules/Configurator/tpls/addFontView.tpl'); }
function cleanAllBeans() { } //// END UTILITIES /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// //// PAGE OUTPUT if (isset($runSilent) && $runSilent == true) { // if called from Scheduler cleanAllBeans(); } else { $hide = array('Activities', 'Home', 'iFrames', 'Calendar', 'Dashboard'); sort($moduleList); $options = array(); $options[] = $app_strings['LBL_NONE']; $options['all'] = "--{$app_strings['LBL_TABGROUP_ALL']}--"; foreach ($moduleList as $module) { if (!in_array($module, $hide)) { $options[$module] = $module; } } $options = get_select_options_with_id($options, ''); $beanDropDown = "<select onchange='SUGAR.Administration.RepairXSS.refreshEstimate(this);' id='repairXssDropdown'>{$options}</select>"; echo getClassicModuleTitle('Administration', array($mod_strings['LBL_REPAIRXSS_TITLE']), false); echo "<script>var done = '{$mod_strings['LBL_DONE']}';</script>"; $smarty = new Sugar_Smarty(); $smarty->assign("mod", $mod_strings); $smarty->assign("beanDropDown", $beanDropDown); $smarty->display("modules/Administration/templates/RepairXSS.tpl"); } // end else
* of this program must display Appropriate Legal Notices, as required under * Section 5 of the GNU Affero General Public License version 3. * * In accordance with Section 7(b) of the GNU Affero General Public License version 3, * these Appropriate Legal Notices must retain the display of the "Powered by * SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not * reasonably feasible for technical reasons, the Appropriate Legal Notices must * display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM". ********************************************************************************/ global $app_strings; global $app_list_strings; global $mod_strings; global $theme; global $currentModule; global $gridline; echo getClassicModuleTitle('Customize Fields', array('Customize Fields'), false); ?> <table cellspacing="<?php echo $gridline; ?> " class="other view"> <tr> <td> <form> Module Name: <select> <?php foreach ($moduleList as $module) { echo "<option>{$module}</option>"; } ?>
/** * @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(); }
require_once 'include/DetailView/DetailView.php'; global $theme; global $mod_strings; /* start standard DetailView layout process */ $GLOBALS['log']->info("Groups DetailView"); $focus = new Group(); $focus->retrieve($_REQUEST['record']); $detailView = new DetailView(); $offset = 0; if (isset($_REQUEST['offset']) or isset($_REQUEST['record'])) { $result = $detailView->processSugarBean("Group", $focus, $offset); if ($result == null) { sugar_die($app_strings['ERROR_NO_RECORD']); } $focus = $result; } else { header("Location: index.php?module=Groups&action=index"); } echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_MODULE_NAME'], $focus->user_name), true); /* end standard DetailView layout process */ $xtpl = new XTemplate('modules/Groups/DetailView.html'); $xtpl->assign('MOD', $mod_strings); $xtpl->assign('APP', $app_strings); $xtpl->assign("CREATED_BY", $focus->created_by_name); $xtpl->assign("MODIFIED_BY", $focus->modified_by_name); $xtpl->assign("GRIDLINE", $gridline); $xtpl->assign("PRINT_URL", "index.php?" . $GLOBALS['request_string']); $xtpl->assign("ID", $focus->id); $xtpl->assign('USER_NAME', $focus->user_name); $xtpl->parse('main'); $xtpl->out('main');
* 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". ********************************************************************************/ $style = 'embeded'; if (isset($_REQUEST['style'])) { $style = $_REQUEST['style']; } if (isset($_REQUEST['module_name'])) { $the_strings = return_module_language($current_language, $_REQUEST['module_name']); global $app_strings; global $app_list_strings; global $mod_strings; global $current_user; echo SugarThemeRegistry::current()->getCSS(); echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_MODULE_NAME'], $_REQUEST['module_name']), true); $xtpl = new XTemplate('modules/LabelEditor/EditView.html'); $xtpl->assign("MOD", $mod_strings); $xtpl->assign("APP", $app_strings); $xtpl->assign("MODULE_NAME", $_REQUEST['module_name']); $xtpl->assign("STYLE", $style); if (isset($_REQUEST['sugar_body_only'])) { $xtpl->assign("SUGAR_BODY_ONLY", $_REQUEST['sugar_body_only']); } if (isset($_REQUEST['record'])) { $xtpl->assign("NO_EDIT", "readonly"); $xtpl->assign("KEY", $_REQUEST['record']); if (isset($the_strings[$_REQUEST['record']])) { $xtpl->assign("VALUE", $the_strings[$_REQUEST['record']]); } else { if (isset($_REQUEST['value'])) {
$focus->parent_type = $app_list_strings['record_type_default_key']; } if (isset($_REQUEST['filename']) && $_REQUEST['isDuplicate'] != 'true') { $focus->filename = $_REQUEST['filename']; } if ($has_campaign || $inboundEmail) { insert_popup_header($theme); } $params = array(); if (empty($focus->id)) { $params[] = $GLOBALS['app_strings']['LBL_CREATE_BUTTON_LABEL']; } else { $params[] = "<a href='index.php?module={$focus->module_dir}&action=DetailView&record={$focus->id}'>{$focus->name}</a>"; $params[] = $GLOBALS['app_strings']['LBL_EDIT_BUTTON_LABEL']; } echo getClassicModuleTitle($focus->module_dir, $params, true); $GLOBALS['log']->info("EmailTemplate detail view"); if ($has_campaign || $inboundEmail) { $xtpl = new XTemplate('modules/EmailTemplates/EditView.html'); } else { $xtpl = new XTemplate('modules/EmailTemplates/EditViewMain.html'); } // else $xtpl->assign("MOD", $mod_strings); $xtpl->assign("APP", $app_strings); $xtpl->assign("LBL_ACCOUNT", $app_list_strings['moduleList']['Accounts']); $xtpl->parse("main.variable_option"); $returnAction = 'index'; if (isset($_REQUEST['return_module'])) { $xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']); }
/** * @see SugarView::display() */ public function display() { require_once 'include/utils/zip_utils.php'; $form_action = "index.php?module=Administration&action=Backups"; $backup_dir = ""; $backup_zip = ""; $run = "confirm"; $input_disabled = ""; global $mod_strings; $errors = array(); // process "run" commands if (isset($_REQUEST['run']) && $_REQUEST['run'] != "") { $run = $_REQUEST['run']; $backup_dir = $_REQUEST['backup_dir']; $backup_zip = $_REQUEST['backup_zip']; if ($run == "confirm") { if ($backup_dir == "") { $errors[] = $mod_strings['LBL_BACKUP_DIRECTORY_ERROR']; } if ($backup_zip == "") { $errors[] = $mod_strings['LBL_BACKUP_FILENAME_ERROR']; } if (sizeof($errors) > 0) { return $errors; } if (!is_dir($backup_dir)) { if (!mkdir_recursive($backup_dir)) { $errors[] = $mod_strings['LBL_BACKUP_DIRECTORY_EXISTS']; } } if (!is_writable($backup_dir)) { $errors[] = $mod_strings['LBL_BACKUP_DIRECTORY_NOT_WRITABLE']; } if (is_file("{$backup_dir}/{$backup_zip}")) { $errors[] = $mod_strings['LBL_BACKUP_FILE_EXISTS']; } if (is_dir("{$backup_dir}/{$backup_zip}")) { $errors[] = $mod_strings['LBL_BACKUP_FILE_AS_SUB']; } if (sizeof($errors) == 0) { $run = "confirmed"; $input_disabled = "readonly"; } } else { if ($run == "confirmed") { ini_set("memory_limit", "-1"); ini_set("max_execution_time", "0"); zip_dir(".", "{$backup_dir}/{$backup_zip}"); $run = "done"; } } } if (sizeof($errors) > 0) { foreach ($errors as $error) { print "<font color=\"red\">{$error}</font><br>"; } } if ($run == "done") { $size = filesize("{$backup_dir}/{$backup_zip}"); print $mod_strings['LBL_BACKUP_FILE_STORED'] . " {$backup_dir}/{$backup_zip} ({$size} bytes).<br>\n"; print "<a href=\"index.php?module=Administration&action=index\">" . $mod_strings['LBL_BACKUP_BACK_HOME'] . "</a>\n"; } else { ?> <?php echo getClassicModuleTitle("Administration", array("<a href='index.php?module=Administration&action=index'>" . translate('LBL_MODULE_NAME', 'Administration') . "</a>", $mod_strings['LBL_BACKUPS_TITLE']), false); echo $mod_strings['LBL_BACKUP_INSTRUCTIONS_1']; ?> <br> <?php echo $mod_strings['LBL_BACKUP_INSTRUCTIONS_2']; ?> <br> <form action="<?php print $form_action; ?> " method="post"> <table> <tr> <td><?php echo $mod_strings['LBL_BACKUP_DIRECTORY']; ?> <br><i><?php echo $mod_strings['LBL_BACKUP_DIRECTORY_WRITABLE']; ?> </i></td> <td><input size="100" type="input" name="backup_dir" <?php print $input_disabled; ?> value="<?php print $backup_dir; ?> "/></td> </tr> <tr> <td><?php echo $mod_strings['LBL_BACKUP_FILENAME']; ?> </td> <td><input type="input" name="backup_zip" <?php print $input_disabled; ?> value="<?php print $backup_zip; ?> "/></td> </tr> </table> <input type=hidden name="run" value="<?php print $run; ?> " /> <?php switch ($run) { case "confirm": ?> <input type="submit" value="<?php echo $mod_strings['LBL_BACKUP_CONFIRM']; ?> " /> <?php break; case "confirmed": ?> <?php echo $mod_strings['LBL_BACKUP_CONFIRMED']; ?> <br> <input type="submit" value="<?php echo $mod_strings['LBL_BACKUP_RUN_BACKUP']; ?> " /> <?php break; } ?> </form> <?php } // end if/else of $run options $GLOBALS['log']->info("Backups"); }
//echo html_entity_decode($_POST['sql']); echo $sql; } elseif (isset($_POST['raction']) && strtolower($_POST['raction']) == "execute") { $sql = str_replace(array("\n", '''), array('', "'"), preg_replace('#(/\\*.+?\\*/\\n*)#', '', $_POST['sql'])); foreach (explode(";", $sql) as $stmt) { $stmt = trim($stmt); if (!empty($stmt)) { $db->query($stmt, true, 'Executing repair query: '); } } echo "<h3>{$mod_strings['LBL_REPAIR_DATABASE_SYNCED']}</h3>"; } } else { if (!$export && empty($_REQUEST['repair_silent'])) { if (empty($hideModuleMenu)) { echo getClassicModuleTitle($mod_strings['LBL_REPAIR_DATABASE'], array($mod_strings['LBL_REPAIR_DATABASE']), true); } echo "<h1 id=\"rdloading\">{$mod_strings['LBL_REPAIR_DATABASE_PROCESSING']}</h1>"; ob_flush(); } $sql = ''; VardefManager::clearVardef(); $repairedTables = array(); foreach ($beanFiles as $bean => $file) { if (file_exists($file)) { require_once $file; unset($GLOBALS['dictionary'][$bean]); $focus = BeanFactory::newBeanByName($bean); if ($focus instanceof SugarBean && !isset($repairedTables[$focus->table_name])) { $sql .= $db->repairTable($focus, $execute); $repairedTables[$focus->table_name] = true;
sugar_die($app_strings['ERROR_NO_RECORD']); } } if (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') { Log::debug("isDuplicate found - duplicating record of id: " . $focus->id); $focus->id = ""; } $params = array(); $params[] = "<a href='index.php?module=Schedulers&action=index'>{$mod_strings['LBL_MODULE_TITLE']}</a>"; if (empty($focus->id)) { $params[] = $GLOBALS['app_strings']['LBL_CREATE_BUTTON_LABEL']; } else { $params[] = "<a href='index.php?module=Schedulers&action=DetailView&record={$focus->id}'>{$focus->name}</a>"; $params[] = $GLOBALS['app_strings']['LBL_EDIT_BUTTON_LABEL']; } echo getClassicModuleTitle("Schedulers", $params, true); Log::info("Scheduler Edit View"); /* End standard EditView setup logic */ // javascript calls $javascript = new javascript(); $javascript->setSugarBean($focus); $javascript->setFormName('EditView'); $javascript->addAllFields(''); $javascript->addFieldGeneric('mins', 'alpha', 'Mins', true, $prefix = ''); $javascript->addFieldGeneric('day_of_month', 'alpha', 'Days of Month', true, $prefix = ''); $javascript->addFieldGeneric('months', 'alpha', 'Months', true, $prefix = ''); $javascript->addFieldGeneric('day_of_week', 'alpha', 'Days of Week', true, $prefix = ''); $javascript->addFieldGeneric('date_start', 'date', 'Start Date', true, $prefix = ''); //$javascript->addFieldDateBeforeAllowBlank('date_start', 'date', 'Date End', 'false', $prefix='', 'date_end', 'true'); // cn: disabled because it does not handle user-pref date format $javascript->addToValidateBinaryDependency('time_hour_from', 'alpha', 'Active From (hr) must be set with Active To (hr) ', 'false', $prefix = '', 'time_hour_to'); $javascript->addToValidateBinaryDependency('time_minute_from', 'alpha', 'Active From (min) must be set with Active To (min) ', 'false', $prefix = '', 'time_minute_to');
function prepareDiag() { global $getDumpsFrom; global $cacheDir; global $curdatetime; global $progress_bar_percent; global $skip_md5_diff; global $sod_guid; global $mod_strings; echo getClassicModuleTitle("Administration", array("<a href='index.php?module=Administration&action=index'>{$mod_strings['LBL_MODULE_NAME']}</a>", translate('LBL_DIAGNOSTIC_TITLE')), false); echo "<BR>"; echo $mod_strings['LBL_DIAGNOSTIC_EXECUTING']; echo "<BR>"; //determine if files.md5 exists or not if (file_exists('files.md5')) { $skip_md5_diff = false; } else { $skip_md5_diff = true; } // array of all tables that we need to pull rows from below $getDumpsFrom = array('config' => 'config', 'fields_meta_data' => 'fields_meta_data', 'upgrade_history' => 'upgrade_history', 'versions' => 'versions'); //Creates the diagnostic directory in the cache directory $cacheDir = create_cache_directory("diagnostic/"); $cacheDir = create_cache_directory("diagnostic/" . $sod_guid); $cacheDir = create_cache_directory("diagnostic/" . $sod_guid . "/diagnostic" . $curdatetime . "/"); display_progress_bar("diagnostic", $progress_bar_percent, 100); ob_flush(); }
if (!$GLOBALS['current_user']->isAdminForModule('Users')) { $tabs = $focus->getPreference('display_tabs'); global $modInvisList; if (!empty($tabs)) { foreach ($categories as $key => $value) { if (!in_array($key, $tabs) && !in_array($key, $modInvisList)) { unset($categories[$key]); } } } } $names = array(); $names = ACLAction::setupCategoriesMatrix($categories); if (!empty($names)) { $tdwidth = 100 / sizeof($names); } $sugar_smarty->assign('APP', $app_list_strings); $sugar_smarty->assign('CATEGORIES', $categories); $sugar_smarty->assign('TDWIDTH', $tdwidth); $sugar_smarty->assign('ACTION_NAMES', $names); $title = getClassicModuleTitle('', array($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_ROLES_SUBPANEL_TITLE']), ''); $sugar_smarty->assign('TITLE', $title); $sugar_smarty->assign('USER_ID', $focus->id); $sugar_smarty->assign('LAYOUT_DEF_KEY', 'UserRoles'); echo $sugar_smarty->fetch('modules/ACLRoles/DetailViewUser.tpl'); //this gets its layout_defs.php file from the user not from ACLRoles so look in modules/Users for the layout defs require_once 'include/SubPanel/SubPanelTiles.php'; $modules_exempt_from_availability_check = array('Users' => 'Users', 'ACLRoles' => 'ACLRoles'); $subpanel = new SubPanelTiles($focus, 'UserRoles'); echo $subpanel->display(true, true); }
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 //Overrides for bounce mailbox accounts if ($focus->mailbox_type == 'bounce') { $xtpl->assign('MODULE_TITLE', getClassicModuleTitle('InboundEmail', array($mod_strings['LBL_BOUNCE_MODULE_NAME'], $focus->name), true)); $xtpl->assign("EMAIL_OPTIONS", $mod_strings['LBL_EMAIL_BOUNCE_OPTIONS']); $xtpl->assign('MAILBOX_TYPE_STYLE', "display:none"); $xtpl->assign('AUTO_IMPORT_STYLE', "display:none"); } elseif ($focus->mailbox_type == 'createcase') { $xtpl->assign("IS_CREATE_CASE", 'checked'); } else { if ($focus->is_personal == '1') { $xtpl->assign('MODULE_TITLE', getClassicModuleTitle('InboundEmail', array($mod_strings['LBL_PERSONAL_MODULE_NAME'], $focus->name), true)); } } //else $xtpl->parse("main"); $xtpl->out("main");
* of this program must display Appropriate Legal Notices, as required under * Section 5 of the GNU Affero General Public License version 3. * * In accordance with Section 7(b) of the GNU Affero General Public License version 3, * these Appropriate Legal Notices must retain the display of the "Powered by * SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not * reasonably feasible for technical reasons, the Appropriate Legal Notices must * display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM". ********************************************************************************/ global $app_strings; global $app_list_strings; global $mod_strings; global $theme; global $currentModule; global $gridline; echo getClassicModuleTitle('MigrateFields', array($mod_strings['LBL_EXTERNAL_DEV_TITLE']), true); ?> <p> <table cellspacing="<?php echo $gridline; ?> " class="other view"> <tr> <td scope="row"><?php echo SugarThemeRegistry::current()->getImage('ImportCustomFields', 'align="absmiddle" border="0"', null, null, '.gif', $mod_strings['LBL_IMPORT_CUSTOM_FIELDS_TITLE']); ?> <a href="./index.php?module=Administration&action=ImportCustomFieldStructure" class="tabDetailViewDL2Link"><?php echo $mod_strings['LBL_IMPORT_CUSTOM_FIELDS_TITLE']; ?> </a></td> <td> <?php
function display() { if (!$this->bean->ACLAccess('list')) { ACLController::displayNoAccess(); return; } $module = $GLOBALS['module']; $metadataFile = null; $foundViewDefs = false; if (file_exists('custom/modules/' . $module . '/metadata/listviewdefs.php')) { $metadataFile = 'custom/modules/' . $module . '/metadata/listviewdefs.php'; $foundViewDefs = true; } else { if (file_exists('custom/modules/' . $module . '/metadata/metafiles.php')) { require_once 'custom/modules/' . $module . '/metadata/metafiles.php'; if (!empty($metafiles[$module]['listviewdefs'])) { $metadataFile = $metafiles[$module]['listviewdefs']; $foundViewDefs = true; } } elseif (file_exists('modules/' . $module . '/metadata/metafiles.php')) { require_once 'modules/' . $module . '/metadata/metafiles.php'; if (!empty($metafiles[$module]['listviewdefs'])) { $metadataFile = $metafiles[$module]['listviewdefs']; $foundViewDefs = true; } } } if (!$foundViewDefs && file_exists('modules/' . $module . '/metadata/listviewdefs.php')) { $metadataFile = 'modules/' . $module . '/metadata/listviewdefs.php'; } require_once $metadataFile; $seed = $this->bean; if (!empty($this->bean->object_name) && isset($_REQUEST[$module . '2_' . strtoupper($this->bean->object_name) . '_offset'])) { //if you click the pagination button, it will poplate the search criteria here if (!empty($_REQUEST['current_query_by_page'])) { //The code support multi browser tabs pagination $blockVariables = array('mass', 'uid', 'massupdate', 'delete', 'merge', 'selectCount', 'request_data', 'current_query_by_page', $module . '2_' . strtoupper($this->bean->object_name) . '_ORDER_BY'); if (isset($_REQUEST['lvso'])) { $blockVariables[] = 'lvso'; } $current_query_by_page = unserialize(base64_decode($_REQUEST['current_query_by_page'])); foreach ($current_query_by_page as $search_key => $search_value) { if ($search_key != $module . '2_' . strtoupper($this->bean->object_name) . '_offset' && !in_array($search_key, $blockVariables)) { if (!is_array($search_value)) { $_REQUEST[$search_key] = $GLOBALS['db']->quoteForEmail($search_value); } else { foreach ($search_value as $key => &$val) { $val = $GLOBALS['db']->quoteForEmail($val); } $_REQUEST[$search_key] = $search_value; } } } } } if (!empty($_REQUEST['saved_search_select']) && $_REQUEST['saved_search_select'] != '_none') { if (empty($_REQUEST['button']) && (empty($_REQUEST['clear_query']) || $_REQUEST['clear_query'] != 'true')) { $this->saved_search = loadBean('SavedSearch'); $this->saved_search->retrieveSavedSearch($_REQUEST['saved_search_select']); $this->saved_search->populateRequest(); } elseif (!empty($_REQUEST['button'])) { // click the search button, after retrieving from saved_search $_SESSION['LastSavedView'][$_REQUEST['module']] = ''; unset($_REQUEST['saved_search_select']); unset($_REQUEST['saved_search_select_name']); } } $lv = new ListViewSmarty(); $displayColumns = array(); if (!empty($_REQUEST['displayColumns'])) { foreach (explode('|', $_REQUEST['displayColumns']) as $num => $col) { if (!empty($listViewDefs[$module][$col])) { $displayColumns[$col] = $listViewDefs[$module][$col]; } } } else { foreach ($listViewDefs[$module] as $col => $params) { if (!empty($params['default']) && $params['default']) { $displayColumns[$col] = $params; } } } global $current_user; if (!is_admin($current_user)) { $params = array('massupdate' => false); $lv->export = false; } else { $params = array('massupdate' => true, 'export' => true); } if (!empty($_REQUEST['orderBy'])) { $params['orderBy'] = $_REQUEST['orderBy']; $params['overrideOrder'] = true; if (!empty($_REQUEST['sortOrder'])) { $params['sortOrder'] = $_REQUEST['sortOrder']; } } $lv->displayColumns = $displayColumns; $this->seed = $seed; $this->module = $module; $searchForm = null; $storeQuery = new StoreQuery(); if (!isset($_REQUEST['query'])) { $storeQuery->loadQuery($this->module); $storeQuery->populateRequest(); } else { $storeQuery->saveFromRequest($this->module); } //search $view = 'basic_search'; if (!empty($_REQUEST['search_form_view'])) { $view = $_REQUEST['search_form_view']; } $headers = true; if (!empty($_REQUEST['search_form_only']) && $_REQUEST['search_form_only']) { $headers = false; } elseif (!isset($_REQUEST['search_form']) || $_REQUEST['search_form'] != 'false') { if (isset($_REQUEST['searchFormTab']) && $_REQUEST['searchFormTab'] == 'advanced_search') { $view = 'advanced_search'; } else { $view = 'basic_search'; } } $use_old_search = true; if (file_exists('modules/' . $this->module . '/SearchForm.html')) { require_once 'include/SearchForm/SearchForm.php'; $searchForm = new SearchForm($this->module, $this->seed); } else { $use_old_search = false; require_once 'include/SearchForm/SearchForm2.php'; if (file_exists('custom/modules/' . $this->module . '/metadata/searchdefs.php')) { require_once 'custom/modules/' . $this->module . '/metadata/searchdefs.php'; } elseif (!empty($metafiles[$this->module]['searchdefs'])) { require_once $metafiles[$this->module]['searchdefs']; } elseif (file_exists('modules/' . $this->module . '/metadata/searchdefs.php')) { require_once 'modules/' . $this->module . '/metadata/searchdefs.php'; } if (!empty($metafiles[$this->module]['searchfields'])) { require_once $metafiles[$this->module]['searchfields']; } elseif (file_exists('modules/' . $this->module . '/metadata/SearchFields.php')) { require_once 'modules/' . $this->module . '/metadata/SearchFields.php'; } $searchForm = new SearchForm($this->seed, $this->module, $this->action); $searchForm->setup($searchdefs, $searchFields, 'include/SearchForm/tpls/SearchFormGeneric.tpl', $view, $listViewDefs); $searchForm->lv = $lv; } if (isset($this->options['show_title']) && $this->options['show_title']) { $moduleName = isset($this->seed->module_dir) ? $this->seed->module_dir : $GLOBALS['mod_strings']['LBL_MODULE_NAME']; echo getClassicModuleTitle($moduleName, array($GLOBALS['mod_strings']['LBL_MODULE_TITLE']), FALSE); } $where = ''; if (isset($_REQUEST['query'])) { // we have a query if (!empty($_SERVER['HTTP_REFERER']) && preg_match('/action=EditView/', $_SERVER['HTTP_REFERER'])) { // from EditView cancel $searchForm->populateFromArray($storeQuery->query); } else { $searchForm->populateFromRequest(); } $where_clauses = $searchForm->generateSearchWhere(true, $this->seed->module_dir); if (count($where_clauses) > 0) { $where = '(' . implode(' ) AND ( ', $where_clauses) . ')'; } $GLOBALS['log']->info("List View Where Clause: {$where}"); } if ($use_old_search) { switch ($view) { case 'basic_search': $searchForm->setup(); $searchForm->displayBasic($headers); break; case 'advanced_search': $searchForm->setup(); $searchForm->displayAdvanced($headers); break; case 'saved_views': echo $searchForm->displaySavedViews($listViewDefs, $lv, $headers); break; } } else { echo $searchForm->display($headers); } if (!$headers) { return; } if (empty($_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] == false) { if (!is_admin($current_user)) { $lv->setup($seed, 'include/ListView/ListViewNoMassUpdate.tpl', $where, $params); } else { $lv->setup($seed, 'include/ListView/ListViewGeneric.tpl', $where, $params); } $savedSearchName = empty($_REQUEST['saved_search_select_name']) ? '' : ' - ' . $_REQUEST['saved_search_select_name']; echo $lv->display(); } }
} /********** FINAL END OF PAGE UI Stuff ********/ $ss->display(file_exists('custom/modules/Campaigns/WizardHome.html') ? 'custom/modules/Campaigns/WizardHome.html' : 'modules/Campaigns/WizardHome.html'); } else { //there is no record to retrieve, so ask which type of campaign wizard to launch /* $header_URL = "Location: index.php?module=Campaigns&action=index"; $GLOBALS['log']->debug("about to post header URL of: $header_URL"); header($header_URL); */ global $mod_strings; global $app_list_strings; global $app_strings; global $current_user; //if (!is_admin($current_user)) sugar_die("Unauthorized access to administration."); //account for use within wizards echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_CAMPAIGN_WIZARD'] . $focus->name), true, false); $ss = new Sugar_Smarty(); $ss->assign("MOD", $mod_strings); $ss->assign("APP", $app_strings); $ss->display(file_exists('custom/modules/Campaigns/tpls/WizardHomeStart.tpl') ? 'custom/modules/Campaigns/tpls/WizardHomeStart.tpl' : 'modules/Campaigns/tpls/WizardHomeStart.tpl'); } function create_campaign_summary($focus) { global $mod_strings, $app_strings; $fields = array(); $fields[] = 'name'; $fields[] = 'assigned_user_name'; $fields[] = 'status'; $fields[] = 'team_name'; $fields[] = 'start_date'; $fields[] = 'end_date';
* In accordance with Section 7(b) of the GNU Affero General Public License version 3, * these Appropriate Legal Notices must retain the display of the "Powered by * SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not * reasonably feasible for technical reasons, the Appropriate Legal Notices must * display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM". ********************************************************************************/ global $app_list_strings, $app_strings, $mod_strings; require_once 'modules/Studio/TabGroups/TabGroupHelper.php'; require_once 'modules/Studio/parsers/StudioParser.php'; $tabGroupSelected_lang = !empty($_GET['lang']) ? $_GET['lang'] : $_SESSION['authenticated_user_language']; $tg = new TabGroupHelper(); $smarty = new Sugar_Smarty(); if (empty($GLOBALS['tabStructure'])) { require 'include/tabConfig.php'; } $title = getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_CONFIGURE_GROUP_TABS']), false); #30205 $selectedAppLanguages = return_application_language($tabGroupSelected_lang); require_once 'include/GroupedTabs/GroupedTabStructure.php'; $availableModules = $tg->getAvailableModules($tabGroupSelected_lang); $smarty->assign('availableModuleList', $availableModules); $modList = array_keys($availableModules); $modList = array_combine($modList, $modList); // Bug #48693 We need full list of modules here instead of displayed modules $groupedTabsClass = new GroupedTabStructure(); $groupedTabStructure = $groupedTabsClass->get_tab_structure($modList, '', true, true); foreach ($groupedTabStructure as $mainTab => $subModules) { $groupedTabStructure[$mainTab]['label'] = $mainTab; $groupedTabStructure[$mainTab]['labelValue'] = $selectedAppLanguages[$mainTab]; } $smarty->assign('tabs', $groupedTabStructure);
unset($categories2[$v]); } } if (!empty($names)) { $tdwidth = 100 / sizeof($names); } $sugar_smarty->assign('ROLE', $role->toArray()); //xye customization begin $sugar_smarty->assign("CHECKED", $role->enablesoftphone ? "checked" : ""); //xye customization end $sugar_smarty->assign('CATEGORIES', $categories); $sugar_smarty->assign('CATEGORIES2', $categories2); $sugar_smarty->assign('TDWIDTH', $tdwidth); $sugar_smarty->assign('ACTION_NAMES', $names); $return = array('module' => 'ACLRoles', 'action' => 'DetailView', 'record' => $role->id); $sugar_smarty->assign('RETURN', $return); $params = array(); $params[] = "<a href='index.php?module=ACLRoles&action=index'>{$mod_strings['LBL_MODULE_NAME']}</a>"; $params[] = $role->get_summary_text(); echo getClassicModuleTitle("ACLRoles", $params, true); //$sugar_smarty->assign('TITLE', $title); $hide_hide_supanels = true; //xye customization begin echo $sugar_smarty->fetch('custom/modules/ACLRoles/DetailView.tpl'); //xye customization end //for subpanels the variable must be named focus; $focus =& $role; $_REQUEST['module'] = 'ACLRoles'; require_once 'include/SubPanel/SubPanelTiles.php'; $subpanel = new SubPanelTiles($role, 'ACLRoles'); echo $subpanel->display();
$sugar_smarty->assign("APP", $app_strings); $sugar_smarty->assign("RETURN_MODULE", "Administration"); $sugar_smarty->assign("RETURN_ACTION", "index"); $sugar_smarty->assign("DB_NAME", $db->dbName); $sugar_smarty->assign("MODULE", $currentModule); $sugar_smarty->assign("PRINT_URL", "index.php?" . $GLOBALS['request_string']); //result storage $sugar_smarty->assign("MANUALFIXFILES", implode("\n", $rlf->manualFixFiles)); $sugar_smarty->assign("MODIFIEDFILES", implode("\n", $rlf->modifiedFiles)); $sugar_smarty->assign("INDEXCHANGES", implode("\n", $rlf->indexChanges)); $sugar_smarty->assign("REMOVEDFILES", implode("\n", $rlf->removedFiles)); $sugar_smarty->assign("REMOVEDMODULES", implode("\n", $rlf->removedModules)); $sugar_smarty->display("custom/modules/Administration/fixLanguageFilesResult.tpl"); unlink("custom/fixLanguageFiles_Progress.php"); } else { $title = getClassicModuleTitle("Administration", array("<a href='index.php?module=Administration&action=index'>{$mod_strings['LBL_MODULE_NAME']}</a>", translate('LBL_FIXLANGUAGEFILES')), false); global $currentModule; $GLOBALS['log']->info("Administration: fixLanguageFiles"); $sugar_smarty = new Sugar_Smarty(); $sugar_smarty->assign("MOD", $mod_strings); $sugar_smarty->assign("APP", $app_strings); $sugar_smarty->assign("TITLE", $title); $sugar_smarty->display("custom/modules/Administration/fixLanguageFiles.tpl"); } class fixLanguageFiles { const TYPE_EMPTY = 0; const TYPE_DYNAMIC = 1; const TYPE_STATIC = 2; const TYPE_UNREADABLE = 3; const TYPE_UNWRITABLE = 4;
$tdwidth = 10; if (isset($_REQUEST['return_module'])) { $return['module'] = $_REQUEST['return_module']; if (isset($_REQUEST['return_action'])) { $return['action'] = $_REQUEST['return_action']; } if (isset($_REQUEST['return_record'])) { $return['record'] = $_REQUEST['return_record']; } } $sugar_smarty->assign('RETURN', $return); $names = ACLAction::setupCategoriesMatrix($categories); if (!empty($names)) { $tdwidth = 100 / sizeof($names); } $sugar_smarty->assign('CATEGORIES', $categories); $sugar_smarty->assign('CATEGORY_NAME', $_REQUEST['category_name']); $sugar_smarty->assign('TDWIDTH', $tdwidth); $sugar_smarty->assign('ACTION_NAMES', $names); $actions = $categories[$_REQUEST['category_name']]['module']; $sugar_smarty->assign('ACTIONS', $actions); ob_clean(); if ($_REQUEST['category_name'] == 'All') { echo $sugar_smarty->fetch('modules/ACLRoles/EditAllBody.tpl'); } else { //WDong Bug 23195: Strings not localized in Role Management. echo getClassicModuleTitle($_REQUEST['category_name'], array($app_list_strings['moduleList'][$_REQUEST['category_name']]), false); echo $sugar_smarty->fetch('modules/ACLRoles/EditRole.tpl'); echo '</form>'; } sugar_cleanup(true);
* * @author Salesagility Ltd <*****@*****.**> */ if (!defined('sugarEntry') || !sugarEntry) { die('Not A Valid Entry Point'); } global $current_user, $sugar_config; global $mod_strings; global $app_list_strings; global $app_strings; global $theme; if (!is_admin($current_user)) { sugar_die("Unauthorized access to administration."); } require_once 'modules/Configurator/Configurator.php'; echo getClassicModuleTitle("Administration", array("<a href='index.php?module=Administration&action=index'>" . translate('LBL_MODULE_NAME', 'Administration') . "</a>", $mod_strings['LBL_AOD_ADMIN_MANAGE_AOD']), false); $cfg = new Configurator(); $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);
/** * This function returns the detail view for email in new 2.0 interface * */ function getDetailViewForEmail2($emailId) { require_once 'include/DetailView/DetailView.php'; global $app_strings, $app_list_strings; global $mod_strings; $smarty = new Sugar_Smarty(); // SETTING DEFAULTS $focus = new Email(); $focus->retrieve($emailId); $detailView->ss = new Sugar_Smarty(); $detailView = new DetailView(); $title = ""; $offset = 0; if ($focus->type == 'out') { $title = getClassicModuleTitle('Emails', array($mod_strings['LBL_SENT_MODULE_NAME'], $focus->name), true); } elseif ($focus->type == 'draft') { $title = getClassicModuleTitle('Emails', array($mod_strings['LBL_LIST_FORM_DRAFTS_TITLE'], $focus->name), true); } elseif ($focus->type == 'inbound') { $title = getClassicModuleTitle('Emails', array($mod_strings['LBL_INBOUND_TITLE'], $focus->name), true); } $smarty->assign("emailTitle", $title); // DEFAULT TO TEXT IF NO HTML CONTENT: $html = trim(from_html($focus->description_html)); if (empty($html)) { $smarty->assign('SHOW_PLAINTEXT', 'true'); } else { $smarty->assign('SHOW_PLAINTEXT', 'false'); } //if not empty or set to test (from test campaigns) if (!empty($focus->parent_type) && $focus->parent_type != 'test') { $smarty->assign('PARENT_MODULE', $focus->parent_type); $smarty->assign('PARENT_TYPE', $app_list_strings['record_type_display'][$focus->parent_type] . ":"); } global $gridline; $smarty->assign('MOD', $mod_strings); $smarty->assign('APP', $app_strings); $smarty->assign('GRIDLINE', $gridline); $smarty->assign('PRINT_URL', 'index.php?' . $GLOBALS['request_string']); $smarty->assign('ID', $focus->id); $smarty->assign('TYPE', $focus->type); $smarty->assign('PARENT_NAME', $focus->parent_name); $smarty->assign('PARENT_ID', $focus->parent_id); $smarty->assign('NAME', $focus->name); $smarty->assign('ASSIGNED_TO', $focus->assigned_user_name); $smarty->assign('DATE_MODIFIED', $focus->date_modified); $smarty->assign('DATE_ENTERED', $focus->date_entered); $smarty->assign('DATE_START', $focus->date_start); $smarty->assign('TIME_START', $focus->time_start); $smarty->assign('FROM', $focus->from_addr); $smarty->assign('TO', nl2br($focus->to_addrs)); $smarty->assign('CC', nl2br($focus->cc_addrs)); $smarty->assign('BCC', nl2br($focus->bcc_addrs)); $smarty->assign('CREATED_BY', $focus->created_by_name); $smarty->assign('MODIFIED_BY', $focus->modified_by_name); $smarty->assign('DATE_SENT', $focus->date_entered); $smarty->assign('EMAIL_NAME', 'RE: ' . $focus->name); $smarty->assign("TAG", $focus->listviewACLHelper()); $smarty->assign("SUGAR_VERSION", $GLOBALS['sugar_version']); $smarty->assign("JS_CUSTOM_VERSION", $GLOBALS['sugar_config']['js_custom_version']); if (!empty($focus->reply_to_email)) { $replyTo = "\n\t\t\t\t<tr>\n\t\t <td class=\"tabDetailViewDL\"><slot>" . $mod_strings['LBL_REPLY_TO_NAME'] . "</slot></td>\n\t\t <td colspan=3 class=\"tabDetailViewDF\"><slot>" . $focus->reply_to_addr . "</slot></td>\n\t\t </tr>"; $smarty->assign("REPLY_TO", $replyTo); } /////////////////////////////////////////////////////////////////////////////// //// JAVASCRIPT VARS $jsVars = ''; $jsVars .= "var showRaw = '{$mod_strings['LBL_BUTTON_RAW_LABEL']}';"; $jsVars .= "var hideRaw = '{$mod_strings['LBL_BUTTON_RAW_LABEL_HIDE']}';"; $smarty->assign("JS_VARS", $jsVars); /////////////////////////////////////////////////////////////////////////////// //// NOTES (attachements, etc.) /////////////////////////////////////////////////////////////////////////////// $note = new Note(); $where = "notes.parent_id='{$focus->id}'"; //take in account if this is from campaign and the template id is stored in the macros. if (isset($macro_values) && isset($macro_values['email_template_id'])) { $where = "notes.parent_id='{$macro_values['email_template_id']}'"; } $notes_list = $note->get_full_list("notes.name", $where, true); if (!isset($notes_list)) { $notes_list = array(); } $attachments = ''; for ($i = 0; $i < count($notes_list); $i++) { $the_note = $notes_list[$i]; $attachments .= "<a href=\"index.php?entryPoint=download&id={$the_note->id}&type=Notes\">" . $the_note->name . "</a><br />"; $focus->cid2Link($the_note->id, $the_note->file_mime_type); } $smarty->assign('DESCRIPTION', nl2br($focus->description)); $smarty->assign('DESCRIPTION_HTML', from_html($focus->description_html)); $smarty->assign("ATTACHMENTS", $attachments); /////////////////////////////////////////////////////////////////////////////// //// SUBPANELS /////////////////////////////////////////////////////////////////////////////// $show_subpanels = true; if ($show_subpanels) { require_once 'include/SubPanel/SubPanelTiles.php'; $subpanel = new SubPanelTiles($focus, 'Emails'); $smarty->assign("SUBPANEL", $subpanel->display()); } $meta['html'] = $smarty->fetch("modules/Emails/templates/emailDetailView.tpl"); return $meta; }