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

📄 query_jsp.java

📁 网上服装店 能让用户在该网站上对物品进行上传购买等操作。该设计为原版
💻 JAVA
字号:
package org.apache.jsp.sub;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
import java.util.Vector;
import com.bwm.db.Condb;
import com.bwm.string.Str;
import java.sql.*;

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

  private static java.util.Vector _jspx_dependants;

  static {
    _jspx_dependants = new java.util.Vector(1);
    _jspx_dependants.add("/sub/top.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');
      out.write('\n');
 request.setCharacterEncoding("gb2312"); 
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("<html>\r\n");
      out.write("<head>\r\n");
      out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n");
      out.write("<title>订单查询</title>\r\n");
      out.write("</head>\r\n");
      out.write("<link href=\"../css/style.css\" rel=\"stylesheet\">\r\n");
      out.write("<body>\r\n");
      out.write("\r\n");
      out.write("<html>\r\n");
      out.write("<head>\r\n");
      out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n");
      out.write("<title>头文件</title>\r\n");
      out.write("\r\n");
      out.write("<style type=\"text/css\">\r\n");
      out.write("<!--\r\n");
      out.write(".style1 {color: #FF0000}\r\n");
      out.write("body {\r\n");
      out.write("\tmargin-right: 0px;\r\n");
      out.write("\tmargin-bottom: 0px;\r\n");
      out.write("}\r\n");
      out.write("-->\r\n");
      out.write("</style>\r\n");
      out.write("</head>\r\n");
      out.write("<link href=\"css/style.css\" rel=\"stylesheet\">\r\n");
      out.write("<body>\r\n");
      out.write("<table width=\"800\" height=\"161\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" bordercolor=\"#FF0000\">\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td width=\"800\" height=\"132\" align=\"center\" class=\"top\"><img src=\"../images/images/top_1.gif\" width=\"800\" height=\"133\"></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td height=\"28\" align=\"center\"><table width=\"800\" height=\"28\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
      out.write("      <tr>\r\n");
      out.write("        <td width=\"173\" height=\"28\" align=\"center\" background=\"../images/images/bag_14.gif\">&nbsp;</td>\r\n");
      out.write("        <td width=\"627\" align=\"center\"><a href=\"sub/input.jsp\" class=\"style2\" ><img src=\"../images/images/top_3.gif\" width=\"627\" height=\"25\" border=\"0\" usemap=\"#Map\"></a></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("\r\n");
      out.write("<div align=\"center\"></div>\r\n");
      out.write("<map name=\"Map\">\r\n");
      out.write("  <area shape=\"rect\" coords=\"77,1,126,26\" href=\"../index.jsp\">\r\n");
      out.write("  <area shape=\"rect\" coords=\"155,3,242,34\" href=\"../sub/input.jsp\">\r\n");
      out.write("  <area shape=\"rect\" coords=\"289,3,358,31\" href=\"../user/order.jsp\">\r\n");
      out.write("  <area shape=\"rect\" coords=\"380,3,469,31\" href=\"../user/Uedit.jsp\">\r\n");
      out.write("  <area shape=\"rect\" coords=\"495,0,563,28\" href=\"../admin/browse.jsp\">\r\n");
      out.write("</map>\r\n");
      out.write("</body>\r\n");
      out.write("</html>\r\n");
      out.write(" \r\n");
      out.write("<table width=\"400\" height=\"340\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" background=\"../images/top1.gif\" class=\"tableBorder\">\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td valign=\"top\"><table width=\"800\" height=\"127\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"00\">\r\n");
      out.write("      <tr align=\"center\" valign=\"middle\" background=\"../images/top1.gif\">\r\n");
      out.write("        <td height=\"42\" colspan=\"8\" nowrap class=\"head\"> <font color=\"#FF0000\">\r\n");
      out.write("          ");
if(session.getAttribute("username")==null){out.println("您还没有登录");}else{out.println(session.getAttribute("username"));}
      out.write("</font>,您的购物情况如下所示</td>\r\n");
      out.write("      </tr>\r\n");
      out.write("      <tr align=\"center\" valign=\"middle\" bgcolor=\"#33CC99\">\r\n");
      out.write("        <td height=\"22\" colspan=\"8\" nowrap class=\"head\"><font size=\"3\" face=\"宋体\" class=\"bgcolor\">我&nbsp;的&nbsp;购&nbsp;物&nbsp;车</font></td>\r\n");
      out.write("      </tr>\r\n");
      out.write("      <tr align=\"center\" valign=\"middle\" class=\"bgcolor\">\r\n");
      out.write("        <td width=\"73\" height=\"21\">&nbsp;</td>\r\n");
      out.write("        <td width=\"96\" class=\"bgcolor\">序号</td>\r\n");
      out.write("        <td width=\"267\" height=\"21\" class=\"bgcolor\">商品名称</td>\r\n");
      out.write("        <td width=\"95\" height=\"21\" class=\"bgcolor\">价格</td>\r\n");
      out.write("        <td width=\"88\" height=\"21\" class=\"bgcolor\">数量</td>\r\n");
      out.write("        <td width=\"107\" height=\"21\" class=\"bgcolor\">总金额</td>\r\n");
      out.write("        <td width=\"35\" height=\"21\">&nbsp;</td>\r\n");
      out.write("        <td width=\"39\" height=\"21\">&nbsp;</td>\r\n");
      out.write("      </tr>\r\n");

	Condb con=new Condb();
	int spif=0;
	String subid=request.getParameter("subid");
	String sql="select * from tb_Shop where Subid='"+subid+"'";
	int num=0;
	int sum=0;
	ResultSet rs=con.executeQuery(sql);
	while(rs.next()){
		String str="select * from tb_Sub where Sub='"+subid+"'";
		ResultSet rst=con.executeQuery(str);
		if(rst.next()){
			spif=rst.getInt(11);
		}
	num++;

      out.write("\r\n");
      out.write("          <tr align=\"center\" valign=\"middle\" class=\"bgcolor\">\r\n");
      out.write("        <td height=\"21\">&nbsp;</td>\r\n");
      out.write("        <td height=\"21\" class=\"bgcolor\">");
      out.print(num);
      out.write("</td>\r\n");
      out.write("        <td height=\"21\" class=\"bgcolor\">");
      out.print(rs.getString(2));
      out.write("</td>\r\n");
      out.write("        <td height=\"21\" class=\"bgcolor\">¥");
      out.print(rs.getInt(3));
      out.write("</td>\r\n");
      out.write("        <td height=\"21\" class=\"bgcolor\">");
int number=rs.getInt(4);out.println(number);
      out.write("</td>\r\n");
      out.write("        <td height=\"21\" class=\"bgcolor\">¥");
int price=rs.getInt(5);out.print(price);
      out.write("</td>\r\n");
      out.write("        <td height=\"21\"></td>\r\n");
      out.write("        <td height=\"21\">&nbsp;</td>\r\n");
      out.write("\t");

		sum=sum+price;
	}if(!rs.next()){
	
      out.write("\r\n");
      out.write("\t<script language=\"javascript\">\r\n");
      out.write("\talert(\"没有此订单号请您重新核实\");\r\n");
      out.write("\thistory.back();\r\n");
      out.write("\t</script>\r\n");
      out.write("\t");

	}
	
      out.write("\r\n");
      out.write("      \t<tr align=\"center\" valign=\"middle\" class=\"bgcolor\">\r\n");
      out.write("        <td height=\"21\" colspan=\"5\">\r\n");
      out.write("          <hr>\r\n");
      out.write("        </td>\r\n");
      out.write("        <td height=\"21\" colspan=\"3\" align=\"left\" class=\"bgcolor\">总合计:<font color=\"#FF0000\">¥");
      out.print(sum);
      out.write("</font></td>\r\n");
      out.write("    </table></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr valign=\"middle\" bgcolor=\"#009900\">\r\n");
      out.write("    <td height=\"22\" align=\"center\" bgcolor=\"#33CC99\" class=\"bgcolor\">");
if(spif==0){out.println("订单正在执行中");} else if(spif==1){out.println("订单已经执行请您注意签收");}
      out.write("      <a href=\"../index.jsp\">&#36820;&#22238;</a></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td align=\"center\" valign=\"middle\" class=\"bgcolor\">&#21508;&#20301;&#20250;&#21592;&#26379;&#21451;&#22312;&#24744;&#30340;&#35746;&#21333;&#25191;&#34892;&#21518;&#20116;&#22825;&#36824;&#27809;&#26377;&#25910;&#21040;&#29289;&#21697;&#35831;&#23613;&#24555;&#19982;&#25105;&#20204;&#21462;&#24471;&#32852;&#31995;</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 + -