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

📄 showmsg.java

📁 天乙代码src_531.rar 天乙代码src_531.rar 天乙代码src_531.rar 天乙代码src_531.rar
💻 JAVA
字号:
package com.laoer.bbscs.bbs.business;

import org.apache.struts.util.*;
import java.util.*;
import com.laoer.bbscs.servlet.UserSessionCheck;
import com.laoer.bbscs.sysinfo.Sys;

/**
 * <p>Title: 天乙社区V5.0</p>
 * <p>Description: BBS-CS天乙社区V5.0</p>
 * <p>Copyright: Copyright (c) 2003</p>
 * <p>Company: laoer.com</p>
 * @author 龚天乙
 * @version 5.0
 */

public class ShowMsg {

  public ShowMsg() {
  }

  public static String getHeadAdv(MessageResources messages, Locale locale,
                                  String sid,
                                  UserSessionCheck myUserSessionCheck) {
    StringBuffer sb = new StringBuffer();
    //sb.append("<script language=\"JavaScript\">\n");
    //sb.append("function viewQQ(Url){\n");
    //sb.append("popup=window.open(Url,\"win2\",\"width=150,height=278,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no\");\n");
    //sb.append("}\n</script>\n");
    sb.append(
        "<table width=93% border=0 align=center cellpadding=0 cellspacing=1>\n");
    sb.append("<tr><td height=20><div align=center><span class='bt'>\n");
    if (!myUserSessionCheck.isGuest()) {
      sb.append(messages.getMessage(locale, "left.commserv") + ":");
      sb.append("<a href=\"" + Sys.getURL() + "searchfAction.do?sid=" + sid +
                "\" target=\"mainFrame\">" +
                messages.getMessage(locale, "left.searchid") + "</a> ");
      sb.append("<a href=\"" + Sys.getURL() + "noteAction.do?sid=" + sid +
                "&action=show\" target=\"mainFrame\">" +
                messages.getMessage(locale, "left.sendmsg") + "</a> ");
      sb.append("<a href=\"" + Sys.getURL() + "boardSaveAction.do?sid=" + sid +
                "&action=show\" target=\"mainFrame\">" +
                messages.getMessage(locale, "left.treasureup") + "</a> ");
      sb.append("<a href=\"" + Sys.getURL() + "peizhiAction.do?sid=" + sid +
                "\" target=\"mainFrame\">" +
                messages.getMessage(locale, "left.infoconf") + "</a> ");
      sb.append("<a href=\"" + Sys.getURL() + "inAction.do?sid=" + sid +
                "\" target=\"mainFrame\">" +
                messages.getMessage(locale, "bbscs.inpage") + "</a> ");
      sb.append("<a href=\"" + Sys.getURL() +
                "login.do?act=index\" target=\"_top\">" +
                messages.getMessage(locale, "bbscs.login") + "</a> ");
      sb.append("<a href=\"" + Sys.getURL() +
                "reg.jsp\" target=\"_top\">" +
                messages.getMessage(locale, "index.regnewuser") + "</a>");
    }
    else {
      sb.append(messages.getMessage(locale, "left.commserv") + ":");
      sb.append(messages.getMessage(locale, "left.searchid") + " ");
      sb.append(messages.getMessage(locale, "left.sendmsg") + " ");
      sb.append(messages.getMessage(locale, "left.treasureup") + " ");
      sb.append(messages.getMessage(locale, "left.infoconf") + " ");
      sb.append("<a href=\"" + Sys.getURL() + "inAction.do?sid=" + sid +
                "\" target=\"mainFrame\">" +
                messages.getMessage(locale, "bbscs.inpage") + "</a> ");
      //sb.append("<a href=\"index.jsp\" target=\"_top\">" + messages.getMessage(locale, "bbscs.login") + "</a> ");
      sb.append("<a href=\"" + Sys.getURL() +
                "login.do?act=index\" target=\"_top\">" +
                messages.getMessage(locale, "bbscs.login") + "</a> ");
      sb.append("<a href=\"" + Sys.getURL() +
                "reg.jsp\" target=\"_top\">" +
                messages.getMessage(locale, "index.regnewuser") + "</a>");
    }
    sb.append("</span></div></td></tr>\n");
    sb.append("<tr><td height=71><div align=center>\n");
    sb.append(Adv.getAdv());
    sb.append("</div></td></tr></table>\n");

    sb.append("<table width=\"98%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\n");
    sb.append("<form name=\"Searchform\" method=\"post\" action=\"" +
              Sys.getURL() +
              "searchAction.do\" target='mainFrame'>\n");
    sb.append("<tr> <td><div align=\"center\">\n");
    sb.append("<input name=\"query\" type=\"text\" id=\"query\">\n");
    sb.append("<input type=\"submit\" name=\"Submit\" value=\"全文检索\">\n");
    sb.append(
        "<input name=\"maxresults\" type=\"hidden\" id=\"maxresults\" value=\"100\">\n");
    sb.append(
        "<input name=\"sid\" type=\"hidden\" value=\"" + sid + "\">\n");
    sb.append("</div></td></tr></form><tr height=5><td></td></tr></table>");

    return sb.toString();
  }

  public static String getInHeadAdv(MessageResources messages, Locale locale,
                                    String sid,
                                    UserSessionCheck myUserSessionCheck) {
    StringBuffer sb = new StringBuffer();
    if (!myUserSessionCheck.isGuest()) {
      sb.append(messages.getMessage(locale, "left.commserv") + ":");
      sb.append("<a href=\"" + Sys.getURL() + "searchfAction.do?sid=" + sid +
                "\" target=\"mainFrame\">" +
                messages.getMessage(locale, "left.searchid") + "</a> ");
      sb.append("<a href=\"" + Sys.getURL() + "noteAction.do?sid=" + sid +
                "&action=show\" target=\"mainFrame\">" +
                messages.getMessage(locale, "left.sendmsg") + "</a> ");
      sb.append("<a href=\"" + Sys.getURL() + "boardSaveAction.do?sid=" + sid +
                "&action=show\" target=\"mainFrame\">" +
                messages.getMessage(locale, "left.treasureup") + "</a> ");
      sb.append("<a href=\"" + Sys.getURL() + "peizhiAction.do?sid=" + sid +
                "\" target=\"mainFrame\">" +
                messages.getMessage(locale, "left.infoconf") + "</a> ");
      sb.append("<a href=\"" + Sys.getURL() +
                "login.do?act=index\" target=\"_top\">" +
                messages.getMessage(locale, "bbscs.login") + "</a> ");
      sb.append("<a href=\"" + Sys.getURL() +
                "reg.jsp\" target=\"_top\">" +
                messages.getMessage(locale, "index.regnewuser") + "</a>");
      //sb.append("<a href=\"in.jsp\" target=\"mainFrame\">" + messages.getMessage(locale, "bbscs.inpage") + "</a>");
    }
    else {
      sb.append(messages.getMessage(locale, "left.commserv") + ":");
      sb.append(messages.getMessage(locale, "left.searchid") + " ");
      sb.append(messages.getMessage(locale, "left.sendmsg") + " ");
      sb.append(messages.getMessage(locale, "left.treasureup") + " ");
      sb.append(messages.getMessage(locale, "left.infoconf") + " ");
      //sb.append("<a href=\"in.jsp\" target=\"mainFrame\">" + messages.getMessage(locale, "bbscs.inpage") + "</a> ");
      sb.append("<a href=\"" + Sys.getURL() +
                "login.do?act=index\" target=\"_top\">" +
                messages.getMessage(locale, "bbscs.login") + "</a> ");
      sb.append("<a href=\"" + Sys.getURL() +
                "reg.jsp\" target=\"_top\">" +
                messages.getMessage(locale, "index.regnewuser") + "</a>");
    }
    return sb.toString();
  }

}

⌨️ 快捷键说明

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