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

📄 input_jsp.java

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

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;

public final class input_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');
      out.write('\n');
 request.setCharacterEncoding("gb2312"); 
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\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("<script language=\"javascript\">\r\n");
      out.write("<!--\r\n");
      out.write("\tfunction check(){\r\n");
      out.write("\t\tif(form1.subid.value==\"\"){\r\n");
      out.write("\t\t\talert(\"请输入你的订单号\");\r\n");
      out.write("\t\t\treturn false;\r\n");
      out.write("\t\t}\r\n");
      out.write("\t}\r\n");
      out.write("-->\r\n");
      out.write("</script>\r\n");
      out.write("<body>\r\n");
      out.write("<table width=\"600\" height=\"\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" background=\"\"> \r\n");
      out.write(" <tr>\r\n");
      out.write("\t\t<td><img name=\"cplist_01_01\" src=\"image/gupic12.gif\" width=\"600\" height=\"50\" border=\"0\" alt=\"\">   </td>\r\n");
      out.write("\t\t\t</tr>\r\n");
      out.write("  <tr><td>\r\n");
      out.write("  ");
 String subid=request.getParameter("subid");
     if(subid==null)
  	{
   
      out.write("\r\n");
      out.write("\t  <table width=\"345\" height=\"149\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
      out.write("\t  <form action=\"input.jsp\" name=\"form1\" method=\"post\">\r\n");
      out.write("\t  <tr align=\"center\" bgcolor=\"#FCBE3F\">\r\n");
      out.write("\t\t<td height=\"44\" colspan=\"4\" background=\"\" bgcolor=\"#EFE9BB\" class=\"head\">输入订单号</td>\r\n");
      out.write("\t  </tr>\r\n");
      out.write("\t  <tr>\r\n");
      out.write("\t\t<td width=\"11\" rowspan=\"3\" background=\"\">&nbsp;</td>\r\n");
      out.write("\t\t<td width=\"54\">订单号:</td>\r\n");
      out.write("\t\t<td width=\"265\" height=\"23\"><input name=\"subid\" type=\"text\" class=\"txt_grey\" size=\"40\"></td>\r\n");
      out.write("\t\t<td width=\"15\" rowspan=\"3\" background=\"\">&nbsp;</td>\r\n");
      out.write("\t  </tr>\r\n");
      out.write("\t  <tr align=\"center\">\r\n");
      out.write("\t\t<td height=\"33\" colspan=\"2\"><input name=\"Submit\" type=\"submit\" class=\"btn_grey\" onClick=\"return check()\" value=\"提交\">\r\n");
      out.write("\t\t  <input name=\"Submit2\" type=\"reset\" class=\"btn_grey\" value=\"重置\"></td>\r\n");
      out.write("\t\t</tr>\r\n");
      out.write("\t  <tr align=\"left\">\r\n");
      out.write("\t\t<td height=\"36\" colspan=\"2\" align=\"center\"><font color=\"#FF0000\"><a href=\"index.jsp\">&#36820;&#22238;&#39318;&#39029;</a></font></td>\r\n");
      out.write("\t\t</tr>\r\n");
      out.write("\t  <tr align=\"left\">\r\n");
      out.write("\t\t<td height=\"13\" colspan=\"4\" background=\"\">&nbsp;</td>\r\n");
      out.write("\t\t</tr>\r\n");
      out.write("\t  </form>\r\n");
      out.write("\t</table>\r\n");
      out.write("  ");
 }
  else { 
      out.write("\r\n");
      out.write("\t<table width=\"400\" height=\"340\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" background=\"f\" class=\"tableBorder\">\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td valign=\"top\"><table width=\"600\" height=\"135\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"00\">\r\n");
      out.write("      <tr align=\"center\" valign=\"middle\" background=\"\">\r\n");
      out.write("        <td height=\"50\" 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("\r\n");
      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 bgcolor=\"#EFE9BB\" class=\"head\"><font size=\"3\" face=\"宋体\" class=\"bgcolor\">我&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 con1=new Condb();
	int spif=0;	
	String sql="select * from tb_Shop where Subid='"+subid+"'";
	int num=0;
	int sum1=0;
	ResultSet rs=con1.executeQuery(sql);
	while(rs.next()){
		String str1="select * from tb_Sub where Sub='"+subid+"'";
		ResultSet rst1=con1.executeQuery(str1);
		if(rst1.next()){
			spif=rst1.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");

		sum1=sum1+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(sum1);
      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=\"#EFE9BB\" class=\"bgcolor\">");
if(spif==0){out.println("订单正在执行中");} else if(spif==1){out.println("订单已经执行请您注意签收");}
      out.write("      <a href=\"index.jsp\">返回</a></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td align=\"center\" valign=\"middle\" class=\"bgcolor\">各位会员朋友在您的订单执行后五天还没有收到物品请尽快与我们取得联系</td>\r\n");
      out.write("  </tr>\r\n");
      out.write("</table>\r\n");
      out.write("  ");
 } 
      out.write("\r\n");
      out.write("</td>\r\n");
      out.write("</tr>\r\n");
      out.write("</table>\r\n");
      out.write("\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 + -