%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"
import="java.util.*"
import="javax.servlet.http.HttpServletRequest"
import="com.tootsville.user.*"
import="org.starhope.appius.user.*"
import="org.starhope.appius.mb.Messages"
import="org.starhope.appius.except.*"
import="org.starhope.appius.messaging.*"
import="org.starhope.appius.types.AgeBracket"
import="com.tootsville.WebUtil"
%><%
//---------- Universal Declarations: Place this on every page.
/**
* Parent/User object. On myAccount this should be declared User and on parent this should be declared Parent
*/
User sessionUser=null;
/**
* Error message list
*/
HashMap err = new HashMap ();
%><%
//----------- Verify the session and create a User or Parent Object
//----------- This should be placed on any of the 'logged in' sections on the website.
String userID = "";
String userPassword = "";
String userType = "";
if (null!=session.getAttribute("sUserID") && null!=session.getAttribute("sUserPassword")
&& null!=session.getAttribute("sUserType") ) {
userID=session.getAttribute("sUserID").toString();
userPassword=session.getAttribute("sUserPassword").toString();
userType=session.getAttribute("sUserType").toString();
} else {
err.put("", Messages.login_invalid());
}
boolean isUnder13 = true;
if (userType.equals(WebUtil.USER)) {
sessionUser=WebUtil.verifyUserLogin(userID, userPassword);
} else if (userType.equals(WebUtil.PARENT)) {
pageContext.forward("/membership/parent/");
}
if (null==sessionUser) {
err.put("username", Messages.login_invalid());
}
if (null!=sessionUser) {
// determine whose email we need
isUnder13 = (sessionUser.needsParent());
} else {
err.put("username", Messages.login_invalid());
}
%><%
//----------- Error handling: Place this on every page.
//----------- These errors are read and displayed by Header.jsp
if (err.size() > 0) {
session.setAttribute("sError", err);
pageContext.forward ("/membership/");
}
%>
Tootsville™ Membership
<% if (isUnder13) { %>
You may log in to Tootsville™ but to chat in world,
your new Toots® account must have parent approval.
Tootsville™ Customer Service will send your parent an
approval e-mail with a chat activation link. Please
remind your parent to check their e-mail.
<% } else { %>
You may log into Tootsville™, but you will need to verify your e-mail address
and approve your account before you are able to chat in world. Tootsville™
Customer Service will send you an approval e-mail with a chat activation link.
Please review the e-mail and follow the account approval instructions.