📄 category.jsp
字号:
<%@ page contentType="text/html" pageEncoding="UTF-8"%>
<%@ page
import="java.sql.*,com.shopping.dao.*,com.shopping.vo.*,java.util.*"%>
<%@page import="com.shopping.factory.DAOFactory;"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>创意生活</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8"><LINK
href="image/style.css" type=text/css rel=stylesheet>
<SCRIPT language=javascript src="image/overlib.js"></SCRIPT>
<%
if("success".equals(request.getAttribute("info"))){
%>
<script type="text/javascript">
alert("操作成功");
</script>
<%
}else if("wrong".equals(request.getAttribute("info"))){
%>
<script type="text/javascript">
alert("操作失败!请重试");
</script>
<% }%>
<META content="MSHTML 6.00.6000.16587" name=GENERATOR></HEAD>
<BODY>
<%
Admin admin = (Admin)session.getAttribute("admin");
if(admin==null){
response.sendRedirect("adminLogin.jsp");
}
UnifyDao catDao = null;
catDao = (UnifyDao) DAOFactory.getBean("com.shopping.dao.imp.CatDaoImp");
%>
<FORM id=Form1 name=Form1 action=Category.aspx method=post>
<SCRIPT language=javascript>
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1) {
theform = document.forms["Form1"];
}
else {
theform = document.Form1;
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
</SCRIPT>
<TABLE class=tableBorder cellSpacing=0 cellPadding=0 width=640 align=center
border=0>
<TBODY>
<TR>
<TH class=tableHeaderText align=left height=25> 商品类别管理</TH>
<TH class=tableHeaderText align=right><A href=""
target=_blank><IMG alt=帮助 src="image/admin_help.gif"
border=0></A> </TH>
<TR></TR></TBODY></TABLE>
<TABLE class=tableBorder cellSpacing=0 cellPadding=0 width=640 align=center
border=0>
<TBODY>
<TR>
<TD class=forumRowHighlight height=23>
<TABLE id=dgCategoryList style="WIDTH: 100%; BORDER-COLLAPSE: collapse"
cellSpacing=0 rules=all align=center border=1>
<TBODY>
<TR class=summary-title style="FONT-WEIGHT: bold">
<TD align=middle>分类ID</TD>
<TD align=left>类别名称</TD>
<TD align=middle>商品</TD>
<TD align=middle> </TD>
<TD> </TD></TR>
<%
List<Category> list1 = catDao.getTable(0);
for(Iterator<Category> it = list1.iterator();it.hasNext();){
Category cg = it.next();
int pid = cg.getId();
%>
<TR onMouseOver="this.style.backgroundColor='#EDF6FF'"
onmouseout="this.style.backgroundColor='#f3f3f3'">
<TD style="WIDTH: 40px" align=middle><%=cg.getId() %> </TD>
<TD align=left><IMG height=1 src="Category_files/empty.gif" width=0
align=absMiddle>├<A
href="item.do?action=search&Keyword=&id=<%=cg.getId() %>"><%=cg.getName()%></A>
</TD>
<TD style="WIDTH: 30px" align=middle><A
href="item.do?action=search&Keyword=&id=<%=cg.getId() %>">查看</A> </TD>
<TD style="WIDTH: 30px" align=middle><A
href="categoryModify.jsp?id=<%=cg.getId() %>">修改</A> </TD>
<TD style="WIDTH: 30px" align=middle><A
href="categoryOpe.do?action=delete&id=<%=cg.getId() %>">
<DIV id=de
onclick="javascript:return confirm('真的要删除吗?此操作将删除属于该类别的所有商品!')">删除</DIV></A></TD></TR>
<%
List<Category> list2 = catDao.getTable(pid);
for(Iterator<Category> it2 = list2.iterator();it2.hasNext();){
Category cg2 = it2.next();
%>
<TR onMouseOver="this.style.backgroundColor='#EDF6FF'"
onmouseout="this.style.backgroundColor='#f3f3f3'">
<TD style="WIDTH: 40px" align=middle><%=cg2.getId() %></TD>
<TD align=left> ├<A
href="item.do?action=search&Keyword=&id=<%=cg2.getId() %>"><%=cg2.getName()%></A>
</TD>
<TD style="WIDTH: 30px" align=middle><A
href="item.do?action=search&Keyword=&id=<%=cg2.getId() %>">查看</A> </TD>
<TD style="WIDTH: 30px" align=middle><A
href="categoryModify.jsp?id=<%=cg2.getId() %>">修改</A> </TD>
<TD style="WIDTH: 30px" align=middle><A
href="categoryOpe.do?action=delete&id=<%=cg2.getId() %>">
<DIV id=de
onclick="javascript:return confirm('真的要删除吗?此操作将删除属于该类别的所有商品!')">删除</DIV></A></TD></TR>
<%
}
}
%>
</TBODY></TABLE></TD></TR></TBODY></TABLE></FORM>
<DIV align=center>
<DIV id=copyright>Powered by <A class=thisclass href=""
target=_blank style="color: maroon">qizhenwei</A> Copyright ©
2008- 飞越Apache<FONT
class=thisclass3>.</FONT></DIV></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -