<%@ page import="com.apz.pirisale.*" %> <% String mLoginMessage = null; String mEmailMessage = null; String mPasswordMessage = null; String mPasswordMessage2 = null; String mFirstNameMessage = null; String mSurnameMessage = null; String mAddressMessage = null; String mPostCodeMessage = null; String mTelephoneMessage = null; String mDeclarationMessage = null; String mDoRegister = request.getParameter("doRegister"); String mLoginID = request.getParameter("loginID"); String mEmail = request.getParameter("email"); String mPassword = request.getParameter("password"); String mPassword2 = request.getParameter("password2"); String mFirstName = request.getParameter("firstName"); String mSurname = request.getParameter("surname"); String mAddress = request.getParameter("address"); String mPostCode = request.getParameter("postCode"); String mTelephone = request.getParameter("telephone"); if (mDoRegister != null) { if (mDoRegister.equals("True")) { if (mLoginID == null) mLoginMessage = "Login ID is empty"; if (mEmail == null) mEmailMessage = "E-mail address is empty"; if (mPassword == null) mPasswordMessage = "Password is empty"; if (mPassword2 == null) mPasswordMessage2 = "Password is empty"; if ((mLoginMessage == null) && (mLoginID.length() == 0)) mLoginMessage = "Login ID is zero-length"; if ((mEmailMessage == null) && (mEmail.length() == 0)) mEmailMessage = "E-mail address is zero-length"; if ((mEmailMessage == null) && (mEmail.indexOf("@") == (-1))) mEmailMessage = "E-mail address must contain \'@\' character"; if ((mEmailMessage == null) && (mEmail.indexOf(".") == (-1))) mEmailMessage = "E-mail address must contain \'.\' character"; out.write("processing form.."); out.write(mLoginID); String result = piriSale.getCustomers().createCustomer(mLoginID, mPassword, mEmail, mFirstName, mSurname, mAddress, mPostCode, mTelephone); if (result == null) out.write("Success!"); if (result != null) out.write(result); } } if (mLoginMessage == null) mLoginMessage = ""; if (mLoginID == null) mLoginID = ""; String mErrLoginID; String mErrEmail; /* final int PARAM_ACTIVE = 0; final int PARAM_EMAIL = 1; final int PARAM_PASSWORD = 2; final int PARAM_PASSWORD2 = 3; final int PARAM_TITLE = 4; final int PARAM_FIRSTNAME = 5; final int PARAM_SURNAME = 6; final int PARAM_ADDRESS = 7; final int PARAM_POSTCODE = 8; final int PARAM_TELEPHONE = 9; final int PARAM_OVER_18 = 10; final int PARAM_RECIEVE = 11; final int PARAM_AGREE = 12; String[] paramValue = new String[13]; String[] paramMessage = new String[13]; boolean[] paramFailed = new boolean[13]; paramValue[PARAM_ACTIVE] = request.getParameter("doRegister"); paramValue[PARAM_EMAIL] = request.getParameter("email"); paramValue[PARAM_FIRSTNAME] = request.getParameter("firstName"); paramValue[PARAM_SURNAME] = request.getParameter("surname"); if (paramValue[PARAM_ACTIVE] != null) { if (paramValue[PARAM_ACTIVE].equals("true")) { if(paramValue[PARAM_EMAIL].length() == 0) { paramFailed[PARAM_EMAIL] = true; paramMessage[PARAM_EMAIL] = "E-mail address not entered"; } if(!paramFailed[PARAM_EMAIL] && (paramValue.indexOf("@") == (-1))) { paramFailed[PARAM_EMAIL] = true; paramMessage[PARAM_EMAIL] = "E-mail address doesn\'t contain \'@\'"); } if (paramFailed[PARAM_EMAIL] = false) { Hashtable attributes = new Hashtable(); attributes.put(new String("firstName"), paramValue[PARAM_FIRSTNAME]); attributes.put(new String("surname"), paramValue[PARAM_SURNAME]); customerListBean.createCustomer(paramValue[PARAM_EMAIL], "password", attributes) } } } Customer[] tempArray = customerListBean.getCustomers(); if(mPassword.length == 0) { mAttrFailed[1] = true; apzWriteErrorText('cellErrorPassword', 'Password not entered'); } if(!mAttrFailed[1] && (mPassword != mPassword2)) { mAttrFailed[2] = true; apzWriteErrorText('cellErrorPassword2', 'Passwords don\'t match'); } if(mFirstName.length == 0) { mAttrFailed[4] = true; apzWriteErrorText('cellErrorFirstName', 'First name not entered'); } if(mSurname.length == 0) { mAttrFailed[5] = true; apzWriteErrorText('cellErrorSurname', 'Surname not entered'); } if(!mAgreed) { mAttrFailed[11] = true; apzWriteErrorText('cellErrorAgreed', 'You must agree to the terms and conditions to register'); } paramValue[PARAM_ACTIVE] = request.getParameter("doRegister"); */ %> Register
Basic Details
 
Login ID*
<%= mLoginMessage %>
E-mail Address*
Choose a Password*
Retype Password*
 
Contact Details
 
First Name*
Surname*
Address
Post Code
Telephone
 
Declarations
 
I am either exactly or over 18 years of age
I agree to recieve carefully targetted mailings from partner companies
I have read and agree the terms and conditions displayed to the left
 
 
Terms & Conditions
THE SOFTWARE, APZ SERVICES AND THE INFORMATION PROVIDED IN THE VARIOUS APZ DIRECTORIES, LISTINGS AND DATABASES IS PROVIDED ON AN "AS IS, AS AVAILABLE" BASIS. APZ MAKES NO AND HEREBY SPECIFICALLY DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THOSE OF MERCHANTABILITY, NON INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE SOFTWARE, THE APZ SERVICES, THE APZ SERVERS' SOFTWARE, THE APZ WEB SITE OR ANY INFORMATION SENT, DELIVERED OR RECEIVED BY USERS ON OR THROUGH THE SOFTWARE, THE APZ SERVERS' SOFTWARE, THE APZ WEB SITE, THE APZ SERVICES OR THE VARIOUS APZ DIRECTORIES AND LISTINGS, UNLESS SUCH WARRANTIES ARE LEGALLY INCAPABLE OF EXCLUSION.
APZ DOES NOT WARRANT, GUARANTEE OR MAKE ANY REPRESENTATIONS REGARDING THE USE, AVAILABILITY, RELIABILITY OR THE RESULTS OF THE USE OF THE SOFTWARE, THE APZ SERVICES AND THE ACCESS TO THE APZ SERVERS, OR THE INFORMATION PROVIDED IN THE VARIOUS APZ DIRECTORIES, LISTINGS AND DATABASES IN TERMS OF THE ACCURACY, RELIABILITY, QUALITY, VALIDITY, STABILITY, COMPLETENESS, CURRENTNESS, OR OTHERWISE OF THEIR CONTENTS OR PRODUCTS, UNLESS SUCH WARRANTIES ARE LEGALLY INCAPABLE OF EXCLUSION. THE ENTIRE RISK AS TO THE RESULTS AND PERFORMANCE OF THE SOFTWARE, THE APZ SERVICES AND ACCESS TO THE APZ SERVERS OR THE VARIOUS APZ DIRECTORIES AND LISTINGS DATA, IS ASSUMED BY YOU.
APZ does not warrant or guarantee that all Software versions shall be provided with similar grades and level of service, features, functionality and the ability to use, the APZ Services. APZ does not warrant or guarantee (1) that any program or information will be free of infection by viruses, worms, Trojan horses or anything else manifesting contaminating or destructive properties; (2) that the information available on or through the APZ Services will not contain adult-oriented material, or material which some individuals may deem objectionable; (3) that the APZ Services and the functions or services performed by APZ will be uninterrupted or error-free; or (4) that defects in the APZ Services will be corrected. You are solely responsible to isolate software and information, execute anti-contamination software and otherwise take steps to ensure that software or information, if contaminated or infected, will not damage your information or system.