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

📄 clubtopicmanage.java

📁 特色: 1.今晚在线社区独有的双风格分桢形式 2.社区最多可进行3级分类
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
            }
            
        }else{
            message= "您所请求的操作的文章不存在!";
        }
        /* 判断是否用短消息通知用户 */
        StringBuffer sb = new StringBuffer();
        if(postMsg.equals("1")){
        	sb.append("您社区的贴子被管理员[b]<");
        	sb.append(topicLogSo);
        	sb.append(">[/b]");
        	if(!topicLogTxt.equals("")){
        		sb.append(",原因:");
        		sb.append(topicLogTxt);
        	}
        	sb.append("\n[url=clubPage.jsp?ccStyle=1&tID=");
        	sb.append(topicID);
        	sb.append("&reID=");
        	sb.append(topicReID);        	
        	sb.append("]贴子主题为:");
        	sb.append(topic);
        	sb.append("[/url]");
        	sb.append("\n\n因此而涉及到您在社区的各项指数变化情况如下:");
        	sb.append("\n积分:");
        	if(userMark>0){sb.append("+");}
        	sb.append(userMark);
        	sb.append("\n金币:");
        	if(userMoney>0){sb.append("+");}
        	sb.append(userMoney);
        	sb.append("\n信誉:");
        	if(userCredit>0){sb.append("+");}
        	sb.append(userCredit);
        	if(topicLogByUserList==1){
        		sb.append("\n执行此项操作的管理员为:");
        		sb.append(byUser);
            	if(!userMessage.equals("")){
            		sb.append("\n以下是管理员给您的留言:[quote=");
            		sb.append(byUser);
            		sb.append("]");
            		sb.append(userMessage); 
            		sb.append("[/quote]");
            	}
        	}
        	sb.append("\n事件发生时间:");
        	sb.append(now);
        	sb.append("\n\n------系统邮件无需回复------");
    		ClubMessageSend cms = new ClubMessageSend ();
    		cms.setIsPost(1);
    		cms.setCmSendUser("勤杂工");
    		cms.setCmSendID(0);
    		cms.setCmTopic("社区提醒:您的某篇贴子被社区管理员管理!");
    		cms.setCmContent(sb.toString());
    		cms.setCmUserIp("127.0.0.1");
    		cms.setCmIsSend(true);
    		cms.setCmOrder((short)0);
    		cms.setCmReID(0);
    		cms.sendMessages(userName);
        }        
        return bea;
    }
    
    
    /**
     * 
     * @param tID
     * @param moveID
     * @return
     * 2005-11-5 21:06:16 Made In GamVan
     * com.gamvan.club.topic
     */
    public boolean topicMove(int tID, int moveID){
        boolean bea = false;
        int ccidd;
        int ccid1=0, ccid2=0;
        int ccidd1=0;
        ClubClassInfo cci = new ClubClassInfo();
        ClubClassItem ccit = null;
        cci.setCcID(moveID);
        ccit = cci.getClubClassInfo();
        moveTxt = "从 " + ccName + " 移动到 " + ccit.getCcName();
        topicLogSo = "移动主题";
        ccidd = ccit.getCcIDD();
        if(ccidd>0){
            ccit = null;
            cci.setCcID(ccidd);
            ccit = cci.getClubClassInfo();
            ccid1 = ccidd;
            ccidd1 = ccit.getCcIDD();
            if(ccidd1>0){
                ccid2 = ccidd1;
            }
        }
        try{
        	ctim.topicMove(tID, moveCCID, ccid1, ccid2, byUser, now, saveLink);         
            bea = true;
            message= "主题移动成功!";
        }catch(Exception e){
            message= "您的操作触发一个美丽的意外,将不被执行,请重新尝试!<br/>"
                + e.toString();
            bea = false;
        }
        return bea;
    }
    
    /**
     * 对单独字段更新
     * @param tID
     * @param num
     * @param what
     * @return
     */
    public boolean topicFieldUpdate(int tid, String field, int num){
        boolean bea = false;
        StringBuffer hql = new StringBuffer();
        try{
            if(topicReID>0){
            	hql.append(" where topicReID=");
            	hql.append(topicReID);
                ctim.topicFieldUpdate_re(hql.toString(), field, num);
            }else{
            	hql.append(" where topicID=");
            	hql.append(tid);
            	ctim.topicFieldUpdate(hql.toString(), field, num);
            }
            bea = true;
        }catch(Exception e){
            message="抱歉!由于系统运行出现一个美丽的错误,您的操作将不能被执行,请重新尝试!";
            bea = false;
        }
        return bea;
    }
    
   /*
    public boolean topicIsDel(int tid, int reid, byte b){
    	boolean bea = false;
    	try{
    		if(reid>0){
    			ctd.topicGarbage(reid, true, b);
    			//ctim.topicIsDelUpdate_re(reid, b);
    			//ccim.contentReDel_(reid, b); //标记删除内容
    		}else{
    			//ctim.topicIsDelUpdate(tid, b);
    			ctd.topicGarbage(tid, false, b);
    		}
    		bea = true;
    	}catch(Exception e){
    		e.printStackTrace();
    	}
    	return bea;
    }
    */
    
    /**
     * 针对主题表 按发帖用户ID更新帖子单独字段
     * @param userid
     * @param num
     * @param what 0更新topicPro, 1更新topicOrder, 2更新topicIsDel
     * @return
     */
    public boolean topicFieldUpdate_userid (int userid, int num, int what){
        boolean bea = false;
        StringBuffer hql = new StringBuffer("");
        try{
        	hql.append(" where userID=");
        	hql.append(userid);
            if(what==0){
            	ctim.topicFieldUpdate(hql.toString(), "topicPro", num);
            }else if(what==1){
            	ctim.topicFieldUpdate(hql.toString(), "topicOrder", num);
            }else if(what==2){
            	
            	//ctim.topicFieldUpdate(hql.toString(), "topicIsDel", (byte)num);
            }
            bea = true;
        }catch(Exception e){
            message="抱歉!由于系统运行出现一个美丽的错误,您的操作将不能被执行,请重新尝试!";
            bea = false;
        }
        return bea;
    }
    /**
     * 针对回复表 按发帖用户ID更新帖子单独字段
     * @param userid
     * @param num
     * @param what 0更新topicPro, 1更新topicOrder, 2更新topicIsDel
     * @return
     * 2005-12-27 12:33:18 Made In GamVan
     * com.gamvan.club.topic
     */
    public boolean topicFieldUpdateRe_userid (int userid, int num, int what){
        boolean bea = false;
        StringBuffer hql = new StringBuffer("");
        try{
        	hql.append(" where userID=");
        	hql.append(userid);
            if(what==0){
            	ctim.topicFieldUpdate_re(hql.toString(), "topicPro", num);
            }else if(what==1){
            	ctim.topicFieldUpdate_re(hql.toString(), "topicOrder", num);
            }else if(what==2){
            	
            	//ctim.topicFieldUpdate_re(hql.toString(), "topicIsDel", (byte)num);
            }
            bea = true;
        }catch(Exception e){
            message="抱歉!由于系统运行出现一个美丽的错误,您的操作将不能被执行,请重新尝试!";
            bea = false;
        }
        return bea;
    }
    
    
    /*
    public static void main(String args[]){
        com.gamvan.conn.ConnClub.init();
        ClubTopicManage ctm= new ClubTopicManage();
        ctm.topicIsDel(8617,0,(byte)1);
        com.gamvan.conn.ConnClub.closeSession2();
    }
    */

    public String getMessage(){
        return this.message;
    }
    public String getByUser() {
        return byUser;
    }

    public void setByUser(String byUser) {
        this.byUser = byUser;
    }

    public int getByUserID() {
        return byUserID;
    }

    public void setByUserID(int byUserID) {
        this.byUserID = byUserID;
    }

    public String getByUserIP() {
        return byUserIP;
    }

    public void setByUserIP(String byUserIP) {
        this.byUserIP = byUserIP;
    }

    public String getCcName() {
        return ccName;
    }

    public void setCcName(String ccName) {
        this.ccName = ccName;
    }

    public String getMessage2() {
        return message2;
    }

    public void setMessage2(String message2) {
        this.message2 = message2;
    }

    public String getSaveLink() {
        return saveLink;
    }

    public void setSaveLink(String saveLink) {
        this.saveLink = saveLink;
    }

    public String getTopic() {
        return topic;
    }

    public void setTopic(String topic) {
        this.topic = topic;
    }

    public short getTopicLogByUserList() {
        return topicLogByUserList;
    }

    public void setTopicLogByUserList(short topicLogByUserList) {
        this.topicLogByUserList = topicLogByUserList;
    }

    public boolean getTopicLogList() {
        return topicLogList;
    }

    public void setTopicLogList(boolean topicLogList) {
        this.topicLogList = topicLogList;
    }

    public String getTopicLogSo() {
        return topicLogSo;
    }

    public void setTopicLogSo(String topicLogSo) {
        this.topicLogSo = topicLogSo;
    }

    public String getTopicLogTxt() {
        return topicLogTxt;
    }

    public void setTopicLogTxt(String topicLogTxt) {
        this.topicLogTxt = topicLogTxt;
    }

    public double getUserCredit() {
        return userCredit;
    }

    public void setUserCredit(double userCredit) {
        this.userCredit = userCredit;
    }

    public double getUserMark() {
        return userMark;
    }

    public void setUserMark(double userMark) {
        this.userMark = userMark;
    }

    public double getUserMoney() {
        return userMoney;
    }

    public void setUserMoney(double userMoney) {
        this.userMoney = userMoney;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public void setIsRe(boolean isRe) {
        this.isRe = isRe;
    }

    public void setAct(String act) {
        this.act = act;
    }

	public void setPostMsg(String postMsg) {
		this.postMsg = postMsg;
	}

	public void setUserMessage(String userMessage) {
		this.userMessage = userMessage;
	}
}
 

⌨️ 快捷键说明

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