<%@ include file="header.jsp" %> <%@ page import="java.text.*" %> <% NumberFormat format = NumberFormat.getInstance(); format.setMaximumFractionDigits(2); format.setMinimumFractionDigits(2); format.setGroupingUsed(false); Product prod; if (request.getParameter("id") != null) { prod = ProductManager.getProduct(request.getParameter("id")); if (prod == null || prod.getId() < 0) { throw new Exception("Invalid product ID."); } boolean showLogs = true; Cookie cookie; Cookie[] cookies = request.getCookies(); if (cookies != null) { for (int x = 0; x < cookies.length; x++) { cookie = cookies[x]; if (cookie.getName().equals("nologs")) { showLogs = false; } } } if (showLogs) { LogManager.logProduct(request.getParameter("id"), request.getHeader("X-Forwarded-For")); } } else { throw new Exception("The product ID expected by this request was not found."); } %> MotoFrugals - <%= prod.getName() %>
<%= prod.getName() %> Back
<% if (prod.getSugPrice() > 0) { out.println(""); } %>
"); out.println("Suggested Price: $"+format.format(prod.getSugPrice())+""); out.println("
Our Price: $<%= format.format(prod.getPrice()) %>

<% int x = 0; if (prod.getVariations() != null) { String var; String curr; ArrayList list = prod.getVariations(); out.println(""); for (x = 0; x < list.size(); x++) { var = (String)list.get(x); StringTokenizer token = new StringTokenizer(var, ","); out.println(""); } out.println("
"); out.println(""); out.println("
"); } %> <% if (prod.getQty() != 0) { out.println(""); } %>
Email this page to a friend.
"); out.println("This item is in stock ready to ship!!"); out.println("

<%= prod.getLongDescription() %>


<% if (prod.getSimilar() != null) { ArrayList list = prod.getSimilar(); Product simProd; %> <% for (x = 0; x < list.size(); x++) { simProd = (Product)list.get(x); %> <%= (x != 0)?"":"" %> <% } out.println("
Related Products:
Here are some products that may also be of interest to you:

<%= simProd.getName() %>
<%= simProd.getShortDescription() %>
$<%= simProd.getPrice() %>
"); } %>
<%@ include file="footer.html" %>