⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 indexori.jsp

📁 毕业设计 网上商店 Ecilpse开发
💻 JSP
📖 第 1 页 / 共 2 页
字号:
<%@ page language="java" import="java.util.*" pageEncoding="GB18030"%>
<%@ page import="com.lufan.shopping.category.*"%>
<%@ page import="com.lufan.shopping.page.*"%>

<%!
private List<Category> getTopCategories(List<Category> categories) {
	List<Category> topCategories = new ArrayList<Category>();
	for(int i=0; i<categories.size(); i++) {
		Category c = categories.get(i);
		if(c.getGrade() == 1) {
			topCategories.add(c);
		}
	}
	return topCategories;
}

private List<Category> getChilds(Category parent, List<Category> categories) {
	List<Category> childs = new ArrayList<Category>();
	for(int i=0; i<categories.size(); i++) {
		Category c = categories.get(i);
		if(c.getPid() == parent.getId()) {
			childs.add(c);
		}
	}
	return childs;
}

private String getChildsStr(List<Category> childs) {
	StringBuffer buf = new StringBuffer();
	for(int i=0; i<childs.size(); i++) {
		Category c = childs.get(i);
		buf.append("<a href='ShowProducts.jsp?categoryId=" + c.getId() + "'>")
		   .append(c.getName()).append("</a>")
		   .append("-");
	}
	return buf.toString();
}
 %>

<%
List<Category> categories = CategoryService.getInstance().getCategories();
List<Category> topCategories = getTopCategories(categories);
 %>
 
    <%
    List<Product> la = ProductOperate.getProducts(1);
    Iterator<Product> itera =la.iterator();
	Product pa[];
	pa = new Product[20];
	int ia=0;
    while(itera.hasNext()){
    	pa[ia] = (Product)itera.next();
     	ia++;
    }
    %> 
	    <%
    List<Product> lb= ProductOperate.getProducts(1);
    Iterator<Product> iterb =lb.iterator();
	Product pb[];
	pb = new Product[20];
	int ib=0;
    while(iterb.hasNext()){
    	pb[ib] = (Product)iterb.next();
     	ib++;
    }
    %> 
	    <%
    List<Product> lc = ProductOperate.getProducts(1);
    Iterator<Product> iterc =lc.iterator();
	Product pc[];
	pc = new Product[20];
	int ic=0;
    while(iterc.hasNext()){
    	pc[ic] = (Product)iterc.next();
     	ic++;
    }
    %> 
 
 
 
 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>诚信玉器店</title>
<style type="text/css">
<!--
body,td,th {
	font-size: 12px;
}
.left_nav {
	border: 1px solid #666666;
	width: 162px;
}
.right_notice {
	font-family: "新宋体";
	font-size: 12px;
	font-style: normal;
	line-height: normal;
	color: #000000;
	position: inherit;
	height: 20px;
	word-spacing: 2px;
	top: 2px;
	page-break-before: left;
	text-align: left;
	background-color: #e8f3f9;
}
.product_show {
	font-family: "宋体";
	font-size: 10px;
	font-style: normal;
	line-height: normal;
	font-weight: normal;
	font-variant: normal;
	text-transform: none;
	white-space: normal;
	display: table;
	clear: none;
	float: none;
	height: 30px;
	width: 275px;
	position: absolute;
	page-break-before: left;
	page-break-after: right;
}
.STYLE1 {font-family: "宋体"}
-->
</style>
</head>

<body><center>
<table width="896" border="0" cellpadding="0" cellspacing="0">
  <!--DWLayoutTable-->
  <tr>
    <td height="94" colspan="4" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <!--DWLayoutTable-->
      <tr>
        <td width="53" height="54">&nbsp;</td>
          <td width="214" rowspan="5" valign="top"><img src="img/sign.jpg" width="205" height="89" /></td>
          <td width="63"></td>
          <td width="103"></td>
          <td width="104"></td>
          <td width="118"></td>
          <td width="47"></td>
          <td>&nbsp;</td>
      </tr>
      <tr>
        <td height="12"></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td rowspan="2" valign="top" nowrap="nowrap">我的帐户 | <img src="img/topnav_cart.gif" width="29" height="21" />购物车 | 收藏本站 | 帮助中心</td>
        <td></td>
      </tr>
      
      
      
      
      
      <tr>
        <td height="11"></td>
          <td></td>
          <td rowspan="2" valign="top">首页</td>
          <td rowspan="2" valign="top">所有商品分类</td>
          <td></td>
          <td></td>
      </tr>
      <tr>
        <td height="13"></td>
        <td></td>
        <td>&nbsp;</td>
        <td></td>
        <td></td>
      </tr>
      
      
      
      
      
      <tr>
        <td height="16"></td>
          <td></td>
          <td></td>
          <td></td>
          <td></td>
          <td></td>
          <td></td>
      </tr>
      
      
      
      
      
      
      
      
    </table></td>
  </tr>
  <tr>
    <td height="29" colspan="3" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <!--DWLayoutTable-->
      <tr>
        <td width="453" height="29" align="center" valign="baseline" >分类一 | 分类二 | 分类三 | 分类四 | 分类五 | 特别推荐 | 本周特价</td>
          <td width="31" >&nbsp;</td>
          <td width="407" valign="top" ><form id="form1" name="form1" method="post" action="">
            <label>找商品 
              <input type="text" name="textfield" />
              </label>
            <label>
              <select name="select" size="1">
                <option selected="selected">搜所有类别</option>
                <option>分类一</option>
                <option>分类二</option>
                <option>分类三</option>
                <option>分类四</option>
                <option>分类五</option>
              </select>
              </label>
            <input src="img/search.gif" name="search" border="0" height="25" type="image" width="38" />   
          </form></td>
        </tr>
    </table></td>
  <td width="7">&nbsp;</td>
  </tr>
  <tr>
    <td height="40" colspan="4" valign="top"><img src="img/ad.jpg" width="896" /></td>
  </tr>
  <tr>
    <td width="162" height="831" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <!--DWLayoutTable-->
      <tr>
        <td width="162" height="115" valign="top">
          <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#e8f3f9" class="left_nav">
            <!--DWLayoutTable-->
		    <td width="160" height="114" align="center" valign="top" bgcolor="#e8f3f9"><table border="0" cellpadding="0" cellspacing="0" width="95%">
                                  <form method="post" action="Login.jsp">
                                  <tbody>
                                    <tr>
                                      <td align="left" height="25" width="73%">会员号:
                                        <input name="username" size="14" style="font-size: 12px;" type="text"></td>
                                      <td rowspan="2" width="27%">
                                      	<input src="images/down.gif" name="B2" border="0" height="45" type="image" width="45"></td>
                                    </tr>
                                    <tr>
                                      <td align="left">密 码:
                                        <input name="password" size="15" style="font-size: 11px;" type="password"></td>
                                    </tr>
                                    <tr>
                                      <td colspan="2" height="30"><p align="center">[<a href="Register.jsp">新用户注册</a>] &nbsp;</p></td>
                                    </tr>
                                  </tbody>
                                 
                  </table></td>
            </table></td>
          </tr>
      <tr>
        <td height="14">&nbsp;</td>
        </tr>
      <tr>
        <td height="107" valign="top">
          <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#e8f3f9" class="left_nav">
            <!--DWLayoutTable-->
            <tr>
              <td height="30" colspan="2" valign="top"><img src="img/MyCart.jpg" width="160" height="30" /></td>
                </tr>
            <tr>
              <td width="151" height="10"></td>
                  <td width="9"></td>
                </tr>
            <tr>
              <td height="55" valign="top"><img src="img/topnav_cart.gif" width="29" height="21" />您的购物车现有件商品,总计¥0.00元【去结算】</td>
                  <td></td>
                </tr>
            <tr>
              <td height="10"></td>
                  <td></td>
                </tr>
            </table></td>
          </tr>
      <tr>
        <td height="15">&nbsp;</td>
        </tr>
      <tr>
        <td height="380" valign="top">
          <table width="100%" border="0" cellpadding="0" cellspacing="0" class="left_nav">
            <!--DWLayoutTable-->
            
            <!--DWLayoutTable-->
            <tr>
              <td width="160" height="30" valign="top"><img src="img/FriendLink.jpg" width="160" height="30"></td>
                </tr>
            <tr>
              <td height="57" valign="top"><img src="AD/logo(2).gif" width="160" height="57" /></td>
                </tr>
            <tr>
              <td height="64" valign="top"><img src="AD/logo.gif" width="160" height="64" /></td>
                </tr>
            <tr>
              <td height="56" valign="top"><img src="AD/logo_coo.gif" width="160" height="56" /></td>
                </tr>
            <tr>
              <td height="58" valign="top"><img src="AD/logo-zhongbaoxie.gif" width="160" height="58" /></td>
                </tr>
            <tr>
              <td height="58" valign="top"><img src="AD/chenghuangzhubao.jpg" width="160" height="58" /></td>
                </tr>
            <tr>
              <td height="48" valign="top"><img src="AD/ZhongGuoShuHuaJia.gif" width="160" height="48" /></td>
                </tr>
            <tr>
              <td height="7"></td>
                </tr>
                    </table></td>
          </tr>
      <tr>
        <td height="200" valign="top"><img src="img/Contect.jpg" width="160" height="200" /></td>
          </tr>
      
      
      
    </table></td>
    <td width="551" rowspan="3" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <!--DWLayoutTable-->
      <tr>
        <td height="20" colspan="2" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
          </tr>
      <tr>
        <td width="275" height="130" valign="top"><table width="275" height="130" border="1" cellspacing="1">
          <tr>
            <th width="120" rowspan="5" scope="col"><img src="<%=pa[0].getAddress()%>" width="130" height="120" /></th>
            <th width="142" scope="col"><%=pa[0].getName()%></th>
          </tr>
          <tr>
            <td><%=pa[0].getNormalprice()%></td>
          </tr>
          <tr>
            <td><%=pa[0].getMemberprice()%></td>
          </tr>
          <tr>
            <td><%=pa[0].getDescr()%></td>
          </tr>
          <tr>
            <td><a href="Buy.jsp?id=<%=pa[0].getId()%>&action=add" arget="cart"> <img src="images/xiaoche.gif" border="0"> </a></td>
          </tr>
        </table></td>
        <td width="275" valign="top"><table width="275" height="130" border="1" cellspacing="1">
          <tr>
            <th width="120" rowspan="5" scope="col"><img src="<%=pa[1].getAddress()%>" width="130" height="120" /></th>
            <th width="142" scope="col"><%=pa[1].getName()%></th>
          </tr>
          <tr>
            <td><%=pa[1].getNormalprice()%></td>
          </tr>
          <tr>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -