%@ page import="java.sql.*"%> 
<%@ page import="java.util.*"%> 
<%@ page language="java" contentType="text/html; charset=UTF-8"
		 pageEncoding="UTF-8"%> 
 
	 
	修改密码 
	 
 
<%
	String psw1 = request.getParameter("psw1"); 
	String psw2 = request.getParameter("psw2"); 
	//out.println(psw1 + " " + psw2); 
	String id = session.getAttribute("reader").toString(); 
	if (psw1.equals(psw2) && psw1 != null && psw2 != null && !psw1.trim().equals("")
	&& !psw2.trim().equals("")) { 
	String sql = "update borrow_card set PASSWORD ='" + psw1 + "' where ID=" + id; 
	try {
	int i = check.executeUpdate(sql); 
	if (i == 1) { 
%>
('修改成功!'); 
window.location.href = "index.jsp"; 
<%
	} else { 
%>
('修改未成功!'); 
window.location.href = "index.jsp"; 
<%
	}
	} catch (Exception e) { 
%>
('修改未成功!'); 
window.location.href = "index.jsp"; 
<%
	}
	} else { 
%>
('修改未成功!'); 
window.location.href = "index.jsp"; 
<%
	}
%>