📄 order_0005fdetail_0002ejsp_jsp.java
字号:
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
import java.sql.*;
import com.wgh.DB.chStr;
import com.wgh.DB.connDB;
public class order_0005fdetail_0002ejsp_jsp extends HttpJspBase {
private static java.util.Vector _jspx_includes;
public java.util.List getIncludes() {
return _jspx_includes;
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
javax.servlet.jsp.PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
try {
_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();
_jspx_out = out;
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
JspRuntimeLibrary.include(request, response, "safe.jsp", out, false);
out.write("\r\n");
String username="";
username=(String)session.getAttribute("username");
if(username.equals("")){
out.println("<script language='javascript'>alert('请先登录!');window.location.href='index.jsp';</script>");
}else{
connDB conn=new connDB();
if (request.getParameter("ID")!=null){
int ID=Integer.parseInt(request.getParameter("ID"));
ResultSet rs_main=conn.executeQuery("select * from tb_order where orderID="+ID);
int orderID=0;
String address="";
String postcode="";
String tel="";
String bz="";
int goodID=-1;
String goodsname="";
float nowprice=0;
int number=0;
if(rs_main.next()){
orderID=rs_main.getInt("orderID");
address=rs_main.getString("address");
postcode=rs_main.getString("postcode");
tel=rs_main.getString("tel");
bz=rs_main.getString("bz");
if (bz.equals("")){
bz="无";
}
}
out.write("\r\n");
out.write("<html>\r\n");
out.write("<head>\r\n");
out.write("<title>Go购电子商城");
out.write("</title>\r\n");
out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n");
out.write("<link href=\"CSS/style.css\" rel=\"stylesheet\">\r\n");
out.write("</head>\r\n");
out.write("<body>\r\n");
out.write("<table width=\"790\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\r\n ");
out.write("<tr>\r\n ");
out.write("<td class=\"tableBorder\">\r\n");
JspRuntimeLibrary.include(request, response, "navigation.jsp", out, false);
out.write("\r\n");
out.write("<table width=\"790\" height=\"236\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n ");
out.write("<tr>\r\n ");
out.write("<td width=\"182\" height=\"182\" valign=\"top\">\r\n\t");
JspRuntimeLibrary.include(request, response, "left.jsp", out, false);
out.write("\r\n\t");
out.write("</td>\r\n ");
out.write("<td valign=\"top\">");
out.write("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n ");
out.write("<tr>\r\n ");
out.write("<td height=\"33\" background=\"images/shop_12.gif\">");
out.write("</td>\r\n ");
out.write("<td width=\"505\" height=\"33\" align=\"right\" valign=\"middle\" background=\"images/shop_12.gif\">");
out.write("<table width=\"100%\" height=\"24\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n ");
out.write("<tr>\r\n ");
out.write("<td height=\"8\">");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("<tr>\r\n ");
out.write("<td align=\"right\" class=\"word_green\">");
out.write("<marquee direction=\"left\" scrollamount=\"1\" scrolldelay=\"1\" onMouseOver=\"this.stop();\" onMouseOut=\"this.start();\">^_^ 顾客您好!购买商品请先登录 ");
out.write("<a href=\"register.jsp\" class=\"word_green\">[新用户注册]");
out.write("</a>");
out.write("</marquee>");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("</table>");
out.write("</td>\r\n ");
out.write("<td width=\"10\" background=\"images/shop_12.gif\"> ");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("<tr>\r\n ");
out.write("<td width=\"93\" height=\"50\" background=\"images/shop_15.gif\"> ");
out.write("</td>\r\n ");
out.write("<td colspan=\"2\" background=\"images/shop_16.gif\">\r\n\t\t ");
JspRuntimeLibrary.include(request, response, "search.jsp", out, false);
out.write("\r\n\t\t");
out.write("</td>\r\n ");
out.write("</tr>\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 height=\"189\" valign=\"top\">");
out.write("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n ");
out.write("<tr>\r\n ");
out.write("<td height=\"80\" background=\"images/center_orderdetail.gif\"> ");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("<tr valign=\"top\">\r\n ");
out.write("<td height=\"134\" align=\"center\">\r\n");
out.write("<table width=\"100%\" height=\"272\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n ");
out.write("<tr>\r\n ");
out.write("<td width=\"97%\" height=\"220\" align=\"center\" valign=\"top\">\r\n\t\t\t\t\t ");
out.write("<table width=\"90%\" height=\"131\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"tableBorder_LTR_dashed\">\r\n ");
out.write("<tr>\r\n ");
out.write("<td width=\"16%\" style=\"padding:5px;\">订 单 号: ");
out.print(orderID);
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("<tr>\r\n ");
out.write("<td style=\"padding:5px;\">地 址: ");
out.print(address);
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("<tr>\r\n ");
out.write("<td style=\"padding:5px;\">邮政编码: ");
out.print(postcode);
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("<tr>\r\n ");
out.write("<td style=\"padding:5px;\">电 话: ");
out.print(tel);
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("<tr>\r\n ");
out.write("<td style=\"padding:5px;\">备 注: ");
out.print(bz);
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("</table>\r\n\t\t\t\t\t ");
out.write("<table width=\"90%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bordercolor=\"#FFFFFF\" bordercolorlight=\"#FFFFFF\" bordercolordark=\"#CCCCCC\" class=\"tableBorder_dashed\">\r\n ");
out.write("<tr align=\"center\" bgcolor=\"#eeeeee\">\r\n ");
out.write("<td width=\"21%\" height=\"24\">商品名称");
out.write("</td>\r\n ");
out.write("<td width=\"45%\">商品名称");
out.write("</td>\r\n ");
out.write("<td width=\"22%\">单价");
out.write("</td>\r\n ");
out.write("<td width=\"12%\">数量");
out.write("</td>\r\n ");
out.write("</tr>\r\n\t\t\t\t\t\t");
ResultSet rs=conn.executeQuery("select * from V_order_detail where orderID="+orderID);
while(rs.next()){
goodID=rs.getInt("goodsID");
goodsname=rs.getString("goodsname");
nowprice=rs.getFloat("price");
number=rs.getInt("number");
out.write(" \r\n ");
out.write("<tr align=\"center\">\r\n ");
out.write("<td height=\"27\">");
out.print(goodsname);
out.write("</td>\r\n ");
out.write("<td height=\"27\">");
out.print(goodsname);
out.write("</td>\r\n ");
out.write("<td>");
out.print(nowprice);
out.write("(元)");
out.write("</td>\r\n ");
out.write("<td>");
out.print(number);
out.write("</td>\r\n ");
out.write("</tr>\r\n\t\t\t\t\t\t ");
}
out.write("\r\n ");
out.write("</table>\r\n\t\t\t\t\t ");
out.write("<table width=\"100%\" height=\"49\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n ");
out.write("<tr>\r\n ");
out.write("<td align=\"center\">");
out.write("<input name=\"Submit\" type=\"submit\" class=\"btn_grey\" value=\"返回\" onClick=\"history.back(-1)\">");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("</table>");
out.write("</td>\r\n ");
out.write("<td width=\"3%\" valign=\"top\"> ");
out.write("</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("<tr>\r\n ");
out.write("<td height=\"38\" align=\"right\" background=\"images/center02.gif\">");
out.write("<a href=\"sale.jsp\">");
out.write("<br>\r\n ");
out.write("<br>\r\n ");
out.write("</a>");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("</table>");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("</table>");
out.write("</td>\r\n ");
out.write("</tr>\r\n");
out.write("</table>\r\n");
out.write("<table width=\"790\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n ");
out.write("<tr>\r\n ");
out.write("<td>");
out.write("<table width=\"100%\" height=\"78\" border=\"0\" align=\"center\" cellpadding=\"-2\" cellspacing=\"-2\">\r\n ");
out.write("<tr>\r\n ");
out.write("<td height=\"13\" colspan=\"5\">");
out.write("<div align=\"center\">\r\n ");
out.write("<hr width=\"100%\" size=\"1\">\r\n ");
out.write("</div>");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("<tr>\r\n ");
out.write("<td width=\"124\" height=\"13\"> ");
out.write("</td>\r\n ");
out.write("<td height=\"13\" colspan=\"3\" align=\"center\">Go购电子商城客户服务热线:0431-4978981,4978982 传真:0431-4972266");
out.write("</td>\r\n ");
out.write("<td width=\"141\"> ");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("<tr>\r\n ");
out.write("<td height=\"15\" colspan=\"2\"> ");
out.write("</td>\r\n ");
out.write("<td width=\"464\" valign=\"bottom\" align=\"center\"> CopyRight © 2005 www.mingrisoft.com 吉林省明日科技有限公司");
out.write("</td>\r\n ");
out.write("<td colspan=\"2\"> ");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("<tr>\r\n ");
out.write("<td colspan=\"2\"> ");
out.write("</td>\r\n ");
out.write("<td align=\"center\">本站请使用IE6.0或以上版本 1024*768为最佳显示效果");
out.write("</td>\r\n ");
out.write("<td colspan=\"2\"> ");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("<tr bgcolor=\"#cccccc\">\r\n ");
out.write("<td height=\"8\" colspan=\"2\">");
out.write("</td>\r\n ");
out.write("<td height=\"8\" align=\"center\">");
out.write("</td>\r\n ");
out.write("<td height=\"8\" colspan=\"2\">");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("</table>");
out.write("</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");
}else{
response.sendRedirect("index.jsp");
}
}
out.write("\r\n");
} catch (Throwable t) {
out = _jspx_out;
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 + -