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

📄 customermanage_0002ejsp_jsp.java

📁 网上书店,JSP,MYSQL,struct,spring,hibernate
💻 JAVA
字号:
import java.sql.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;


public class customerManage_0002ejsp_jsp extends HttpJspBase {


    static {
    }
    public customerManage_0002ejsp_jsp( ) {
    }

    private static boolean _jspx_inited = false;

    public final void _jspx_init() throws org.apache.jasper.runtime.JspException {
    }

    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;
        String  _value = null;
        try {

            if (_jspx_inited == false) {
                synchronized (this) {
                    if (_jspx_inited == false) {
                        _jspx_init();
                        _jspx_inited = true;
                    }
                }
            }
            _jspxFactory = JspFactory.getDefaultFactory();
            response.setContentType("text/html; charset=gb2312");
            pageContext = _jspxFactory.getPageContext(this, request, response,
            			"", true, 8192, true);

            application = pageContext.getServletContext();
            config = pageContext.getServletConfig();
            session = pageContext.getSession();
            out = pageContext.getOut();

            // HTML // begin [file="/customerManage.jsp";from=(0,52);to=(1,0)]
                out.write("\r\n");

            // end
            // HTML // begin [file="/customerManage.jsp";from=(1,30);to=(2,0)]
                out.write("\r\n");

            // end
            // HTML // begin [file="/customerManage.jsp";from=(2,31);to=(3,0)]
                out.write("\r\n");

            // end
            // begin [file="/customerManage.jsp";from=(3,2);to=(3,38)]
                request.setCharacterEncoding("GBK");
            // end
            // HTML // begin [file="/customerManage.jsp";from=(3,40);to=(11,0)]
                out.write("\r\n<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n<title>客户管理</title>\r\n<style type=\"text/css\">\r\n</style>\r\n</head>\r\n");

            // end
            // begin [file="/customerManage.jsp";from=(11,2);to=(11,47)]
                 if(session.getAttribute("adminId")==null) { 
            // end
            // HTML // begin [file="/customerManage.jsp";from=(11,49);to=(12,0)]
                out.write("\r\n");

            // end
            // begin [file="/customerManage.jsp";from=(12,0);to=(12,36)]
                if (true) {
                    out.clear();
                    String _jspx_qfStr = "";
                    pageContext.forward("/notLogin.jsp" +  _jspx_qfStr);
                    return;
                }
            // end
            // HTML // begin [file="/customerManage.jsp";from=(12,36);to=(13,0)]
                out.write("\r\n");

            // end
            // begin [file="/customerManage.jsp";from=(13,2);to=(13,12)]
                 } else { 
            // end
            // HTML // begin [file="/customerManage.jsp";from=(13,14);to=(39,0)]
                out.write("\r\n<body>\r\n<div id=\"pagecell1\" style=\"background-image:url(images/bg1.gif)\">\r\n <table width=\"100%\" border=\"0\">\r\n  <tr valign=\"top\" style=\"background-image:url(images/bg1.gif)\"> <td width=\"81%\" >\r\n<div class=\"book\">\r\n\t  <form name=\"form\" method=\"post\" action=\"DeleteUser.jsp\">\r\n\t <table width=\"100%\" border=\"0\" >\r\n   <tr> <td  bgcolor=\"#FFFFFF\" >&nbsp;</td> </tr>\r\n    <tr>\r\n      <td height=\"11\" bgcolor=\"#FFFFFF\" >\r\n\t  <table width=\"100%\" border=\"0\" >\r\n            <tr>\r\n              <td width=\"5%\"><div align=\"center\">删除</div></td>\r\n\t\t\t  <td width=\"10%\"><div align=\"center\">顾客ID</div></td>\r\n              <td width=\"10%\"><div align=\"center\">姓名</div></td>\r\n\t\t\t  <td width=\"5%\"><div align=\"center\">性别</div></td>\r\n                   <td width=\"18%\"><div align=\"center\">E-mail</div></td>\r\n               <td width=\"10%\"><div align=\"center\">邮编</div></td>\r\n                       <td width=\"30%\"><div align=\"center\">地址</div></td>\r\n             <td width=\"12%\"><div align=\"center\">电话</div></td>\r\n\r\n            </tr>\r\n            <tr>\r\n              <td colspan=\"8\"><hr></td>\r\n              </tr>\r\n");

            // end
            // begin [file="/customerManage.jsp";from=(39,2);to=(60,0)]
                 String pg="";
                if(request.getParameter("pg")==null){
                pg="1";
                }else{
                	pg=request.getParameter("pg");
                        }
                        int index=(Integer.parseInt(pg)-1)*30;
                
                 try{
                	Class.forName("sun.jdbc.odbc.JdbcOdbcDriver") ;
                	Connection con=DriverManager.getConnection("jdbc:odbc:Shopping");
                	Statement stmt=con.createStatement();
                	ResultSet resultset=stmt.executeQuery("select * from users");
                	        for(int i=0;i<index;i++){
                				resultset.next();
                			}
                			int n=0;
                		    while(resultset.next()&&n<30){
                			n++;
                			int userId=resultset.getInt("userID");
                
            // end
            // HTML // begin [file="/customerManage.jsp";from=(60,2);to=(63,49)]
                out.write("\r\n <tr>\r\n  <td ><div align=\"center\">\r\n    <input name=\"userId\" type=\"checkbox\"  value=\"");

            // end
            // begin [file="/customerManage.jsp";from=(63,52);to=(63,58)]
                out.print(userId);
            // end
            // HTML // begin [file="/customerManage.jsp";from=(63,60);to=(64,30)]
                out.write("\"> </div></td>\r\n\t\t\t  <td ><div align=\"center\">");

            // end
            // begin [file="/customerManage.jsp";from=(64,33);to=(64,39)]
                out.print(userId);
            // end
            // HTML // begin [file="/customerManage.jsp";from=(64,41);to=(65,27)]
                out.write("</div></td>\r\n  <td ><div align=\"center\">");

            // end
            // begin [file="/customerManage.jsp";from=(65,30);to=(65,63)]
                out.print( resultset.getString("username") );
            // end
            // HTML // begin [file="/customerManage.jsp";from=(65,65);to=(66,27)]
                out.write("</div></td>\r\n   <td><div align=\"center\">");

            // end
            // begin [file="/customerManage.jsp";from=(66,30);to=(66,58)]
                out.print( resultset.getString("sex") );
            // end
            // HTML // begin [file="/customerManage.jsp";from=(66,60);to=(67,28)]
                out.write("</div></td>\r\n    <td><div align=\"center\">");

            // end
            // begin [file="/customerManage.jsp";from=(67,31);to=(67,61)]
                out.print( resultset.getString("Email") );
            // end
            // HTML // begin [file="/customerManage.jsp";from=(67,63);to=(68,29)]
                out.write("</div></td>\r\n     <td><div align=\"center\">");

            // end
            // begin [file="/customerManage.jsp";from=(68,32);to=(68,65)]
                out.print( resultset.getString("postcode") );
            // end
            // HTML // begin [file="/customerManage.jsp";from=(68,67);to=(69,30)]
                out.write("</div></td>\r\n      <td><div align=\"center\">");

            // end
            // begin [file="/customerManage.jsp";from=(69,33);to=(69,65)]
                out.print( resultset.getString("address") );
            // end
            // HTML // begin [file="/customerManage.jsp";from=(69,67);to=(70,31)]
                out.write("</div></td>\r\n       <td><div align=\"center\">");

            // end
            // begin [file="/customerManage.jsp";from=(70,34);to=(70,68)]
                out.print( resultset.getString("telephone") );
            // end
            // HTML // begin [file="/customerManage.jsp";from=(70,70);to=(72,0)]
                out.write("</div></td>\r\n </tr>\r\n");

            // end
            // begin [file="/customerManage.jsp";from=(72,2);to=(74,1)]
                
                  }
                 
            // end
            // HTML // begin [file="/customerManage.jsp";from=(74,3);to=(84,2)]
                out.write("\r\n </table>\r\n </td>\r\n</tr> <tr>\r\n<td height=\"5\" background=\"source/glbnav_background.gif\" bgcolor=\"#FFFFFF\" >&nbsp;</td> </tr>\r\n </table>\r\n<table width=\"100%\" border=\"0\">  <tr>\r\n <td width=\"50%\"><input type=\"submit\" name=\"Submit\" value=\"删除\"></td>\r\n<td width=\"50%\"><a href=\"adminMenu.jsp\">返回 </a></td>\r\n <td width=\"50%\">\r\n  ");

            // end
            // begin [file="/customerManage.jsp";from=(84,4);to=(88,30)]
                
                    String pre="/bookshop/bookManage.jsp?pg="+Integer.toString(index/30);
                     String aft="/bookshop/bookManage.jsp?pg="+Integer.toString(index/30+2);
                       if(pg.equals("1")){
                       if(resultset.next()){  
            // end
            // HTML // begin [file="/customerManage.jsp";from=(88,32);to=(89,39)]
                out.write("\r\n       \t<div align=\"right\">上一页/<a href=");

            // end
            // begin [file="/customerManage.jsp";from=(89,42);to=(89,47)]
                out.print( aft );
            // end
            // HTML // begin [file="/customerManage.jsp";from=(89,49);to=(90,8)]
                out.write(">下一页</a></div>\r\n        ");

            // end
            // begin [file="/customerManage.jsp";from=(90,10);to=(90,19)]
                	}else{  
            // end
            // HTML // begin [file="/customerManage.jsp";from=(90,21);to=(92,8)]
                out.write("\r\n        <div align=\"right\">上一页/下一页</div>\r\n        ");

            // end
            // begin [file="/customerManage.jsp";from=(92,10);to=(94,32)]
                	}
                         } else {
                         if(resultset.next()){  
            // end
            // HTML // begin [file="/customerManage.jsp";from=(94,34);to=(95,36)]
                out.write("\r\n         <div align=\"right\"><a href=");

            // end
            // begin [file="/customerManage.jsp";from=(95,39);to=(95,42)]
                out.print(pre);
            // end
            // HTML // begin [file="/customerManage.jsp";from=(95,44);to=(95,61)]
                out.write(">上一页</a>/<a href=");

            // end
            // begin [file="/customerManage.jsp";from=(95,64);to=(95,69)]
                out.print( aft );
            // end
            // HTML // begin [file="/customerManage.jsp";from=(95,71);to=(96,9)]
                out.write(">下一页</a></div>\r\n         ");

            // end
            // begin [file="/customerManage.jsp";from=(96,11);to=(96,22)]
                 	} else { 
            // end
            // HTML // begin [file="/customerManage.jsp";from=(96,24);to=(97,37)]
                out.write("\r\n         \t<div align=\"right\"><a href=");

            // end
            // begin [file="/customerManage.jsp";from=(97,40);to=(97,43)]
                out.print(pre);
            // end
            // HTML // begin [file="/customerManage.jsp";from=(97,45);to=(98,6)]
                out.write(">上一页</a>/下一页</div>\r\n      ");

            // end
            // begin [file="/customerManage.jsp";from=(98,8);to=(102,2)]
                }
                       }
                  }catch(Exception e)
                { out.println(e);}
                  
            // end
            // HTML // begin [file="/customerManage.jsp";from=(102,4);to=(110,0)]
                out.write("</td> </tr>\r\n  </table>\r\n</form>\r\n</div></td></tr>\r\n</table>\r\n</div>\r\n<br>\r\n</body>\r\n");

            // end
            // begin [file="/customerManage.jsp";from=(110,2);to=(110,5)]
                 } 
            // end
            // HTML // begin [file="/customerManage.jsp";from=(110,7);to=(114,0)]
                out.write("\r\n</html>\r\n\r\n\r\n");

            // end

        } catch (Throwable t) {
            if (out != null && out.getBufferSize() != 0)
                out.clearBuffer();
            if (pageContext != null) pageContext.handlePageException(t);
        } finally {
            if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
        }
    }
}

⌨️ 快捷键说明

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