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

📄 showuser_jsp.java

📁 jsp mysql 实现网上购物系统
💻 JAVA
字号:
package org.apache.jsp.manage;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import com.mybusiness.web.ware.shopuser;

public final class showuser_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,
      			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");

if (session.getAttribute("admin")==null || session.getAttribute("admin")==""){
	response.sendRedirect("error.htm");
} 
      out.write("\r\n");
      out.write("\r\n");
      com.mybusiness.web.usermn user = null;
      synchronized (_jspx_page_context) {
        user = (com.mybusiness.web.usermn) _jspx_page_context.getAttribute("user", PageContext.PAGE_SCOPE);
        if (user == null){
          user = new com.mybusiness.web.usermn();
          _jspx_page_context.setAttribute("user", user, PageContext.PAGE_SCOPE);
        }
      }
      out.write('\r');
      out.write('\n');

long userid=0;
String mesg = "";

if (request.getParameter("userid")!=null && !request.getParameter("userid").equals("")) {
	try {
		userid = Long.parseLong(request.getParameter("userid"));
		if (!user.getUserinfo(userid)) {
			mesg = "要查询的用户信息不存在";
		}
	} catch(Exception e) {
		mesg = "该用户号不存在!";
	}
}

if (request.getParameter("action")!=null && request.getParameter("action").equals("del")){
	try{
		long id = Long.parseLong(request.getParameter("userid"));
		if (user.delete(id)) {
			mesg = "删除操作成功";
		} else {
			mesg = "删除操作出错";
		}
	} catch (Exception e) {
		mesg = "你要删除的用户号错误";
	}
}


      out.write("\r\n");
      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("<link rel=\"stylesheet\" href=\"books.css\" type=\"text/css\">\r\n");
      out.write("</head>\r\n");
      out.write("\r\n");
      out.write("<body  background=../images/112.gif text=\"#000000\" onload=\"javascript:window.focus();\">\r\n");
      out.write("<div align=\"center\">\r\n");
      out.write("\r\n");
      out.write("        <p>欢迎你,商场翱游购物系统管理员同志。...............</p>\r\n");
      out.write("        <p>查看用户详细情况:</p>\r\n");
      out.write("\t\t");
 if (!mesg.equals("")){
			out.println("<font color=red>"+ mesg +"</font><br><br>"); 
		} else {
			shopuser userinfo = (shopuser)user.getUserlist().elementAt(0);
		
      out.write("\r\n");
      out.write("\t<table width=\"95%\" border=\"1\" cellspacing=\"1\" cellpadding=\"1\" bordercolor=\"#2DAE2D\">\r\n");
      out.write("\t  <tr><td align=right width=100>用户名</td><td>");
      out.print( userinfo.getUserName() );
      out.write("</td></tr> \r\n");
      out.write("\t  <tr><td align=right width=100>用户真名</td><td>");
      out.print( userinfo.getNames() );
      out.write("</td></tr> \r\n");
      out.write("\t  <tr><td align=right width=100>性别</td><td>");
      out.print( userinfo.getSex() );
      out.write("</td></tr> \r\n");
      out.write("\t  <tr><td align=right width=100>联系地址</td><td>");
      out.print( userinfo.getAddress() );
      out.write("</td></tr> \r\n");
      out.write("\t  <tr><td align=right width=100>联系电话</td><td>");
      out.print( userinfo.getPhone() );
      out.write("</td></tr> \r\n");
      out.write("\t  <tr><td align=right width=100>邮编</td><td>");
      out.print( userinfo.getPost() );
      out.write("</td></tr> \r\n");
      out.write("\t  <tr><td align=right width=100>电子邮件</td><td>");
      out.print( userinfo.getEmail() );
      out.write("</td></tr> \r\n");
      out.write("\t  <tr><td align=right width=100>注册来源</td><td>");
      out.print( userinfo.getRegIpAddress() );
      out.write("</td></tr> \r\n");
      out.write("\t  <tr><td align=right width=100>注册时间</td><td>");
      out.print( userinfo.getRegTime() );
      out.write("</td></tr>\r\n");
      out.write("  </table>\r\n");
      out.write("  <br>\r\n");
      out.write("  <a href=\"showuser.jsp?action=del&userid=");
      out.print(userinfo.getId() );
      out.write("\" onclick=\"return(confirm('你真的要删除这个用户?'))\">删除</a><br><br>\r\n");
}
      out.write("\r\n");
      out.write("  <br><p><a href=\"javascript:window.close()\">关闭窗口</a></p>\r\n");
      out.write("  <table width=\"70%\" border=\"0\" cellspacing=\"2\" cellpadding=\"2\">\r\n");
      out.write("    <tr>\r\n");
      out.write("      <td align=\"center\">开发:王文耀<br>\r\n");
      out.write("        CopyRight@2006 <br>\r\n");
      out.write("        Email:<a href=\"mailto:wwy170@163.com\">wwy170@163.com</a></td>\r\n");
      out.write("    </tr>\r\n");
      out.write("  </table>\r\n");
      out.write("  \r\n");
      out.write("</div>\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 + -