⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 orderqry.jsp

📁 好东西好东西好东西好东西好东西好东西好东西
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %>
<%@ include file="Connections/myesale.jsp" %>
<%
String recqry__MMColParam = "Null";
if (session.getValue("custid")            !=null) {recqry__MMColParam = (String)session.getValue("custid")           ;}
%>
<%
Driver Driverrecqry = (Driver)Class.forName(MM_myesale_DRIVER).newInstance();
Connection Connrecqry = DriverManager.getConnection(MM_myesale_STRING,MM_myesale_USERNAME,MM_myesale_PASSWORD);
PreparedStatement Statementrecqry = Connrecqry.prepareStatement("SELECT *  FROM orders  WHERE ord_custid = " + recqry__MMColParam + " and ord_sendok='N'");
ResultSet recqry = Statementrecqry.executeQuery();
boolean recqry_isEmpty = !recqry.next();
boolean recqry_hasData = !recqry_isEmpty;
Object recqry_data;
int recqry_numRows = 0;
%>
<%
String reccust__MMColParam = "amber";
if (session.getValue("MM_Username")  !=null) {reccust__MMColParam = (String)session.getValue("MM_Username") ;}
%>
<%
Driver Driverreccust = (Driver)Class.forName(MM_myesale_DRIVER).newInstance();
Connection Connreccust = DriverManager.getConnection(MM_myesale_STRING,MM_myesale_USERNAME,MM_myesale_PASSWORD);
PreparedStatement Statementreccust = Connreccust.prepareStatement("SELECT *  FROM customers  WHERE username = '" + reccust__MMColParam + "'");
ResultSet reccust = Statementreccust.executeQuery();
boolean reccust_isEmpty = !reccust.next();
boolean reccust_hasData = !reccust_isEmpty;
Object reccust_data;
int reccust_numRows = 0;
%>
<%
int Repeat1__numRows = -1;
int Repeat1__index = 0;
recqry_numRows += Repeat1__numRows;
%>
<% String MM_paramName = ""; %>
<%
// *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters

String MM_keepBoth,MM_keepURL="",MM_keepForm="",MM_keepNone="";
String[] MM_removeList = { "index", MM_paramName };

// create the MM_keepURL string
if (request.getQueryString() != null) {
  MM_keepURL = '&' + request.getQueryString();
  for (int i=0; i < MM_removeList.length && MM_removeList[i].length() != 0; i++) {
  int start = MM_keepURL.indexOf(MM_removeList[i]) - 1;
    if (start >= 0 && MM_keepURL.charAt(start) == '&' &&
        MM_keepURL.charAt(start + MM_removeList[i].length() + 1) == '=') {
      int stop = MM_keepURL.indexOf('&', start + 1);
      if (stop == -1) stop = MM_keepURL.length();
      MM_keepURL = MM_keepURL.substring(0,start) + MM_keepURL.substring(stop);
    }
  }
}

// add the Form variables to the MM_keepForm string
if (request.getParameterNames().hasMoreElements()) {
  java.util.Enumeration items = request.getParameterNames();
  while (items.hasMoreElements()) {
    String nextItem = (String)items.nextElement();
    boolean found = false;
    for (int i=0; !found && i < MM_removeList.length; i++) {
      if (MM_removeList[i].equals(nextItem)) found = true;
    }
    if (!found && MM_keepURL.indexOf('&' + nextItem + '=') == -1) {
      MM_keepForm = MM_keepForm + '&' + nextItem + '=' + java.net.URLEncoder.encode(request.getParameter(nextItem));
    }
  }
}

String tempStr = "";
for (int i=0; i < MM_keepURL.length(); i++) {
  if (MM_keepURL.charAt(i) == '<') tempStr = tempStr + "&lt;";
  else if (MM_keepURL.charAt(i) == '>') tempStr = tempStr + "&gt;";
  else if (MM_keepURL.charAt(i) == '"') tempStr = tempStr +  "&quot;";
  else tempStr = tempStr + MM_keepURL.charAt(i);
}
MM_keepURL = tempStr;

tempStr = "";
for (int i=0; i < MM_keepForm.length(); i++) {
  if (MM_keepForm.charAt(i) == '<') tempStr = tempStr + "&lt;";
  else if (MM_keepForm.charAt(i) == '>') tempStr = tempStr + "&gt;";
  else if (MM_keepForm.charAt(i) == '"') tempStr = tempStr +  "&quot;";
  else tempStr = tempStr + MM_keepForm.charAt(i);
}
MM_keepForm = tempStr;

// create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL + MM_keepForm;
if (MM_keepBoth.length() > 0) MM_keepBoth = MM_keepBoth.substring(1);
if (MM_keepURL.length() > 0)  MM_keepURL = MM_keepURL.substring(1);
if (MM_keepForm.length() > 0) MM_keepForm = MM_keepForm.substring(1);
%>
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="java.util.*"%>
<%request.setCharacterEncoding("gb2312"); 
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>账户管理-订单查询</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
.样式2 {color: #FF6600}
.BOX {border: thick dashed #E68989;
}
.style4 {	font-family: "金梅浪漫反白字";
	font-weight: bold;
	font-size: 24px;
	color: #FF7F0F;
}
.style6 {color: #009933}
.style26 {font-size: 16px}
.style27 {color: #000000}
.style44 {
	font-size: 24px;
	color: #FFFFFF;
	font-weight: bold;
}
.style45 {color: #003300}
-->
</style>
</head>

<body>
<div align="center"></div>
<div align="center">
  <table width="200" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td colspan="7"><table width="200" border="3" align="center" cellpadding="2" cellspacing="1" bordercolor="#FFDEC1" class="style6">
          <tr>
            <td><img src="images/esale_title.jpg" width="760" height="120"></td>
          </tr>
      </table></td>
    </tr>
    <tr background="images/life_23.gif">
      <td height="20" colspan="7" background="images/line_top.gif">&nbsp;</td>
    </tr>
    <tr>
      <td width="23" rowspan="4" background="images/line_top.gif">&nbsp;</td>
      <td width="11" rowspan="4" valign="top">&nbsp;</td>
      <td rowspan="2" align="right" valign="top"><img src="images/border_ul.gif" width="50" height="51"></td>
      <td width="608"><div align="left">
        <p align="center">  <img name="title_account" src="images/title_ordqry.gif" width="237" height="50" border="0" alt=""><span class="style26"></span><img src="images/line.gif" width="536" height="16">            </p>
      </div></td>
      <td width="50" rowspan="2" align="left" valign="top"><img src="images/border_ur.gif" width="50" height="51"></td>
      <td width="11" rowspan="4">&nbsp;</td>
      <td width="21" rowspan="4" background="images/line_top.gif">&nbsp;</td>
    </tr>
    <tr>
      <td><div align="center">
        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="105" height="33">
          <param name="movie" value="swf/btn_pass.swf">
          <param name="quality" value="high">
          <embed src="swf/btn_pass.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="105" height="33" ></embed>
        </object>
        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="105" height="33">
          <param name="movie" value="swf/btn_ordered.swf">
          <param name="quality" value="high">
          <embed src="swf/btn_ordered.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="105" height="33" ></embed>
        </object>
        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="93" height="33">
          <param name="movie" value="swf/btn_back.swf">
          <param name="quality" value="high">
          <embed src="swf/btn_back.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="93" height="33" ></embed>
        </object>
      </div></td>
    </tr>
    <tr>
      <td width="50">&nbsp;</td>
      <td valign="top"><div align="center">
          <table width="100%" border="8" cellpadding="0" cellspacing="0" bordercolor="#FEB05D" bgcolor="#FFEED2">
            <tr>
              <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                  <td valign="top"><% if (!recqry_isEmpty ) { %>
<table width="100%"  border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#999999" id="orderlist">
                        <tr>
                          <td height="30" colspan="6"><span class="style26"> <%=(((reccust_data = reccust.getObject("cust_name"))==null || reccust.wasNull())?"":reccust_data)%>您好!! ,尚未出货的订单列表如下:
                            
                          </span></td>
                          </tr>
                        <tr bgcolor="#FFCC66">
                          <td><div align="center" class="style26"><span class="style27"> 订单编号 </span></div></td>
                            <td> <div align="center" class="style26">订购日期 <br>
                            (月/日/年) </div></td><td><div align="center" class="style26"><span class="style27">商品名称</span></div></td>
                            <td><div align="center" class="style26"><span class="style27">总价</span></div></td>
                            <td><div align="center" class="style26"><span class="style27">订单状态</span></div></td>
                            <td> <div align="center" class="style26">出货日期<br>
                            </div></td>
                        </tr>
                        <% while ((recqry_hasData)&&(Repeat1__numRows-- != 0)) { %>
                          <tr bgcolor="#F2F2F2">
                              <td width="14%"><%=(((recqry_data = recqry.getObject("ord_id"))==null || recqry.wasNull())?"":recqry_data)%></td>
                            <td width="19%"><%=(((recqry_data = recqry.getObject("ord_date"))==null || recqry.wasNull())?"":recqry_data)%></td>
                            <td width="25%"><div align="center"><A HREF="orderdetails.jsp?<%= MM_keepNone + ((MM_keepNone!="")?"&":"") + "ord_id=" + (((recqry_data = recqry.getObject("ord_id"))==null || recqry.wasNull())?"":recqry_data) %>">詳細資料</A></div></td>
                            <td width="11%"><%=(((recqry_data = recqry.getObject("ord_total"))==null || recqry.wasNull())?"":recqry_data)%></td>
                            <td width="11%"><%=(((recqry_data = recqry.getObject("ord_sendok"))==null || recqry.wasNull())?"":recqry_data)%></td>
                            <td width="20%"><%=(((recqry_data = recqry.getObject("ord_senddate"))==null || recqry.wasNull())?"":recqry_data)%></td>
                          </tr>
                          <%
  Repeat1__index++;
  recqry_hasData = recqry.next();
}
%>
</table>
                      <% } /* end !recqry_isEmpty */ %></td>
                </tr>
                <tr>
                  <td height="30" valign="top"><% if (recqry_isEmpty ) { %>
                      <table width="70%" border="0" align="center">
                        <tr>
                          <td><div align="center" class="style44 style45">目前无任何订单 </div></td>
                        </tr>
                      </table>
                      <% } /* end recqry_isEmpty */ %></td>
                </tr>
              </table>                </td>
            </tr>
          </table>
            </div></td>
      <td width="50">&nbsp;</td>
    </tr>
    <tr>
      <td align="right" valign="top"><img src="images/border_dl.gif" width="50" height="51"></td>
      <td width="608" valign="middle"><div align="center">
          <form name="form1" method="post" action="">
            <table width="80%" height="27" border="0" align="center">
              <tr>
                <td height="23"><div align="center"> <span class="style4">
                    <input type="submit" name="Submit3" value="回购物首页">
                </span> </div>                  <div align="center"></div></td>
              </tr>
            </table>
          </form>
      </div></td>
      <td align="left" valign="top" background="ima"><img src="images/border_dr.gif" width="50" height="51"></td>
    </tr>
    <tr>
      <td height="20" colspan="7" background="images/line_top.gif">&nbsp;</td>
    </tr>
  </table>
  
  <p>&nbsp;</p>
</div>
</body>
</html>
<%
recqry.close();
Statementrecqry.close();
Connrecqry.close();
%>
<%
recqry.close();
Statementrecqry.close();
Connrecqry.close();
%>
<%
reccust.close();
Statementreccust.close();
Connreccust.close();
%>
<%
reccust.close();
Statementreccust.close();
Connreccust.close();
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -