<%@page import="com.sun.mail.handlers.message_rfc822" language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" import="java.util.*" import="com.tootsville.WebUtil" import="com.tootsville.IBCUtil" import="org.starhope.appius.game.AppiusClaudiusCaecus" import="org.starhope.appius.mb.Messages" import="org.starhope.appius.except.*" import="javax.naming.NamingException" import="java.sql.SQLException" %><% // ---------- 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 */ /** * Error message list */ final /** * Success message list */ final final HashMap storeValues = new HashMap (); /** * Hidden form field to determine what to process */ final String formHandler = request.getParameter ("formHandler"); /** * Static final Strings for formHandler logic */ final String NEW_ACCT = "new"; final String RULES = "rules"; final String CODE = "code"; final String TOOT = "pickatoot"; final String DETAILS = "details"; final String EMAIL = "email"; String url = "/chase-it/"; /** IBC Code Page Processing */ if (formHandler.equalsIgnoreCase (CODE)) { String chaseItCode = ""; try { if (null!=request.getParameter("code")) { chaseItCode = request.getParameter("code"); if (IBCUtil.verifyCode(chaseItCode)) { session.setAttribute("ibc", chaseItCode); url = "/chase-it/confirm/"; } else { throw new NotFoundException ("Invalid IBC Code"); } } else { throw new NotFoundException ("Invalid IBC Code"); } } catch (NotFoundException e) { err.put("code", "You have entered an invalid IBC Code number."); url="/chase-it/"; } catch (DataException e) { err.put("code", "You have entered an invalid IBC Code number."); url="/chase-it/"; } } else if (formHandler.equalsIgnoreCase (NEW_ACCT)) { url = "/membership/register/rules/?register=user"; } if (err.size() > 0) { session.setAttribute("sError", err); System.err.println("Errors?: " + err.toString()); } ; System.err.println("Redirecting: " + url); response.sendRedirect(url); %>