⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 userdata.java

📁 BBS-CS是采用JSP+JavaBean+Servlet开发的一套网络虚拟社区系统。
💻 JAVA
字号:
package com.laoer.bbscs.user;import java.sql.*;import java.io.*;import java.util.*;import com.laoer.bbscs.db.*;import com.laoer.bbscs.txthtml.*;/** * <p>Title: BBS-CS</p> * <p>Description: BBS-CS(BBS式虚拟社区系统)</p> * <p>Copyright: Copyright (c) 2002</p> * <p>Company: loveroom.com.cn</p> * @author 龚天乙(laoer) * @version 3.0 */public class UserData {  String SQL = "";  DbTrans DBSQL;  ResultSet rs = null;  private int userExp = 0;  private int userBx = 0;  private int userArtNum = 0;  private int userStayTime = 0;  private int userNStayTime = 0;  private int userPower = 0;  private int userHPower = 0;  public UserData() {      this.DBSQL = new DbTrans();  }  public void setUserData(String strUserID) {      SQL = "select * from userdata where UID ="+strUserID;      try {          rs = DBSQL.executeQuery(SQL);          if (rs.next()) {              this.userExp = rs.getInt("exp");              this.userBx = rs.getInt("bx");              this.userArtNum = rs.getInt("artunm");              this.userStayTime = rs.getInt("staytime");              this.userNStayTime = rs.getInt("nstaytime");              this.userPower = rs.getInt("power");              this.userHPower = rs.getInt("hpower");          }          rs.close();      }      catch (SQLException e){      }  }  public int getUserExp() {      return this.userExp;  }  public int getUserBx() {      return this.userBx;  }  public int getUserArtNum() {      return this.userArtNum;  }  public int getUserStatyTime() {      return this.userStayTime;  }  public int getUserNStayTime() {      return this.userNStayTime;  }  public int getUserPower() {      return this.userPower;  }  public int getUserHPower() {      return this.userHPower;  }  public void setUpdateUserData(String strUserID,String bx,String artunm,String power) {      SQL = "update userdata set bx=bx"+bx+",artunm=artunm"+artunm+",power=power"+power+" where UID="+ strUserID;      try {          DBSQL.executeUpdate(SQL);      }      catch (SQLException e) {      }  }  public void close() {      try {          DBSQL.close();      }      catch (SQLException e) {      }  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -