%@ page contentType="text/html; charset=windows-1253" %> <%@ include file="/commonTags.jsp" %> <%@ page import="msc.htmlWriter.*" %> <%@ page import="msc.utils.SendMail" %> <% StringBuffer messageBody = new StringBuffer(); messageBody.append("This message has been sent through the Information System of GS TOURS at http://www.gstours.gr \n\n"); int emailyes = -1; if (request.getParameter("whichButton")!=null) { int result; String aValue = null; String emailfrom = null; byte b[] = null; emailyes = 0; //Έλεγχος εάν δόθηκαν οι τιμές με αστερίσκο if (request.getParameter("name")!=null && !request.getParameter("name").equals("") && request.getParameter("emailaddress")!=null && !request.getParameter("emailaddress").equals("")) { if (request.getParameter("name")!=null && !request.getParameter("name").equals("")) { aValue = request.getParameter("name"); messageBody.append("Name: "); messageBody.append(getGreek(aValue)); messageBody.append(" \n\n"); } if (request.getParameter("emailaddress")!=null && !request.getParameter("emailaddress").equals("")) { aValue = request.getParameter("emailaddress"); messageBody.append("Email : "); messageBody.append(getGreek(aValue)); messageBody.append(" \n\n"); emailfrom = aValue; } if (request.getParameter("telfax")!=null && !request.getParameter("telfax").equals("")) { aValue = request.getParameter("telfax"); messageBody.append("Telephone/Fax: "); messageBody.append(getGreek(aValue)); messageBody.append(" \n\n"); } if (request.getParameter("whichhotel")!=null && !request.getParameter("whichhotel").equals("")) { aValue = request.getParameter("whichhotel"); messageBody.append("Hotel: "); messageBody.append(getGreek(aValue)); messageBody.append(" \n\n"); } if (request.getParameter("discover")!=null && !request.getParameter("discover").equals("")) { aValue = request.getParameter("discover"); messageBody.append("Discover Crete: "); messageBody.append(getGreek(aValue)); messageBody.append(" \n\n"); } if (request.getParameter("drive4")!=null && !request.getParameter("drive4").equals("")) { aValue = request.getParameter("drive4"); messageBody.append("4x4 Drive: "); messageBody.append(getGreek(aValue)); messageBody.append(" \n\n"); } if (request.getParameter("naturism")!=null && !request.getParameter("naturism").equals("")) { aValue = request.getParameter("naturism"); messageBody.append("Naturism Holidays: "); messageBody.append(getGreek(aValue)); messageBody.append(" \n\n"); } if (request.getParameter("diving")!=null && !request.getParameter("diving").equals("")) { aValue = request.getParameter("diving"); messageBody.append("Diving: "); messageBody.append(getGreek(aValue)); messageBody.append(" \n\n"); } if (request.getParameter("remarks")!=null && !request.getParameter("remarks").equals("")) { aValue = request.getParameter("remarks"); messageBody.append("Additional Remarks: "); messageBody.append(getGreek(aValue)); messageBody.append(" \n\n"); } result = SendMail.sendIt( "194.219.144.188", emailfrom.toString(), "info@gstours.gr", messageBody.toString(), "Reservation" ); if ( result == 0 ) { emailyes = 2; // sent result = SendMail.sendIt( "194.219.144.188", emailfrom.toString(), "nikos@msc.gr", messageBody.toString(), "Reservation" ); } } else { emailyes = 1; } } %>
Kontakt <% if (emailyes==1) { out.println("You din't supply the obligatory fields. Press 'Back' button to complete the form. "); } else if (emailyes==0) { out.println("You din't supply your email address corectly. Press 'Back' button to complete the form. "); } else if (emailyes==2) { out.println("Your message has been successfully sent "); } %>
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||