📄 coupon.jsp
字号:
<%@ include file="common_imports.jsp" %>
<%
showFlashy = false;
if(jspPath == null)
jspPath = "/shop/my_account.jsp";
//if (!isSignin) {
// request.getRequestDispatcher("/shop/login.jsp").forward(request,response);
//} else
if (! "admin".equals(userID)) {
request.getRequestDispatcher(jspPath).forward(request,response);
}
String selectAllCouponSQL = "SELECT couponid,contentid,value,description FROM OPERA_COUPON_INFO WHERE shopid='" + operaShopID + "'";
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
int[] selectAllCouponTypes = new int[] {java.sql.Types.VARCHAR,java.sql.Types.VARCHAR,java.sql.Types.FLOAT,java.sql.Types.VARCHAR};
String [] columnHeaders = {"Content Code", "Content ID", "Value","Description"};
Vector couponInfo = DBUtil.getRecords(selectAllCouponSQL, selectAllCouponTypes, null);
%>
<%@ include file="top_body.jsp" %>
<td width="700" valign="top" align="center">
<table width="680" border="0" cellspacing="0" cellpadding="5">
<tr>
<td class="song_title" colspan="2">
Coupon Info for <%=operaShopID%></td>
</tr>
<tr>
<td> </td>
<td width="580" align="center">
<table cellspacing="0" cellpadding="3" border="1">
<tr>
<%
for (int i=0; i < columnHeaders.length; i++) {
%>
<td class="subsong_detail" align="center"><b><%=columnHeaders[i]%></b></td>
<%
}
%>
</tr>
<%
if (couponInfo.size() > 0) {
for (int m=0; m <couponInfo.size(); m++) {
String[] aCoupon = (String[]) couponInfo.elementAt(m);
%>
<tr>
<%
for (int i=0; i < aCoupon.length; i++) {
if (aCoupon[i] == null || "".equals(aCoupon[i].trim()))
aCoupon[i] = " ";
%>
<td class="subsong_detail"><%=aCoupon[i]%></td>
<%
}
%>
</tr>
<%
}
} else {
%>
<tr>
<td class="star" style="font-weight:normal" colspan="<%=columnHeaders.length%>">
No coupon is available at this time.
</td>
</tr>
<%
}
%>
</table>
</td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2">
<a href="create_coupon.jsp" style="text-decoration:none;font-size:18px;">Create New Coupon</a></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
</table>
</td>
<%@ include file = "footer.jsp" %>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -