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

📄 huiyuanguanli_jsp.java

📁 用JSP制作的个人网站
💻 JAVA
字号:
package org.apache.jsp.guanli;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
import liangjuyan.conndb;

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

  private static java.util.Vector _jspx_dependants;

  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,
      			"", 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");

conndb conn=new conndb();
ResultSet rs=conn.executeQuery("select * from tb_Member");

      out.write("\r\n");
      out.write("<html>\r\n");
      out.write("<head>\r\n");
      out.write("<title>后台管理</title>\r\n");
      out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n");
      out.write("\r\n");
      out.write("</head>\r\n");
      out.write("\r\n");
      out.write("<body onLoad=\"clockon(bgclock)\">\r\n");
      out.write("<table width=\"777\" height=\"192\"  border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tableBorder\">\r\n");
      out.write("<tr>\r\n");
      out.write("  <td>\r\n");
      org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "banner.jsp", out, false);
      out.write("\r\n");
      out.write("<table width=\"777\" height=\"288\"  border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td width=\"182\" valign=\"top\"><table width=\"100%\" height=\"431\"  border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
      out.write("      <tr>\r\n");
      out.write("        <td valign=\"top\" background=\"../images/manage_02.gif\">");
      org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "navigation.jsp", out, false);
      out.write("</td>\r\n");
      out.write("      </tr>\r\n");
      out.write("    </table></td>\r\n");
      out.write("    <td align=\"center\" valign=\"top\"><table width=\"100%\" height=\"120\"  border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
      out.write("      <tr>\r\n");
      out.write("        <td valign=\"top\" background=\"../images/manage_03.gif\"><table width=\"100%\" height=\"36\"  border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
      out.write("          <tr>\r\n");
      out.write("            <td width=\"98%\" align=\"right\"><a href=\"addqita.jsp\">[ <img src=\"../images/list.gif\" width=\"11\" height=\"13\">添加其他信息管理]</a>&nbsp;<a href=\"addfuzhuang.jsp\">[ <img src=\"../images/list.gif\" width=\"11\" height=\"13\">添加服装信息管理]</a>&nbsp;<a href=\"addshipin.jsp\">[ <img src=\"../images/list.gif\" width=\"11\" height=\"13\">添加饰品信息管理]</a>&nbsp;<a href=\"addshenghuoyongpin.jsp\">[ <img src=\"../images/list.gif\" width=\"11\" height=\"13\">&nbsp;添加生活用品信息]</a></td>\r\n");
      out.write("            <td width=\"2%\">&nbsp;</td>\r\n");
      out.write("          </tr>\r\n");
      out.write("        </table></td>\r\n");
      out.write("      </tr>\r\n");
      out.write("    </table>\r\n");
      out.write("      <table width=\"92%\" height=\"192\"  border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
      out.write("        <tr>\r\n");
      out.write("          <td valign=\"top\">\r\n");
      out.write("<table width=\"100%\" height=\"14\"  border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
      out.write("            <tr>\r\n");
      out.write("              <td height=\"13\" align=\"center\">&nbsp;</td>\r\n");
      out.write("            </tr>\r\n");
      out.write("          </table>\r\n");
      out.write("            <table width=\"100%\" height=\"48\"  border=\"1\" cellpadding=\"0\" cellspacing=\"0\" bordercolor=\"#FFFFFF\" bordercolordark=\"#CCCCCC\" bordercolorlight=\"#FFFFFF\">\r\n");
      out.write("              <tr bgcolor=\"#eeeeee\">\r\n");
      out.write("                <td width=\"22%\" height=\"24\" align=\"center\">商品名称</td>\r\n");
      out.write("\r\n");
      out.write("                <td width=\"8%\" align=\"center\">修改</td>\r\n");
      out.write("                <td width=\"8%\" align=\"center\">删除</td>\r\n");
      out.write("              </tr>\r\n");

String str=(String)request.getParameter("Page");
if(str==null){
	str="0";
}
int pagesize=10;
rs.last();
int RecordCount=rs.getRow();
int maxPage=0;
maxPage=(RecordCount%pagesize==0)?(RecordCount/pagesize):(RecordCount/pagesize+1);

int Page=Integer.parseInt(str);
if(Page<1){
	Page=1;
}else{
	if(Page>maxPage){
		Page=maxPage;
	}
}
rs.absolute((Page-1)*pagesize+1);
for(int i=1;i<=pagesize;i++){
	  int ID=rs.getInt("ID");
	  String username=rs.getString("username");

	  
      out.write("\r\n");
      out.write("\r\n");
      out.write("              <tr style=\"padding:5px;\">\r\n");
      out.write("\r\n");
      out.write("                <td height=\"20\" align=\"center\">");
      out.print(username);
      out.write("</a></td>\r\n");
      out.write("               <td align=\"center\"><a href=\"huiyuan_modify.jsp?ID=");
      out.print(ID);
      out.write("\"><img src=\"../images/modify.gif\" width=\"15\" height=\"15\"></a></td>\r\n");
      out.write("                  <td align=\"center\"><a href=\"huiyuan_del.jsp?ID=");
      out.print(ID);
      out.write("\"><img src=\"../images/del.gif\" width=\"16\" height=\"16\"></a></td>\r\n");
      out.write("              </tr>\r\n");

	try{
		if(!rs.next()){break;}
		}catch(Exception e){}
}

      out.write("\r\n");
      out.write("            </table>\r\n");
      out.write("<table width=\"100%\"  border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td align=\"right\">当前页数:[");
      out.print(Page);
      out.write('/');
      out.print(maxPage);
      out.write("]&nbsp;\r\n");
      out.write("\t");
if(Page>1){
      out.write("\r\n");
      out.write("\t<a href=\"index.jsp?Page=1\">第一页</a> <a href=\"index.jsp?Page=");
      out.print(Page-1);
      out.write("\">上一页</a>\r\n");
      out.write("\t");

	}
	if(Page<maxPage){
	
      out.write("\r\n");
      out.write("\t <a href=\"index.jsp?Page=");
      out.print(Page+1);
      out.write("\">下一页</a> <a href=\"index.jsp?Page=");
      out.print(maxPage);
      out.write("\">最后一页&nbsp;</a>\r\n");
      out.write("\t");
}
	
      out.write("\r\n");
      out.write("\t</td>\r\n");
      out.write("  </tr>\r\n");
      out.write("</table>\t\t  </td>\r\n");
      out.write("        </tr>\r\n");
      out.write("      </table>\r\n");
      out.write("      <table width=\"100%\" height=\"46\"  border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
      out.write("        <tr>\r\n");
      out.write("          <td background=\"../images/manage_06.gif\">&nbsp;</td>\r\n");
      out.write("        </tr>\r\n");
      out.write("      </table></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("</table>\r\n");
      out.write("<table width=\"777\"  border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td height=\"54\" align=\"center\"></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("</table>\r\n");
      out.write("</td>\r\n");
      out.write("</tr>\r\n");
      out.write("</table>\r\n");
      out.write("</body>\r\n");
      out.write("</html>\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 + -