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

📄 clubusers.java

📁 特色说明: 1.沿袭今晚在线论坛独有的双风格分桢形式 2.社区最多可进行3级分类
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
        if(!act.equals("add")){            sqlCommand = "UPDATE GVclubUsers SET userPass=?, userName2=?, userSex=?, userEmail=?";            sqlCommand += ", userEmailOpen=?, userBirthday=?, userWeb=?, userQQ=?";            sqlCommand += ", userArea=?, userCity=?, userWork=?, userPen=?, userIntro=? where userName=?";        }else{            sqlCommand = "INSERT INTO GVclubUsers(userName, userPass, userName2, userSex, userEmail, userEmailOpen";            sqlCommand += ", userQuestion, userAnswer, userBirthday, userWeb, userQQ, userArea, userCity, userWork";            sqlCommand += ", userPen, userIntro, userUpfile, userRegTime, userLastTime, userLoginTimes ";            sqlCommand += ", userRegip, userLastip, userMoney, userDeposit, userMark, userCredit, userTopicCount, userReCount)";            sqlCommand += " VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";        }         return sqlCommand;    } // 更新用户相关数据 // 参数isRe判断是否为回复,0为不是, 1为是; public boolean userUpdate(String uName, double uMark, double uMoney,        double uCredit, int isRe, int tCount)            throws Exception{       boolean tempbea = false;       String txts = new String("");       String sql = new String();       ConnClub bridge = new ConnClub();       Connection con = bridge.getConnection();          try{            ClubRule cr = new ClubRule(); //社区制度            sql = "UPDATE GVclubUsers set  userMoney=userMoney+?, userMark=userMark+?, userCredit=userCredit+? ";            if(isRe==0){                sql += " ,userTopicCount=userTopicCount + "+ tCount +"";            }            if(isRe==1){                sql += " ,userReCount=userReCount + "+ tCount +"";            }               sql += " where userName = ?" ;            PreparedStatement pps = con.prepareStatement(sql);            pps.setDouble(1, uMoney);            pps.setDouble(2, uMark);            pps.setDouble(3, uCredit);            pps.setString(4, uName);            pps.executeUpdate();            tempbea = true;       }catch(Exception e){           tempbea = false;           con.close();       }finally{           con.close();       }        return tempbea;    }//========================================== public boolean userUpdate(String uName, int num, int isRe, int tCount) throws Exception{       boolean tempbea = false;       String txts = new String("");       String sql = new String();       ConnClub bridge = new ConnClub();       Connection con = bridge.getConnection();          try{            ClubRule cr = new ClubRule(); //社区制度            cr.getClubRule();            txts = cr.getCrMark();            userMark = ae.txtsList(txts,num,"|");            txts = "";            txts = cr.getCrMoney();            userMoney = ae.txtsList(txts,num,"|");            txts = "";            txts = cr.getCrCredit();            userCredit = ae.txtsList(txts,num,"|");                sql = "UPDATE GVclubUsers set  userMoney=userMoney+?, userMark=userMark+?, userCredit=userCredit+? ";            if(isRe==0){                sql += " ,userTopicCount=userTopicCount + "+ tCount +"";            }            if(isRe==1){                sql += " ,userReCount=userReCount + "+ tCount +"";            }               sql += " where userName = ?" ;            PreparedStatement pps = con.prepareStatement(sql);            pps.setDouble(1, userMoney);            pps.setDouble(2, userMark);            pps.setDouble(3, userCredit);            pps.setString(4, uName);            pps.executeUpdate();            tempbea = true;            pps.close();       }catch(Exception e){           con.close();           tempbea = false;       }finally{           con.close();       }        return tempbea;    }    public String getMessage(){        return this.message;    }    public String getUserRegDate(){        String temp="";        temp = String.valueOf(userRegDate);        return temp;    }    public String getUserLastDate(){        String temp="";        temp = String.valueOf(userLastDate);        return temp;    }    public String getUserRegTime(){        String temp="";        temp = String.valueOf(userRegTime);        return temp;    }    public String getUserLastTime(){        String temp="";        temp = String.valueOf(userLastTime);        return temp;    }    public String getUserName(){        return this.userName;    }    public String getUserName2(){        if(userName2==null){            return "";        }else{            return this.userName2.trim();        }    }    public String getUserPass(){        return this.userPass;    }    public String getUserEmail(){        if(userEmail==null){            return "";        }else{            return this.userEmail.trim();        }    }    public String getUserQuestion(){        return this.userQuestion.trim();    }    public String getUserAnswer(){        return this.userAnswer.trim();    }    public String getUserBirthday(){        if(userBirthday!=null){            return this.userBirthday.trim();        }else{            return "1982-2-1";        }    }    public String getUserWeb(){        if(userWeb==null){            return "http://www.GamVan.com";        }else{            return this.userWeb.trim();        }    }    public String getUserQQ(){        if(userQQ==null){            return "";        }else{            return this.userQQ.trim();        }    }    public String getUserArea(){        if(this.userArea==null){            return "";        }else{            return this.userArea.trim();        }    }    public String getUserCity(){        if(userCity==null){            return "";        }else{            return this.userCity.trim();        }    }    public String getUserWork(){        if(userWork==null){            return "";        }else{        return this.userWork.trim();        }    }    public String getUserPen() throws Exception{        if(userPen==null){            return "";        }else{            return this.userPen.trim();        }    }    public String getUserIntro(){        if(userIntro==null){            return "";        }else{            return this.userIntro.trim();        }    }    public String getUserTxt(){        if(userTxt==null){            return "";        }else{            return this.userTxt.trim();        }    }    public int getUserID(){        return this.userID;    }    public int getUserSex(){        return this.userSex;    }    public int getUserEmailOpen(){        return this.userEmailOpen;    }    public int getUserUpfile(){        return this.userUpfile;    }    public int getUserLoginTimes(){        return this.userLoginTimes;    }    public double getUserMark(){        userMark = Double.parseDouble(df.format(userMark));        return this.userMark;    }    public double getUserMoney(){        userMoney = Double.parseDouble(df.format(userMoney));        return this.userMoney;    }    public double getUserCredit(){        userCredit = Double.parseDouble(df.format(userCredit));        return this.userCredit;    }    public String getUserLastip(){        return this.userLastip;    }    public int getUserTopicCount(){        return this.userTopicCount;    }    public int getUserReCount(){        return this.userReCount;    }    //==================================================    public void setUserName(String userName){        userName = clubgb.Gb(userName);        this.userName = userName.trim();    }    public void setUserName2(String userName2){        userName2 = clubgb.Gb(userName2);        userName2 = ens.htmlEncoder(userName2);        this.userName2 = userName2.trim();    }    public void setUserPass(String userPass){        userPass = ens.encodeString("md5of16",userPass);        this.userPass = userPass;    }    public void setUserEmail(String userEmail){        this.userEmail = userEmail.trim();    }    public void setUserEmailOpen(String userEmailOpen){        this.userEmailOpen = Integer.parseInt(userEmailOpen);    }    public void setUserQuestion(String userQuestion){        userQuestion = clubgb.Gb(userQuestion);        this.userQuestion = userQuestion.trim();    }    public void setUserAnswer(String userAnswer){        userAnswer = clubgb.Gb(userAnswer);        userAnswer = ens.encodeString("md5of16",userAnswer);        this.userAnswer = userAnswer.trim();    }    public void setUserBirthday(String userBirthday){        userBirthday = clubgb.Gb(userBirthday);       this.userBirthday = userBirthday.trim();    }    public void setUserWeb(String userWeb){        userWeb = clubgb.Gb(userWeb);        this.userWeb = userWeb.trim();    }    public void setUserQQ(String userQQ){        userQQ = clubgb.Gb(userQQ);        this.userQQ = userQQ.trim();    }    public void setUserArea(String userArea){        userArea = clubgb.Gb(userArea);        this.userArea = userArea.trim();    }    public void setUserCity(String userCity){        userCity = clubgb.Gb(userCity);        this.userCity = userCity.trim();    }    public void setUserWork(String userWork){        userWork = clubgb.Gb(userWork);        this.userWork = userWork.trim();    }    public void setUserPen(String userPen){        userPen =clubgb.Gb(userPen);        this.userPen = userPen;    }    public void setUserIntro(String userIntro){        userIntro = clubgb.Gb(userIntro);        this.userIntro = userIntro.trim();    }    public void setUserTxt(String userTxt){        userTxt = clubgb.Gb(userTxt);        this.userTxt = userTxt.trim();    }    public void setUserSex(String userSex){        this.userSex = Integer.parseInt(userSex);    }    public void setUserRegip(String userRegip){        this.userRegip = userRegip.trim();    }    public void setUserLastip(String userLastip){        this.userLastip = userLastip.trim();    }}

⌨️ 快捷键说明

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