Package net.sf.l2j.gameserver.communitybbs.BB

Examples of net.sf.l2j.gameserver.communitybbs.BB.Topic


      activeChar.sendPacket(new ShowBoard(null,"102"));
      activeChar.sendPacket(new ShowBoard(null,"103"));
    }
    else
    {
      Topic t = f.gettopic(idt);
      if(t == null)
      {
        ShowBoard sb = new ShowBoard("<html><body><br><br><center>the topic: "+idt+" does not exist !</center><br><br></body></html>","101");
        activeChar.sendPacket(sb);
        activeChar.sendPacket(new ShowBoard(null,"102"));
        activeChar.sendPacket(new ShowBoard(null,"103"));
      }
      else
      {
        CPost cp = null;
        Post p = getGPosttByTopic(t);
        if(p != null)
        {
          cp = p.getCPost(idp);
        }
        if(cp == null)
        {
          ShowBoard sb = new ShowBoard("<html><body><br><br><center>the post: "+idp+" does not exist !</center><br><br></body></html>","101");
          activeChar.sendPacket(sb);
          activeChar.sendPacket(new ShowBoard(null,"102"));
          activeChar.sendPacket(new ShowBoard(null,"103"));
        }
        else
        {
          p.getCPost(idp).postTxt = ar4;
          p.updatetxt(idp);
          parsecmd("_bbsposts;read;"+ f.getID() +";"+ t.getID(),activeChar);
        }
      }
    }
  }
View Full Code Here


        activeChar.sendPacket(new ShowBoard(null, "103"));
      }
      else
      {
        f.vload();
        Topic t = new Topic(Topic.ConstructorType.CREATE,
                  TopicBBSManager.getInstance().getMaxID(f) + 1,
                  Integer.parseInt(ar2), ar5,
                  Calendar.getInstance().getTimeInMillis(), activeChar.getName(),
                  activeChar.getObjectId(), Topic.MEMO, 0);
        f.addtopic(t);
        TopicBBSManager.getInstance().setMaxID(t.getID(), f);
        Post p = new Post(activeChar.getName(), activeChar.getObjectId(),
                  Calendar.getInstance().getTimeInMillis(), t.getID(), f.getID(), ar4);
        PostBBSManager.getInstance().addPostByTopic(p, t);
        parsecmd("_bbsmemo", activeChar);
      }

    }
    else if (ar1.equals("del"))
    {
      Forum f = ForumsBBSManager.getInstance().getForumByID(Integer.parseInt(ar2));
      if (f == null)
      {
        ShowBoard sb = new ShowBoard("<html><body><br><br><center>the forum: " + ar2
          + " does not exist !</center><br><br></body></html>", "101");
        activeChar.sendPacket(sb);
        activeChar.sendPacket(new ShowBoard(null, "102"));
        activeChar.sendPacket(new ShowBoard(null, "103"));
      }
      else
      {
        Topic t = f.gettopic(Integer.parseInt(ar3));
        if (t == null)
        {
          ShowBoard sb = new ShowBoard("<html><body><br><br><center>the topic: " + ar3
            + " does not exist !</center><br><br></body></html>", "101");
          activeChar.sendPacket(sb);
          activeChar.sendPacket(new ShowBoard(null, "102"));
          activeChar.sendPacket(new ShowBoard(null, "103"));
        }
        else
        {
          //CPost cp = null;
          Post p = PostBBSManager.getInstance().getGPosttByTopic(t);
          if (p != null)
          {
            p.deleteme(t);
          }
          t.deleteme(f);
          parsecmd("_bbsmemo", activeChar);
        }
      }
    }
    else
View Full Code Here

        activeChar.sendPacket(new ShowBoard(null, "102"));
        activeChar.sendPacket(new ShowBoard(null, "103"));
      }
      else
      {
        Topic t = f.gettopic(idt);
        if (t == null)
        {
          ShowBoard sb = new ShowBoard("<html><body><br><br><center>the topic: " + idt
            + " does not exist !</center><br><br></body></html>", "101");
          activeChar.sendPacket(sb);
          activeChar.sendPacket(new ShowBoard(null, "102"));
          activeChar.sendPacket(new ShowBoard(null, "103"));
        }
        else
        {
          //CPost cp = null;
          Post p = PostBBSManager.getInstance().getGPosttByTopic(t);
          if (p != null)
          {
            p.deleteme(t);
          }
          t.deleteme(f);
          parsecmd("_bbsmemo", activeChar);
        }
      }
    }
    else
View Full Code Here

    {
      if (j < 0)
      {
        break;
      }
      Topic t = forum.gettopic(j);
      if (t != null)
      {
        if (i >= 12 * (index - 1))
        {
          html.append("<table border=0 cellspacing=0 cellpadding=5 WIDTH=610>");
          html.append("<tr>");
          html.append("<td FIXWIDTH=5></td>");
          html.append("<td FIXWIDTH=415><a action=\"bypass _bbsposts;read;" + forum.getID()
            + ";" + t.getID() + "\">" + t.getName() + "</a></td>");
          html.append("<td FIXWIDTH=120 align=center></td>");
          html.append("<td FIXWIDTH=70 align=center>"
            + DateFormat.getInstance().format(new Date(t.getDate())) + "</td>");
          html.append("</tr>");
          html.append("</table>");
          html.append("<img src=\"L2UI.Squaregray\" width=\"610\" height=\"1\">");
        }
        i++;
View Full Code Here

TOP

Related Classes of net.sf.l2j.gameserver.communitybbs.BB.Topic

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.