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

📄 a_taxis.jsp

📁 hibernate做的一个网上商店系统
💻 JSP
字号:
<%@ page contentType="text/html; charset=GBK" import="java.util.*,mrgf.other.*,mrgf.hibernate.*" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>

<html>
<link rel="stylesheet" href="css/style.css">
<head>
<title>
index
</title>
</head>
<body bgcolor="#ffffff" topmargin="0">
<table width="100%" height="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr align="right">
    <td height="22" background="image/other/taxis.jpg">&nbsp;</td>
  </tr>
  <tr>
    <td height="619" background="image/other/background.jpg"><table width="100%" height="100%"  border="0" cellspacing="0" cellpadding="0">
      <tr height="10">
        <td colspan="2"></td>
      </tr>
      <%
      List merchandises=new ArrayList();
      if(request.getAttribute("requestPage")==null){
        Hibernate hn=new Hibernate();
        if(request.getAttribute("merchandises")==null){
          String sql="select merchandise_id from (select * from tb_sell_info where merchandise_id in (select id from tb_merchandise_info where sort_id=29)) sortMerchandise group by sortMerchandise.merchandise_id order by sum(amount) desc";
          List idTaxis=hn.queryWithSql(sql);
          String sid="";
          int id=0;
          for(int i=0;i<8;i++){
            if(i<idTaxis.size()){
              sid=idTaxis.get(i).toString();
              id=Integer.parseInt(sid);
              String hql="from MerchandiseInfo where id="+id;
              MerchandiseInfo info=(MerchandiseInfo)hn.query(hql).get(0);
              merchandises.add(info);
            }
          }
        }else{
          merchandises=(List)request.getAttribute("merchandises");
        }
        session.setAttribute("merchandises",merchandises);
      }else{
        merchandises=(List)session.getAttribute("merchandises");
      }
      MerchandiseInfo info=null;
      int index=0;
      %>
      <tr>
          <!--1.1-->
        <td width="282" height="150">
        <%
        if(index<merchandises.size()){
          info=(MerchandiseInfo)merchandises.get(index);
        %>
          <table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="12%" rowspan="3">&nbsp;</td>
            <td width="64%" rowspan="3" align="right"><a href="merchandise_info.do?merchandiseId=<%=info.getId() %>&requestPage=<%=request.getServletPath() %>" class="style2">
              <img src="image/MerchandisePhoto/<%=info.getPhoto() %>" width="168" height="110"></a></td>
            <td width="8%" rowspan="3">&nbsp;</td>
            <td width="6%" valign="bottom"><font color="red">第</font></td>
            <td width="10%" rowspan="3">&nbsp;</td>
          </tr>
          <tr>
            <td><font color="red">一</font></td>
          </tr>
          <tr>
            <td valign="top"><font color="red">名</font></td>
          </tr>
          <tr>
            <td colspan="5" height="6"></td>
          </tr>
          <tr align="center">
            <td colspan="5"><a href="merchandise_info.do?merchandiseId=<%=info.getId() %>&requestPage=<%=request.getServletPath() %>" class="style2"><%=info.getName() %></a>&nbsp;&nbsp;</td>
          </tr>
        </table>
        <%
        }
        index=index+1;
        %>
      </td>
          <!--1.2-->
        <td width="282">
        <%
        if(index<merchandises.size()){
          info=(MerchandiseInfo)merchandises.get(index);
        %>
          <table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="10%" rowspan="3">&nbsp;</td>
            <td width="6%" align="right" valign="bottom" ><font color="red">第</font></td>
            <td width="8%" rowspan="3">&nbsp;</td>
            <td width="64%" rowspan="3"><a href="merchandise_info.do?merchandiseId=<%=info.getId() %>&requestPage=<%=request.getServletPath() %>" class="style2">
              <img src="image/MerchandisePhoto/<%=info.getPhoto() %>" width="168" height="110"></a></td>
            <td width="12%" rowspan="3">&nbsp;</td>
          </tr>
          <tr>
            <td align="right"><font color="red">二</font></td>
          </tr>
          <tr>
            <td align="right" valign="top"><font color="red">名</font></td>
          </tr>
          <tr>
            <td colspan="5" height="6"></td>
          </tr>
          <tr align="center">
            <td colspan="5"><a href="merchandise_info.do?merchandiseId=<%=info.getId() %>&requestPage=<%=request.getServletPath() %>" class="style2"><%=info.getName() %></a>&nbsp;&nbsp;</td>
          </tr>
        </table>
        <%
        }
        index=index+1;
        %>
      </td>
      </tr>
      <tr>
          <!--2.1-->
        <td width="282" height="150">
        <%
        if(index<merchandises.size()){
          info=(MerchandiseInfo)merchandises.get(index);
        %>
          <table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="12%" rowspan="3">&nbsp;</td>
            <td width="64%" rowspan="3" align="right"><a href="merchandise_info.do?merchandiseId=<%=info.getId() %>&requestPage=<%=request.getServletPath() %>" class="style2">
              <img src="image/MerchandisePhoto/<%=info.getPhoto() %>" width="168" height="110"></a></td>
            <td width="8%" rowspan="3">&nbsp;</td>
            <td width="6%" valign="bottom"><font color="red">第</font></td>
            <td width="10%" rowspan="3">&nbsp;</td>
          </tr>
          <tr>
            <td><font color="red">三</font></td>
          </tr>
          <tr>
            <td valign="top"><font color="red">名</font></td>
          </tr>
          <tr>
            <td colspan="5" height="6"></td>
          </tr>
          <tr align="center">
            <td colspan="5"><a href="merchandise_info.do?merchandiseId=<%=info.getId() %>&requestPage=<%=request.getServletPath() %>" class="style2"><%=info.getName() %></a>&nbsp;&nbsp;</td>
          </tr>
        </table>
        <%
        }
        index=index+1;
        %>
      </td>
          <!--2.2-->
        <td width="282">
        <%
        if(index<merchandises.size()){
          info=(MerchandiseInfo)merchandises.get(index);
        %>
          <table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="10%" rowspan="3">&nbsp;</td>
            <td width="6%" align="right" valign="bottom" ><font color="red">第</font></td>
            <td width="8%" rowspan="3">&nbsp;</td>
            <td width="64%" rowspan="3"><a href="merchandise_info.do?merchandiseId=<%=info.getId() %>&requestPage=<%=request.getServletPath() %>" class="style2">
              <img src="image/MerchandisePhoto/<%=info.getPhoto() %>" width="168" height="110"></a></td>
            <td width="12%" rowspan="3">&nbsp;</td>
          </tr>
          <tr>
            <td align="right"><font color="red">四</font></td>
          </tr>
          <tr>
            <td align="right" valign="top"><font color="red">名</font></td>
          </tr>
          <tr>
            <td colspan="5" height="6"></td>
          </tr>
          <tr align="center">
            <td colspan="5"><a href="merchandise_info.do?merchandiseId=<%=info.getId() %>&requestPage=<%=request.getServletPath() %>" class="style2"><%=info.getName() %></a>&nbsp;&nbsp;</td>
          </tr>
        </table>
        <%
        }
        index=index+1;
        %>
      </td>
      </tr>
      <tr>
          <!--3.1-->
        <td width="282" height="150">
        <%
        if(index<merchandises.size()){
          info=(MerchandiseInfo)merchandises.get(index);
        %>
          <table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="12%" rowspan="3">&nbsp;</td>
            <td width="64%" rowspan="3" align="right"><a href="merchandise_info.do?merchandiseId=<%=info.getId() %>&requestPage=<%=request.getServletPath() %>" class="style2">
              <img src="image/MerchandisePhoto/<%=info.getPhoto() %>" width="168" height="110"></a></td>
            <td width="8%" rowspan="3">&nbsp;</td>
            <td width="6%" valign="bottom"><font color="red">第</font></td>
            <td width="10%" rowspan="3">&nbsp;</td>
          </tr>
          <tr>
            <td><font color="red">五</font></td>
          </tr>
          <tr>
            <td valign="top"><font color="red">名</font></td>
          </tr>
          <tr>
            <td colspan="5" height="6"></td>
          </tr>
          <tr align="center">
            <td colspan="5"><a href="merchandise_info.do?merchandiseId=<%=info.getId() %>&requestPage=<%=request.getServletPath() %>" class="style2"><%=info.getName() %></a>&nbsp;&nbsp;</td>
          </tr>
        </table>
        <%
        }
        index=index+1;
        %>
      </td>
          <!--3.2-->
        <td width="282">
        <%
        if(index<merchandises.size()){
          info=(MerchandiseInfo)merchandises.get(index);
        %>
          <table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="10%" rowspan="3">&nbsp;</td>
            <td width="6%" align="right" valign="bottom" ><font color="red">第</font></td>
            <td width="8%" rowspan="3">&nbsp;</td>
            <td width="64%" rowspan="3"><a href="merchandise_info.do?merchandiseId=<%=info.getId() %>&requestPage=<%=request.getServletPath() %>" class="style2">
              <img src="image/MerchandisePhoto/<%=info.getPhoto() %>" width="168" height="110"></a></td>
            <td width="12%" rowspan="3">&nbsp;</td>
          </tr>
          <tr>
            <td align="right"><font color="red">六</font></td>
          </tr>
          <tr>
            <td align="right" valign="top"><font color="red">名</font></td>
          </tr>
          <tr>
            <td colspan="5" height="6"></td>
          </tr>
          <tr align="center">
            <td colspan="5"><a href="merchandise_info.do?merchandiseId=<%=info.getId() %>&requestPage=<%=request.getServletPath() %>" class="style2"><%=info.getName() %></a>&nbsp;&nbsp;</td>
          </tr>
        </table>
        <%
        }
        index=index+1;
        %>
      </td>
      </tr>
      <tr>
          <!--4.1-->
        <td width="282" height="150">
        <%
        if(index<merchandises.size()){
          info=(MerchandiseInfo)merchandises.get(index);
        %>
          <table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="12%" rowspan="3">&nbsp;</td>
            <td width="64%" rowspan="3" align="right"><a href="merchandise_info.do?merchandiseId=<%=info.getId() %>&requestPage=<%=request.getServletPath() %>" class="style2">
              <img src="image/MerchandisePhoto/<%=info.getPhoto() %>" width="168" height="110"></a></td>
            <td width="8%" rowspan="3">&nbsp;</td>
            <td width="6%" valign="bottom"><font color="red">第</font></td>
            <td width="10%" rowspan="3">&nbsp;</td>
          </tr>
          <tr>
            <td><font color="red">七</font></td>
          </tr>
          <tr>
            <td valign="top"><font color="red">名</font></td>
          </tr>
          <tr>
            <td colspan="5" height="6"></td>
          </tr>
          <tr align="center">
            <td colspan="5"><a href="merchandise_info.do?merchandiseId=<%=info.getId() %>&requestPage=<%=request.getServletPath() %>" class="style2"><%=info.getName() %></a>&nbsp;&nbsp;</td>
          </tr>
        </table>
        <%
        }
        index=index+1;
        %>
      </td>
          <!--4.2-->
        <td width="282">
        <%
        if(index<merchandises.size()){
          info=(MerchandiseInfo)merchandises.get(index);
        %>
          <table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="10%" rowspan="3">&nbsp;</td>
            <td width="6%" align="right" valign="bottom" ><font color="red">第</font></td>
            <td width="8%" rowspan="3">&nbsp;</td>
            <td width="64%" rowspan="3"><a href="merchandise_info.do?merchandiseId=<%=info.getId() %>&requestPage=<%=request.getServletPath() %>" class="style2">
              <img src="image/MerchandisePhoto/<%=info.getPhoto() %>" width="168" height="110"></a></td>
            <td width="12%" rowspan="3">&nbsp;</td>
          </tr>
          <tr>
            <td align="right"><font color="red">八</font></td>
          </tr>
          <tr>
            <td align="right" valign="top"><font color="red">名</font></td>
          </tr>
          <tr>
            <td colspan="5" height="6"></td>
          </tr>
          <tr align="center">
            <td colspan="5"><a href="merchandise_info.do?merchandiseId=<%=info.getId() %>&requestPage=<%=request.getServletPath() %>" class="style2"><%=info.getName() %></a>&nbsp;&nbsp;</td>
          </tr>
        </table>
        <%
        }
        index=index+1;
        %>
      </td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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