orderlist.jsp
资源名称:shop.rar [点击查看]
上传用户:yatiankong
上传日期:2014-05-16
资源大小:5604k
文件大小:4k
源码类别:
Applet
开发平台:
Java
- <%@ page contentType="text/html; charset=gb2312" %>
- <%@ page session="true" %>
- <%
- if (session.getAttribute("user")==null || session.getAttribute("user")==""){
- response.sendRedirect("error.htm");
- } %>
- <%@ page import="MyFly.Book.Indent" %>
- <jsp:useBean id="shop" scope="page" class="MyFly.Book.Purchase"/>
- <%
- int pages=1;
- String mesg = "";
- if (request.getParameter("action")!=null && request.getParameter("action").equals("del")){
- try {
- long id = Long.parseLong(request.getParameter("indentid"));
- if (shop.delete(id)) {
- mesg = "删除订单资料成功!";
- } else {
- mesg = "删除订单出错!";
- }
- } catch (Exception e) {
- mesg ="你要删除的数据参数出错!";
- }
- }
- if (request.getParameter("page")!=null && !request.getParameter("page").equals("")) {
- String requestpage = request.getParameter("page");
- try {
- pages = Integer.parseInt(requestpage);
- } catch(Exception e) {
- mesg = "你要找的页码错误!";
- }
- shop.setPage(pages);
- }
- %>
- <html>
- <head>
- <title>好易多网上书店管理系统</title>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <script language="javascript">
- function openScript(url,name, width, height){
- var Win = window.open(url,name,'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=yes' );
- }
- </script>
- <link rel="stylesheet" href="books.css" type="text/css">
- </head>
- <body bgcolor="#799ae1" text="#000000">
- <div align="center">
- <table width="100%" border="0" cellspacing="2" cellpadding="2">
- <tr>
- <td align="center" width="88%">
- <p> </p>
- <p>星海网络书店订单情况:</p>
- <% if (!mesg.equals("")) out.println("<font color=red>" + mesg + "</font><br>");%>
- <table width="98%" border="1" cellspacing="1" cellpadding="1" bordercolor="#336633">
- <tr align="center">
- <td>订单编号</td>
- <td>用户名</td>
- <td>下单时间</td>
- <td>交货时间</td>
- <td>总金额</td>
- <td>订货IP</td>
- <td>付款</td>
- <td>发货</td>
- <td>查看</td>
- </tr>
- <%
- if (shop.getIndent()) {
- for(int i=0 ; i<shop.getMy_indent().size(); i++){
- Indent Ident = (Indent) shop.getMy_indent().elementAt(i); %>
- <tr>
- <td><%= Ident.getIndentNo() %></td>
- <td align="center"><%=Ident.getUserId()%></td>
- <td align="center"><%= Ident.getSubmitTime() %></td>
- <td align="center"><%= Ident.getConsignmentTime() %></td>
- <td align="center"><%= Ident.getTotalPrice() %></td>
- <td align="center"><%= Ident.getIPAddress() %></td>
- <td align="center">
- <% if (Ident.getIsPayoff() )
- out.print("已付清");
- else
- out.print("未付");
- %></td>
- <td align="center">
- <% if (Ident.getIsSales())
- out.print("已发货");
- else
- out.print("未发货");
- %></td>
- <td align="center"><a href="#" onclick="openScript('indentlist.jsp?indentid=<%= Ident.getId() %>','indent',500,500)" >详细情况</a> <a href="orderlist.jsp?action=del&indentid=<%= Ident.getId()%>&page=<%= shop.getPage() %>" onclick="return(confirm('你真的要删除吗?'))">删除</a></td>
- </tr>
- <% }
- } else {
- %>
- <tr align=center ><td>无订单信息</td></tr>
- <%}%>
- </table>
- <table width="90%" border="0" cellspacing="1" cellpadding="1">
- <tr>
- <td align="right">当前页第<%= shop.getPage() %>页 <a href="orderlist.jsp">首页</a>
- <% if (shop.getPage()>1) {%>
- <a href="orderlist.jsp?page=<%= shop.getPage()-1 %>">上一页</a>
- <% } %>
- <% if (shop.getPage()<shop.getPageCount()-1) {%>
- <a href="orderlist.jsp?page=<%= shop.getPage()+1 %>">下一页</a>
- <% } %>
- <a href="orderlist.jsp?page=<%= shop.getPageCount() %>">未页</a> </td>
- </tr>
- </table>
- <p> </p>
- </td>
- </tr>
- </table>
- <br>
- <table width="70%" border="0" cellspacing="2" cellpadding="2">
- </table>
- </div>
- </body>
- </html>