Package com.liusoft.dlog4j.beans

Examples of com.liusoft.dlog4j.beans.GuestBookBean


   * @return
   */
  public static GuestBookBean getMsg(int siteid, int msg_id){
    if(msg_id < 0)
      return null;
    GuestBookBean gbb = (GuestBookBean)getBean(GuestBookBean.class, msg_id);
    if(gbb.getSiteId()==siteid)
      return gbb;
    return null;
  }
View Full Code Here


      if(loginUser!=null){
        //�ж��Ƿ�Ϊվ��
        SiteBean site = SiteDAO.getSiteByID(msgform.getSid());
        if(site!=null && site.isOwner(loginUser)){
          //�ظ�����
          GuestBookBean gbean = GuestBookDAO.getMsg(msgform.getSid(), msgform.getId());
          if(gbean!=null){
            String reply = super.autoFiltrate(site,msgform.getReply());           
            if(reply.length()>MAX_GB_REPLY_LENGTH)
              reply = reply.substring(0, MAX_GB_REPLY_LENGTH);
            gbean.setReply(super.filterScriptAndStyle(reply));
            gbean.setReplyTime(new Date());
            GuestBookDAO.flush();
          }
        }
      }
    }
View Full Code Here

      //��������
      if(isUserInBlackList(site, loginUser)){
        msgs.add("message", new ActionMessage("error.user_in_blacklist"));
        break;
      }
      GuestBookBean msgbean = new GuestBookBean();
      String content = super.autoFiltrate(site,msgform.getContent());
      if(content.length()>MAX_GB_COUNT_LENGTH)
        content = content.substring(0, MAX_GB_COUNT_LENGTH);
      msgbean.setContent(super.filterScriptAndStyle(content));
      msgbean.setClient(new ClientInfo(request, 0));
      msgbean.setUser(loginUser);
      msgbean.setSiteId(site.getId());
      try{
        GuestBookDAO.createMsg(msgbean);
      }catch(HibernateException e){
        context().log("undelete diary failed.", e);
        msgs.add("message", new ActionMessage("error.database", e.getMessage()));
View Full Code Here

TOP

Related Classes of com.liusoft.dlog4j.beans.GuestBookBean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.