📄 mylist.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java"
import="java.sql.*"%>
<%
request.setCharacterEncoding("gb2312");
%>
<%@ page import="java.util.Vector"%>
<jsp:useBean id="databean" scope="session" class="ConnBean.conn" />
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>我的订单</title>
</head>
<link href="../images/style.css" rel="stylesheet">
<body>
<TABLE width=760 border=0 align="center" cellPadding=0 cellspacing="0"
bgcolor="#FFFFFF" style="BORDER-COLLAPSE: collapse">
<jsp:include page="top_mybandao.jsp" />
</table>
<table width="300" height="340" border="1" align="center"
cellpadding="0" cellspacing="0" bordercolor="#0000ff">
<tr>
<td valign="top">
<table width="800" height="127" border="0" align="center"
cellpadding="0" cellspacing="00">
<tr align="center" valign="middle" background="../images/top1.gif">
<td height="42" colspan="8" nowrap class="head">
<font color="#FF0000"> <%
if (session.getAttribute("user") == null) {
out
.print("<script language=\"JavaScript\">alert(\"登录后才能查看自己的订单!\");location.href=\"../index.jsp\"</script>");
} else {
out.println(session.getAttribute("user"));
}
%> </font> ,您的订单情况如下
<input type="button" value="退 出"
onclick="javascript:location.href='mybandao.jsp';">
</td>
</tr>
<tr align="center" valign="middle" bgcolor="#4ad7fa">
<td align="center" height="22" colspan="8" nowrap class="head">
<font size="5" face="华文行楷" class="bgcolor">
我 的 订 单 </font>
</td>
</tr>
<tr align="center" valign="middle" class="bgcolor">
<td width="260" height="21" class="bgcolor">
<strong> 订单号 </strong>
</td>
<td width="120" height="21" class="bgcolor">
<strong> 金额 </strong>
</td>
<td width="120" height="21" class="bgcolor">
<strong> 是否发货 </strong>
</td>
</tr>
<tr align="center" valign="middle" class="bgcolor">
<td width="260" height="10" class="bgcolor">
</td>
</tr>
<%
String username = (String) session.getAttribute("user");
try {
String sql = "select * from userorderlist where UserName='"
+ username + "'";
ResultSet rs = databean.executeQuery(sql);
while (rs.next()) {
String no = rs.getString("OrderlistNo");
String sum = rs.getString("TotalPrice");
String issendout = rs.getString("IsSendout");
%>
<tr align="center" valign="middle" class="bgcolor">
<td width="260" height="21" class="bgcolor">
<A href="../orderlist/query.jsp?subid=<%out.print(no);%>" class=link_b07 href="#"
target=_self> <%out.print(no);%> </A>
</td>
<td width="120" height="21" class="bgcolor">
¥
<%
out.print(sum);
%>
</td>
<td width="120" height="21" class="bgcolor">
<%
out.print(issendout);
%>
</td>
</tr>
<%
}
} catch (SQLException e) {
e.printStackTrace();
}
%>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -