📄 top.jsp
字号:
<%@page contentType="text/html; charset=GBK"
import="netshop.util.*,netshop.businessobjects.*"%>
<%@taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%>
<%@taglib uri="/WEB-INF/struts-nested.tld" prefix="nested"%>
<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@taglib uri="/WEB-INF/struts-template.tld" prefix="template"%>
<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<DIV align=center>
<TABLE cellSpacing=0 cellPadding=0 width=980 border=0>
<TBODY>
<TR>
<TD bgColor=#ececf4 colSpan=4 height=5></TD>
</TR>
<TR>
<TD width=300 rowSpan=2><html:img border="0" page="/images/flag.jpg" /></TD>
<TD align=right colSpan=3 height=35>
<P style="MARGIN-RIGHT: 1px"><%!private boolean hasLogin(HttpSession session) {
Object o = session.getAttribute(Constants.SESSION_CONTAINER_KEY);
if (o != null && o instanceof SessionContainer) {
SessionContainer sc = (SessionContainer) o;
User u = sc.getUser();
if (u != null)
return true;
}
return false;
}
%> <%if (!hasLogin(session)) {
%> <html:img width="15" height="15" align="absMiddle" border="0"
page="/images/topl1.gif" /> <html:link page="/main/reg.jsp">
<bean:message key="user.registration" />
</html:link> <html:img width="15" height="15"
align="absMiddle" border="0" page="/images/topl2.gif" /> <html:link
page="/main/login.jsp">
<bean:message key="user.login" />
</html:link> <%} else {
%> <html:img width="15" height="15" align="absMiddle" border="0"
page="/images/topl1.gif" /> <html:link page="/main/main.jsp">
<bean:message key="user.manager" />
</html:link> <html:img width="15" height="15"
align="absMiddle" border="0" page="/images/topl2.gif" /> <html:link
page="/logoutAction.do">
<bean:message key="user.logout" />
</html:link> <%}
%> <html:img width="15" height="15" align="absMiddle"
border="0" page="/images/topl3.gif" /> <html:link
page="/main/shoppingCart.jsp">
<bean:message key="shopping.cart" />
</html:link> <html:img width="15" height="15"
align="absMiddle" border="0" page="/images/topl4.gif" /> <html:link
page="/showOrdersAction.do">
<bean:message key="user.order" />
</html:link> <html:img width="15" height="15" align="absMiddle"
border="0" page="/images/topl6.gif" /> <html:link
page="/localeConverterAction.do">
<bean:message key="locale.language" />
</html:link> </P>
</TD>
</TR>
<TR>
<TD vAlign=bottom align=right width=150><html:img border="0"
page="/images/tel.gif" /></TD>
<TD vAlign=bottom align=right width=10></TD>
<TD width=400><B> <bean:message key="netshop.phone" /> <FONT
style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">0573-3642404</FONT>
<bean:message key="netshop.qq" /> <FONT
style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">281465073</FONT> </B></TD>
</TR>
<TR>
<TD colSpan=4>
<TABLE height=24 cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD align="center" width=120 height=24></TD>
<!--iterate-->
<logic:iterate id="category" name="category.container"
scope="application">
<logic:empty name="category" property="parentCategory">
<%boolean select = ((Category) pageContext
.getAttribute("category"))
.equals(session
.getAttribute(Constants.CURRENT_PARENT_CATEGORY_KEY));
if (select) {
%>
<TD align="center" width=79 background="<%=request.getContextPath()%>/images/toplanf.gif"
height=24><%} else {
%>
<TD align="center" width=79 background="<%=request.getContextPath()%>/images/toplanb.gif"
height=24><%}
%> <a
href="/netshop/showItemsAction.do?categoryId=<bean:write name="category" property="id"/>">
<bean:write name="category" property="name" /></a></TD>
<TD align="center" width=3 height=24></TD>
</logic:empty>
</logic:iterate>
<!--iterate-->
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
<TR>
<TD colSpan=4 height=23 bgColor=#A6D7F5>
<P style="MARGIN-LEFT: 100px"><bean:message key="category.choose" />
<logic:present name="<%=Constants.CURRENT_PARENT_CATEGORY_KEY%>">
<logic:notEmpty name="<%=Constants.CURRENT_PARENT_CATEGORY_KEY%>"
property="childCategories" scope="session">
<logic:iterate id="child"
name="<%=Constants.CURRENT_PARENT_CATEGORY_KEY%>"
property="childCategories" scope="session">
<a
href="/netshop/showItemsAction.do?categoryId=<bean:write name="child" property="id"/>">
<bean:write name="child" property="name" /></a>
</logic:iterate></P>
</TD>
</logic:notEmpty>
</logic:present>
</TR>
<TR>
<TD align="center" bgColor=#f6f6f6 colSpan=4><tiles:insert
attribute="searchbar" /></TD>
</TR>
<TR>
<TD align="center" colSpan=4 height=3></TD>
</TR>
</TBODY>
</TABLE>
</DIV>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -