?? query_jsp.java
字號(hào):
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>訂單查詢(xún)</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\"> </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("您還沒(méi)有登錄");}else{out.println(session.getAttribute("username"));}
out.write("</font>,您的購(gòu)物情況如下所示</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\">我 的 購(gòu) 物 車(chē)</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\"> </td>\r\n");
out.write(" <td width=\"96\" class=\"bgcolor\">序號(hào)</td>\r\n");
out.write(" <td width=\"267\" height=\"21\" class=\"bgcolor\">商品名稱(chēng)</td>\r\n");
out.write(" <td width=\"95\" height=\"21\" class=\"bgcolor\">價(jià)格</td>\r\n");
out.write(" <td width=\"88\" height=\"21\" class=\"bgcolor\">數(shù)量</td>\r\n");
out.write(" <td width=\"107\" height=\"21\" class=\"bgcolor\">總金額</td>\r\n");
out.write(" <td width=\"35\" height=\"21\"> </td>\r\n");
out.write(" <td width=\"39\" height=\"21\"> </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\"> </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\"> </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(\"沒(méi)有此訂單號(hào)請(qǐng)您重新核實(shí)\");\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\">總合計(jì):<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("訂單正在執(zhí)行中");} else if(spif==1){out.println("訂單已經(jīng)執(zhí)行請(qǐng)您注意簽收");}
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("</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);
}
}
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -