📄 ordered.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %>
<%@ include file="Connections/myesale.jsp" %>
<%@ page import="java.util.*"%>
<%request.setCharacterEncoding("gb2312");
%>
<%
String reclist__MMColParam = "1";
if (session.getValue("custid") !=null) {reclist__MMColParam = (String)session.getValue("custid");}
%>
<%
Driver Driverreclist = (Driver)Class.forName(MM_myesale_DRIVER).newInstance();
Connection Connreclist = DriverManager.getConnection(MM_myesale_STRING,MM_myesale_USERNAME,MM_myesale_PASSWORD);
PreparedStatement Statementreclist = Connreclist.prepareStatement("SELECT * FROM orders WHERE ord_custid = " + reclist__MMColParam + " and ord_sendok='Y'");
ResultSet reclist = Statementreclist.executeQuery();
boolean reclist_isEmpty = !reclist.next();
boolean reclist_hasData = !reclist_isEmpty;
Object reclist_data;
int reclist_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;
reclist_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 + "<";
else if (MM_keepURL.charAt(i) == '>') tempStr = tempStr + ">";
else if (MM_keepURL.charAt(i) == '"') tempStr = tempStr + """;
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 + "<";
else if (MM_keepForm.charAt(i) == '>') tempStr = tempStr + ">";
else if (MM_keepForm.charAt(i) == '"') tempStr = tempStr + """;
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);
%>
<!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}
.style26 {font-size: 16px}
.style27 {color: #000000}
.style4 {font-family: "金梅浪漫反白字";
font-weight: bold;
font-size: 24px;
color: #FF7F0F;
}
.style6 {color: #009933}
.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"> </td>
</tr>
<tr>
<td width="21" rowspan="4" background="images/line_top.gif"> </td>
<td width="20" rowspan="4" valign="top"> </td>
<td rowspan="2" align="right" valign="top"><img src="images/border_ul.gif" width="50" height="51"></td>
<td width="548" align="center"><div align="center"><img name="title_account" src="images/title_ordered.gif" width="222" height="50" border="0" alt=""><img src="images/line.gif" width="536" height="16"></div></td>
<td width="50" rowspan="2" align="left" valign="top"><img src="images/border_ur.gif" width="50" height="51"></td>
<td width="20" rowspan="4"> </td>
<td width="20" rowspan="4" background="images/line_top.gif"> </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="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>
<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="BGCOLOR" value="">
<param name="movie" value="swf/btn_orderqry.swf">
<param name="quality" value="high">
<embed src="swf/btn_orderqry.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="BGCOLOR" value="">
<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>
</div></td>
</tr>
<tr>
<td width="50"> </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 (!reclist_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">付款方式</div></td>
<td>
<div align="center" class="style26">出货日期<br>
</div></td>
</tr>
<% String paystring="";%>
<% while ((reclist_hasData)&&(Repeat1__numRows-- != 0)) { %>
<%
int paytype=reclist.getInt("ord_paytype");
if (paytype==1) paystring="ATM转帐";
else paystring="邮政划拨";
%>
<tr bgcolor="#F2F2F2">
<td width="14%"><%=(((reclist_data = reclist.getObject("ord_id"))==null || reclist.wasNull())?"":reclist_data)%></td>
<td width="18%"><div align="center"><%=(((reclist_data = reclist.getObject("ord_date"))==null || reclist.wasNull())?"":reclist_data)%></div></td>
<td width="16%"><div align="center"><A HREF="orderdetails.jsp?<%= MM_keepNone + ((MM_keepNone!="")?"&":"") + "ord_id=" + (((reclist_data = reclist.getObject("ord_id"))==null || reclist.wasNull())?"":reclist_data) %>">详细信息</A></div></td>
<td width="18%">$<%=(((reclist_data = reclist.getObject("ord_total"))==null || reclist.wasNull())?"":reclist_data)%></td>
<td width="15%"><%=paystring%></td>
<td width="19%"><%=(((reclist_data = reclist.getObject("ord_senddate"))==null || reclist.wasNull())?"":reclist_data)%></td>
</tr>
<%
Repeat1__index++;
reclist_hasData = reclist.next();
}
%>
</table>
<% } /* end !reclist_isEmpty */ %>
</td>
</tr>
<tr>
<td height="30" valign="top"><% if (reclist_isEmpty ) { %>
<table width="70%" border="0" align="center">
<tr>
<td><div align="center" class="style44 style45">你目前无任何购物记录 </div></td>
</tr>
</table>
<% } /* end reclist_isEmpty */ %></td>
</tr>
</table></td>
</tr>
</table>
</div></td>
<td width="50"> </td>
</tr>
<tr>
<td align="right" valign="top"><img src="images/border_dl.gif" width="50" height="51"></td>
<td width="548" valign="middle"><div align="center">
<table width="80%" 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>
</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"> </td>
</tr>
</table>
</div>
</body>
</html>
<%
reclist.close();
Statementreclist.close();
Connreclist.close();
%>
<%
reccust.close();
Statementreccust.close();
Connreccust.close();
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -