<%@ include file="../import.include" %> <% long limit1 = 0; try { limit1 = Long.parseLong(request.getParameter("limit1")); } catch(Exception e) { limit1 = 0; } String errormessage = ""; String infomessage = ""; boolean doThis = true; /** VALIDATE VARIABLES */ Members map = new Members(); long id = 0; try { id = Long.parseLong(request.getParameter("id")); map.setId(id); } catch (Exception e){ errormessage = "Check your id value. Cannot identify particular member."; doThis = false; } String lastname = "-"; try { lastname = request.getParameter("lastname"); if ((lastname == null) || ("".equals(lastname))){ lastname = "-"; } } catch (Exception e){ lastname = "-"; } map.setLastname(lastname); String firstname = "-"; try { firstname = request.getParameter("firstname"); if ((firstname == null) || ("".equals(firstname))){ firstname = "-"; } } catch (Exception e){ firstname = "-"; } map.setFirstname(firstname); String middlename = "-"; try { middlename = request.getParameter("middlename"); if ((middlename == null) || ("".equals(middlename))){ middlename = "-"; } } catch (Exception e){ middlename = "-"; } map.setMiddlename(middlename); String nickname = "-"; try { nickname = request.getParameter("nickname"); if ((nickname == null) || ("".equals(nickname))){ nickname = "-"; } } catch (Exception e){ nickname = "-"; } map.setNickname(nickname); String age = "0"; try { age = request.getParameter("age"); if ((age == null) || ("".equals(age))){ age = "ns"; } } catch (Exception e){ age = "cbs"; } map.setAge(age); String sex = "-"; try { sex = request.getParameter("sex"); if ((sex == null) || ("".equals(sex))){ sex = "-"; } } catch (Exception e){ sex = "-"; } map.setSex(sex); String civilstatus = "-"; try { civilstatus = request.getParameter("civilstatus"); if ((civilstatus == null) || ("".equals(civilstatus))){ civilstatus = "-"; } } catch (Exception e){ civilstatus = "-"; } map.setCivilstatus(civilstatus); String birthdate = "-"; try { birthdate = request.getParameter("birthdate"); if ((birthdate == null) || ("".equals(birthdate))){ birthdate = "-"; } } catch (Exception e){ birthdate = "-"; } map.setBirthdate(birthdate); String occupation = "-"; try { occupation = request.getParameter("occupation"); if ((occupation == null) || ("".equals(occupation))){ occupation = "-"; } } catch (Exception e){ occupation = "-"; } map.setOccupation(occupation); String birthplace = "-"; try { birthplace = request.getParameter("birthplace"); if ((birthplace == null) || ("".equals(birthplace))){ birthplace = "-"; } } catch (Exception e){ birthplace = "-"; } map.setBirthplace(birthplace); String spousename = "-"; try { spousename = request.getParameter("spousename"); if ((spousename == null) || ("".equals(spousename))){ spousename = "-"; } } catch (Exception e){ spousename = "-"; } map.setSpousename(spousename); String spousenick = "-"; try { spousenick = request.getParameter("spousenick"); if ((spousenick == null) || ("".equals(spousenick))){ spousenick = "-"; } } catch (Exception e){ spousenick = "-"; } map.setSpousenick(spousenick); String spouseage = "0"; try { spouseage = request.getParameter("spouseage"); if ((spouseage == null) || ("".equals(spouseage))){ spouseage = "ns"; } } catch (Exception e){ spouseage = "cbs"; } map.setSpouseage(spouseage); String spouseocc = "-"; try { spouseocc = request.getParameter("spouseocc"); if ((spouseocc == null) || ("".equals(spouseocc))){ spouseocc = "-"; } } catch (Exception e){ spouseocc = "-"; } map.setSpouseocc(spouseocc); String wedanniv = "-"; try { wedanniv = request.getParameter("wedanniv"); if ((wedanniv == null) || ("".equals(wedanniv))){ wedanniv = "-"; } } catch (Exception e){ wedanniv = "-"; } map.setWedanniv(wedanniv); String spousebday = "-"; try { spousebday = request.getParameter("spousebday"); if ((spousebday == null) || ("".equals(spousebday))){ spousebday = "-"; } } catch (Exception e){ spousebday = "-"; } map.setSpousebday(spousebday); String state = "-"; try { state = request.getParameter("state"); if ((state == null) || ("".equals(state))){ state = "-"; } } catch (Exception e){ state = "-"; } map.setState(state); String country = "-"; try { country = request.getParameter("country"); if ((country == null) || ("".equals(country))){ country = "-"; } } catch (Exception e){ country = "-"; } map.setCountry(country); String zipcode = "-"; try { zipcode = request.getParameter("zipcode"); if ((zipcode == null) || ("".equals(zipcode))){ zipcode = "-"; } } catch (Exception e){ zipcode = "-"; } map.setZipcode(zipcode); String telno1 = "-"; try { telno1 = request.getParameter("telno1"); if ((telno1 == null) || ("".equals(telno1))){ telno1 = "-"; } } catch (Exception e){ telno1 = "-"; } map.setTelno1(telno1); String telno2 = "-"; try { telno2 = request.getParameter("telno2"); if ((telno2 == null) || ("".equals(telno2))){ telno2 = "-"; } } catch (Exception e){ telno2 = "-"; } map.setTelno2(telno2); String telno3 = "-"; try { telno3 = request.getParameter("telno3"); if ((telno3 == null) || ("".equals(telno3))){ telno3 = "-"; } } catch (Exception e){ telno3 = "-"; } map.setTelno3(telno3); String faxno1 = "-"; try { faxno1 = request.getParameter("faxno1"); if ((faxno1 == null) || ("".equals(faxno1))){ faxno1 = "-"; } } catch (Exception e){ faxno1 = "-"; } map.setFaxno1(faxno1); String faxno2 = "-"; try { faxno2 = request.getParameter("faxno2"); if ((faxno2 == null) || ("".equals(faxno2))){ faxno2 = "-"; } } catch (Exception e){ faxno2 = "-"; } map.setFaxno2(faxno2); String celno1 = "-"; try { celno1 = request.getParameter("celno1"); if ((celno1 == null) || ("".equals(celno1))){ celno1 = "-"; } } catch (Exception e){ celno1 = "-"; } map.setCelno1(celno1); String celno2 = "-"; try { celno2 = request.getParameter("celno2"); if ((celno2 == null) || ("".equals(celno2))){ celno2 = "-"; } } catch (Exception e){ celno2 = "-"; } map.setCelno2(celno2); String celno3 = "-"; try { celno3 = request.getParameter("celno3"); if ((celno3 == null) || ("".equals(celno3))){ celno3 = "-"; } } catch (Exception e){ celno3 = "-"; } map.setCelno3(celno3); String emailadd = "-"; try { emailadd = request.getParameter("emailadd"); if ((emailadd == null) || ("".equals(emailadd))){ emailadd = "-"; } } catch (Exception e){ emailadd = "-"; } map.setEmailadd(emailadd); String website = "-"; try { website = request.getParameter("website"); if ((website == null) || ("".equals(website))){ website = "-"; } } catch (Exception e){ website = "-"; } map.setWebsite(website); String[] allcomputerknowhow; String computerknowhow = ""; try { allcomputerknowhow = request.getParameterValues("computerknowhow"); for (int x = 0; x < allcomputerknowhow.length; x++){ computerknowhow = allcomputerknowhow[x] + "; " + computerknowhow; } if (allcomputerknowhow.length <= 0){ computerknowhow = "-"; } } catch (Exception e){ computerknowhow = "-"; } map.setComputerknowhow(computerknowhow); String[] allsports; String sports = ""; try { allsports = request.getParameterValues("sports"); for (int x = 0; x < allsports.length; x++){ sports = allsports[x] + "; " + sports; } if (allsports.length <= 0){ sports = "-"; } } catch (Exception e){ sports = "-"; } map.setSports(sports); String hobbies = "-"; try { hobbies = request.getParameter("hobbies"); if ((hobbies == null) || ("".equals(hobbies))){ hobbies = "-"; } } catch (Exception e){ hobbies = "-"; } map.setHobbies(hobbies); String higheduc = "-"; try { higheduc = request.getParameter("higheduc"); if ((higheduc == null) || ("".equals(higheduc))){ higheduc = "-"; } } catch (Exception e){ higheduc = "-"; } map.setHigheduc(higheduc); String schoolname = "-"; try { schoolname = request.getParameter("schoolname"); if ((schoolname == null) || ("".equals(schoolname))){ schoolname = "-"; } } catch (Exception e){ schoolname = "-"; } map.setSchoolname(schoolname); String course = "-"; try { course = request.getParameter("course"); if ((course == null) || ("".equals(course))){ course = "-"; } } catch (Exception e){ course = "-"; } map.setCourse(course); String yeargrad = "-"; try { yeargrad = request.getParameter("yeargrad"); if ((yeargrad == null) || ("".equals(yeargrad))){ yeargrad = "-"; } } catch (Exception e){ yeargrad = "-"; } map.setYeargrad(yeargrad); String schooladd = "-"; try { schooladd = request.getParameter("schooladd"); if ((schooladd == null) || ("".equals(schooladd))){ schooladd = "-"; } } catch (Exception e){ schooladd = "-"; } map.setSchooladd(schooladd); String occadd = "-"; try { occadd = request.getParameter("occadd"); if ((occadd == null) || ("".equals(occadd))){ occadd = "-"; } } catch (Exception e){ occadd = "-"; } map.setOccadd(occadd); String occtel = "-"; try { occtel = request.getParameter("occtel"); if ((occtel == null) || ("".equals(occtel))){ occtel = "-"; } } catch (Exception e){ occtel = "-"; } map.setOcctel(occtel); String occfax = "-"; try { occfax = request.getParameter("occfax"); if ((occfax == null) || ("".equals(occfax))){ occfax = "-"; } } catch (Exception e){ occfax = "-"; } map.setOccfax(occfax); String bus1 = "-"; try { bus1 = request.getParameter("bus1"); if ((bus1 == null) || ("".equals(bus1))){ bus1 = "-"; } } catch (Exception e){ bus1 = "-"; } map.setBus1(bus1); String bus2 = "-"; try { bus2 = request.getParameter("bus2"); if ((bus2 == null) || ("".equals(bus2))){ bus2 = "-"; } } catch (Exception e){ bus2 = "-"; } map.setBus2(bus2); String bus3 = "-"; try { bus3 = request.getParameter("bus3"); if ((bus3 == null) || ("".equals(bus3))){ bus3 = "-"; } } catch (Exception e){ bus3 = "-"; } map.setBus3(bus3); String bus4 = "-"; try { bus4 = request.getParameter("bus3"); if ((bus4 == null) || ("".equals(bus4))){ bus4 = "-"; } } catch (Exception e){ bus4 = "-"; } map.setBus4(bus4); String reblno = "-"; try { reblno = request.getParameter("reblno"); if ((reblno == null) || ("".equals(reblno))){ reblno = "-"; } } catch (Exception e){ reblno = "-"; } map.setReblno(reblno); String[] allspecialization; String specialization = ""; try { allspecialization = request.getParameterValues("specialization"); for (int x = 0; x < allspecialization.length; x++){ specialization = allspecialization[x] + "; " + specialization; } if (allspecialization.length <= 0){ specialization = "-"; } } catch (Exception e){ specialization = "-"; } map.setSpecialization(specialization); String[] alltransactiontype; String transactiontype = ""; try { alltransactiontype = request.getParameterValues("transactiontype"); for (int x = 0; x < alltransactiontype.length; x++){ transactiontype = alltransactiontype[x] + "; " + transactiontype; } if (alltransactiontype.length <= 0){ transactiontype = "-"; } } catch (Exception e){ transactiontype = "-"; } map.setTransactiontype(transactiontype); String[] allclassification; String classification = ""; try { allclassification = request.getParameterValues("classification"); for (int x = 0; x < allclassification.length; x++){ classification = allclassification[x] + "; " + classification; } if (allclassification.length <= 0){ classification = "-"; } } catch (Exception e){ classification = "-"; } map.setClassification(classification); String location = "-"; try { location = request.getParameter("location"); if ((location == null) || ("".equals(location))){ location = "-"; } } catch (Exception e){ location = "-"; } map.setLocation(location); String services = "-"; try { services = request.getParameter("services"); if ((services == null) || ("".equals(services))){ services = "-"; } } catch (Exception e){ services = "-"; } map.setServices(services); String project1 = "-"; try { project1 = request.getParameter("project1"); if ((project1 == null) || ("".equals(project1))){ project1 = "-"; } } catch (Exception e){ project1 = "-"; } map.setProject1(project1); String developer1 = "-"; try { developer1 = request.getParameter("developer1"); if ((developer1 == null) || ("".equals(developer1))){ developer1 = "-"; } } catch (Exception e){ developer1 = "-"; } map.setDeveloper1(developer1); String designation1 = "-"; try { designation1 = request.getParameter("designation1"); if ((designation1 == null) || ("".equals(designation1))){ designation1 = "-"; } } catch (Exception e){ designation1 = "-"; } map.setDesignation1(designation1); String project2 = "-"; try { project2 = request.getParameter("project2"); if ((project2 == null) || ("".equals(project2))){ project2 = "-"; } } catch (Exception e){ project2 = "-"; } map.setProject2(project2); String developer2 = "-"; try { developer2 = request.getParameter("developer2"); if ((developer2 == null) || ("".equals(developer2))){ developer2 = "-"; } } catch (Exception e){ developer2 = "-"; } map.setDeveloper2(developer2); String designation2 = "-"; try { designation2 = request.getParameter("designation2"); if ((designation2 == null) || ("".equals(designation2))){ designation2 = "-"; } } catch (Exception e){ designation2 = "-"; } map.setDesignation2(designation2); String project3 = "-"; try { project3 = request.getParameter("project3"); if ((project3 == null) || ("".equals(project3))){ project3 = "-"; } } catch (Exception e){ project3 = "-"; } map.setProject3(project3); String developer3 = "-"; try { developer3 = request.getParameter("developer3"); if ((developer3 == null) || ("".equals(developer3))){ developer3 = "-"; } } catch (Exception e){ developer3 = "-"; } map.setDeveloper3(developer3); String designation3 = "-"; try { designation3 = request.getParameter("designation3"); if ((designation3 == null) || ("".equals(designation3))){ designation3 = "-"; } } catch (Exception e){ designation3 = "-"; } map.setDesignation3(designation3); String hlurbno1 = "-"; try { hlurbno1 = request.getParameter("hlurbno1"); if ((hlurbno1 == null) || ("".equals(hlurbno1))){ hlurbno1 = "-"; } } catch (Exception e){ hlurbno1 = "-"; } map.setHlurbno1(hlurbno1); String date1 = "-"; try { date1 = request.getParameter("date1"); if ((date1 == null) || ("".equals(date1))){ date1 = "-"; } } catch (Exception e){ date1 = "-"; } map.setDate1(date1); String hlurbno2 = "-"; try { hlurbno2 = request.getParameter("hlurbno2"); if ((hlurbno2 == null) || ("".equals(hlurbno2))){ hlurbno2 = "-"; } } catch (Exception e){ hlurbno2 = "-"; } map.setHlurbno2(hlurbno2); String date2 = "-"; try { date2 = request.getParameter("date2"); if ((date2 == null) || ("".equals(date2))){ date2 = "-"; } } catch (Exception e){ date2 = "-"; } map.setDate2(date2); String hlurbno3 = "-"; try { hlurbno3 = request.getParameter("hlurbno3"); if ((hlurbno3 == null) || ("".equals(hlurbno3))){ hlurbno3 = "-"; } } catch (Exception e){ hlurbno3 = "-"; } map.setHlurbno3(hlurbno3); String date3 = "-"; try { date3 = request.getParameter("date3"); if ((date3 == null) || ("".equals(date3))){ date3 = "-"; } } catch (Exception e){ date3 = "-"; } map.setDate3(date3); String position1 = "-"; try { position1 = request.getParameter("position1"); if ((position1 == null) || ("".equals(position1))){ position1 = "-"; } } catch (Exception e){ position1 = "-"; } map.setPosition1(position1); String period1 = "-"; try { period1 = request.getParameter("period1"); if ((period1 == null) || ("".equals(period1))){ period1 = "-"; } } catch (Exception e){ period1 = "-"; } map.setPeriod1(period1); String position2 = "-"; try { position2 = request.getParameter("position2"); if ((position2 == null) || ("".equals(position2))){ position2 = "-"; } } catch (Exception e){ position2 = "-"; } map.setPosition2(position2); String period2 = "-"; try { period2 = request.getParameter("period2"); if ((period2 == null) || ("".equals(period2))){ period2 = "-"; } } catch (Exception e){ period2 = "-"; } map.setPeriod2(period2); String position3 = "-"; try { position3 = request.getParameter("position3"); if ((position3 == null) || ("".equals(position3))){ position3 = "-"; } } catch (Exception e){ position3 = "-"; } map.setPosition3(position3); String period3 = "-"; try { period3 = request.getParameter("period3"); if ((period3 == null) || ("".equals(period3))){ period3 = "-"; } } catch (Exception e){ period3 = "-"; } map.setPeriod3(period3); String entrydate = "-"; try { entrydate = request.getParameter("entrydate"); if ((entrydate == null) || ("".equals(entrydate))){ entrydate = "-"; } } catch (Exception e){ entrydate = "-"; } map.setEntrydate(entrydate); String chapter = "-"; try { chapter = request.getParameter("chapter"); if ((chapter == null) || ("".equals(chapter))){ chapter = "-"; } } catch (Exception e){ chapter = "-"; } map.setChapter(chapter); String memtype = "-"; try { memtype = request.getParameter("memtype"); if ((memtype == null) || ("".equals(memtype))){ memtype = "-"; } } catch (Exception e){ memtype = "-"; } map.setMemtype(memtype); 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 = "Member ("+map.getNickname()+") was successfully updated."; } catch (Exception e) { e.printStackTrace(); } } /** AFTER EVERYTHING, POINT TO INDEX */ response.sendRedirect("../members/listings.jsp?infomessage="+infomessage+"&errormessage="+errormessage+" "); %>