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

📄 point_jsp.java

📁 论坛源码
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
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 point_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("GB2312");
      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');

String tempSTR,strSQL;//                       '执行的SQL语句
java.sql.ResultSet sqlRst;				   
java.sql.ResultSet sqlRst2;				   
int i,pages;

String errmsg=request.getParameter("errmsg");

tempSTR=request.getParameter("pages");
if (tempSTR==null){
 pages=0;
}
else
{
 pages=java.lang.Integer.parseInt(tempSTR);
}
//'
//'
//'pages=1  个人积分排行榜
//'pages=2  论坛点击率
//'pages=3  论坛主题数
//'
//'

      out.write("\r\n");
      out.write("\r\n");
      out.write("<html>\r\n");
      out.write("\r\n");
      out.write("<head>\r\n");
      out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset= gb2312\">\r\n");
      out.write("<meta name=\"GENERATOR\" content=\"Microsoft FrontPage 4.0\">\r\n");
      out.write("<meta name=\"ProgId\" content=\"FrontPage.Editor.Document\">\r\n");
      out.write("<title>New Page 4</title>\r\n");
      out.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"bbs03.css\">\r\n");
      out.write("</head>\r\n");
      out.write("\r\n");
      out.write("<body>\r\n");

if ((pages==1)||(pages==0)) {

      out.write("\r\n");
      out.write("<div align=\"center\">\r\n");
      out.write("  <center>\r\n");
      out.write("        <table border=\"1\" width=\"90%\"  bgcolor=\"#EFFFCE\" bordercolorlight=\"#000000\" bordercolordark=\"#FFFFFF\" cellspacing=\"0\" cellpadding=\"0\">\r\n");
      out.write("          <tr>\r\n");
      out.write("            <td width=\"100%\" bgcolor=\"#99CC66\" bordercolorlight=\"#000000\" bordercolordark=\"#FFFFFF\" colspan=\"6\">\r\n");
      out.write("              <p align=\"center\"><font color=\"#FFFFFF\"><b>个人积分排行榜</b></font></td>\r\n");
      out.write("          </tr>\r\n");
      out.write("          <tr>\r\n");
      out.write("            <td width=\"17%\" bordercolorlight=\"#000000\" bordercolordark=\"#FFFFFF\" align=\"center\">\r\n");
      out.write("              <b>排名</b></td>\r\n");
      out.write("            <td width=\"17%\" bordercolorlight=\"#000000\" bordercolordark=\"#FFFFFF\" align=\"center\">\r\n");
      out.write("              <b>姓名</b></td>\r\n");
      out.write("            <td width=\"17%\" bordercolorlight=\"#000000\" bordercolordark=\"#FFFFFF\" align=\"center\">\r\n");
      out.write("              <b>积分</b></td>\r\n");
      out.write("            <td width=\"17%\" bordercolorlight=\"#000000\" bordercolordark=\"#FFFFFF\" align=\"center\">\r\n");
      out.write("              <b>排名</b></td>\r\n");
      out.write("            <td width=\"16%\" bordercolorlight=\"#000000\" bordercolordark=\"#FFFFFF\" align=\"center\">\r\n");
      out.write("              <b>姓名</b></td>\r\n");
      out.write("            <td width=\"16%\" bordercolorlight=\"#000000\" bordercolordark=\"#FFFFFF\" align=\"center\">\r\n");
      out.write("              <b>积分</b></td>\r\n");
      out.write("          </tr>\r\n");
      out.write("\r\n");

i=1;
sqlRst=user.listUser(3);
while ((sqlRst.next())&&(i<=20)){

      out.write("\r\n");
      out.write("          <tr>\r\n");
      out.write("            <td width=\"17%\" bordercolorlight=\"#000000\" bordercolordark=\"#FFFFFF\" align=\"center\">\r\n");
      out.write("              ");
      out.print(i);
      out.write("</td>\r\n");
      out.write("            <td width=\"17%\" bordercolorlight=\"#000000\" bordercolordark=\"#FFFFFF\" align=\"center\">\r\n");
      out.write("              ");
      out.print(sqlRst.getString("username"));
      out.write("</td>\r\n");
      out.write("            <td width=\"17%\" bordercolorlight=\"#000000\" bordercolordark=\"#FFFFFF\" align=\"center\">\r\n");
      out.write("              ");
      out.print(sqlRst.getString("userclass"));
      out.write("</td>\r\n");

i++;
if (!sqlRst.next()){
  continue;
}

      out.write("\r\n");
      out.write("            <td width=\"17%\" bordercolorlight=\"#000000\" bordercolordark=\"#FFFFFF\" align=\"center\">\r\n");
      out.write("              ");
      out.print(i);
      out.write("</td>\r\n");
      out.write("            <td width=\"17%\" bordercolorlight=\"#000000\" bordercolordark=\"#FFFFFF\" align=\"center\">\r\n");
      out.write("              ");
      out.print(sqlRst.getString("username"));
      out.write("</td>\r\n");
      out.write("            <td width=\"17%\" bordercolorlight=\"#000000\" bordercolordark=\"#FFFFFF\" align=\"center\">\r\n");
      out.write("              ");
      out.print(sqlRst.getString("userclass"));
      out.write("</td>\r\n");
      out.write("          </tr>\r\n");
      out.write("         \r\n");

i++;
}   //'		 while ((strRst.next())&&(i<=20))
sqlRst.close();

      out.write("          \r\n");
      out.write("        </table>\r\n");

⌨️ 快捷键说明

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