/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *大敌; ,*验证登陆用户 *大敌; ,* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */public int  isValid (Userjia 用户){ int permission =, 1; Connection conn =,空; ResultSet rs =,空; Statement stmt =,空; 康涅狄格州=ConnectionFactory.getConnection (),,, try {=,,stmt  conn.createStatement ();=,rs  stmt.executeQuery ,(“select *,得到login_user where name =? ,+ user.getUsername () +“passwd=,害的”+ user.getUserpasswd () +“,”); ,如果(rs.next ()) { 时间=permission rs.getInt(“许可”); , ,} },catch (Exception e), {//,TODO Auto-generated  catch 块 e.printStackTrace (); 最后}{ CloseResource.release (rs,支撑,康涅狄格州); } return 许可; }
至,此功能基本实现。