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

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>InformationList</title>
  7. <link href="Css/skinv2.0.css" rel="stylesheet" type="text/css" />
  8. <script type="text/javascript">
  9. function doPost(params){
  10.   var action="<%=request.getContextPath()%>/Manage/Information.do?todo=OpenInformationList"+"&"+params;
  11.   <c:if test="${param.menuID != null}">
  12.   action += '&menuID=<c:out value="${param.menuID}" />';
  13.   </c:if>
  14.   <c:if test="${param.catID != null}">
  15.   action += '&catID=<c:out value="${param.catID}" />';
  16.   </c:if>
  17.   var form=document.getElementById("form");
  18.   form.action=action;
  19.   form.submit();
  20. }
  21. function searchAction() {
  22.   var action = '<%=request.getContextPath()%>/Manage/Information.do?todo=OpenInformationList&menuID=<c:out value="${param.menuID}" />';
  23.   var form = document.getElementById("form");
  24.   form.action = action;
  25.   form.submit();
  26. }
  27. function AddInfo(){
  28.   <c:if test="${cat != null}">
  29.   location.href = '<%=request.getContextPath()%>/Manage/Information.do?todo=OpenInformation&catID=' + <c:out value="${cat.cat_ID}" />;
  30.   </c:if>
  31.   <c:if test="${menu != null}">
  32.   location.href = '<%=request.getContextPath()%>/Manage/Information.do?todo=OpenInformation&menID=' + <c:out value="${menu.men_ID}" />;
  33.   </c:if>
  34. }
  35. function EditInfo(id){
  36.   <c:if test="${cat != null}">
  37.   location.href = '<%=request.getContextPath()%>/Manage/Information.do?todo=OpenInformation&infID=' + id + '&catID=' + <c:out value="${cat.cat_ID}" />;
  38.   </c:if>
  39.   <c:if test="${menu != null}">
  40.   location.href = '<%=request.getContextPath()%>/Manage/Information.do?todo=OpenInformation&infID=' + id + '&menID=' + <c:out value="${menu.men_ID}" />;
  41.   </c:if>
  42. }
  43. </script>
  44. </head>
  45. <body bgcolor="#ffffff">
  46. <form name="form" method="post" action="InformationList.jsp">
  47. <table cellspacing="0" cellpadding="0" width="100%" border="0">
  48.   <tr bgcolor="#cfdbe8">
  49.     <td style="WIDTH: 20px" width="20" bgColor="#cfdbe8" height="19">
  50.       &nbsp;<img height="10" src="<%=request.getContextPath()%>/Manage/images/icon.gif" width="12" alt="" />
  51.     </td>
  52.     <td valign="middle" bgcolor="#cfdbe8" colSpan="2">&nbsp; <c:out value="${MainTitle}" /></td>
  53.   </tr>
  54.   <tr>
  55.     <td style="HEIGHT: 31px" valign="top" align="left" height="80">&nbsp;</td>
  56.     <td style="HEIGHT: 31px" valign="middle" align="left" colSpan="2">
  57.       &nbsp;<img src="<%=request.getContextPath()%>/Manage/images/edit.gif" alt="" />
  58.       &nbsp;<c:out value="${ChildTitle}" />
  59.     </td>
  60.   </tr>
  61.   <tr>
  62.     <td style="HEIGHT: 1px" valign="top" align="left"></td>
  63.     <td style="HEIGHT: 1px" valign="top" align="left" width="820" bgcolor="#cfdbe8"></td>
  64.     <td style="HEIGHT: 1px" valign="top" align="left" width="144"></td>
  65.   </tr>
  66.   <tr>
  67.     <td style="HEIGHT: 381px" valign="top" align="left"></td>
  68.     <td style="HEIGHT: 381px" valign="top" align="left" colspan="2">
  69.       <br/>
  70.       查询关键字:
  71.       <input type="text" id="txtCondition" value='<c:out value="${condition}" />' name="condition" class="input000000_1" />
  72.       <input type="hidden" name="hidCondition" value='<c:out value="${condition}" />' />
  73.       <input type="button" name="btnQuery" value="  重新刷新" class="Botton" onclick="searchAction();" />
  74.       <input type="button" name="btnQuery" value="  添加记录" class="Botton" onclick="AddInfo();" />
  75.       <br /><br />
  76.       <table width="640" border="0" cellpadding="0" cellspacing="0" class="table_Left">
  77.         <tr>
  78.           <td width="400" height="30" align="center" bgcolor="#5983B0" class="STYLE1 table_Right"><strong>信息标题</strong></td>
  79.           <td width="120" align="center" bgcolor="#5983B0" class="STYLE1 table_Right"><strong>发布时间</strong></td>
  80.           <td width="120" align="center" bgcolor="#5983B0" class="STYLE1 table_Right"><strong>操作</strong></td>
  81.         </tr>
  82.       </table>
  83.       <div id="divList">
  84.         <c:forEach var="inf" items="${pageInfo.rows}" varStatus="status">
  85.           <table width="640" border="0" cellpadding="0" cellspacing="0" class="table_Left">
  86.             <tr>
  87.               <td width="400" height="25" class="table_Right">
  88.                 &nbsp;<c:out value="${inf.inf_Title}" />
  89.               </td>
  90.               <td width="120" align="center" class="table_Right">
  91.                 <bean:write name="inf" property="inf_Time" format="yyyy-MM-dd"/>
  92.               </td>
  93.               <td width="120" align="center" class="table_Right">
  94.                 <a href='javascript:EditInfo(<c:out value="${inf.inf_ID}" />)'>编辑</a>
  95.                 &nbsp;|&nbsp;
  96.                 <a href='<%=request.getContextPath()%>/Manage/Information.do?todo=DeleteInformation&infID=<c:out value="${inf.inf_ID}" />&menuID=<c:out value="${param.menuID}" />&catID=<c:out value="${param.catID}" />'>删除</a>
  97.               </td>
  98.             </tr>
  99.           </table>
  100.         </c:forEach>
  101.       </div>
  102.       <table width="640" border="0" cellpadding="0" cellspacing="0" class="table_Left">
  103.         <tr>
  104.           <td valign="middle" colspan="9" align="center" class="STYLE1 table_Right" height="30">
  105.             <div align="right" >
  106.               共<c:out value="${pageInfo.totalRows}"/>条记录 共<c:out value="${pageInfo.totalPages}"/>页 当前第<c:out value="${pageInfo.currentPageNO+1}"/>页
  107.               &nbsp;&nbsp;&nbsp;&nbsp;
  108.               <c:choose>
  109.                 <c:when test="${pageInfo.firstPageNO>=pageInfo.currentPageNO}">
  110.                 第一页
  111.                 |
  112.                 上一页
  113.                 </c:when>
  114.                 <c:otherwise>
  115.                   <a href="javascript:doPost('pageNo=<c:out value="${pageInfo.firstPageNO}"/>')">第一页</a>
  116.                   |
  117.                   <a href="javascript:doPost('pageNo=<c:out value="${pageInfo.previousPageNO}"/>')">上一页</a>
  118.                 </c:otherwise>
  119.               </c:choose>
  120.               |
  121.               <c:choose>
  122.                 <c:when test="${pageInfo.lastPageNO<=pageInfo.currentPageNO}">
  123.                 下一页
  124.                 |
  125.                 最后页
  126.                 </c:when>
  127.                 <c:otherwise>
  128.                   <a href="javascript:doPost('pageNo=<c:out value="${pageInfo.nextPageNO}"/>')">下一页</a>
  129.                   |
  130.                   <a href="javascript:doPost('pageNo=<c:out value="${pageInfo.lastPageNO}"/>')">最后页</a>
  131.                 </c:otherwise>
  132.               </c:choose>&nbsp;&nbsp;
  133.             </div>
  134.           </td>
  135.         </tr>
  136.       </table>
  137.     </td>
  138.   </tr>
  139. </table>
  140. </form>
  141. </body>
  142. </html>