home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / JAVA Utilities / JProxy 1.1.0 / customers / BUY.JSP < prev    next >
Encoding:
Text File  |  2003-04-29  |  1007 b   |  46 lines

  1. <%@ page language="java" import="
  2.     java.util.*,
  3.     com.jproxy.site.customers.*"
  4. %>
  5.  
  6. <jsp:useBean id="buycustomers" scope="request" class="com.jproxy.site.customers.Buy"/>
  7. <%
  8. buycustomers.request(pageContext);
  9. boolean isOem = buycustomers.ses.getLogin().getHasClients();
  10. boolean isUpgrade = false;
  11. if(buycustomers.getParameter("is-upgrade").length()>0)
  12.     isUpgrade = buycustomers.getParameter("is-upgrade").equalsIgnoreCase("true");
  13.  
  14. if (!buycustomers.ses.isLoggedIn())
  15. {
  16. %>
  17.   <jsp:forward page="login.jsp">
  18.   </jsp:forward>
  19. <%
  20. }
  21. %>
  22.  
  23. <%
  24. if(buycustomers.forwardPage.length()>0)
  25. {
  26. %>
  27.   <jsp:forward page="<%=buycustomers.forwardPage%>">
  28.   </jsp:forward>
  29. <%
  30. }
  31. %>
  32.  
  33. <%
  34. String href = "buy-customer.jsp";
  35. if(isOem&&!isUpgrade)
  36.     href = "buy-oem.jsp";
  37. if(isOem&&isUpgrade)
  38.     href = "buy-oem-upgrade.jsp";
  39. if(!isOem&&!isUpgrade)
  40.     href = "buy-customer.jsp";
  41. if(!isOem&&isUpgrade)
  42.     href = "buy-customer-upgrade.jsp";
  43. %>
  44. <jsp:include page="<%=href%>" flush="true">
  45. </jsp:include>
  46.