📄 download.jsp
字号:
<%@ include file="common_imports.jsp" %>
<%
pageTitle = "Download";
if (jspPath == null)
jspPath = "/shop/index.jsp";
String downloadPath = "/shop/download/";
HashMap purchasedCart = (HashMap) sessioncache.getAttribute(sessionId,"opera.items_purchased");
String sql = "SELECT meta.title, prod.category, prod.filename FROM SHOP_PRODUCT prod LEFT OUTER JOIN OPERA_CONTENT_METADATA meta ON prod.contentid = meta.contentid WHERE prod.contentid = ?";
int[] productInfoTypes = new int[] { java.sql.Types.VARCHAR, java.sql.Types.VARCHAR,java.sql.Types.VARCHAR};
/*
Vector items = null;
if(userID != null) {
String sql = "SELECT trans.contentid, product.description, product.category, product.filename FROM SHOP_PRODUCT product, SHOP_TRANSACTION trans WHERE trans.userid='" +
userID + "' AND trans.contentid = product.contentid";
int[] types = {java.sql.Types.VARCHAR, java.sql.Types.VARCHAR,java.sql.Types.VARCHAR,java.sql.Types.VARCHAR};
items = DBUtil.getRecords(sql, types, null);
}
*/
%>
<%@ include file="top_body.jsp" %>
<td width="395" valign="top">
<table width="375" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="375" border="0" cellspacing="0" cellpadding="0">
<tr>
<td >
<TABLE width="70%" border="1" cellspacing="0" cellpadding="2">
<TR>
<TD width="45%" class="body_text"><b>Product ID</b></TD>
<TD class="body_text" ><b>Description</b></TD>
<TD class="body_text" ><b>Category</b></TD>
<TD class="body_text"><b>Play</b></tD>
</TR>
<%
if (purchasedCart == null) {
%>
<TR>
<TD colspan="4" class="body_text" >You have not purchased any products.</TD>
</TR>
<%
} else {
Set enum1 = purchasedCart.keySet();
Iterator iter = enum1.iterator();
while(iter.hasNext()) {
String item = (String) iter.next();
String[] productInfo = DBUtil.getRecord(sql,
productInfoTypes, null, new Object[] {item});
%>
<TR>
<TD class="body_text" ><%=item%></TD>
<TD class="body_text" ><%=productInfo[0]%></TD>
<TD class="body_text" ><%=productInfo[1]%></TD>
<TD class="body_text" ><A HREF="<%=(productInfo[2])%>"><%=item%></A></TD>
</TR>
<%
}
}
%>
<tr>
<td colspan="4"> </td>
</tr>
<TR>
<TD colspan="4" align="center"><A HREF="index.jsp" style="text-decoration:none;">
<IMG SRC="images/continue_shop.gif" border="0"></A></TD>
</TR>
</TABLE>
</td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="175"> </td>
<td width="175"> </td>
</tr>
</table>
</td>
<%@ include file="footer.jsp" %>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -