• 大小: 985KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-24
  • 语言: Java
  • 标签: java  

资源简介

里面含有三个完整的java注册登录模块。有验证码,ajax异步验证,表单验证等知识点

资源截图

代码片段和文件信息

/*
 * To change this template choose Tools | Templates
 * and open the template in the editor.
 */
package com.wy.dao;

import com.wy.model.UserInfo;
import com.wy.tools.JDBConnection;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * 
 * @author Administrator
 */
public class UserInfoDao implements UserInfoDaoImp {

private JDBConnection connection = null;
private String sql = null;

public boolean updateUserInfo(UserInfo userInfo) {
connection = new JDBConnection();
boolean flag = false;
sql = “update tb_register1 set password=‘“ + userInfo.getPassword()
+ “‘ where id=“ + userInfo.getId() + ““;
if (connection.executeUpdate(sql)) {
flag = true;
}
return flag;
}

public boolean saveUserInfo(UserInfo userinfo) {
connection = new JDBConnection();
boolean flag = false;
sql = “insert into tb_register1 values (‘“ + userinfo.getAccount()
+ “‘‘“
+ userinfo.getPassword()
+ “‘‘“ + userinfo.getEmail() + “‘‘“ + userinfo.getQuestion()
+ “‘‘“ + userinfo.getResult() + “‘)“;
if (connection.executeUpdate(sql)) {
flag = true;
}
return flag;
}

public UserInfo queryUserInfo(String account) {
UserInfo userinfo = null;
connection = new JDBConnection();
try {
sql = “select * from tb_register1 where account=‘“ + account + “‘“;
ResultSet rs = connection.executeQuery(sql);
while (rs.next()) {
userinfo = new UserInfo();
userinfo.setId(rs.getInt(1));
userinfo.setAccount(rs.getString(2));
userinfo.setPassword(rs.getString(3));
userinfo.setEmail(rs.getString(4));
userinfo.setQuestion(rs.getString(5));
userinfo.setResult(rs.getString(6));
}
} catch (SQLException ex) {
return null;
} finally {
connection.closeConnection();
}
return userinfo;
}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2011-08-16 02:01  03_注册登录模块\
     目录           0  2010-12-22 00:32  03_注册登录模块\sl\
     目录           0  2010-12-22 00:32  03_注册登录模块\sl\01\
     目录           0  2010-12-22 00:32  03_注册登录模块\sl\01\css\
     文件        3207  2010-12-22 00:32  03_注册登录模块\sl\01\css\style.css
     文件        5076  2010-12-22 00:32  03_注册登录模块\sl\01\findPS1.jsp
     文件        5323  2010-12-22 00:32  03_注册登录模块\sl\01\findPS2.jsp
     目录           0  2010-12-22 00:32  03_注册登录模块\sl\01\images\
     文件       70470  2010-12-22 00:32  03_注册登录模块\sl\01\images\banne.jpg
     文件       27110  2010-12-22 00:32  03_注册登录模块\sl\01\images\char.jpg
     文件       25694  2010-12-22 00:32  03_注册登录模块\sl\01\images\cidian.jpg
     文件       20652  2010-12-22 00:32  03_注册登录模块\sl\01\images\downLine.jpg
     文件        2969  2010-12-22 00:32  03_注册登录模块\sl\01\images\land.gif
     文件       24438  2010-12-22 00:32  03_注册登录模块\sl\01\images\land.jpg
     文件       32263  2010-12-22 00:32  03_注册登录模块\sl\01\images\land1.jpg
     文件       26972  2010-12-22 00:32  03_注册登录模块\sl\01\images\left.jpg
     文件       35491  2010-12-22 00:32  03_注册登录模块\sl\01\images\re_center.jpg
     文件       25521  2010-12-22 00:32  03_注册登录模块\sl\01\images\re_down.jpg
     文件       53888  2010-12-22 00:32  03_注册登录模块\sl\01\images\re_top.jpg
     文件       24997  2010-12-22 00:32  03_注册登录模块\sl\01\images\right.jpg
     文件        5632  2010-12-22 00:32  03_注册登录模块\sl\01\images\Thumbs.db
     文件        9303  2010-12-22 00:32  03_注册登录模块\sl\01\index.jsp
     目录           0  2010-12-22 00:32  03_注册登录模块\sl\01\js\
     文件         600  2010-12-22 00:32  03_注册登录模块\sl\01\js\validate.js
     文件         267  2010-12-22 00:32  03_注册登录模块\sl\01\loginOut.jsp
     目录           0  2010-12-22 00:32  03_注册登录模块\sl\01\meta-INF\
     文件          39  2010-12-22 00:32  03_注册登录模块\sl\01\meta-INF\MANIFEST.MF
     文件        9743  2010-12-22 00:32  03_注册登录模块\sl\01\register.jsp
     目录           0  2010-12-22 00:32  03_注册登录模块\sl\01\src\
     目录           0  2010-12-22 00:32  03_注册登录模块\sl\01\src\com\
     目录           0  2010-12-22 00:32  03_注册登录模块\sl\01\src\com\wy\
............此处省略186个文件信息

评论

共有 条评论