public function display() { global $app_list_strings; $modules = Reports_Utils::available_modules(); foreach ($modules as $key => &$val) { if (isset($app_list_strings['moduleList'][$key])) { $val = $app_list_strings['moduleList'][$key]; } } asort($modules); if (isset($_REQUEST['report_module']) and !empty($_REQUEST['report_module'])) { $cur_module = $_REQUEST['report_module']; } else { $ind = array_keys($modules); $cur_module = $ind[0]; } $this->ss->assign('AVAILABLE_MODULES', get_select_options_with_id($modules, $cur_module)); $related_modules = Reports_Utils::getRelatedModules($cur_module); $related_modules[''] = ''; asort($related_modules); $this->ss->assign('RELATED_MODULES', get_select_options_with_id($related_modules, '')); $module_fields = Reports_Utils::getModuleFields($cur_module); asort($module_fields); $this->ss->assign('MODULE_FIELDS', get_select_options_with_id($module_fields, '')); $module_fields = Reports_Utils::getModuleFields($cur_module); asort($module_fields); $this->ss->assign('MODULE_FIELDS', get_select_options_with_id($module_fields, '')); $custom_fields = Reports_Utils::getReportCustomFields($cur_module); $this->ss->assign('CUSTOM_FIELDS', get_select_options_with_id($custom_fields, '')); $this->ev->process(); echo $this->ev->display($this->showTitle); }
public function process() { global $app_list_strings; $app_list_strings['report_available_modules'] = Reports_Utils::available_modules(FALSE); foreach ($app_list_strings['report_available_modules'] as $key => &$val) { if (isset($app_list_strings['moduleList'][$key])) { $val = $app_list_strings['moduleList'][$key]; } } parent::process(); }
protected function action_getOfficeForm() { global $mod_strings, $currentModule; $this->view = 'getofficeform'; if (!isset($_REQUEST['report_module']) or empty($_REQUEST['report_module']) or !isset($_REQUEST['record']) or empty($_REQUEST['record'])) { sugar_die($mod_strings['ERR_REPORT_PARAMS']); } if (!in_array($_REQUEST['report_module'], Reports_Utils::available_modules())) { sugar_die($mod_strings['ERR_REPORT_PARAMS']); } if (!Reports_Utils::check_access_report($currentModule, $_REQUEST['record'], 'export')) { sugar_die($mod_strings['ERR_RIGHTS_FOR_EXPORT']); } }
function display() { global $app_list_strings; $this->ev->process(); $modules = Reports_Utils::available_modules(); foreach ($modules as $key => &$val) { if (isset($app_list_strings['moduleList'][$key])) { $val = $app_list_strings['moduleList'][$key]; } } $this->ss->assign('AVAILABLE_MODULES', get_select_options_with_id($modules, $this->bean->report_module)); $options_fields = ''; $fields = unencodeMultienum($this->bean->report_vars); foreach ($fields as $field) { if (empty($field)) { continue; } $options_fields .= '<option value="' . $field . '">' . Reports_Utils::translateField($field, $this->bean->report_module) . '</option>'; } $this->ss->assign('REPORT_FIELDS', $options_fields); echo $this->ev->display($this->showTitle); }
} require_once 'include/SubPanel/SubPanelDefinitions.php'; global $current_user; global $mod_strings, $app_strings, $app_list_strings; if (!is_admin($current_user)) { sugar_die("Unauthorized access to administration."); } if (isset($_REQUEST['process']) && $_REQUEST['process'] == 'true') { $_REQUEST['officeDocxExcludeModules'] = explode(':', $_REQUEST['officeDocxExcludeModules']); $config = Reports_Utils::set_config($_REQUEST); header('Location: index.php?module=OfficeReportsMerge&action=Settings'); } $focus = new OfficeReportMerge(); $ss = new Sugar_Smarty(); $config = Reports_Utils::get_config(); $listEnableModules = Reports_Utils::available_modules(); $listDisableModules = $config['officeDocxExcludeModules']; if (!is_array($listDisableModules)) { $listDisableModules = array(); } $enabled = array(); foreach ($listEnableModules as $key) { if (empty($key)) { continue; } if (isset($app_list_strings['moduleList'][$key])) { $label = $app_list_strings['moduleList'][$key]; } else { $label = $key; } $enabled[] = array("module" => $key, "label" => $label);
private function checkModule() { global $currentModule; return in_array($currentModule, Reports_Utils::available_modules()); }