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

📄 userdb.java

📁 源码/软件简介: 云网论坛1.1RC国际版是采用JSP开发的集论坛、CMS(网站内容管理系统)、博客、聊天室、商城、交友、语音灌水等于一体的门户式社区。拥有CWBBS ( Cloud Web BBS
💻 JAVA
📖 第 1 页 / 共 3 页
字号:

    public void setState(String state) {
        this.state = state;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public void setOicq(String oicq) {
        this.oicq = oicq;
    }

    public void setPostCode(String postCode) {
        this.postCode = postCode;
    }

    public void setHobbies(String hobbies) {
        this.hobbies = hobbies;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public void setIDCard(String IDCard) {
        this.IDCard = IDCard;
    }

    public UserDb getUser(String name) {
        // logger.info("name=" + name);
        return (UserDb)getObjectDb(name);
    }

    public void setLoaded(boolean loaded) {
        this.loaded = loaded;
    }

    public String getCareer() {
        return this.career;
    }

    public void setCareer(String c) {
        this.career = c;
    }

    public int getMarriage() {
        return this.marriage;
    }

    public int getArrestDay() {
        return arrestDay;
    }

    public String getArrestReason() {
        return arrestReason;
    }

    public Date getArrestTime() {
        return arrestTime;
    }

    public String getArrestPolice() {
        return arrestPolice;
    }

    public int getIsPolice() {
        return isPolice;
    }

    public Date getLastTime() {
        return lastTime;
    }

    public Date getCurTime() {
        return curTime;
    }

    public int getEliteCount() {
        return eliteCount;
    }

    public int getGold() {
        return gold;
    }

    public String getFavoriate() {
        return favoriate;
    }

    public boolean isValid() {
        return valid;
    }

    public String getRawPwd() {
        return rawPwd;
    }

    public long getDiskSpaceAllowed() {
        return diskSpaceAllowed;
    }

    public long getDiskSpaceUsed() {
        return diskSpaceUsed;
    }

    public boolean isSecret() {
        return secret;
    }

    public long getId() {
        return id;
    }

    public String getIp() {
        return ip;
    }

    public Date getReleaseTime() {
        return releaseTime;
    }

    public TimeZone getTimeZone() {
        return timeZone;
    }

    public String getHome() {
        return home;
    }

    public String getMsn() {
        return msn;
    }

    public String getGroupCode() {
        return groupCode;
    }

    public String getLocale() {
        return locale;
    }

    public void setMarriage(int m) {
        this.marriage = m;
    }

    public void setArrestDay(int arrestDay) {
        this.arrestDay = arrestDay;
    }

    public void setArrestReason(String arrestReason) {
        this.arrestReason = arrestReason;
    }

    public void setArrestTime(Date arrestTime) {
        this.arrestTime = arrestTime;
    }

    public void setArrestPolice(String arrestPolice) {
        this.arrestPolice = arrestPolice;
    }

    public void setIsPolice(int isPolice) {
        this.isPolice = isPolice;
    }

    public void setLastTime(Date lastTime) {
        this.lastTime = lastTime;
    }

    public void setCurTime(Date curTime) {
        this.curTime = curTime;
    }

    public void setEliteCount(int eliteCount) {
        this.eliteCount = eliteCount;
    }

    public void setGold(int gold) {
        this.gold = gold;
    }

    public void setFavoriate(String favoriate) {
        this.favoriate = favoriate;
    }

    public void setValid(boolean valid) {
        this.valid = valid;
    }

    public void setRawPwd(String rawPwd) {
        this.rawPwd = rawPwd;
    }

    public void setDiskSpaceAllowed(long diskSpaceAllowed) {
        this.diskSpaceAllowed = diskSpaceAllowed;
    }

    public void setDiskSpaceUsed(long diskSpaceUsed) {
        this.diskSpaceUsed = diskSpaceUsed;
    }

    public void setSecret(boolean secret) {
        this.secret = secret;
    }

    public void setId(long id) {
        this.id = id;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public void setReleaseTime(Date releaseTime) {
        this.releaseTime = releaseTime;
    }

    public void setTimeZone(TimeZone timeZone) {
        this.timeZone = timeZone;
    }

    public void setHome(String home) {
        this.home = home;
    }

    public void setMsn(String msn) {
        this.msn = msn;
    }

    public void setGroupCode(String groupCode) {
        this.groupCode = groupCode;
    }

    public void setLocale(String locale) {
        this.locale = locale;
    }

    public void setCurTime() {
        curTime = new Date();
    }

    public boolean DIYMyface(ServletContext application, FileUpload fu) throws ResKeyException {
        java.util.Date currentTime = new java.util.Date();
        String filenm = String.valueOf(currentTime.getTime());

        String width = StrUtil.getNullString(fu.getFieldValue("width"));
        String height = StrUtil.getNullString(fu.getFieldValue("height"));
        int w=120, h=150;
        if (StrUtil.isNumeric(width) && StrUtil.isNumeric(height)) {
            w = Integer.parseInt(width);
            h = Integer.parseInt(height);
            if (w > 120 || h > 150) {
                throw new ResKeyException("res.forum.person.UserDb", "err_w_h"); // "<a href='javascript:history.back()'>宽度必须小于120,高度必须小于150</a>");
            }
        } else {
            throw new ResKeyException("res.forum.person.UserDb", "err_w_h_not_num"); // "<a href='javascript:history.back()'>宽度和高度必须为数字</a>");
        }
        myfaceWidth = w;
        myfaceHeight = h;

        String photopath = application.getRealPath("/")+"images/myface/";
        fu.setSavePath(photopath); // 取得目录

        String oldface = myface;

        Vector v = fu.getFiles();
        int size = v.size();
        FileInfo fi = null;

        if (size>0)
            fi = (FileInfo)v.firstElement();

        int ret = fu.getRet();
        if (fi != null) {
            myface = filenm + "." + fi.getExt();
        }
        else
            myface = "";

        if (!save())
            throw new ResKeyException(SkinUtil.ERR_DB);

        if (oldface != null && !oldface.equals("")) {
            //删除原来的gif或jpg相片
            String fname = photopath + oldface;
            File virtualFile = new File(fname);
            virtualFile.delete();
        }

        // 保存图片
        if (fi!=null) {
            fi.write(photopath, myface);
        }

        primaryKey.setValue(name);
        UserCache uc = new UserCache(this);
        uc.refreshSave(primaryKey);

        return true;
    }

    private int myfaceHeight;
    private int myfaceWidth;
    private String myface;
    private String sign;
    private String question;
    private String answer;
    private String career;
    private String job;
    private int marriage;
    private String phone;
    private Date birthday;
    private String mobile;
    private String state;
    private String address;
    private String oicq;
    private String postCode;
    private String hobbies;
    private String city;
    private String IDCard;
    private boolean loaded = false;
    private int arrestDay = 0;
    private String arrestReason;
    private Date arrestTime;
    private String arrestPolice;
    private int isPolice = 0;
    private Date lastTime;
    private Date curTime;
    private int eliteCount; // 被设为精华贴的数量

    private int gold = 0;
    private String favoriate;
    private boolean valid;
    private String rawPwd;
    private long diskSpaceAllowed = 10240000; // 10M
    private long diskSpaceUsed = 0;
    private boolean secret = true;
    private long id;
    private String ip;
    private Date releaseTime; // 用以辅助查询用户是否已被释放

    private TimeZone timeZone;
    private String home;
    private String msn;
    private String groupCode;
    private String locale;
}

⌨️ 快捷键说明

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