orderlist.jsp
上传用户:yatiankong
上传日期:2014-05-16
资源大小:5604k
文件大小:4k
源码类别:

Applet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=gb2312" %>
  2. <%@ page session="true" %>
  3. <%
  4. if (session.getAttribute("user")==null || session.getAttribute("user")==""){
  5. response.sendRedirect("error.htm");
  6. } %>
  7. <%@ page import="MyFly.Book.Indent" %>
  8. <jsp:useBean id="shop" scope="page" class="MyFly.Book.Purchase"/>
  9. <%
  10. int pages=1;
  11. String mesg = "";
  12. if (request.getParameter("action")!=null && request.getParameter("action").equals("del")){
  13. try {
  14. long id = Long.parseLong(request.getParameter("indentid"));
  15. if (shop.delete(id)) {
  16. mesg = "删除订单资料成功!";
  17. } else {
  18. mesg = "删除订单出错!";
  19. }
  20. } catch (Exception e) {
  21. mesg ="你要删除的数据参数出错!";
  22. }
  23. }
  24. if (request.getParameter("page")!=null && !request.getParameter("page").equals("")) {
  25. String requestpage = request.getParameter("page");
  26. try {
  27. pages = Integer.parseInt(requestpage);
  28. } catch(Exception e) {
  29. mesg = "你要找的页码错误!";
  30. }
  31. shop.setPage(pages);
  32. }
  33. %>
  34. <html>
  35. <head>
  36. <title>好易多网上书店管理系统</title>
  37. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  38. <script language="javascript">
  39.   function openScript(url,name, width, height){
  40. var Win = window.open(url,name,'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=yes' );
  41. }
  42. </script>
  43. <link rel="stylesheet" href="books.css" type="text/css">
  44. </head>
  45. <body bgcolor="#799ae1" text="#000000">
  46. <div align="center">
  47.   <table width="100%" border="0" cellspacing="2" cellpadding="2">
  48.    
  49.     <tr>
  50.       
  51.       <td align="center" width="88%">
  52.         <p>&nbsp;</p>
  53.         <p>星海网络书店订单情况:</p>
  54. <% if (!mesg.equals("")) out.println("<font color=red>" + mesg + "</font><br>");%>
  55.         <table width="98%" border="1" cellspacing="1" cellpadding="1" bordercolor="#336633">
  56.           <tr align="center"> 
  57.             <td>订单编号</td>
  58.             <td>用户名</td>
  59.             <td>下单时间</td>
  60. <td>交货时间</td>
  61.             <td>总金额</td>
  62. <td>订货IP</td>
  63. <td>付款</td>
  64.             <td>发货</td>
  65.             <td>查看</td>
  66.           </tr>
  67. <%
  68.   if (shop.getIndent()) {
  69. for(int i=0 ; i<shop.getMy_indent().size(); i++){
  70. Indent Ident = (Indent) shop.getMy_indent().elementAt(i); %>
  71.   <tr>
  72.             <td><%= Ident.getIndentNo() %></td>
  73.             <td align="center"><%=Ident.getUserId()%></td>
  74.             <td align="center"><%= Ident.getSubmitTime() %></td>
  75. <td align="center"><%= Ident.getConsignmentTime() %></td>
  76.             <td align="center"><%= Ident.getTotalPrice() %></td>
  77. <td align="center"><%= Ident.getIPAddress() %></td>
  78. <td align="center">
  79. <% if (Ident.getIsPayoff() )
  80. out.print("已付清");
  81. else
  82. out.print("未付");
  83. %></td>
  84.             <td align="center">
  85. <% if (Ident.getIsSales())
  86. out.print("已发货");
  87. else 
  88. out.print("未发货");
  89. %></td>
  90.             <td align="center"><a href="#"  onclick="openScript('indentlist.jsp?indentid=<%= Ident.getId() %>','indent',500,500)" >详细情况</a>&nbsp;<a href="orderlist.jsp?action=del&indentid=<%= Ident.getId()%>&page=<%= shop.getPage() %>" onclick="return(confirm('你真的要删除吗?'))">删除</a></td>
  91.           </tr>
  92. <% }
  93.   }  else {
  94. %>
  95. <tr align=center ><td>无订单信息</td></tr>
  96. <%}%>
  97.         </table>
  98.  <table width="90%" border="0" cellspacing="1" cellpadding="1">
  99.           <tr>
  100.             <td align="right">当前页第<%= shop.getPage() %>页 <a href="orderlist.jsp">首页</a>&nbsp; 
  101.               <% if (shop.getPage()>1) {%>
  102.               <a href="orderlist.jsp?page=<%= shop.getPage()-1 %>">上一页</a>&nbsp; 
  103.               <% } %>
  104.               <% if (shop.getPage()<shop.getPageCount()-1) {%>
  105.               <a href="orderlist.jsp?page=<%= shop.getPage()+1 %>">下一页</a>&nbsp; 
  106.               <% } %>
  107.               <a href="orderlist.jsp?page=<%= shop.getPageCount() %>">未页</a>&nbsp;</td>
  108.           </tr>
  109.         </table>
  110.         <p>&nbsp;</p>
  111.       </td>
  112.     </tr>
  113.   </table>
  114.   <br>
  115.   <table width="70%" border="0" cellspacing="2" cellpadding="2">
  116.   
  117.   </table>
  118.   
  119. </div>
  120. </body>
  121. </html>