$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'); } require_once 'include/QuickSearchDefaults.php'; $qsd = new QuickSearchDefaults(); $sqs_objects = array('reports_to_name' => $qsd->getQSUser()); $sqs_objects['reports_to_name']['populate_list'] = array('reports_to_name', 'reports_to_id'); $quicksearch_js = $qsd->getQSScripts(); $quicksearch_js .= '<script type="text/javascript" language="javascript">sqs_objects = ' . $json->encode($sqs_objects) . '</script>'; $xtpl->assign("JAVASCRIPT", get_set_focus_js() . get_validate_record_js() . get_chooser_js() . $quicksearch_js); $xtpl->assign("IMAGE_PATH", $image_path); $xtpl->assign("PRINT_URL", "index.php?" . $GLOBALS['request_string']); $xtpl->assign("ID", $focus->id); $xtpl->assign("FIRST_NAME", $focus->first_name); $xtpl->assign("LAST_NAME", $focus->last_name); $xtpl->assign("TITLE", $focus->title); $xtpl->assign("DEPARTMENT", $focus->department); $xtpl->assign("REPORTS_TO_ID", $focus->reports_to_id); $xtpl->assign("REPORTS_TO_NAME", $focus->reports_to_name); $xtpl->assign("PHONE_HOME", $focus->phone_home); $xtpl->assign("PHONE_MOBILE", $focus->phone_mobile); $xtpl->assign("PHONE_WORK", $focus->phone_work); $xtpl->assign("PHONE_OTHER", $focus->phone_other); $xtpl->assign("PHONE_FAX", $focus->phone_fax); $xtpl->assign("EMAIL1", $focus->email1);
$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']); } // handle Create $module then Cancel if (empty($_REQUEST['return_id'])) { $xtpl->assign("RETURN_ACTION", 'index'); } $xtpl->assign("PRINT_URL", "index.php?" . $GLOBALS['request_string']); $xtpl->assign("JAVASCRIPT", get_set_focus_js() . get_chooser_js() . get_validate_record_js()); $xtpl->assign("ID", $focus->id); $xtpl->assign("NAME", $focus->name); $xtpl->assign("DESCRIPTION", $focus->description); require_once "include/templates/TemplateGroupChooser.php"; require_once "modules/MySettings/TabController.php"; $chooser = new TemplateGroupChooser(); $controller = new TabController(); $chooser->args['id'] = 'edit_tabs'; if (isset($_REQUEST['record'])) { $chooser->args['values_array'][0] = $focus->query_modules(1); $chooser->args['values_array'][1] = $focus->query_modules(0); foreach ($chooser->args['values_array'][0] as $key => $value) { $chooser->args['values_array'][0][$value] = $app_list_strings['moduleList'][$value]; unset($chooser->args['values_array'][0][$key]); }
$chooser->args['left_name'] = 'choose_index'; $chooser->args['right_name'] = 'ignore_index'; $chooser->args['left_label'] = 'Index(es) used'; $chooser->args['right_label'] = 'Index(es) not used'; $chooser->args['title'] = 'Verify duplicate entries against selected indexes'; // _pp($chooser); /* foreach ($chooser->args['values_array'][0] as $key=>$value) { $chooser->args['values_array'][0][$key] = $app_list_strings['moduleList'][$key]; } foreach ($chooser->args['values_array'][1] as $key=>$value) { $chooser->args['values_array'][1][$key] = $app_list_strings['moduleList'][$key]; }*/ $xtpl->assign("TAB_CHOOSER", $chooser->display()); $xtpl->assign("JAVASCRIPT_CHOOSER", get_chooser_js()); /////// $xtpl->parse("main.table"); $module_key = "LBL_" . strtoupper($_REQUEST['module']) . "_NOTE_"; for ($i = 1; isset($mod_strings[$module_key . $i]); $i++) { $xtpl->assign("NOTETEXT", $mod_strings[$module_key . $i]); $xtpl->parse("main.note"); } ($has_header = true) ? $xtpl->assign("HAS_HEADER", 'on') : $xtpl->assign("HAS_HEADER", 'off'); $xtpl->assign("MODULE", $_REQUEST['module']); $javascript = get_validate_import_fields_js($focus->required_fields, $translated_column_fields, false); if ($_REQUEST['module'] == 'Notes') { $parents = array('account_id' => $translated_column_fields['account_id'], 'opportunity_id' => $translated_column_fields['opportunity_id'], 'acase_id' => $translated_column_fields['acase_id'], 'lead_id' => $translated_column_fields['lead_id']); $javascript .= get_validate_import_parent_fields_js($parents); } $xtpl->assign("JAVASCRIPT", $javascript);