<%@ include file="../import.include" %> <% String errormessage = ""; String infomessage = ""; boolean doThis = true; /** VALIDATE VARIABLES */ adminmembers.Properties map = new adminmembers.Properties(); BigfootUtils bu = new BigfootUtils(); String dateUploaded = "-"; try { dateUploaded = request.getParameter("dateUploaded"); if ((dateUploaded == null) || ("".equals(dateUploaded))){ dateUploaded = "-"; } } catch (Exception e){ dateUploaded = "-"; } map.setDateUploaded(dateUploaded); long plsuploadID = 0; try { plsuploadID = Long.parseLong(request.getParameter("plsuploadID")); map.setPlsuploadID(plsuploadID); } catch (Exception e){ errormessage = "Check your id value. Cannot identify particular property."; doThis = false; } String pid = "-"; try { pid = request.getParameter("pid"); if ((pid == null) || ("".equals(pid))){ pid = "-"; } } catch (Exception e){ pid = "-"; } map.setPid(pid); String location1 = "-"; try { location1 = request.getParameter("location1"); if ((location1 == null) || ("".equals(location1))){ location1 = "-"; } } catch (Exception e){ location1 = "-"; } map.setLocation1(location1); String location2 = "-"; try { location2 = request.getParameter("location2"); if ((location2 == null) || ("".equals(location2))){ location2 = "-"; } } catch (Exception e){ location2 = "-"; } map.setLocation2(location2); String region = "-"; try { region = request.getParameter("region"); if ((region == null) || ("".equals(region))){ region = "-"; } } catch (Exception e){ region = "-"; } map.setRegion(region); String transaction = "-"; try { transaction = request.getParameter("transaction"); if ((transaction == null) || ("".equals(transaction))){ transaction = "-"; } } catch (Exception e){ transaction = "-"; } map.setTransaction(transaction); String classType = "-"; try { classType = request.getParameter("classType"); if ((classType == null) || ("".equals(classType))){ classType = "-"; } } catch (Exception e){ classType = "-"; } map.setClassType(classType); String propertyCode = "-"; try { propertyCode = request.getParameter("propertyCode"); if ((propertyCode == null) || ("".equals(propertyCode))){ propertyCode = "-"; } } catch (Exception e){ propertyCode = "-"; } map.setPropertyCode(propertyCode); String propertyType = "-"; try { propertyType = request.getParameter("propertyType"); if ((propertyType == null) || ("".equals(propertyType))){ propertyType = "-"; } } catch (Exception e){ propertyType = "-"; } map.setPropertyType(propertyType); String propertyDescription = "-"; try { propertyDescription = request.getParameter("propertyDescription"); if ((propertyDescription == null) || ("".equals(propertyDescription))){ propertyDescription = "-"; } } catch (Exception e){ propertyDescription = "-"; } map.setPropertyDescription(propertyDescription); String pricePerSQM = "0"; try { pricePerSQM = request.getParameter("pricePerSQM"); if ((pricePerSQM == null) || ("".equals(pricePerSQM))){ pricePerSQM = "0"; } } catch (Exception e){ pricePerSQM = "0"; } map.setPricePerSQM(pricePerSQM); String priceTotal = "0"; try { priceTotal = request.getParameter("priceTotal"); if ((priceTotal == null) || ("".equals(priceTotal))){ priceTotal = "0"; } } catch (Exception e){ priceTotal = "0"; } map.setPriceTotal(priceTotal); String inviewID = "1010"; try { inviewID = request.getParameter("inviewID"); if ((inviewID == null) || ("".equals(inviewID))){ inviewID = "-"; } } catch (Exception e){ inviewID = "-"; } map.setInviewID(inviewID); String productKey = "1010"; try { productKey = request.getParameter("productKey"); if ((productKey == null) || ("".equals(productKey))){ productKey = "-"; } } catch (Exception e){ productKey = "-"; } map.setProductKey(productKey); String brokerName = "-"; try { brokerName = request.getParameter("brokerName"); if ((brokerName == null) || ("".equals(brokerName))){ brokerName = "-"; } } catch (Exception e){ brokerName = "-"; } map.setBrokerName(brokerName); String address1 = "-"; try { address1 = request.getParameter("address1"); if ((address1 == null) || ("".equals(address1))){ address1 = "-"; } } catch (Exception e){ address1 = "-"; } map.setAddress1(address1); String address2 = "-"; try { address2 = request.getParameter("address2"); if ((address2 == null) || ("".equals(address2))){ address2 = "-"; } } catch (Exception e){ address2 = "-"; } map.setAddress2(address2); String emailAddress = "-"; try { emailAddress = request.getParameter("emailAddress"); if ((emailAddress == null) || ("".equals(emailAddress))){ emailAddress = "-"; } } catch (Exception e){ emailAddress = "-"; } map.setEmailAddress(emailAddress); String phoneNo = "-"; try { phoneNo = request.getParameter("phoneNo"); if ((phoneNo == null) || ("".equals(phoneNo))){ phoneNo = "-"; } } catch (Exception e){ phoneNo = "-"; } map.setPhoneNo(phoneNo); String faxNo = "-"; try { faxNo = request.getParameter("faxNo"); if ((faxNo == null) || ("".equals(faxNo))){ faxNo = "-"; } } catch (Exception e){ faxNo = "-"; } map.setFaxNo(faxNo); String mobileNo = "-"; try { mobileNo = request.getParameter("mobileNo"); if ((mobileNo == null) || ("".equals(mobileNo))){ mobileNo = "-"; } } catch (Exception e){ mobileNo = "-"; } map.setMobileNo(mobileNo); String licenseNo = "-"; try { licenseNo = request.getParameter("licenseNo"); if ((licenseNo == null) || ("".equals(licenseNo))){ licenseNo = "-"; } } catch (Exception e){ licenseNo = "-"; } map.setLicenseNo(licenseNo); String hlurbNo = "-"; try { hlurbNo = request.getParameter("hlurbNo"); if ((hlurbNo == null) || ("".equals(hlurbNo))){ hlurbNo = "-"; } } catch (Exception e){ hlurbNo = "-"; } map.setHlurbNo(hlurbNo); String hlurbYear = "-"; try { hlurbYear = request.getParameter("hlurbYear"); if ((hlurbYear == null) || ("".equals(hlurbYear))){ hlurbYear = "-"; } } catch (Exception e){ hlurbYear = "-"; } map.setHlurbYear(hlurbYear); String chapter = "-"; try { chapter = request.getParameter("chapter"); if ((chapter == null) || ("".equals(chapter))){ chapter = "-"; } } catch (Exception e){ chapter = "-"; } map.setChapter(chapter); String status = "-"; try { status = request.getParameter("status"); if ((status == null) || ("".equals(status))){ status = "-"; } } catch (Exception e){ status = "-"; } map.setStatus(status); /** INSERTS RECORD */ if (doThis) { try { map.update(); infomessage = "Property ("+map.getLocation1()+","+map.getLocation2()+") was successfully updated."; } catch (Exception e) { e.printStackTrace(); } } /** AFTER EVERYTHING, POINT TO INDEX */ response.sendRedirect("../properties/listings.jsp?infomessage="+infomessage+"&errormessage="+errormessage+" "); %>