ProductList.jsp
上传用户:zghglow
上传日期:2022-08-09
资源大小:27227k
文件大小:5k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

JavaScript

  1. <%@ page contentType="text/html; charset=GBK" %>
  2. <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
  3. <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  4. <html>
  5. <head>
  6. <title>ProductList</title>
  7. <script type="text/javascript">
  8. function doPost(params){
  9.   var action="<%=request.getContextPath()%>/Manage/Product.do?todo=OpenProduct"+"&"+params;
  10.   var form=document.getElementById("form");
  11.   form.action=action;
  12.   form.submit();
  13. }
  14. </script>
  15. <link href="Css/skinv2.0.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body bgcolor="#ffffff">
  18. <form name="form" id="form" method="post" action="News.jsp">
  19. <table cellspacing="0" cellpadding="0" width="100%" border="0">
  20.   <tr bgcolor="#cfdbe8">
  21.     <td style="WIDTH: 20px" width="20" bgColor="#cfdbe8" height="19">&nbsp;<img height="10" src="<%=request.getContextPath()%>/Manage/images/icon.gif" width="12" alt="" /></td>
  22.     <td valign="middle" bgcolor="#cfdbe8" colSpan="2">&nbsp; 生产经营栏目</td>
  23.   </tr>
  24.   <tr>
  25.     <td style="HEIGHT: 31px" valign="top" align="left" height="80">&nbsp;</td>
  26.     <td style="HEIGHT: 31px" valign="middle" align="left" colSpan="2">
  27.       &nbsp;<img src="<%=request.getContextPath()%>/Manage/images/edit.gif" alt="" />
  28.       &nbsp;产品列表
  29.     </td>
  30.   </tr>
  31.   <tr>
  32.     <td style="HEIGHT: 1px" valign="top" align="left"></td>
  33.     <td style="HEIGHT: 1px" valign="top" align="left" width="820" bgcolor="#cfdbe8"></td>
  34.     <td style="HEIGHT: 1px" valign="top" align="left" width="144"></td>
  35.   </tr>
  36.   <tr>
  37.     <td style="HEIGHT: 381px" valign="top" align="left"></td>
  38.     <td style="HEIGHT: 381px" valign="top" align="left" colspan="2">
  39.       <br />
  40.       <a href="<%=request.getContextPath()%>/Manage/Product.do?todo=OpenProductInfo">点这里添加新的产品信息</a>
  41.       <br/><br />
  42.       <table width="670" border="0" cellpadding="0" cellspacing="0" class="table_Left">
  43.         <tr>
  44.           <td height="30" width="200" align="center" bgcolor="#5983B0" class="STYLE1 table_Right"><strong>产品名</strong></td>
  45.           <td width="200" align="center" bgcolor="#5983B0" class="STYLE1 table_Right"><strong>产品英文名</strong></td>
  46.           <td width="150" align="center" bgcolor="#5983B0" class="STYLE1 table_Right"><strong>发布时间</strong></td>
  47.           <td width="120" align="center" bgcolor="#5983B0" class="STYLE1 table_Right"><strong>操作</strong></td>
  48.         </tr>
  49.       </table>
  50.       <div id="divList">
  51.         <c:forEach var="product" items="${pageInfo.rows}" varStatus="status">
  52.           <table width="670" border="0" cellpadding="0" cellspacing="0" class="table_Left">
  53.             <tr>
  54.               <td height="25" width="200" class="table_Right">
  55.                 &nbsp;<c:out value="${product.pro_Name}" />
  56.               </td>
  57.               <td width="200" align="center" class="table_Right">
  58.                 <c:out value="${product.pro_EnName}" />
  59.               </td>
  60.               <td width="150" align="center" class="table_Right">
  61.                 <bean:write name="product" property="pro_Time" format="yyyy-MM-dd"/>
  62.               </td>
  63.               <td width="120" align="center" class="table_Right">
  64.                 <a href='<%=request.getContextPath()%>/Manage/Product.do?todo=OpenProductInfo&proID=<c:out value="${product.pro_ID}" />'>编辑</a>
  65.                 &nbsp;|&nbsp;
  66.                 <a href='<%=request.getContextPath()%>/Manage/Product.do?todo=DeletProduct&proID=<c:out value="${product.pro_ID}" />'>删除</a>
  67.               </td>
  68.             </tr>
  69.           </table>
  70.         </c:forEach>
  71.       </div>
  72.       <table width="670" border="0" cellpadding="0" cellspacing="0" class="table_Left">
  73.         <tr>
  74.           <td valign="middle" colspan="9" align="center" class="STYLE1 table_Right" height="30">
  75.             <div align="right" >
  76.               共<c:out value="${pageInfo.totalRows}"/>条记录 共<c:out value="${pageInfo.totalPages}"/>页 当前第<c:out value="${pageInfo.currentPageNO+1}"/>页
  77.               &nbsp;&nbsp;&nbsp;&nbsp;
  78.               <c:choose>
  79.                 <c:when test="${pageInfo.firstPageNO>=pageInfo.currentPageNO}">
  80.                 第一页
  81.                 |
  82.                 上一页
  83.                 </c:when>
  84.                 <c:otherwise>
  85.                   <a href="javascript:doPost('pageNo=<c:out value="${pageInfo.firstPageNO}"/>')">第一页</a>
  86.                   |
  87.                   <a href="javascript:doPost('pageNo=<c:out value="${pageInfo.previousPageNO}"/>')">上一页</a>
  88.                 </c:otherwise>
  89.               </c:choose>
  90.               |
  91.               <c:choose>
  92.                 <c:when test="${pageInfo.lastPageNO<=pageInfo.currentPageNO}">
  93.                 下一页
  94.                 |
  95.                 最后页
  96.                 </c:when>
  97.                 <c:otherwise>
  98.                   <a href="javascript:doPost('pageNo=<c:out value="${pageInfo.nextPageNO}"/>')">下一页</a>
  99.                   |
  100.                   <a href="javascript:doPost('pageNo=<c:out value="${pageInfo.lastPageNO}"/>')">最后页</a>
  101.                 </c:otherwise>
  102.               </c:choose>&nbsp;&nbsp;
  103.             </div>
  104.           </td>
  105.         </tr>
  106.       </table>
  107.     </td>
  108.   </tr>
  109. </table>
  110. </form>
  111. </body>
  112. </html>