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

📄 search.jsp~13~

📁 模仿Taobao购物网
💻 JSP~13~
字号:
<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="java.util.*" %>
<%@page import="taobaoproject.*" %>
<jsp:useBean id="goodsInfosBean" scope="session" class="taobaoproject.GoodsInfo_Bean" />
<jsp:setProperty name="goodsInfosBean" property="*" />
<jsp:useBean id="fenYe_Bean" scope="session" class="taobaoproject.FenYe_Bean" />
<jsp:setProperty name="fenYe_Bean" property="*" />
<jsp:include flush="true" page="head.jsp"/>
<html>
<head>
<title>
list
</title>
<%
FenYe_Bean fenYe = new FenYe_Bean();
long currentpage = 1;
String ss = request.getParameter("currentpage");
if(ss != null && !ss.equals("")) {
  currentpage = Long.parseLong(ss);
}
else {
  currentpage = 1;
}
int classID =-1;
String classff = request.getParameter("searchType");
if(classff != null && !classff.equals("")) {
  classID = java.lang.Integer.parseInt(classff);
}
else {
  classID = -1;
}
String searchWord = fenYe_Bean.getGBK(request.getParameter("searchWord"));
if(searchWord == null) {
  searchWord = "";
}
fenYe.setP_curpage(currentpage);
ArrayList goodsList = fenYe.getGoodsList(classID,searchWord);
%>
</head>
<body bgcolor="#ffffff">
<DIV id=PageWidth><!--top start-->
  <!--top end-->
<DIV style="CLEAR: both"><!--path start-->
  <!--path end-->
  <!-- left start-->
<DIV id=left>
<%
ArrayList isDiscountList = goodsInfosBean.getGoods_List(15,-1,-1,-1,-1,1,"");
for(int i =0;i< isDiscountList.size();i++)  {
  GoodsBean isDiscountGoods = new GoodsBean();
  isDiscountGoods = (GoodsBean)isDiscountList.get(i);
  if(i ==0){
%>
<DIV id=left_td-bg>特价商品</DIV>
<DIV class=HackBox></DIV>
<DIV id=assort>
<UL>
  <%} %>
  <LI><a href="xiangxi.jsp?goodsID=<%=isDiscountGoods.getGoodsID() %>"><%=isDiscountGoods.getGoodsName() %></A>
<%} %>
</UL>
<hr class=product-hr>
</DIV>
<DIV class=HackBox></DIV>
<%
ArrayList iserfinementList = goodsInfosBean.getGoods_List(15,-1,-1,1,-1,-1,"");
for(int i =0;i< iserfinementList.size();i++)  {
  GoodsBean iserfinementGoods = new GoodsBean();
  iserfinementGoods = (GoodsBean)iserfinementList.get(i);
  if(i ==0){
%>
<DIV id=left_td-bg>今日推荐</DIV>
<DIV class=HackBox></DIV>
<DIV id=topsales>
<UL><%} %>
  <LI><a href="xiangxi.jsp?goodsID=<%=iserfinementGoods.getGoodsID() %>"><%=iserfinementGoods.getGoodsName() %></A>
<%} %>
</UL>
<hr class=product-hr>
</DIV>
</DIV><!-- left end --><!--content start-->
<DIV id=product-list><!--search result start-->
<DIV id=product_td-bg>
<DIV class=result>显示:<%=fenYe.getP_start() %>-<%=fenYe.getP_end() %>条 共<%=fenYe.getP_totalnum() %>条 </DIV>
<form style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"
name=searchform
action="" method=post>
<DIV class=btn-go><input type=image alt=Go
src="images/az-go-orange-trans.gif" align=middle ></DIV>
<DIV class=sort-view><SELECT style="MARGIN: 3px 0px 1px" name=sortType>
  <OPTION value=market selected>销售排行↓</OPTION> <OPTION value=time>上架时间↓</OPTION>
  <OPTION value=price>商品价格↑</OPTION> <OPTION value=dprice>商品价格↓</OPTION></SELECT>
</DIV></FORM></DIV>
<DIV class=HackBox1></DIV>
<DIV id=product-3col>

<%
boolean stast=true;
for(int i=0;i<goodsList.size();i++)
{
  GoodsBean goods = new GoodsBean();
  goods = (GoodsBean)goodsList.get(i);
  if(stast == true)
  {
    out.print("<TABLE cellSpacing=0 cellPadding=0 width='100%' border=0> <TBODY> <TR>");
    stast = false;
  }
%>
    <td align="center">
      <%--显示手机图片开始 --%>
      <div><%=goods.getGoodsName() %><br />
        <a href="xiangxi.jsp?goodsID=<%=goods.getGoodsID() %>"><img width="150" height=150 alt="<%=goods.getGoodsName() %>" src="<%=goods.getGoodsUrl() %>" border=0> </a>
    </div>
    <%--显示手机图片结束 --%>
    <%--显示手机信息开始 --%>
      <div id=line-height><BR>市场价:<S>¥<%=goods.getMarketPrice() %></S>
      元<BR>卓越价:<SPAN class=our-price>¥</SPAN><%=goods.getMemberPrice() %> 元</DIV>
      <%--显示手机信息结束 --%>
      <%--显示手机购买开始 --%>
      <DIV id=btn>
        <a href=""><IMG src="images/az-add-to-shopping-cart-sm-pri.gif" alt="" border=0></A> &nbsp;
        <a href="xiangxi.jsp?goodsID=<%=goods.getGoodsID() %>"><IMG src="images/az-add-to-favorites-sm-pri.gif" alt="" border=0></A></DIV></TD>
      <%--显示手机购买结束 --%>
      <%
      if((i+1)>=3 && (i+1)%3==0)
      {
        out.print("</TR></TBODY></TABLE><hr>");
        stast = true;
      }
      else if(i+1 == goodsList.size())
      {
        if((i+3)%3==0){
          out.print("<td></td>");
        }
        out.print("<td></td>");
        out.print("</TR></TBODY></TABLE><hr>");
      }

    } %>

<DIV id=result-page>
  <a href="search.jsp?classID=<%=classID %>&currentpage=<%=fenYe.getPrepage() %>&searchWord=<%=fenYe_Bean.searchWord %>">
  上一页 </a>
  &nbsp;
  <a href="search.jsp?classID=<%=classID %>&currentpage=<%=fenYe.getNextpage() %>&searchWord=<%=fenYe_Bean.searchWord %>">
  下一页 </a>
</DIV></DIV><!--search result end--></DIV><!--content end--></DIV><!--clear:both--><!--bottom start-->
<DIV class=HackBox></DIV>
<!--bottom end-->
</DIV>

</body>
</html>

⌨️ 快捷键说明

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