📄 _orderform.java
字号:
/*@lineinfo:filename=/Orderform.jsp*/
/*@lineinfo:generated-code*/
import oracle.jsp.runtime.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import Model_PetType.*;
import Model_CartItem.*;
import Model_ItemInfo.*;
import java.util.*;
import java.text.*;
import javax.servlet.http.HttpSession;
import java.util.Collection;
import java.util.Iterator;
public class _Orderform extends com.orionserver.http.OrionHttpJspPage {
public final String _globalsClassName = null;
// ** Begin Declarations
// ** End Declarations
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException {
response.setContentType( "text/html;charset=GB2312");
/* set up the intrinsic variables using the pageContext goober:
** session = HttpSession
** application = ServletContext
** out = JspWriter
** page = this
** config = ServletConfig
** all session/app beans declared in globals.jsa
*/
PageContext pageContext = JspFactory.getDefaultFactory().getPageContext( this, request, response, null, true, JspWriter.DEFAULT_BUFFER, true);
// Note: this is not emitted if the session directive == false
HttpSession session = pageContext.getSession();
if (pageContext.getAttribute(OracleJspRuntime.JSP_REQUEST_REDIRECTED, PageContext.REQUEST_SCOPE) != null) {
pageContext.setAttribute(OracleJspRuntime.JSP_PAGE_DONTNOTIFY, "true", PageContext.PAGE_SCOPE);
JspFactory.getDefaultFactory().releasePageContext(pageContext);
return;
}
int __jsp_tag_starteval;
ServletContext application = pageContext.getServletContext();
JspWriter out = pageContext.getOut();
_Orderform page = this;
ServletConfig config = pageContext.getServletConfig();
try {
// global beans
// end global beans
out.write(__oracle_jsp_text[0]);
out.write(__oracle_jsp_text[1]);
out.write(__oracle_jsp_text[2]);
out.write(__oracle_jsp_text[3]);
out.write(__oracle_jsp_text[4]);
out.write(__oracle_jsp_text[5]);
out.write(__oracle_jsp_text[6]);
out.write(__oracle_jsp_text[7]);
out.write(__oracle_jsp_text[8]);
/*@lineinfo:user-code*//*@lineinfo:35^13*/ String loginid=request.getParameter("Loginid");
/*@lineinfo:generated-code*/
out.write(__oracle_jsp_text[9]);
/*@lineinfo:user-code*//*@lineinfo:38^13*/ out.print(loginid);
/*@lineinfo:generated-code*/
out.write(__oracle_jsp_text[10]);
/*@lineinfo:user-code*//*@lineinfo:67^23*/ HttpSession hs1=request.getSession(); if(hs1.getAttribute("cart")==null) { hs1.setAttribute("cart",new CartItemBean()); } CartItemBean cib1=(CartItemBean)hs1.getAttribute("cart"); int Count1=cib1.AllCount(); double Sum1=cib1.AllSum();
/*@lineinfo:generated-code*/
out.write(__oracle_jsp_text[11]);
/*@lineinfo:user-code*//*@lineinfo:77^28*/ out.print(Count1);
/*@lineinfo:generated-code*/
out.write(__oracle_jsp_text[12]);
/*@lineinfo:user-code*//*@lineinfo:78^28*/ out.print(Sum1);
/*@lineinfo:generated-code*/
out.write(__oracle_jsp_text[13]);
/*@lineinfo:user-code*//*@lineinfo:88^21*/ PetTypeBean ptb=new PetTypeBean(); Collection col=ptb.SelectPetType(); Iterator ita=col.iterator(); while (ita.hasNext()) { PetType pt=(PetType)ita.next(); String n=pt.getPetTypeName();
/*@lineinfo:generated-code*/
out.write(__oracle_jsp_text[14]);
/*@lineinfo:user-code*//*@lineinfo:98^29*/ out.print(n);
/*@lineinfo:generated-code*/
out.write(__oracle_jsp_text[15]);
/*@lineinfo:user-code*//*@lineinfo:99^21*/ }
/*@lineinfo:generated-code*/
out.write(__oracle_jsp_text[16]);
/*@lineinfo:user-code*//*@lineinfo:114^21*/ java.text.SimpleDateFormat format=new SimpleDateFormat("yyyy-MM-dd"); String date=format.format(new java.util.Date());
/*@lineinfo:generated-code*/
out.write(__oracle_jsp_text[17]);
/*@lineinfo:user-code*//*@lineinfo:121^137*/ out.print(loginid);
/*@lineinfo:generated-code*/
out.write(__oracle_jsp_text[18]);
/*@lineinfo:user-code*//*@lineinfo:121^266*/ out.print(date);
/*@lineinfo:generated-code*/
out.write(__oracle_jsp_text[19]);
/*@lineinfo:user-code*//*@lineinfo:123^21*/ double total=0.0; HttpSession hs=request.getSession(); if(hs.getAttribute("cart")==null) { hs.setAttribute("cart",new CartItemBean()); } CartItemBean cib=(CartItemBean)hs.getAttribute("cart"); Collection col4=cib.getAllItem(); Iterator it4=col4.iterator(); while (it4.hasNext()) { CartItem ci=(CartItem)it4.next(); String itemid=ci.getId(); int count=Integer.parseInt(ci.getNum()); double sum=Double.parseDouble(ci.getCost()); double s=sum/count; total=total+sum;
/*@lineinfo:generated-code*/
out.write(__oracle_jsp_text[20]);
/*@lineinfo:user-code*//*@lineinfo:143^58*/ out.print(itemid);
/*@lineinfo:generated-code*/
out.write(__oracle_jsp_text[21]);
/*@lineinfo:user-code*//*@lineinfo:143^105*/ out.print(count);
/*@lineinfo:generated-code*/
out.write(__oracle_jsp_text[22]);
/*@lineinfo:user-code*//*@lineinfo:143^151*/ out.print(s);
/*@lineinfo:generated-code*/
out.write(__oracle_jsp_text[23]);
/*@lineinfo:user-code*//*@lineinfo:145^21*/ }
/*@lineinfo:generated-code*/
out.write(__oracle_jsp_text[24]);
/*@lineinfo:user-code*//*@lineinfo:148^128*/ out.print(total);
/*@lineinfo:generated-code*/
out.write(__oracle_jsp_text[25]);
/*@lineinfo:user-code*//*@lineinfo:160^108*/ out.print(loginid);
/*@lineinfo:generated-code*/
out.write(__oracle_jsp_text[26]);
}
catch( Throwable e) {
try {
if (out != null) out.clear();
}
catch( Exception clearException) {
}
pageContext.handlePageException( e);
}
finally {
OracleJspRuntime.extraHandlePCFinally(pageContext,false);
JspFactory.getDefaultFactory().releasePageContext(pageContext);
}
}
private static final char __oracle_jsp_text[][]=new char[27][];
static {
try {
__oracle_jsp_text[0] =
"\n".toCharArray();
__oracle_jsp_text[1] =
"\n".toCharArray();
__oracle_jsp_text[2] =
"\n".toCharArray();
__oracle_jsp_text[3] =
"\n".toCharArray();
__oracle_jsp_text[4] =
"\n".toCharArray();
__oracle_jsp_text[5] =
"\n".toCharArray();
__oracle_jsp_text[6] =
"\n".toCharArray();
__oracle_jsp_text[7] =
"\n".toCharArray();
__oracle_jsp_text[8] =
"\n<html>\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=GB2312\">\n <title>untitled</title>\n </head>\n <body>\n <table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\" height=\"100%\">\n <tr>\n <td width=\"36%\">\n <img src=\"E:\\学习\\JSPPetShop\\Image\\logo.gif\" width=\"202\" height=\"61\"/>\n </td>\n <td width=\"64%\"> </td>\n </tr>\n <tr>\n <td colspan=\"2\"> </td>\n </tr>\n <tr style=\"font-size:x-small;\">\n <td width=\"29%\" colspan=\"2\">\n <form>\n <table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\">\n <tr>\n <td width=\"21%\" align=\"right\" style=\"font-size:x-small;\">\n \n 欢迎您:</td>\n <td width=\"19%\" align=\"left\" style=\"font-size:x-small;\"> \n ".toCharArray();
__oracle_jsp_text[9] =
"\n ".toCharArray();
__oracle_jsp_text[10] =
"\n </td>\n <td width=\"11%\" align=\"right\" style=\"font-size:x-small;\"> </td>\n <td width=\"20%\" align=\"left\" style=\"font-size:x-small;\"> \n </td>\n <td width=\"8%\" style=\"font-size:x-small;\"> \n </td>\n <td width=\"9%\" align=\"right\" style=\"font-size:x-small;\">\n <a href=\"AddCustomer.jsp\">注册</a>\n </td>\n <td width=\"12%\"> </td>\n </tr>\n </table>\n </form>\n </td>\n </tr>\n <tr>\n <td width=\"36%\" colspan=\"2\">\n <table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\">\n <tr>\n <td width=\"23%\">\n <table cellspacing=\"0\" cellpadding=\"0\" border=\"1\" width=\"100%\">\n <tr>\n <td align=\"center\" bgcolor=\"Red\">我的购物车状态</td>\n </tr>\n <tr style=\"font-size:x-small;\">\n <td height=\"80\" style=\"border-color:rgb(255,0,0);\" align=\"center\" valign=\"top\">\n <P align=\"center\"> </P>\n <P align=\"center\">\n ".toCharArray();
__oracle_jsp_text[11] =
"\n <p>您有".toCharArray();
__oracle_jsp_text[12] =
"种商品在购物车中</p>\n <p>总计".toCharArray();
__oracle_jsp_text[13] =
"¥</p>\n <p><a href=\"ShowCart.jsp\">查看购物车</a></p>\n \n </td>\n </tr>\n <tr>\n <td align=\"center\" bgcolor=\"Red\">网站商品架</td>\n </tr>\n <tr style=\"font-size:x-small;\">\n <td align=\"center\" valign=\"top\" style=\"border-color:rgb(255,0,0);\">\n ".toCharArray();
__oracle_jsp_text[14] =
"\n <br>\n <a>".toCharArray();
__oracle_jsp_text[15] =
"</a>\n ".toCharArray();
__oracle_jsp_text[16] =
"\n </br>\n </td>\n </tr>\n </table>\n </td>\n <td width=\"77%\" valign=\"top\">\n <form action=\"orderform\" method=\"post\">\n <input type=\"hidden\" name=\"action\" value=\"index\"/>\n <table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"700\">\n <tr>\n <td align=\"left\" colspan=\"6\">订单信息\n </td>\n ".toCharArray();
__oracle_jsp_text[17] =
"\n </tr>\n <tr><td align=\"center\" width=\"87\">订单编号:</td><td width=\"132\">\n <input type=\"text\" name=\"OrderID\" size=\"10\"/>\n </td><td align=\"center\" width=\"106\">客户编号:</td><td width=\"159\"><input type=\"text\" name=\"CustomerID\" size=\"10\" value=\"".toCharArray();
__oracle_jsp_text[18] =
"\"/></td><td align=\"center\" width=\"88\">定购日期:</td><td width=\"128\"><input type=\"text\" name=\"OrderDate\" size=\"10\" value=\"".toCharArray();
__oracle_jsp_text[19] =
"\"/></td></tr>\n <tr><td colspan=\"2\" align=\"center\">商品编号</td><td colspan=\"2\" align=\"center\">数量</td><td colspan=\"2\" align=\"center\">售价</td></tr>\n ".toCharArray();
__oracle_jsp_text[20] =
"\n <tr>\n <td colspan=\"2\" align=\"center\">".toCharArray();
__oracle_jsp_text[21] =
"</td><td colspan=\"2\" align=\"center\">".toCharArray();
__oracle_jsp_text[22] =
"</td><td colspan=\"2\" align=\"center\">".toCharArray();
__oracle_jsp_text[23] =
"</td>\n </tr>\n ".toCharArray();
__oracle_jsp_text[24] =
"\n <tr><td colspan=\"2\"></td><td colspan=\"2\"></td><td align=\"right\" colspan=\"2\">总金额为:<input type=\"text\" value=\"".toCharArray();
__oracle_jsp_text[25] =
"\" name=\"TotolMoney\" size=\"10\"/></td></tr>\n <tr><td align=\"center\">付款方式:</td><td><select name=\"PayType\">\n <option value=\"邮局汇款\">邮局汇款</option>\n <option value=\"农行汇款\">农行汇款</option>\n <option value=\"建行汇款\">建行汇款</option>\n </select></td><td align=\"center\">是否付款:</td><td><select name=\"PayFlag\">\n <option value=\"是\">是</option>\n <option value=\"否\">否</option>\n </select></td><td align=\"center\">是否发货:</td><td><select name=\"Flag\" size=\"1\">\n <option value=\"是\">是</option>\n <option value=\"否\">否</option>\n </select></td></tr>\n <tr><td></td><td></td><td></td><td></td><td><input type=\"hidden\" name=\"Loginid\" value=\"".toCharArray();
__oracle_jsp_text[26] =
"\"/></td><td align=\"right\"><input type=\"submit\" value=\"提交订单\"/></a></td></tr>\n </table>\n </form>\n \n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n </body>\n</html>\n\n\n".toCharArray();
}
catch (Throwable th) {
System.err.println(th);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -