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

📄 bbb_jsp.java

📁 论坛源码
💻 JAVA
字号:
package org.apache.jsp.web.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.io.*;
import java.util.*;
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;

public final class bbb_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent {

  public String getServletInfo() {
    return "database handler";
  }

  private static java.util.Vector _jspx_dependants;

  static {
    _jspx_dependants = new java.util.Vector(1);
    _jspx_dependants.add("/web/jsp/incdb.jsp");
  }

  public java.util.List getDependants() {
    return _jspx_dependants;
  }

  public void _jspService(HttpServletRequest request, HttpServletResponse response)
        throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;


    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html; charset=gb2312");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\r\n");
      out.write("\r\n");
request.setCharacterEncoding("gbk");
      out.write("\r\n");
      out.write("\r\n");
      out.write("<!--¿ªÊ¼µ¼Èëpackages-->\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("<!--µ¼Èë½áÊø-->");
      out.write('\r');
      out.write('\n');
      twm.bbsuser user = null;
      synchronized (_jspx_page_context) {
        user = (twm.bbsuser) _jspx_page_context.getAttribute("user", PageContext.PAGE_SCOPE);
        if (user == null){
          user = new twm.bbsuser();
          _jspx_page_context.setAttribute("user", user, PageContext.PAGE_SCOPE);
        }
      }
      out.write('\r');
      out.write('\n');
      twm.bbsboard board = null;
      synchronized (_jspx_page_context) {
        board = (twm.bbsboard) _jspx_page_context.getAttribute("board", PageContext.PAGE_SCOPE);
        if (board == null){
          board = new twm.bbsboard();
          _jspx_page_context.setAttribute("board", board, PageContext.PAGE_SCOPE);
        }
      }
      out.write('\r');
      out.write('\n');
      twm.bbs bbs = null;
      synchronized (_jspx_page_context) {
        bbs = (twm.bbs) _jspx_page_context.getAttribute("bbs", PageContext.PAGE_SCOPE);
        if (bbs == null){
          bbs = new twm.bbs();
          _jspx_page_context.setAttribute("bbs", bbs, PageContext.PAGE_SCOPE);
        }
      }
      out.write('\r');
      out.write('\n');

java.sql.ResultSet sqlRst; 
sqlRst=board.listBoard(7);
String boardmaster;
int boardid;
java.util.Date dateandtime= new java.util.Date();

      out.write("\r\n");
      out.write("\r\n");
      out.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" >\r\n");
      out.write("<html>\r\n");
      out.write("<head>\r\n");
      out.write("<title>bbs</title>\r\n");
      out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gbk\">\r\n");
      out.write("<style type=\"text/css\">\r\n");
      out.write("<!--\r\n");
      out.write("a\t\t\t{ text-decoration: none; color: #003366 }\r\n");
      out.write("a:hover\t\t\t{ text-decoration: underline }\r\n");
      out.write("body\t\t\t{ scrollbar-base-color: #F4F4F4; scrollbar-arrow-color: #000000; font-size: 12px; background-color: #EFFFCE }\r\n");
      out.write("table\t\t\t{ font: 12px Tahoma, Verdana; color: #000000 }\r\n");
      out.write("input,select,textarea\t{ font: 11px Tahoma, Verdana; color: #000000; font-weight: normal; background-color: #F4F4F4 }\r\n");
      out.write("form\t\t\t{ margin: 0; padding: 0}\r\n");
      out.write("select\t\t\t{ font: 11px Arial, Tahoma; color: #000000; font-weight: normal; background-color: #F4F4F4 }\r\n");
      out.write(".nav\t\t\t{ font: 12px Tahoma, Verdana; color: #000000; font-weight: bold }\r\n");
      out.write(".nav a\t\t\t{ color: #000000 }\r\n");
      out.write(".header\t\t\t{ font: 11px Tahoma, Verdana; color: #000000; font-weight: bold; background-color: #99CC66 }\r\n");
      out.write(".header a\t\t{ color: #000000 }\r\n");
      out.write(".category\t\t{ font: 11px Arial, Tahoma; color: #000000; background-color: #EFEFEF }\r\n");
      out.write(".tableborder\t\t{ background: #D6E0EF; border: 1px solid #000000 } \r\n");
      out.write(".singleborder\t\t{ font-size: 0px; line-height: 1px; padding: 0px; background-color: #F4F4F4 }\r\n");
      out.write(".smalltxt\t\t{ font: 11px Arial, Tahoma }\r\n");
      out.write(".outertxt\t\t{ font: 12px Tahoma, Verdana; color: #000000 }\r\n");
      out.write(".outertxt a\t\t{ color: #000000 }\r\n");
      out.write(".bold\t\t\t{ font-weight: bold }\r\n");
      out.write(".altbg1\t\t\t{ background: #F4F4F4 }\r\n");
      out.write(".altbg2\t\t\t{ background: #F8F8F8 }\r\n");
      out.write(".maintable\t\t{ width: 100%; background-color: #EFFFCE }\r\n");
      out.write("#Layer1 {\r\n");
      out.write("\tposition:absolute;\r\n");
      out.write("\tleft:205px;\r\n");
      out.write("\ttop:60px;\r\n");
      out.write("\twidth:60px;\r\n");
      out.write("\theight:48px;\r\n");
      out.write("\tz-index:1;\r\n");
      out.write("}\r\n");
      out.write("#Layer2 {\r\n");
      out.write("\tposition:absolute;\r\n");
      out.write("\tleft:205px;\r\n");
      out.write("\ttop:84px;\r\n");
      out.write("\twidth:79px;\r\n");
      out.write("\theight:38px;\r\n");
      out.write("\tz-index:1;\r\n");
      out.write("\tbackground-color: #FF00FF;\r\n");
      out.write("}\r\n");
      out.write("--></style>\r\n");
      out.write("<SCRIPT src=\"js/menu.js\"></SCRIPT>\r\n");
      out.write("</head>\r\n");
      out.write("\r\n");
      out.write("<body >\r\n");
      out.write("<table bgcolor=\"#EFFFCE\" width=\"101%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\">\r\n");
      out.write("  <tr>\r\n");
      out.write("    <div class=\"maintable\">\r\n");
      out.write("      <table cellspacing=\"1\" cellpadding=\"4\" width=\"98%\" align=\"center\" class=\"tableborder\">\r\n");
      out.write("        <tr class=\"header\">\r\n");
      out.write("          <td height=\"58\"><h1>\r\n");
      out.write("            <div align=\"center\">BBS</div>\r\n");
      out.write("            <h1></h1>\r\n");
      out.write("          </h1></td>\r\n");
      out.write("        </tr>\r\n");
      out.write("      </table>\r\n");
      out.write("    </div>\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td align=\"right\" class=\"smalltxt\"><span class=\"bold\">&raquo;</span> <span class=\"bold\">游客: &nbsp;</span> <a href=\"registry.jsp\" >注册</a> | <a href=\"login.jsp\">登录</a> </td>\r\n");
      out.write("    <td rowspan=\"2\" width=\"0\"></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("</table>\r\n");
      out.write("<center>\r\n");
      out.write("\r\n");
      out.write("\t  \r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("<table cellspacing=\"4\" cellpadding=\"0\" border=\"0\" width=\"98%\" align=\"center\" class=\"outertxt\">\r\n");
      out.write("<tr>\r\n");
      out.write("  <td width=\"90%\" class=\"smalltxt\">\r\n");
      out.write("  <a href=\"index.jsp\" target=\"_top\">返回首页 </a>|\r\n");
      out.write("  <a href=\"about.jsp\" target=\"rtop\"> 关于论坛 </a>|\r\n");
      out.write("  <a href=\"query.jsp\"> 帖子查询 </a>|\r\n");
      out.write("  <img src=\"images/hot_folder.gif\" name=\"bar1\"  width=\"25\" height=\"23\" id=bar1> \r\n");
      out.write("  <A  href=\"guanli.jsp\">管理员</A>\r\n");
      out.write(" <img src=\"images/hot_folder.gif\" id=bar2  width=\"25\" height=\"23\"> \r\n");
      out.write("  <A HREF=\"paihp.jsp\" target=\"_self\">排 行 榜|</a>\r\n");
      out.write("<img src=\"images/hot_folder.gif\" id=bar3  width=\"25\" height=\"23\"> \r\n");
      out.write("  <A HREF=\"grxx.jsp\" target=\"_self\">用户信息</a>\r\n");
      out.write("\t </td>\r\n");
      out.write("\t \r\n");
      out.write("  <td width=\"10%\" align=\"right\" nowrap class=\"smalltxt\">注册人数:<font color=\"#FF0000\">");
      out.print(user.countUser());
      out.write("</font>注册版面:<font color=\"#FF0000\">");
      out.print(board.countBoard());
      out.write("</font>共有帖子数:<font color=\"#FF0000\">");
      out.print(bbs.countBbs());
      out.write("</font>\r\n");
      out.write("  </td>\r\n");
      out.write("</tr></table>\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("<div class=\"maintable\">\r\n");
      out.write("<table cellspacing=\"1\" cellpadding=\"4\" width=\"98%\" align=\"center\" class=\"tableborder\">\r\n");
      out.write("<tr class=\"header\"><td height=\"65\"><p>  <img src=\"images/gb.gif\" width=\"18\" height=\"18\">论坛系统广播:</p>  <MARQUEE onmouseover=this.stop() onmouseout=this.start() width=\"98%\">\r\n");
      out.write("      希望大家相互灌水!</MARQUEE>\r\n");
      out.write("   </td></tr>\r\n");
      out.write("</table>\r\n");
      out.write("<br></div>\r\n");
      out.write("\r\n");
      out.write("<div class=\"maintable\">\r\n");
      out.write("  <table cellspacing=\"1\" cellpadding=\"4\" width=\"98%\" align=\"center\" class=\"tableborder\">\r\n");
      out.write("    <tr>\r\n");
      out.write("      <td height=\"32\" colspan=\"7\" class=\"header\"><table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\r\n");
      out.write("          <tr class=\"smalltxt\">\r\n");
      out.write("            <td class=\"bold\">");
  
while(sqlRst.next()){

      out.write("\r\n");
      out.write("                <a href=\"bbslist.jsp?boardid=");
      out.print(sqlRst.getString("boardid"));
      out.write('"');
      out.write('>');
      out.print(sqlRst.getString("boardname"));
      out.write("\r\n");
      out.write("                ");

}
//'sqlRst.close();

      out.write("\r\n");
      out.write("                </a></td>\r\n");
      out.write("          </tr>\r\n");
      out.write("      </table></td>\r\n");
      out.write("    </tr>\r\n");
      out.write("    <tr class=\"category\" align=\"center\">\r\n");
      out.write("      <td width=\"5%\">&nbsp;</td>\r\n");
      out.write("      <td width=\"51%\">论坛</td>\r\n");
      out.write("      <td width=\"5%\">主题</td>\r\n");
      out.write("      <td width=\"5%\">帖数</td>\r\n");
      out.write("      <td width=\"5%\">今日</td>\r\n");
      out.write("      <td width=\"13%\">最后发表</td>\r\n");
      out.write("      <td width=\"16%\">版主</td>\r\n");
      out.write("    </tr>\r\n");
      out.write("    <tbody id=\"category_19\" style=\"\">\r\n");
      out.write("      <tr>\r\n");
      out.write("\t  ");

	  String boardname,masterword;
	  boolean bl;
	  //int boardtopics;
	  java.sql.ResultSet rs;
	  boardname="";
      boardmaster="";
      masterword="";
	 // boardtopics=0;
      boardid=3;
	 
 

if (board.getBoardInfo(boardid)){
  boardid=board.getBoardId();
  boardname=board.getBoardName();
  boardmaster=board.getBoardMaster();
  masterword=board.getBoardMasterword();
 // boardtopics=board.getBoardTopics();
	}  
	  
      out.write("\r\n");
      out.write("        <td class=\"altbg1\" align=\"center\"><img src=\"images/forum.gif\" width=\"30\" height=\"29\"></td>\r\n");
      out.write("        <td class=\"altbg2\" align=\"left\" onMouseOver=\"this.className='altbg1'\" onMouseOut=\"this.className='altbg2'\"><a href=\"bbslist.jsp?boardid=");
      out.print(boardid);
      out.write('"');
      out.write('>');
      out.print(boardname);
      out.write("</a> <br>\r\n");
      out.write("            <br>\r\n");
      out.write("        </td>\r\n");
      out.write("        <td class=\"altbg1\" align=\"center\">4</td>\r\n");
      out.write("        <td class=\"altbg2\" align=\"center\">2</td>\r\n");
      out.write("        <td class=\"altbg1\" align=\"center\">0</td>\r\n");
      out.write("        <td class=\"altbg2\"><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\r\n");
      out.write("            <tr>\r\n");
      out.write("              <td align=\"right\" class=\"smalltxt\" title=\"标题: \" nowrap> 2006-7-4 08:22<br>\r\n");
      out.write("                by <a href=\"bbslist.jsp?boardid=1\">aa</a></td>\r\n");
      out.write("              <td nowrap>&nbsp;<a href=\"redirect.php?tid=40462&goto=lastpost#lastpost\"><img src=\"images/lastpost.gif\" width=\"14\" height=\"9\" border=\"0\"></a></td>\r\n");
      out.write("            </tr>\r\n");
      out.write("        </table></td>\r\n");
      out.write("        <td class=\"altbg1\" align=\"center\" style=\"word-break: keep-all\">");
      out.print(boardmaster);
      out.write("</td>\r\n");
      out.write("      </tr>\r\n");
      out.write("      <tr> </tr>\r\n");
      out.write("    </tbody>\r\n");
      out.write("  </table>\r\n");
      out.write("  <br>\r\n");
      out.write("\r\n");
      out.write("</div>\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("</center><br>\r\n");
      out.write("</body></html>\r\n");
      out.write("\r\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
}

⌨️ 快捷键说明

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