All pastes #900964 Raw Edit

Someone

public html v1 · immutable
·published 2008-02-12 08:55 UTC
rendered paste body
<%@ page     contentType="text/html"     pageEncoding="UTF-8" %><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %><%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %><%@ taglib prefix="fn" uri="/WEB-INF/functions.tld" %><c:if test="${!fn:contains(module, 'ls_prd')}">    <jsp:forward page="/user/forbidden.jsp"/></c:if><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />    <link rel="stylesheet" type="text/css" href="${contextPath}/images/Refresh.css"/>    <title>Product List</title></head>    <body>    <div id="wrap">            <jsp:include page="/WEB-INF/jspf/header.jsp"/>    <jsp:include page="/WEB-INF/jspf/menu.jsp">        <jsp:param name="current" value="data"/>    </jsp:include>        <!-- content wrap starts here -->    <div id="content-wrap">            <div id="sidebar">            <jsp:include page="/WEB-INF/jspf/sidebar.jsp">                <jsp:param name="current" value="data"/>            </jsp:include>        </div>                <div id="main">                        <form class="search" method="get">                <input type="text" name="filter" value="${param.filter}"/>                                <input class="button" type="submit" value="search"/>            </form>                                    <sql:setDataSource dataSource="${retailDBJNDI}"/>            <sql:query var="products">                SELECT                     id, name, unit, description, createSince,                    price1, price2, price3                FROM                     Product                <c:if test="${!empty param.filter}">                    WHERE id LIKE ? OR name LIKE ? OR description LIKE ?                    <sql:param value="%${param.filter}%"/>                    <sql:param value="%${param.filter}%"/>                    <sql:param value="%${param.filter}%"/>                </c:if>            </sql:query>                        <p>                            <div style="font-weight:bold; font-size:130%">Product List</div>            </p>                        <p>                                <c:if test="${fn:contains(module, 'add_prd')}">                    <div>                        <a href="${contextPath}/data/addProduct.jsp">                            <img src="${contextPath}/images/add.gif"/>Add New Product                        </a>                    </div>                </c:if>                                                <table cellspacing="0">                                    <tr>                        <th>Id</th>                        <th>                            Name                            <div style="font-size:80%; font-style:italic">Description</div>                        </th>                        <th>Unit</th>                        <th>Retail</th>                        <th>Reseller</th>                        <th>...</th>                        <th>Since</th>                        <th>&nbsp;</th>                    </tr>                                        <c:set var="altFlag" value="true"/>                    <c:forEach var="product" items="${products.rows}">                        <tr>                            <td ${(altFlag)? "class=\"specalt\"" : "class=\"spec\""} >                                <c:choose>                                    <c:when test="${fn:contains(module, 'edt_prd')}">                                        <a href="${contextPath}/data/editProduct.jsp?prd=${fn:encodeURL(product.id, 'UTF-8')}">                                            ${fn:encodeHTML(product.id)}                                        </a>                                    </c:when>                                    <c:otherwise>                                        ${fn:encodeHTML(product.id)}                                    </c:otherwise>                                </c:choose>                            </td>                            <td ${(altFlag)? "class=\"alt\"" : ""} >                                ${fn:encodeHTML(product.name)}                                <div style="font-size:80%; font-style:italic">${fn:encodeHTML(product.description)}</div>                            </td>                            <td ${(altFlag)? "class=\"alt\"" : ""} >${fn:encodeHTML(product.unit)}</td>                            <td ${(altFlag)? "class=\"alt\"" : ""} >${product.price1}</td>                            <td ${(altFlag)? "class=\"alt\"" : ""} >${product.price2}</td>                            <td ${(altFlag)? "class=\"alt\"" : ""} >${product.price3}</td>                            <td ${(altFlag)? "class=\"alt\"" : ""} ><fmt:formatDate value="${product.createSince}" /></td>                            <td>                                <c:choose>                                    <c:when test="${fn:contains(module, 'del_prd')}">                                        <a href="${contextPath}/controller?action=deleteProduct&prd=${fn:encodeURL(product.id, 'UTF-8')}&transactionId=${transactionId}"                                        onclick="return confirm('Are you sure want to delete this product?')">                                            <img src="${contextPath}/images/delete.gif"/>                                        </a>                                    </c:when>                                    <c:otherwise>                                        &nbsp;                                    </c:otherwise>                                </c:choose>                            </td>                        </tr>                        <c:set var="altFlag" value="${!altFlag}"/>                    </c:forEach>                                    </table>            </p>                    </div>            <!-- content wrap ends here -->        </div>        <jsp:include page="/WEB-INF/jspf/footer.jsp"/>    </div>        </body></html>