<%@ page language="java"%>

All fields marked with ' * ' are mandatory.
<%! boolean missingFields = false; String errorMsg = ""; %> <% errorMsg = ""; if (request.getParameter("firstName") != null && request.getParameter("firstName").equals("")) { missingFields = true; errorMsg += "First Name
"; } if (request.getParameter("lastName") != null && request.getParameter("lastName").equals("")) { missingFields = true; errorMsg += "Last Name
"; } if (request.getParameter("company") != null && request.getParameter("company").equals("")) { missingFields = true; errorMsg += "Company
"; } if (request.getParameter("city") != null && request.getParameter("city").equals("")) { missingFields = true; errorMsg += "City
"; } if (request.getParameter("state") != null && request.getParameter("state").equals("")) { missingFields = true; errorMsg += "State
"; } if (request.getParameter("country") != null && request.getParameter("country").equals("")) { missingFields = true; errorMsg += "Country
"; } if (request.getParameter("zipCode") != null && request.getParameter("zipCode").equals("")) { missingFields = true; errorMsg += "Zip Code
"; } if (request.getParameter("phone") != null && request.getParameter("phone").equals("")) { missingFields = true; errorMsg += "Phone
"; } if (request.getParameter("email") != null && request.getParameter("email").equals("")) { missingFields = true; errorMsg += "Email
"; } if (missingFields) { %>

Please fill out the following missing information:

<%=errorMsg%> <% missingFields = false; } else if (request.getParameterNames().hasMoreElements() == true) { %> <% cust.insertCustomerRecord(); String subject = null; String akonSubject; StringBuffer bodyText = new StringBuffer(512); String downloadFormat = request.getParameter("DownloadFormat"); bodyText.append("Dear " + request.getParameter("firstName") + "\n"); subject = "Confirmation of your Catalog Request with Akon Inc."; if (downloadFormat != null && downloadFormat.equals("Electronic Format")) { akonSubject = "Catalog Request (Electronic Format)"; bodyText.append("\n\nThe Akon Sales Team would like to thank you for your interest in our products. Please click on the link below to view and download the complete catalog.\n\n"); bodyText.append("http://www.akoninc.com/AkonCatalog.pdf\n"); bodyText.append( "Download Time: 28.8 Modem: 1 hour 30 min 8 sec, 56k Modem: 59 min 4 sec, 512k Cable Modem: 6 min 49 sec, T1: 3 min 15 sec"); bodyText.append("\n\nIf you have any questions please do not hesitate in contacting us. Contact information can be retrieved from our website. Again, we thank you and look forward to assisting you with your current and future requirements.\n\n"); bodyText.append("Kind Regards,\n\nAkon Sales Team\n\n"); bodyText.append("http://www.akoninc.com\n\n"); } else { akonSubject = "Catalog Request (Hard Copy)"; bodyText.append("The Akon Sales Team would like to thank you for your interest in our products. Your request is being processed by our Sales Department. Please allow 3-5 business days for shipping and handling. If you have any questions please do not hesitate in contacting us. Contact information can be retrieved from our website. Again, we thank you and look forward to assisting you with your current and future requirements.\n\n"); bodyText.append("Kind regards,\n\n"); bodyText.append("Akon Sales Team\nwww.akoninc.com"); } cust.sendEmail("sales@akoninc.com", request.getParameter("email"), subject, bodyText.toString()); bodyText = new StringBuffer(512); bodyText.append("Dear Akon Representative,\n\nPlease research and qualify the below information. Follow up with customer one week from today.\n\n"); bodyText.append("\n\nFirst Name: " + request.getParameter("firstName")); bodyText.append("\nLast Name: " + request.getParameter("lastName")); bodyText.append("\nCompany: " + request.getParameter("company")); bodyText.append("\nCity: " + request.getParameter("city")); bodyText.append("\nState: " + request.getParameter("state")); bodyText.append("\nCountry: " + request.getParameter("country")); bodyText.append("\nZip Code: " + request.getParameter("zipCode")); bodyText.append("\nPhone: " + request.getParameter("phone")); bodyText.append("\nEmail: " + request.getParameter("email")); bodyText.append("\nComments: " + request.getParameter("comments")); bodyText.append("\n\nBest regards,\n\nAkon Management\n\n\n\n"); cust.sendEmail(request.getParameter("email"), "sales@akoninc.com", akonSubject, bodyText.toString()); if (downloadFormat != null && downloadFormat.equals("Electronic Format")) { %> <% } else { %> <% } } %>

<% String firstName = ""; if ((firstName = request.getParameter("firstName")) == null) { firstName = ""; } String lastName = ""; if ((lastName = request.getParameter("lastName")) == null) { lastName = ""; } String company = ""; if ((company = request.getParameter("company")) == null) { company = ""; } String city = ""; if ((city = request.getParameter("city")) == null) { city = ""; } String state = ""; if ((state = request.getParameter("state")) == null) { state = ""; } String country = ""; if ((country = request.getParameter("country")) == null) { country = ""; } String zipCode = ""; if ((zipCode = request.getParameter("zipCode")) == null) { zipCode = ""; } String phone = ""; if ((phone = request.getParameter("phone")) == null) { phone = ""; } String email = ""; if ((email = request.getParameter("email")) == null) { email = ""; } String title = ""; if ((title = request.getParameter("title")) == null) { title = ""; } String fax = ""; if ((fax = request.getParameter("fax")) == null) { fax = ""; } String companyUrl = ""; if ((companyUrl = request.getParameter("companyUrl")) == null) { companyUrl = ""; } String comments = ""; if ((comments = request.getParameter("comments")) == null) { comments = ""; } %>
First Name :   * Last Name :  *
Title : Company Name :  *
Street Address1 :  * Street Address2 :
City :   * State :   *
Country :   * Zip Code :   *
Phone :   * Fax :
Company URL : Email :  *
Comments :   
 
To complete your request please selec t either electronic format or hard copy.
Electronic Format Hard Copy
28.8 Modem : 1 hour 30 min 8 sec, 56k Modem: 59 min 4 sec, 512k Cable Modem: 6 min 49 sec, T1: 3 min 15 sec