rublishbox.jsp
上传用户:lm2018
上传日期:2015-12-12
资源大小:30449k
文件大小:5k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page language="java" pageEncoding="GBK"%>
  2. <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
  3. <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
  4. <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
  5. <%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
  6. <html xmlns="http://www.w3.org/1999/xhtml">
  7. <head>
  8. <meta http-equiv="Content-Type" content="text/html; charset=gbk" />
  9. <title>无标题文档</title>
  10. <style>
  11. <!--
  12. a{TEXT-DECORATION:none}
  13. body{ font-size:12px}
  14. -->
  15. </style>
  16. <script>
  17. function isAllCheck(){
  18. var check = document.getElementById("allcheck");
  19. if(check.checked==true){
  20. //选中了,下面的要全部选上
  21. var child = document.getElementsByName("check");
  22. for(var i=0; i<child.length; i++){
  23. child[i].checked=true;
  24. }
  25. }else{
  26. var child = document.getElementsByName("check");
  27. for(var i=0; i<child.length; i++){
  28. child[i].checked=false;
  29. }
  30. }
  31. }
  32. //全选
  33. function allCheck(){
  34. var check = document.getElementById("allcheck");
  35. check.checked=true;
  36. var child = document.getElementsByName("check");
  37. for(var i=0; i<child.length; i++){
  38. child[i].checked=true;
  39. }
  40. }
  41. //反选
  42. function check(){
  43. var check = document.getElementById("allcheck");
  44. if(check.checked==true){
  45. check.checked=false;
  46. }else if(check.checked==false){
  47. check.checked=true;
  48. }
  49. var child = document.getElementsByName("check");
  50. for(var i=0; i<child.length; i++){
  51. if(child[i].checked==true){
  52. child[i].checked=false;
  53. }else if(child[i].checked==false){
  54. child[i].checked=true;
  55. }
  56. }
  57. }
  58. //不选
  59. function nocheck(){
  60. var check = document.getElementById("allcheck");
  61. check.checked=false;
  62. var child = document.getElementsByName("check");
  63. for(var i=0; i<child.length; i++){
  64. child[i].checked=false;
  65. }
  66. }
  67. function go(method){
  68. var child = document.getElementsByName("check");
  69. var flag = false;
  70. for(var i=0; i<child.length; i++){
  71. if(child[i].checked==true){
  72. flag = true;
  73. }
  74. }
  75. if(flag ==false){
  76. alert("请选择删除对象");
  77. return false;
  78. }
  79. document.getElementById("method").value=method; 
  80. }
  81. //移动到哪里
  82. function moveoto(method){
  83. var select = document.getElementById("select").value;
  84. if(select == '移动到---'){
  85. return false;
  86. }
  87. var flag = false;
  88. var child = document.getElementsByName("check");
  89. for(var i=0; i<child.length; i++){
  90. if(child[i].checked==true){
  91. flag = true;
  92. }
  93. }
  94. if(flag ==false){
  95. alert("请选择移动的对象");
  96. return false;
  97. }
  98. document.getElementById("method").value=method; 
  99. var form = document.getElementById("emailForm");
  100. form.submit();
  101. }
  102. </script>
  103. </head>
  104. <body>
  105. <html:form action="/email" method="post" >
  106. <html:hidden property="method" value=""/>
  107. <table width="100%" border="1" >
  108.   <tr>
  109.     <td align="center"><input type="checkbox" name="allcheck" onclick="isAllCheck();"/></td>
  110.     <td>邮件状态</td>
  111.     <td>发件人</td>
  112.     <td>主题</td>
  113.     <td>日期</td>
  114.     <td>附件</td>
  115.   </tr>
  116.   
  117.   
  118.   <logic:notPresent name="rublishList" property="list">
  119.    <tr>
  120.    <td colspan="6" align="center">暂时没有数据</td>
  121.    </tr>
  122.   </logic:notPresent>  
  123.   
  124.   <logic:present name="rublishList" property="list">
  125.   <logic:empty name="rublishList" property="list" >
  126.    <tr>
  127.    <td colspan="6" align="center">暂时没有数据</td>
  128.    </tr>
  129.   </logic:empty>
  130.   <logic:notEmpty  name="rublishList" property="list" >
  131.    <logic:iterate id="letter" name="rublishList" property="list">
  132.    <tr>
  133.      <td align="center">
  134.       <html:multibox property="check" value="${letter.emailid}"></html:multibox>
  135.      </td>
  136.     <td>
  137.      <html:link action="/email.do?method=readEmail&isread=${letter.isread}&emailid=${letter.emailid}">
  138.      <logic:equal value="0" name="letter" property="isread"><font color="red">未读</font></logic:equal>
  139.      <logic:equal value="1" name="letter" property="isread">已读</logic:equal>
  140.          
  141.      </html:link>
  142.     </td>
  143.     <td>
  144.      <bean:write name="letter" property="sendname"/>
  145.     </td>
  146.     <td>
  147.      <bean:write name="letter" property="title"/>
  148.     </td>
  149.     <td>
  150.      <bean:write name="letter" property="sendtime"/>
  151.     </td>
  152.     <td>
  153.      <logic:equal value="1" name="letter" property="isfujian"><font color="red">有附件</font></logic:equal>
  154. <logic:equal value="0" name="letter" property="isfujian">无附件</logic:equal>   
  155.     </td>
  156.  </tr>
  157.    </logic:iterate> 
  158.   </logic:notEmpty>
  159.   </logic:present>
  160.   
  161.   <tr>
  162.     <td colspan="6">
  163.      <bean:write name="rublishList" property="pageBar" filter="false" />
  164.     </td>
  165.   </tr>
  166.   <tr>
  167.     <td colspan="6">
  168. <input type="submit" value="彻底删除"  onclick="return go('delsForever');"/>
  169. <select name="select" onchange="moveoto('moveToReceiverBox');">
  170. <option>移动到---</option>
  171. <option>
  172. 收件箱
  173. </option>
  174. </select>
  175. </td>
  176.   </tr>
  177. </table>
  178. </html:form>
  179. </body>
  180. </html>