【JSP开源代码栏目提醒】:网学会员鉴于大家对JSP开源代码十分关注,论文会员在此为大家搜集整理了“viewTypeShop.jsp”一文,供大家参考学习
<%@ page contentType="text/html;charset=GB2312" %>
<%@ taglib prefix="c" uri="/WEB-INF/tlds/c.tld" %>
<%@ taglib prefix="fn" uri="/WEB-INF/tlds/fn.tld" %>
<%@ page isELIgnored="false"%>
<jsp:include page="banner.jsp"/>
<table border="0" cellpadding="0" cellspacing="0" width="780">
<tr>
<td width="170">
<jsp:include page="userLogin.jsp"/>
</td>
<td>
<table border="0" cellpadding="0" cellspacing="0" width="607">
<tr>
<jsp:useBean id="shopOP" scope="page" class="javabean.shopOPBean"/>
<jsp:setProperty name="shopOP" property="shopTypeId" value="${param.shopTypeId}"/>
<c:set var="top6shop" value="<%=shopOP.selectShopByTypeTop6()%>"/>
<c:forEach items="${top6shop}" var="shop">
<td><a href="viewShop.jsp?shopId=${shop.shopid}">
<img border="0" src="admin/shopPicShow.jsp?shopid=${shop.shopid}" height="130">
</a></td>
</c:forEach>
</tr>
</table>
</td>
</tr>
</table>
<table width="780">
<c:set var="shops" value="<%=shopOP.selectShopByType()%>"/>
<c:set var="i" value="0"/>
<c:forEach items="${shops}" var="shop">
<c:if test="${i%4==0}">
<tr>
</c:if>
<td><font size="2" color="#000080">
<a href="viewShop.jsp?shopId=${shop.shopid}">
<c:if test="${fn:length(shop.shopname)>12}">
<li><c:out value="${fn:substring(shop.shopname,0,12)}"/>...
</c:if>
<c:if test="${fn:length(shop.shopname)<=12}">
<li><c:out value="${shop.shopname}"/>
</c:if></a>
</font></td>
<c:set var="i" value="${i+1}"/>
<c:if test="${i==4}">
</tr>
</c:if>
</c:forEach>
</table>
<jsp:include page="bottom.jsp"/>