?? goodslist.jsp
字號(hào):
<%@ page contentType="text/html;charset=gb2312"%>
<%@page import="java.util.*"%>
<%@page import="java.io.*"%>
<%@page import="java.sql.*,java.lang.Double.*"%>
<%@include file="comm.jsp"%>
<html>
<body >
<div>
<table>
<tr>
<td width="236" align=center valign=top><br>
<p ><font color="#000080"><a href=CustomerInfo.jsp?action=view>我的資料</a></font></p>
<p>商品信息
<br> <a href="GoodsList.jsp?type=1">可用商品</a>
</p>
<p>我的購物車
<br> <a href="CartInfo.jsp?action=view&type=1">未提交訂單</a>
<br> <a href="CartInfo.jsp?action=view&type=2">已提交訂單</a>
<br> <a href="CartInfo.jsp?action=view&type=3">已發(fā)貨訂單</a>
</p>
<p>帳單管理
<br> <a href="CustomerBill.jsp?action=view&type=1">已匯款帳單</a>
<br> <a href="CustomerBill.jsp?action=view&type=2">已確認(rèn)帳單</a>
</td>
<%
String CustomerID=(String)session.getValue("user");
String Type=request.getParameter("type"); //用于判斷商品查看類型
int iType=Integer.parseInt(Type);
if(CustomerID==null)
{%>
<jsp:forward page="CustomerLogin.htm"/>
<%}%>
<td align=center valign=top>
<p align=center>歡迎您:<%=CustomerID%></p>
<table>
<tr bgcolor=#E9E9D1>
<td width=59>ID</td>
<td width=169>商品名</td>
<td width=159>商品類型</td>
<td width=70>單價(jià)</td>
<td width=80>當(dāng)前數(shù)量</td>
<td width=50></td>
</tr>
<%
strSql="{call dbo.sp_GetAllGoods(?)}";
cstmt=conn.prepareCall(strSql);
cstmt.setInt(1,iType);
rs=cstmt.executeQuery();
while(rs.next())
{
%>
<tr bgcolor="#EAFfFff">
<td><%=rs.getInt(1)%></td>
<td><%=new String(rs.getString(2).getBytes("8859_1"),"gb2312")%></td>
<td><%=new String(rs.getString(3).getBytes("8859_1"),"gb2312")%></td>
<td><%=rs.getDouble(4)%></td>
<td><%=rs.getInt(5)%></td>
<%if(iType==1) {%>
<td><a href=CartInfo.jsp?action=insert&type=1&GoodsID=<%=rs.getString(1)%>&Price=<%=rs.getDouble(4)%>>購買</a></td>
<%}%>
</tr>
<%}%>
</table>
</td>
<%
rs.close();
cstmt.close();
conn.close();
%>
</tr>
</table>
</div>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -