📄 shopcar_0002ejsp_jsp.java
字号:
// begin [file="/inc/left.inc";from=(48,12);to=(49,0)]
}
// end
// HTML // begin [file="/inc/left.inc";from=(49,2);to=(59,0)]
out.write("</SELECT>\r\n\t\t </td>\r\n </tr>\r\n\r\n <tr>\r\n <td> </td>\r\n <td align=\"center\"><INPUT TYPE=\"submit\" name=\"submit\" value=\"查询\" ></td>\r\n </tr>\r\n\t\t </FORM>\r\n </table>\r\n");
// end
// HTML // begin [file="/shopcar.jsp";from=(82,38);to=(86,0)]
out.write("\r\n </td>\r\n <td width=\"600\">\r\n <b><font color=\"#0000FF\">我的购物车物品清单</font></b></p>\r\n");
// end
// begin [file="/shopcar.jsp";from=(86,2);to=(95,0)]
if (!mesg.equals("") )
out.println("<p ><font color=#ff0000>" + mesg + "</font></p>");
Vector shoplist = (Vector) session.getAttribute("shopcar");
if (shoplist==null || shoplist.size()<0 ){
if (mesg.equals(""))
out.println("<p><font color=#ff0000>你还没有选择购买图书!请先购买</font></p>");
} else {
// end
// HTML // begin [file="/shopcar.jsp";from=(95,2);to=(105,1)]
out.write("\r\n <table width=\"100%\" border=\"1\" cellspacing=\"1\" cellpadding=\"1\" bordercolor=\"white\">\r\n <tr align=\"center\" bgcolor=\"#DEF3CE\">\r\n <td>图书名称</td>\r\n <td>作者</td>\r\n <td>图书类别</td>\r\n <td>单价(元)</td>\r\n <td>数量</td>\r\n <td colspan =2>选择</td>\r\n </tr>\r\n\t");
// end
// begin [file="/shopcar.jsp";from=(105,3);to=(114,1)]
float totalprice =0;
int totalamount = 0;
for (int i=0; i<shoplist.size();i++){
allorder iList = (allorder) shoplist.elementAt(i);
if (book_list.getOnebook((int)iList.getBookNo())) {
book bk = (book) book_list.getBooklist().elementAt(0);
totalprice = totalprice + bk.getPrince() * iList.getAmount();
totalamount = totalamount + iList.getAmount();
// end
// HTML // begin [file="/shopcar.jsp";from=(114,3);to=(116,16)]
out.write("\r\n <tr>\r\n <td>");
// end
// begin [file="/shopcar.jsp";from=(116,19);to=(116,37)]
out.print( bk.getBookName() );
// end
// HTML // begin [file="/shopcar.jsp";from=(116,39);to=(117,31)]
out.write("</td>\r\n <td align=\"center\">");
// end
// begin [file="/shopcar.jsp";from=(117,34);to=(117,50)]
out.print( bk.getAuthor() );
// end
// HTML // begin [file="/shopcar.jsp";from=(117,52);to=(118,31)]
out.write("</td>\r\n <td align=\"center\">");
// end
// begin [file="/shopcar.jsp";from=(118,34);to=(118,53)]
out.print( bk.getClassname() );
// end
// HTML // begin [file="/shopcar.jsp";from=(118,55);to=(119,31)]
out.write("</td>\r\n <td align=\"center\">");
// end
// begin [file="/shopcar.jsp";from=(119,34);to=(119,50)]
out.print( bk.getPrince() );
// end
// HTML // begin [file="/shopcar.jsp";from=(119,52);to=(122,77)]
out.write("</td>\r\n\t\t <form name=\"change\" method=\"post\" action=\"shopcar.jsp\">\r\n <td align=\"center\">\r\n <input type=\"text\" name=\"amount\" maxlength=\"4\" size=\"3\" value=\"");
// end
// begin [file="/shopcar.jsp";from=(122,80);to=(122,99)]
out.print( iList.getAmount() );
// end
// HTML // begin [file="/shopcar.jsp";from=(122,101);to=(125,45)]
out.write("\" >\r\n </td>\r\n <td align=\"center\" width=55 >\r\n\t\t\t<input type=\"hidden\" name=\"bookid\" value=\"");
// end
// begin [file="/shopcar.jsp";from=(125,48);to=(125,67)]
out.print( iList.getBookNo() );
// end
// HTML // begin [file="/shopcar.jsp";from=(125,69);to=(128,46)]
out.write("\" >\r\n <input type=\"submit\" name=\"modi\" value=\"修改\" onclick=\"return(check());\"></td>\r\n\t\t\t<form name=\"del\" method=\"post\" action=\"shoperlist.jsp\">\r\n\t\t\t <input type=\"hidden\" name=\"bookid\" value=\"");
// end
// begin [file="/shopcar.jsp";from=(128,49);to=(128,68)]
out.print( iList.getBookNo() );
// end
// HTML // begin [file="/shopcar.jsp";from=(128,70);to=(132,2)]
out.write("\" >\r\n\t\t\t <td align=center width=55> <input type=\"submit\" name=\"del\" value=\"删除\">\r\n </td></form>\r\n </tr>\r\n\t\t");
// end
// begin [file="/shopcar.jsp";from=(132,4);to=(133,3)]
}
}
// end
// HTML // begin [file="/shopcar.jsp";from=(133,5);to=(133,54)]
out.write(" <tr><td colspan=7 align=\"right\"><br>你选择的图书的总金额:");
// end
// begin [file="/shopcar.jsp";from=(133,57);to=(133,68)]
out.print( totalprice);
// end
// HTML // begin [file="/shopcar.jsp";from=(133,70);to=(133,87)]
out.write("元 总数量:");
// end
// begin [file="/shopcar.jsp";from=(133,90);to=(133,102)]
out.print( totalamount);
// end
// HTML // begin [file="/shopcar.jsp";from=(133,104);to=(140,46)]
out.write("本 </td></tr>\r\n </table>\r\n <p></p>\r\n <table width=\"90%\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\">\r\n <tr> <form name=\"payout\" method=\"post\" action=\"shopcar.jsp\">\r\n <td align=\"right\" valign=\"bottom\"> <a href=\"booklist.jsp\">继续购书</a> \r\n\r\n\t\t\t\t<input type=\"hidden\" name=\"userid\" value=\"");
// end
// begin [file="/shopcar.jsp";from=(140,49);to=(140,57)]
out.print( userid );
// end
// HTML // begin [file="/shopcar.jsp";from=(140,59);to=(141,50)]
out.write("\">\r\n\t\t\t\t<input type=\"hidden\" name=\"totalprice\" value=\"");
// end
// begin [file="/shopcar.jsp";from=(141,53);to=(141,65)]
out.print( totalprice );
// end
// HTML // begin [file="/shopcar.jsp";from=(141,67);to=(151,0)]
out.write("\">\r\n\t\t\t\t<TEXTAREA NAME=\"content\" ROWS=\"3\" COLS=\"20\">附言:</TEXTAREA><br>\r\n\t\t\t\t<input type=\"submit\" name=\"payout\" value=\"提交我的购物车\" onclick=\"javascript:return(checklogin());\"> </td></form>\r\n\t\t\t\t<form name=\"form1\" method=\"post\" action=\"shopcar.jsp\">\r\n\t\t\t <td valign=\"bottom\"> \r\n <input type=\"submit\" name=\"clear\" value=\"清空我的购物车\">\r\n </td></form>\r\n </tr>\r\n </table>\r\n </form>\r\n");
// end
// begin [file="/shopcar.jsp";from=(151,2);to=(151,5)]
}
// end
// HTML // begin [file="/shopcar.jsp";from=(151,7);to=(159,0)]
out.write("\r\n </td>\r\n </tr>\r\n </table>\r\n\r\n </td>\r\n </tr>\r\n</table>\r\n");
// end
// HTML // begin [file="/inc/tail.inc";from=(0,33);to=(47,0)]
out.write("\r\n </tr>\r\n\r\n <table width=\"778\" border=\"0\" cellpadding=\"0\" align=\"center\" bgcolor=\"#E4EDFB\">\r\n <tr>\r\n <td width=\"39.9\"></td><td bgcolor=\"#000000\" width=\"700.2\"><img src=\"images/Spacer.gif\" width=\"1\" height=\"1\"></td><td width=\"39.9\"></td>\r\n </tr>\r\n <tr>\r\n <td hight=\"1\"> </td>\r\n </tr>\r\n <tr>\r\n <td></td>\r\n <td align=\"center\">\r\n <p align=\"center\">\r\n隽隽书店在线\r\n 版权所有\r\n@2004<br>\r\n<!--TAddress-->\r\n书店地址:\r\n北京市XXXXXXXX\r\n<br>\r\n<!--TTelephone-->\r\n电话: 8888888 \r\n<!--TEMail-->\r\n 电子邮件: <A HREF='mailto:<!--Email-->'>wxy8108123@163.com</A>\r\n <br><br>\r\nUpdated by <a href=\"http://www.trfsoft.com\">The Terrificsoft(特瑞飞软件)</a>\r\n \r\nSupport: <a href=\"http://www.trfsoft.com/\">www.trfsoft.com</a>\r\n</p>\r\n </td><td></td>\r\n </tr>\r\n </table>\r\n </table>\r\n </td>\r\n </tr>\r\n </table>\r\n </td>\r\n </tr>\r\n</table>\r\n<table width=\"778\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\r\n <tr>\r\n <td><img src=\"images/index_bottom.gif\" width=\"778\" height=\"80\"></td>\r\n </tr>\r\n</table>\r\n</BODY>\r\n</HTML>\r\n");
// end
// HTML // begin [file="/shopcar.jsp";from=(159,33);to=(161,0)]
out.write("\r\n\r\n");
// end
} catch (Throwable t) {
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 + -