" javascript: history.go (-1) ">
} catch (ServletException e) {. printStackTrace ();
}
((JDBCConnectionPool) sc.getAttribute ("ConPool")). checkIn (c);
}
}
}
7.2.2 Редагування профілю покупця
public class EditBuyerProfile implements Command {void execute (HttpServletRequest request, HttpServletResponse response, ServletContext sc, HttpSession session) throws IOException {s = ""; c = ((JDBCConnectionPool) sc.getAttribute (" ; ConPool ")). checkOut (); login = request.getParameter (" Rlogin "); pass = request.getParameter (" Rpass "); email = request.getParameter (" email "); lastname = request. getParameter ("Rlastname"); firstname = request.getParameter ("Rfirstname"); cpass = request.getParameter ("RCpass"); thirdname = request.getParameter ("Rthirdname"); webmoney = request.getParameter ( "Rwebmoney"); address = request.getParameter ("Raddress"); phone = request.getParameter ("Rphone"); b_id = (Integer) session.getAttribute ("id"); (session.getAttribute ( "role")! = null). setAttribute ("succ", true); (! phone.equals ("") &&! cpass.equals ("") &&! email.equals ("") &&! login.equals ("") &&! pass.equals ("") &&! lastname.equals ("" ) &&! firstname.equals ("") &&! thirdname.equals ("")
&&! webmoney.equals ("") &&! address.equals ("")) {{stmt = c.createStatement ();. executeUpdate ( "UPDATE buyers SET last_name = '" + lastname + "', first_name = '" + firstname + "', third_name = '" + thirdname + "', login = '" + login + " ; ', password =' ​​"+ pass +" ', email =' "+ email +" ', webmoney_account_number =' "+ webmoney +" ', home_address =' ​​"+ address +" ' , phone = '"+ phone +"' "+
"WHERE buyers.buyer_id =" + b_id + ";"); = "Дані успішно змінено!";
} catch (SQLException e) {= "
На жаль дані змінити неможливо!
}
} else = "
заповнених не всі поля!
} catch (ServletException e) {. printStackTrace ();
}
((JDBCConnectionPool) sc.getAttribute ("ConPool")). checkIn (c);
}
}
7.2.3 Виведення на екран історії замовлень клієнта
public class OrdersHistory implements Command {void execute (HttpServletRequest request, HttpServletResponse response, ServletContext sc, HttpSession session) throws IOException {s = ""; {c = ((JDBCConnectionPool) sc.getAttribute ( "ConPool")). checkOut (); stmt = c.createStatement (); = FindBadGoo...