📄 newaccount.jsp
字号:
<%@ include file="/includes/header.jsp" %>
<%@ page import="com.sourcetap.sfa.contact.*" %>
<%@ page import="com.sourcetap.sfa.security.SFALoginEvents" %>
<%@ page import="com.sourcetap.sfa.ui.UIScreenSection" %>
<%@ page import="com.sourcetap.sfa.ui.UIWebUtility" %>
<jsp:useBean id="userWebEventProcessor" class="com.sourcetap.sfa.user.UserWebEventProcessor" scope="application" />
<jsp:useBean id="userEventProcessor" class="com.sourcetap.sfa.user.UserEventProcessor" scope="application" />
<SCRIPT LANGUAGE="javascript">
function initializeScreen() {
// Change the title bar of the Company Create section.
var tdObj = document.all("CREATETitleTD");
tdObj.innerText = "New Company Information";
}
</SCRIPT>
<!-- Display the Section and process events. -->
<%
try{
//Handle null login for first use
GenericValue userLoginCheck = (GenericValue) request.getSession().getAttribute("_USER_LOGIN_");
if ( userLoginCheck == null ) {
String noLogin = "";
userInfo = new UserInfo( noLogin, noLogin, noLogin, noLogin, noLogin );
}
//if successfully inserted, then login the user and change the display
String action = request.getParameter("action");
String status = "";
// display some info as to what is happening
if ( ( action != null ) && action.equals(UIScreenSection.ACTION_SHOW_INSERT) )
{
%>
<BODY ONLOAD="initializeScreen()">
<TABLE CLASS="freeFormSectionDisplayTable" HEIGHT="100%">
<TR>
<TD VALIGN="top" CLASS="freeFormSectionField">
<B><BR>Welcome to SourceTap's CRM System.</B>
<P><BR>To prepare the system for use by your company, please enter the information below
<BR>and click the Save button.
<P><BR>The login and password you choose here will give your system administrator access<BR>
to the system to add additional users and set up your company's territories
<P><BR>If you have any questions, please contact Sourcetap at support@sourcetap.com
<P><BR>
<% }
String html =
userWebEventProcessor.processEvents(
"NEW_USER",
"CREATE",
userInfo,
request,
response,
delegator,
userEventProcessor,
uiCache,
false);
if ( (action != null ) && action.equals(UIScreenSection.ACTION_INSERT) && (html.indexOf("<TABLE") > 0 ) )
{
String username = request.getParameter(UIWebUtility.getParamName("", "CREATE", "UserLogin", "userLoginId", 0));
String password = request.getParameter(UIWebUtility.getParamName("", "CREATE", "UserLogin", "currentPassword", 0));
status = SFALoginEvents.login( request, response, username, password );
}
if ( status.equals("success") )
{
%>
<SCRIPT FOR="window" EVENT="onload" LANGUAGE="JavaScript">
// Reload the menu to clear the menu items.
parent.parent.menu.location.href = parent.parent.menu.location.href;
</SCRIPT>
<p>Your account has been created, and you have been set up as the administrator.
<p>If you have multiple sales people in your organization, you should <a href=/sfa/control/territory>click here</a> to set up your
users and territories.
<%
}
else
out.write(html);
%>
<script for='CREATE_Address_country_0' event='onchange()' language='JavaScript'>
sendDropDown(
'CREATE_Address_state_0',
'codeId',
'codeValue',
'com.sourcetap.sfa.address.StateDropDown',
'country',
this.value,
this.form,
'<%=action%>');
</script>
<%
} catch (Exception e){
e.printStackTrace();out.write("Error" + e.toString());
}
%>
</TD>
</TR>
<TR HEIGHT="*">
<TD>
</TD>
</TR>
</TABLE>
<%@ include file="/includes/footer.jsp" %>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -