function display() { global $mod_strings, $app_strings; require_once 'include/connectors/utils/ConnectorUtils.php'; require_once 'include/connectors/sources/SourceFactory.php'; $sugar_smarty = new Sugar_Smarty(); $sugar_smarty->assign('mod', $mod_strings); $sugar_smarty->assign('APP', $app_strings); $connectors = ConnectorUtils::getConnectors(true); $required_fields = array(); //Get required fields for first connector only foreach ($connectors as $id => $entry) { $s = SourceFactory::getSource($id); $connector_strings = ConnectorUtils::getConnectorStrings($id); $fields = $s->getRequiredConfigFields(); foreach ($fields as $field_id) { $label = isset($connector_strings[$field_id]) ? $connector_strings[$field_id] : $field_id; $required_fields[$id][$field_id] = $label; } break; } $sugar_smarty->assign('SOURCES', $connectors); $sugar_smarty->assign('REQUIRED_FIELDS', $required_fields); echo get_module_title('Connectors', $mod_strings['LBL_MODIFY_PROPERTIES_PAGE_TITLE'], true); $sugar_smarty->display('modules/Connectors/tpls/modify_properties.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('Admin Only'); } $fontManager = new FontManager(); if (!$fontManager->listFontFiles()) { $error = implode("<br>", $fontManager->errors); } $this->ss->assign("MODULE_TITLE", get_module_title($mod_strings['LBL_MODULE_ID'], $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'); }
function display_error_import() { $message = $_SESSION['import_error']; global $import_mod_strings; global $theme; global $mod_strings; global $app_strings; $theme_path = "themes/" . $theme . "/"; $image_path = $theme_path . "images/"; require_once $theme_path . 'layout_utils.php'; $GLOBALS['log']->info("Upload Error"); $xtpl = new XTemplate('modules/Import/error.html'); $xtpl->assign("MOD", $mod_strings); $xtpl->assign("APP", $app_strings); echo "\n<p>\n"; echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME'], true); echo "\n</p>\n"; if (isset($_REQUEST['return_module'])) { $xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']); } if (isset($_REQUEST['return_action'])) { $xtpl->assign("RETURN_ACTION", $_REQUEST['return_action']); } $xtpl->assign("THEME", $theme); $xtpl->assign("IMAGE_PATH", $image_path); $xtpl->assign("PRINT_URL", "index.php?" . $GLOBALS['request_string']); $xtpl->assign("MODULE", $_REQUEST['module']); $xtpl->assign("MESSAGE", $message); $xtpl->parse("main"); $xtpl->out("main"); }
function display() { global $mod_strings, $app_strings; echo get_module_title('Connectors', $mod_strings['LBL_ADMINISTRATION_MAIN'], true); $sugar_smarty = new Sugar_Smarty(); $sugar_smarty->assign('mod', $mod_strings); $sugar_smarty->assign('app', $app_strings); $sugar_smarty->assign('IMG', 'themes/default/images/'); $sugar_smarty->display('modules/Connectors/tpls/administration.tpl'); }
function display() { require_once 'include/connectors/utils/ConnectorUtils.php'; $sources = ConnectorUtils::getConnectors(); $this->ss->assign('SOURCES', $sources); $this->ss->assign('mod', $GLOBALS['mod_strings']); $this->ss->assign('APP', $GLOBALS['app_strings']); $this->ss->assign('theme', $GLOBALS['theme']); echo get_module_title('Connectors', $GLOBALS['mod_strings']['LBL_MODIFY_DISPLAY_PAGE_TITLE'], true); $this->ss->display('modules/Connectors/tpls/modify_display.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']); echo get_module_title($mod_strings['LBL_MODULE_NAME'], $app_strings['LBL_IMPORT_VCARD'] . " " . $mod_strings['LBL_MODULE_NAME'], true); if (file_exists('custom/include/MVC/View/tpls/Importvcard.tpl')) { $this->ss->display('custom/include/MVC/View/tpls/Importvcard.tpl'); } else { $this->ss->display('include/MVC/View/tpls/Importvcard.tpl'); } }
function display() { require_once 'include/connectors/utils/ConnectorUtils.php'; require_once 'include/connectors/sources/SourceFactory.php'; global $mod_strings, $app_strings; $sugar_smarty = new Sugar_Smarty(); $sugar_smarty->assign('mod', $mod_strings); $sugar_smarty->assign('APP', $app_strings); $connectors = ConnectorUtils::getConnectors(true); $sugar_smarty->assign('SOURCES', $connectors); echo get_module_title('Connectors', $mod_strings['LBL_MODIFY_MAPPING_PAGE_TITLE'], true); $sugar_smarty->display('modules/Connectors/tpls/modify_mapping.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']); $middleText = "<a href='index.php?module={$_REQUEST['module']}&action=index'>{$mod_strings['LBL_MODULE_NAME']}</a><span class='pointer'>»</span>{$app_strings['LBL_IMPORT_VCARD_BUTTON_LABEL']}"; echo get_module_title($mod_strings['LBL_MODULE_NAME'], $middleText, true); if (file_exists('custom/include/MVC/View/tpls/Importvcard.tpl')) { $this->ss->display('custom/include/MVC/View/tpls/Importvcard.tpl'); } else { $this->ss->display('include/MVC/View/tpls/Importvcard.tpl'); } }
/** * display the form */ public function display() { global $mod_strings, $app_list_strings, $app_strings, $current_user; if (!is_admin($current_user)) { sugar_die('Admin Only'); } $error = $this->addFont(); $this->ss->assign("MODULE_TITLE", get_module_title($mod_strings['LBL_MODULE_ID'], $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'); }
function display() { global $mod_strings, $export_module, $current_language, $theme, $current_user; echo get_module_title("Activities", $mod_strings['LBL_MODULE_TITLE'], true); $mod_strings = return_module_language($current_language, 'Calls'); // Overload the export module since the user got here by clicking the "Activities" tab $export_module = "Calls"; $_REQUEST['module'] = 'Calls'; $controller = ControllerFactory::getController('Calls'); $controller->loadBean(); $controller->preProcess(); $controller->process(); //Manipulate view directly to not display header, js and footer again $view = ViewFactory::loadView($controller->view, $controller->module, $controller->bean, $controller->view_object_map); $view->options['show_header'] = false; $view->options['show_title'] = false; $view->options['show_javascript'] = false; $view->process(); die; }
/** * 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", get_module_title($mod_strings['LBL_MODULE_ID'], $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'); }
public function testget_module_title() { //execute the method and test if it returns html and contains the values provided in parameters //with show_create true, generates more html $html1 = get_module_title('Users', 'Users Home', true); $this->assertGreaterThan(0, strlen($html1)); $this->assertContains('Users', $html1); $this->assertContains('Users Home', $html1); //with show_create false, generates less html $html2 = get_module_title('Users', 'Users Home', false); $this->assertGreaterThan(0, strlen($html2)); $this->assertContains('Users', $html2); $this->assertContains('Users Home', $html2); $this->assertGreaterThan(strlen($html2), strlen($html1)); //with show_create flase and count > 1, generates more html compared to count =0 $html3 = get_module_title('Users', 'Users Home', false, 2); $this->assertGreaterThan(0, strlen($html3)); $this->assertContains('Users', $html3); $this->assertContains('Users Home', $html3); $this->assertGreaterThan(strlen($html2), strlen($html3)); $this->assertGreaterThan(strlen($html3), strlen($html1)); }
global $sugar_version, $sugar_config; /*************** GENERAL SETUP WORK **********/ $focus = new Campaign(); if (isset($_REQUEST['record'])) { $focus->retrieve($_REQUEST['record']); } if (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') { $focus->id = ""; } global $theme; $json = getJSONobj(); $GLOBALS['log']->info("Campaign NewsLetter Wizard"); if (isset($_REQUEST['wizardtype']) && $_REQUEST['wizardtype'] == 1 || $focus->campaign_type == 'NewsLetter') { echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_NEWSLETTER WIZARD_TITLE'] . $focus->name, true); } else { echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_CAMPAIGN'] . $focus->name, true); } $ss = new Sugar_Smarty(); $ss->assign("MOD", $mod_strings); $ss->assign("APP", $app_strings); if (isset($_REQUEST['return_module'])) { $ss->assign("RETURN_MODULE", $_REQUEST['return_module']); } if (isset($_REQUEST['return_action'])) { $ss->assign("RETURN_ACTION", $_REQUEST['return_action']); } if (isset($_REQUEST['return_id'])) { $ss->assign("RETURN_ID", $_REQUEST['return_id']); } // handle Create $module then Cancel if (empty($_REQUEST['return_id'])) {
global $app_list_strings; global $mod_strings; global $current_user; $focus = new DocumentRevision(); if (isset($_REQUEST['record'])) { $focus->retrieve($_REQUEST['record']); } $old_id = ''; if (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') { if (!empty($focus->filename)) { $old_id = $focus->id; } $focus->id = ""; } echo "\n<p>\n"; echo get_module_title('DocumentRevisions', $mod_strings['LBL_MODULE_NAME'] . ": " . $focus->document_name, true); echo "\n</p>\n"; global $theme; $theme_path = "themes/" . $theme . "/"; $image_path = $theme_path . "images/"; require_once $theme_path . 'layout_utils.php'; $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']); }
/** * */ function process_page() { global $focus; global $mod_strings; global $app_strings; global $app_list_strings; global $currentModule; global $odd_bg; global $even_bg; global $timedate; $history_list = array(); if (!empty($_REQUEST['record'])) { $result = $focus->retrieve($_REQUEST['record']); if ($result == null) { sugar_die($app_strings['ERROR_NO_RECORD']); } } $activitiesRels = array('tasks' => 'Task', 'meetings' => 'Meeting', 'calls' => 'Call', 'emails' => 'Email', 'notes' => 'Note'); //Setup the arrays to store the linked records. foreach ($activitiesRels as $relMod => $beanName) { $varname = "focus_" . $relMod . "_list"; ${$varname} = array(); } foreach ($focus->get_linked_fields() as $field => $def) { if ($focus->load_relationship($field)) { $relTable = $focus->{$field}->getRelatedTableName(); if (in_array($relTable, array_keys($activitiesRels))) { $varname = "focus_" . $relTable . "_list"; ${$varname} = sugarArrayMerge(${$varname}, $focus->get_linked_beans($field, $activitiesRels[$relTable])); } } } foreach ($focus_tasks_list as $task) { $sort_date_time = ''; if ($task->date_due == '0000-00-00') { $date_due = ''; } else { $date_due = $task->date_due; } if (!empty($task->date_due) and !empty($task->time_due)) { $sort_date_time = $timedate->to_db_date_time($task->date_due, $task->time_due); $sort_date_time = implode(' ', $sort_date_time); // kbrill - Bug #16714 //$sort_date_time=$timedate->handle_offset($sort_date_time,'Y-m-d H:i:s',true); } if ($task->status != "Not Started" && $task->status != "In Progress" && $task->status != "Pending Input") { $history_list[] = array('name' => $task->name, 'id' => $task->id, 'type' => "Task", 'direction' => '', 'module' => "Tasks", 'status' => $task->status, 'parent_id' => $task->parent_id, 'parent_type' => $task->parent_type, 'parent_name' => $task->parent_name, 'contact_id' => $task->contact_id, 'contact_name' => $task->contact_name, 'date_modified' => $date_due, 'description' => $this->getTaskDetails($task), 'date_type' => $app_strings['DATA_TYPE_DUE'], 'sort_value' => $sort_date_time); } else { $open_activity_list[] = array('name' => $task->name, 'id' => $task->id, 'type' => "Task", 'direction' => '', 'module' => "Tasks", 'status' => $task->status, 'parent_id' => $task->parent_id, 'parent_type' => $task->parent_type, 'parent_name' => $task->parent_name, 'contact_id' => $task->contact_id, 'contact_name' => $task->contact_name, 'date_due' => $date_due, 'description' => $this->getTaskDetails($task), 'date_type' => $app_strings['DATA_TYPE_DUE']); } } // end Tasks foreach ($focus_meetings_list as $meeting) { if ($meeting->status != "Planned") { $sort_date_time = ''; if (!empty($meeting->date_start) and !empty($meeting->time_start)) { $sort_date_time = $timedate->to_db_date_time($meeting->date_start, $meeting->time_start); $sort_date_time = implode(' ', $sort_date_time); // kbrill - Bug #16714 //$sort_date_time=$timedate->handle_offset($sort_date_time,'Y-m-d H:i:s',true); } $history_list[] = array('name' => $meeting->name, 'id' => $meeting->id, 'type' => "Meeting", 'direction' => '', 'module' => "Meetings", 'status' => $meeting->status, 'parent_id' => $meeting->parent_id, 'parent_type' => $meeting->parent_type, 'parent_name' => $meeting->parent_name, 'contact_id' => $meeting->contact_id, 'contact_name' => $meeting->contact_name, 'date_modified' => $meeting->date_start, 'description' => $this->formatDescription($meeting->description), 'date_type' => $app_strings['DATA_TYPE_START'], 'sort_value' => $sort_date_time); } else { $open_activity_list[] = array('name' => $meeting->name, 'id' => $meeting->id, 'type' => "Meeting", 'direction' => '', 'module' => "Meetings", 'status' => $meeting->status, 'parent_id' => $meeting->parent_id, 'parent_type' => $meeting->parent_type, 'parent_name' => $meeting->parent_name, 'contact_id' => $meeting->contact_id, 'contact_name' => $meeting->contact_name, 'date_due' => $meeting->date_start, 'description' => $this->formatDescription($meeting->description), 'date_type' => $app_strings['DATA_TYPE_START']); } } // end Meetings foreach ($focus_calls_list as $call) { if ($call->status != "Planned") { $sort_date_time = ''; if (!empty($call->date_start) and !empty($call->time_start)) { $sort_date_time = $timedate->to_db_date_time($call->date_start, $call->time_start); $sort_date_time = implode(' ', $sort_date_time); // kbrill - Bug #16714 //$sort_date_time=$timedate->handle_offset($sort_date_time,'Y-m-d H:i:s',true); } elseif (!empty($call->date_start) && empty($call->time_start)) { //jc - Bug#19862 //for some reason the calls module does not populate the time_start variable in //this case, so the date_start attribute contains the information we need //to determine where in the history this call belongs. //using swap_formats to get from the format '03/31/2008 09:45pm' to the format //'2008-03-31 09:45:00' $sort_date_time = $timedate->swap_formats($call->date_start, $timedate->get_date_time_format(), $timedate->get_db_date_time_format()); } $history_list[] = array('name' => $call->name, 'id' => $call->id, 'type' => "Call", 'direction' => $call->direction, 'module' => "Calls", 'status' => $call->status, 'parent_id' => $call->parent_id, 'parent_type' => $call->parent_type, 'parent_name' => $call->parent_name, 'contact_id' => $call->contact_id, 'contact_name' => $call->contact_name, 'date_modified' => $call->date_start, 'description' => $this->formatDescription($call->description), 'date_type' => $app_strings['DATA_TYPE_START'], 'sort_value' => $sort_date_time); } else { $open_activity_list[] = array('name' => $call->name, 'id' => $call->id, 'direction' => $call->direction, 'type' => "Call", 'module' => "Calls", 'status' => $call->status, 'parent_id' => $call->parent_id, 'parent_type' => $call->parent_type, 'parent_name' => $call->parent_name, 'contact_id' => $call->contact_id, 'contact_name' => $call->contact_name, 'date_due' => $call->date_start, 'description' => $this->formatDescription($call->description), 'date_type' => $app_strings['DATA_TYPE_START']); } } // end Calls foreach ($focus_emails_list as $email) { $sort_date_time = ''; if (!empty($email->date_start) and !empty($email->time_start)) { $sort_date_time = $timedate->to_db_date_time($email->date_start, $email->time_start); $sort_date_time = implode(' ', $sort_date_time); // kbrill - Bug #16714 //$sort_date_time=$timedate->handle_offset($sort_date_time,'Y-m-d H:i:s',true); } $history_list[] = array('name' => $email->name, 'id' => $email->id, 'type' => "Email", 'direction' => '', 'module' => "Emails", 'status' => '', 'parent_id' => $email->parent_id, 'parent_type' => $email->parent_type, 'parent_name' => $email->parent_name, 'contact_id' => $email->contact_id, 'contact_name' => $email->contact_name, 'date_modified' => $email->date_start . " " . $email->time_start, 'description' => $this->getEmailDetails($email), 'date_type' => $app_strings['DATA_TYPE_SENT'], 'sort_value' => $sort_date_time); } //end Emails foreach ($focus_notes_list as $note) { if (!empty($note->date_modified)) { $sort_date_time = $timedate->swap_formats($note->date_modified, $timedate->get_date_time_format(), $timedate->get_db_date_time_format()); } $history_list[] = array('name' => $note->name, 'id' => $note->id, 'type' => "Note", 'direction' => '', 'module' => "Notes", 'status' => '', 'parent_id' => $note->parent_id, 'parent_type' => $note->parent_type, 'parent_name' => $note->parent_name, 'contact_id' => $note->contact_id, 'contact_name' => $note->contact_name, 'date_modified' => $note->date_modified, 'description' => $this->formatDescription($note->description), 'date_type' => $app_strings['DATA_TYPE_MODIFIED'], 'sort_value' => $sort_date_time); if (!empty($note->filename)) { $count = count($history_list); $count--; $history_list[$count]['filename'] = $note->filename; $history_list[$count]['fileurl'] = UploadFile::get_url($note->filename, $note->id); } } // end Notes $xtpl = new XTemplate('modules/Activities/Popup_picker.html'); $xtpl->assign('MOD', $mod_strings); $xtpl->assign('APP', $app_strings); insert_popup_header(); //output header echo "<table width='100%' cellpadding='0' cellspacing='0'><tr><td>"; echo get_module_title($focus->module_dir, translate('LBL_MODULE_NAME', $focus->module_dir) . ": " . $focus->name, false); echo "</td><td align='right' class='moduleTitle'>"; echo "<A href='javascript:print();' class='utilsLink'><img src='" . SugarThemeRegistry::current()->getImageURL("print.gif") . "' width='13' height='13' alt='" . $app_strings['LNK_PRINT'] . "' border='0' align='absmiddle'></a> <A href='javascript:print();' class='utilsLink'>" . $app_strings['LNK_PRINT'] . "</A>\n"; echo "</td></tr></table>"; $oddRow = true; if (count($history_list) > 0) { $history_list = array_csort($history_list, 'sort_value', SORT_DESC); } foreach ($history_list as $activity) { $activity_fields = array('ID' => $activity['id'], 'NAME' => $activity['name'], 'MODULE' => $activity['module'], 'CONTACT_NAME' => $activity['contact_name'], 'CONTACT_ID' => $activity['contact_id'], 'PARENT_TYPE' => $activity['parent_type'], 'PARENT_NAME' => $activity['parent_name'], 'PARENT_ID' => $activity['parent_id'], 'DATE' => $activity['date_modified'], 'DESCRIPTION' => $activity['description'], 'DATE_TYPE' => $activity['date_type']); if (empty($activity['direction'])) { $activity_fields['TYPE'] = $app_list_strings['activity_dom'][$activity['type']]; } else { $activity_fields['TYPE'] = $app_list_strings['call_direction_dom'][$activity['direction']] . ' ' . $app_list_strings['activity_dom'][$activity['type']]; } switch ($activity['type']) { case 'Call': $activity_fields['STATUS'] = $app_list_strings['call_status_dom'][$activity['status']]; break; case 'Meeting': $activity_fields['STATUS'] = $app_list_strings['meeting_status_dom'][$activity['status']]; break; case 'Task': $activity_fields['STATUS'] = $app_list_strings['task_status_dom'][$activity['status']]; break; } if (isset($activity['location'])) { $activity_fields['LOCATION'] = $activity['location']; } if (isset($activity['filename'])) { $activity_fields['ATTACHMENT'] = "<a href='index.php?entryPoint=download&id=" . $activity['id'] . "&type=Notes' target='_blank'>" . SugarThemeRegistry::current()->getImage("attachment", "alt='" . $activity['filename'] . "' border='0' align='absmiddle'") . "</a>"; } if (isset($activity['parent_type'])) { $activity_fields['PARENT_MODULE'] = $activity['parent_type']; } $xtpl->assign("ACTIVITY", $activity_fields); $xtpl->assign("ACTIVITY_MODULE_PNG", SugarThemeRegistry::current()->getImage($activity_fields['MODULE'] . '', 'border="0" alt="' . $activity_fields['NAME'] . '"')); if ($oddRow) { //todo move to themes $xtpl->assign("ROW_COLOR", 'oddListRow'); $xtpl->assign("BG_COLOR", $odd_bg); } else { //todo move to themes $xtpl->assign("ROW_COLOR", 'evenListRow'); $xtpl->assign("BG_COLOR", $even_bg); } $oddRow = !$oddRow; $xtpl->parse("history.row"); // Put the rows in. } $xtpl->parse("history"); $xtpl->out("history"); insert_popup_footer(); }
<?php if (!defined('sugarEntry') || !sugarEntry) { die('Not A Valid Entry Point'); } if (!is_admin($current_user)) { sugar_die('Admin Only'); } echo get_module_title($mod_strings['LBL_MANAGE_ZUCKERREPORTS2CONFIG'], $mod_strings['LBL_MANAGE_ZUCKERREPORTS2CONFIG'], false); require_once 'include/Sugar_Smarty.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('RETURN_ACTION', 'index'); $sugar_smarty->assign('RETURN_MODULE', 'Administration'); require_once 'modules/Administration/Administration.php'; $admin = new Administration(); $admin->retrieveSettings(); if (!empty($_REQUEST["index_include"])) { $admin->saveSetting("zuckerreports2", "index_include", html_entity_decode($_REQUEST["index_include"])); } if (!empty($_REQUEST["script_enabled"])) { $admin->saveSetting("zuckerreports2", "script_enabled", $_REQUEST["script_enabled"]); } if (!empty($_REQUEST["debug_enabled"])) { $admin->saveSetting("zuckerreports2", "debug_enabled", $_REQUEST["debug_enabled"]); } if (!empty($_REQUEST["charset"])) { $admin->saveSetting("zuckerreports2", "charset", html_entity_decode($_REQUEST["charset"])); }
} if (!empty($_REQUEST['name'])) { $name = $_REQUEST['name']; } if (!empty($_REQUEST['description'])) { $description = $_REQUEST['description']; } if (!empty($_REQUEST['querytemplate_id'])) { $querytemplate_id = $_REQUEST['querytemplate_id']; } global $theme; $theme_path = "themes/" . $theme . "/"; $image_path = $theme_path . "images/"; require_once $theme_path . 'layout_utils.php'; echo "\n<p>\n"; echo get_module_title("ZuckerWordTemplate", $title, false); echo "\n</p>\n"; $xtpl = new XTemplate('modules/ZuckerWordTemplate/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);
* 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. If the display of the logo is not reasonably feasible for * technical reasons, the Appropriate Legal Notices must display the words * "Powered by SugarCRM". ********************************************************************************/ global $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_once 'include/tabConfig.php'; } $title = get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_CONFIGURE_GROUP_TABS'], true); #30205 $selectedAppLanguages = return_application_language($tabGroupSelected_lang); require_once 'include/GroupedTabs/GroupedTabStructure.php'; $groupedTabsClass = new GroupedTabStructure(); $groupedTabStructure = $groupedTabsClass->get_tab_structure('', '', true, true); foreach ($groupedTabStructure as $mainTab => $subModules) { $groupedTabStructure[$mainTab]['label'] = $mainTab; $groupedTabStructure[$mainTab]['labelValue'] = $selectedAppLanguages[$mainTab]; } $smarty->assign('tabs', $groupedTabStructure); #end of 30205 $selectedLanguageModStrings = return_module_language($tabGroupSelected_lang, 'Studio'); $smarty->assign('TGMOD', $selectedLanguageModStrings); $smarty->assign('MOD', $GLOBALS['mod_strings']); $smarty->assign('otherLabel', 'LBL_TABGROUP_OTHER');
$image_path = $theme_path . "images/"; require_once $theme_path . 'layout_utils.php'; $focus = new Administration(); $focus->retrieveSettings(); //retrieve all admin settings. $GLOBALS['log']->info("SecuritySuite Configure Settings view"); $xtpl = new XTemplate('modules/SecurityGroups/config.html'); $xtpl->assign("MOD", $mod_strings); $xtpl->assign("APP", $app_strings); $xtpl->assign("RETURN_MODULE", "Administration"); $xtpl->assign("RETURN_ACTION", "index"); $xtpl->assign("MODULE", $currentModule); $xtpl->assign("THEME", $theme); $xtpl->assign("IMAGE_PATH", $image_path); $xtpl->assign("PRINT_URL", "index.php?" . $GLOBALS['request_string']); $xtpl->assign("HEADER", get_module_title("SecurityGroups", "{MOD.LBL_CONFIGURE_SETTINGS}", true)); // securitysuite_additive $securitysuite_additive = ''; if (isset($sugar_config['securitysuite_additive']) && $sugar_config['securitysuite_additive'] == true) { $securitysuite_additive = 'CHECKED'; } $xtpl->assign('securitysuite_additive', $securitysuite_additive); // securitysuite_strict_rights $securitysuite_strict_rights = ''; if (isset($sugar_config['securitysuite_strict_rights']) && $sugar_config['securitysuite_strict_rights'] == true) { $securitysuite_strict_rights = 'CHECKED'; } $xtpl->assign('securitysuite_strict_rights', $securitysuite_strict_rights); // securitysuite_filter_user_list $securitysuite_filter_user_list = ''; if (isset($sugar_config['securitysuite_filter_user_list']) && $sugar_config['securitysuite_filter_user_list'] == true) {
/** * @see SugarView::display() */ public function display() { global $mod_strings; global $app_list_strings; global $app_strings; global $current_user; global $sugar_config; echo $this->getModuleTitle(false); global $currentModule; $focus = Administration::getSettings(); //retrieve all admin settings. $GLOBALS['log']->info("Mass Emailer(EmailMan) ConfigureSettings view"); $this->ss->assign("MOD", $mod_strings); $this->ss->assign("APP", $app_strings); $this->ss->assign("RETURN_MODULE", "Administration"); $this->ss->assign("RETURN_ACTION", "index"); $this->ss->assign("MODULE", $currentModule); $this->ss->assign("PRINT_URL", "index.php?" . $GLOBALS['request_string']); $this->ss->assign("HEADER", get_module_title("EmailMan", "{MOD.LBL_CONFIGURE_SETTINGS}", true)); $this->ss->assign("notify_fromaddress", $focus->settings['notify_fromaddress']); $this->ss->assign("notify_send_from_assigning_user", isset($focus->settings['notify_send_from_assigning_user']) && !empty($focus->settings['notify_send_from_assigning_user']) ? "checked='checked'" : ""); $this->ss->assign("notify_on", $focus->settings['notify_on'] ? "checked='checked'" : ""); $this->ss->assign("notify_fromname", $focus->settings['notify_fromname']); $this->ss->assign("notify_allow_default_outbound_on", !empty($focus->settings['notify_allow_default_outbound']) && $focus->settings['notify_allow_default_outbound'] ? "checked='checked'" : ""); $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_smtpauth_req", $focus->settings['mail_smtpauth_req'] ? "checked='checked'" : ""); $this->ss->assign("mail_haspass", empty($focus->settings['mail_smtppass']) ? 0 : 1); $this->ss->assign("MAIL_SSL_OPTIONS", get_select_options_with_id($app_list_strings['email_settings_for_ssl'], $focus->settings['mail_smtpssl'])); //Assign the current users email for the test send dialogue. $this->ss->assign("CURRENT_USER_EMAIL", $current_user->email1); $showSendMail = FALSE; $outboundSendTypeCSSClass = "yui-hidden"; if (isset($sugar_config['allow_sendmail_outbound']) && $sugar_config['allow_sendmail_outbound']) { $showSendMail = TRUE; $app_list_strings['notifymail_sendtype']['sendmail'] = 'sendmail'; $outboundSendTypeCSSClass = ""; } $this->ss->assign("OUTBOUND_TYPE_CLASS", $outboundSendTypeCSSClass); $this->ss->assign("mail_sendtype_options", get_select_options_with_id($app_list_strings['notifymail_sendtype'], $focus->settings['mail_sendtype'])); /////////////////////////////////////////////////////////////////////////////// //// USER EMAIL DEFAULTS // editors $editors = $app_list_strings['dom_email_editor_option']; $newEditors = array(); foreach ($editors as $k => $v) { if ($k != "") { $newEditors[$k] = $v; } } // preserve attachments $preserveAttachments = ''; if (isset($sugar_config['email_default_delete_attachments']) && $sugar_config['email_default_delete_attachments'] == true) { $preserveAttachments = 'CHECKED'; } $this->ss->assign('DEFAULT_EMAIL_DELETE_ATTACHMENTS', $preserveAttachments); //// END USER EMAIL DEFAULTS /////////////////////////////////////////////////////////////////////////////// //setting to manage. //emails_per_run //tracking_entities_location_type default or custom //tracking_entities_location http://www.sugarcrm.com/track/ ////////////////////////////////////////////////////////////////////////////// //// EMAIL SECURITY if (!isset($sugar_config['email_xss']) || empty($sugar_config['email_xss'])) { $sugar_config['email_xss'] = getDefaultXssTags(); } foreach (unserialize(base64_decode($sugar_config['email_xss'])) as $k => $v) { $this->ss->assign($k . "Checked", 'CHECKED'); } //// END EMAIL SECURITY /////////////////////////////////////////////////////////////////////////////// require_once 'modules/Emails/Email.php'; $email = BeanFactory::getBean('Emails'); $this->ss->assign('ROLLOVER', $email->rolloverStyle); $this->ss->assign('THEME', $GLOBALS['theme']); $this->ss->assign("JAVASCRIPT", get_validate_record_js()); $this->ss->display('modules/EmailMan/tpls/config.tpl'); }
* this program; if not, see http://www.gnu.org/licenses or write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA. * * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. * * The interactive user interfaces in modified source and object code versions * of this program must display Appropriate Legal Notices, as required under * Section 5 of the GNU General Public License version 3. * * In accordance with Section 7(b) of the GNU General Public License version 3, * these Appropriate Legal Notices must retain the display of the "Powered by * 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". ********************************************************************************/ /********************************************************************************* * Description: TODO: To be written. * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. * All Rights Reserved. * Contributor(s): ______________________________________.. ********************************************************************************/ global $current_user; global $theme; if (!isset($_REQUEST['current_user_only']) && (!isset($_REQUEST['view']) || $_REQUEST['view'] != 'all') && !isset($_REQUEST['query'])) { $_REQUEST['current_user_only'] = 'on'; } global $mod_strings; echo get_module_title($mod_strings['LBL_MODULE_ID'], $mod_strings['LBL_MY_LIST_FORM_TITLE'], true); include 'modules/Feeds/MyFeeds.php';
global $mod_strings; $admin = new Administration(); $admin->retrieveSettings(); $focus = new User(); if (!is_admin($current_user) && $_REQUEST['record'] != $current_user->id) { sugar_die("Unauthorized access to administration."); } if (isset($_REQUEST['record'])) { $focus->retrieve($_REQUEST['record']); } if (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') { $focus->id = ""; $focus->user_name = ""; } echo "\n<p>\n"; echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME'] . ": " . $focus->first_name . " " . $focus->last_name . " (" . $focus->user_name . ")", true); echo "\n</p>\n"; global $theme; $theme_path = 'themes/' . $theme . '/'; $image_path = $theme_path . 'images/'; require_once $theme_path . 'layout_utils.php'; $GLOBALS['log']->info('User edit view'); $xtpl = new XTemplate('modules/Users/EditView.html'); $xtpl->assign('MOD', $mod_strings); $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']); }
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * this program; if not, see http://www.gnu.org/licenses or write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA. * * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. * * The interactive user interfaces in modified source and object code versions * of this program must display Appropriate Legal Notices, as required under * Section 5 of the GNU General Public License version 3. * * In accordance with Section 7(b) of the GNU General Public License version 3, * these Appropriate Legal Notices must retain the display of the "Powered by * 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". ********************************************************************************/ /********************************************************************************* * Description: ********************************************************************************/ //TODO admins only - unless we specify otherwise? if (!$current_user->is_admin) { sugar_die('You must have administrative access to proceed.'); } echo get_module_title($mod_strings['LBL_MODULE_TITLE'], $mod_strings['LBL_MODULE_TITLE'], true); require_once 'modules/Schedulers/ListView.php';
//// OUTPUT /////////////////////////////////////////////////////////////////////////////// echo "\n<p>\n"; $GLOBALS['log']->info("Email detail view"); if ($email_type == 'archived') { echo get_module_title('Emails', $mod_strings['LBL_ARCHIVED_EMAIL'] . ": " . $focus->name, true); $xtpl = new XTemplate('modules/Emails/DetailView.html'); } else { $xtpl = new XTemplate('modules/Emails/DetailViewSent.html'); if ($focus->type == 'out') { echo get_module_title('Emails', $mod_strings['LBL_SENT_MODULE_NAME'] . ": " . $focus->name, true); $xtpl->assign('DISABLE_REPLY_BUTTON', 'NONE'); } elseif ($focus->type == 'draft') { echo get_module_title('Emails', $mod_strings['LBL_LIST_FORM_DRAFTS_TITLE'] . ": " . $focus->name, true); } elseif ($focus->type == 'inbound') { echo get_module_title('Emails', $mod_strings['LBL_INBOUND_TITLE'] . ": " . $focus->name, true); } } echo "\n</p>\n"; /////////////////////////////////////////////////////////////////////////////// //// RETURN NAVIGATION $uri = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : 'index.php'; $start = $focus->getStartPage($uri); if (isset($_REQUEST['return_id'])) { // coming from a subpanel, return_module|action is not set $xtpl->assign('RETURN_ID', $_REQUEST['return_id']); if (isset($_REQUEST['return_module'])) { $xtpl->assign('RETURN_MODULE', $_REQUEST['return_module']); } else { $xtpl->assign('RETURN_MODULE', 'Emails'); }
global $app_strings; global $app_list_strings; global $curent_language; $mod_strings = return_module_language($current_language, $currentModule); $focus = new UserSignature(); if (isset($_REQUEST['record']) && !empty($_REQUEST['record'])) { $focus->retrieve($_REQUEST['record']); } if (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') { $focus->id = ""; } $GLOBALS['log']->info('EmailTemplate detail view'); /////////////////////////////////////////////////////////////////////////////// //// OUTPUT echo insert_popup_header(); echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_SIGNATURE'] . ' ' . $focus->name, true); $xtpl = new XTemplate('modules/Users/UserSignatureEditView.html'); $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'])) {
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']); $xtpl->assign("JAVASCRIPT", get_set_focus_js() . get_validate_record_js()); $xtpl->assign("ID", $focus->id); $xtpl->assign("HEADER", get_module_title("Feeds", "{MOD.LBL_CONTACT} " . $focus->title, true)); $xtpl->assign("TITLE", $focus->title); //$xtpl->assign("DESCRIPTION", $focus->description); //Add Custom Fields require_once 'modules/DynamicFields/templates/Files/EditView.php'; if (empty($focus->assigned_user_id) && empty($focus->id)) { $focus->assigned_user_id = $current_user->id; } $xtpl->parse("main"); $xtpl->out("main"); require_once 'include/javascript/javascript.php'; $javascript = new javascript(); $javascript->setFormName('EditView'); $javascript->setSugarBean($focus); $javascript->addAllFields(''); echo $javascript->getScript();
********************************************************************************/ global $mod_strings; global $app_list_strings; global $app_strings; global $theme; global $current_user; global $currentModule; switch ($_REQUEST['view']) { case "support_portal": if (!is_admin($current_user)) { sugar_die("Unauthorized access to administration."); } $GLOBALS['log']->info("Administration SupportPortal"); $iframe_url = add_http("www.sugarcrm.com/network/redirect.php?tmpl=network"); $mod_title = $mod_strings['LBL_SUPPORT_TITLE']; echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_title, true); $sugar_smarty = new Sugar_Smarty(); $sugar_smarty->assign('iframeURL', $iframe_url); echo $sugar_smarty->fetch('modules/Administration/SupportPortal.tpl'); break; default: $send_version = isset($_REQUEST['version']) ? $_REQUEST['version'] : ""; $send_edition = isset($_REQUEST['edition']) ? $_REQUEST['edition'] : ""; $send_lang = isset($_REQUEST['lang']) ? $_REQUEST['lang'] : ""; $send_module = isset($_REQUEST['help_module']) ? $_REQUEST['help_module'] : ""; $send_action = isset($_REQUEST['help_action']) ? $_REQUEST['help_action'] : ""; $send_key = isset($_REQUEST['key']) ? $_REQUEST['key'] : ""; $send_anchor = ''; // awu: Fixes the ProjectTasks pluralization issue -- must fix in later versions. if ($send_module == 'ProjectTasks') { $send_module = 'ProjectTask';
/** * display the form */ public function display() { global $mod_strings, $app_strings, $current_user; if (!is_admin($current_user)) { sugar_die('Admin Only'); } $this->ss->assign('enabled_modules', SugarThemeRegistry::availableThemes()); $this->ss->assign('disabled_modules', SugarThemeRegistry::unAvailableThemes()); $this->ss->assign('mod', $mod_strings); $this->ss->assign('APP', $app_strings); $this->ss->assign('currentTheme', SugarThemeRegistry::current()); echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_THEME_SETTINGS'], true); echo $this->ss->fetch('modules/Administration/templates/themeSettings.tpl'); }
global $sugar_version, $sugar_config; // Unimplemented until jscalendar language files are fixed // global $current_language; // global $default_language; // global $cal_codes; $focus = new ProspectList(); if (isset($_REQUEST['record'])) { $focus->retrieve($_REQUEST['record']); } global $theme; $theme_path = "themes/" . $theme . "/"; $image_path = $theme_path . "images/"; require_once $theme_path . 'layout_utils.php'; $GLOBALS['log']->info("Prospect List Edit View"); echo "\n<p>\n"; echo get_module_title($mod_strings['LBL_MODULE_ID'], $mod_strings['LBL_MODULE_NAME'] . ": " . $focus->name, true); echo "\n</p>\n"; $xtpl = new XTemplate('modules/ProspectLists/EditView.html'); $xtpl->assign("MOD", $mod_strings); $xtpl->assign("APP", $app_strings); $json = getJSONobj(); /// Users Popup $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')); $xtpl->assign('encoded_users_popup_request_data', $json->encode($popup_request_data)); // Unimplemented until jscalendar language files are fixed // $xtpl->assign("CALENDAR_LANG", ((empty($cal_codes[$current_language])) ? $cal_codes[$default_language] : $cal_codes[$current_language])); $xtpl->assign("CALENDAR_LANG", "en"); $xtpl->assign("USER_DATEFORMAT", '(' . $timedate->get_user_date_format() . ')'); $xtpl->assign("CALENDAR_DATEFORMAT", $timedate->get_cal_date_format()); if (isset($_REQUEST['return_module'])) { $xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']);
/** * display the form */ public function display() { global $mod_strings, $app_list_strings, $app_strings, $current_user; global $sugar_config; $this->ss->assign("MODULE_TITLE", get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME'] . " " . $mod_strings['LBL_STEP_1_TITLE'], true)); $this->ss->assign("MOD", $mod_strings); $this->ss->assign("APP", $app_strings); $this->ss->assign("DELETE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" alt="' . $app_strings['LNK_DELETE'] . '" border="0"')); $this->ss->assign("PUBLISH_INLINE_PNG", SugarThemeRegistry::current()->getImage('publish_inline', 'align="absmiddle" alt="' . $mod_strings['LBL_PUBLISH'] . '" border="0"')); $this->ss->assign("UNPUBLISH_INLINE_PNG", SugarThemeRegistry::current()->getImage('unpublish_inline', 'align="absmiddle" alt="' . $mod_strings['LBL_UNPUBLISH'] . '" border="0"')); $this->ss->assign("IMPORT_MODULE", $_REQUEST['import_module']); $this->ss->assign("JAVASCRIPT", $this->_getJS()); // handle publishing and deleting import maps if (isset($_REQUEST['delete_map_id'])) { $import_map = new ImportMap(); $import_map->mark_deleted($_REQUEST['delete_map_id']); } if (isset($_REQUEST['publish'])) { $import_map = new ImportMap(); $result = 0; $import_map = $import_map->retrieve($_REQUEST['import_map_id'], false); if ($_REQUEST['publish'] == 'yes') { $result = $import_map->mark_published($current_user->id, true); if (!$result) { $this->ss->assign("ERROR", $mod_strings['LBL_ERROR_UNABLE_TO_PUBLISH']); } } elseif ($_REQUEST['publish'] == 'no') { // if you don't own this importmap, you do now! // unless you have a map by the same name $result = $import_map->mark_published($current_user->id, false); if (!$result) { $this->ss->assign("ERROR", $mod_strings['LBL_ERROR_UNABLE_TO_UNPUBLISH']); } } } // load bean $focus = loadImportBean($_REQUEST['import_module']); if (!$focus) { showImportError($mod_strings['LBL_ERROR_IMPORTS_NOT_SET_UP'], $_REQUEST['import_module']); return; } // trigger showing other software packages $this->ss->assign("show_salesforce", false); $this->ss->assign("show_outlook", false); $this->ss->assign("show_act", false); $this->ss->assign("show_jigsaw", false); switch ($_REQUEST['import_module']) { case "Prospects": break; case "Accounts": $this->ss->assign("show_salesforce", true); $this->ss->assign("show_act", true); $this->ss->assign("show_jigsaw", true); break; case "Contacts": $this->ss->assign("show_salesforce", true); $this->ss->assign("show_outlook", true); $this->ss->assign("show_act", true); break; default: $this->ss->assign("show_salesforce", true); break; } // get user defined import maps $this->ss->assign('is_admin', is_admin($current_user)); $import_map_seed = new ImportMap(); $custom_imports_arr = $import_map_seed->retrieve_all_by_string_fields(array('assigned_user_id' => $current_user->id, 'is_published' => 'no', 'module' => $_REQUEST['import_module'])); if (count($custom_imports_arr)) { $custom = array(); foreach ($custom_imports_arr as $import) { $custom[] = array("IMPORT_NAME" => $import->name, "IMPORT_ID" => $import->id); } $this->ss->assign('custom_imports', $custom); } // get globally defined import maps $published_imports_arr = $import_map_seed->retrieve_all_by_string_fields(array('is_published' => 'yes', 'module' => $_REQUEST['import_module'])); if (count($published_imports_arr)) { $published = array(); foreach ($published_imports_arr as $import) { $published[] = array("IMPORT_NAME" => $import->name, "IMPORT_ID" => $import->id); } $this->ss->assign('published_imports', $published); } $this->ss->display('modules/Import/tpls/step1.tpl'); }