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

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. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  7. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  8. <html xmlns="http://www.w3.org/1999/xhtml">
  9. <head>
  10. <meta http-equiv="Content-Type" content="text/html; charset=gbk" />
  11. <title>无标题文档</title>
  12. <style>
  13. <!--
  14. a{TEXT-DECORATION:none}
  15. body{ font-size:12px}
  16. -->
  17. </style> 
  18. <SCRIPT type="text/javascript">
  19. function go(address){
  20. parent.emailmainFrame.location.href=address;
  21. }
  22. </SCRIPT>
  23. <script>
  24. function isAllCheck(){
  25. var check = document.getElementById("allcheck");
  26. if(check.checked==true){
  27. //选中了,下面的要全部选上
  28. var child = document.getElementsByName("check");
  29. for(var i=0; i<child.length; i++){
  30. child[i].checked=true;
  31. }
  32. }else{
  33. var child = document.getElementsByName("check");
  34. for(var i=0; i<child.length; i++){
  35. child[i].checked=false;
  36. }
  37. }
  38. }
  39. //全选
  40. function allCheck(){
  41. var check = document.getElementById("allcheck");
  42. check.checked=true;
  43. var child = document.getElementsByName("check");
  44. for(var i=0; i<child.length; i++){
  45. child[i].checked=true;
  46. }
  47. }
  48. //反选
  49. function check(){
  50. var check = document.getElementById("allcheck");
  51. if(check.checked==true){
  52. check.checked=false;
  53. }else if(check.checked==false){
  54. check.checked=true;
  55. }
  56. var child = document.getElementsByName("check");
  57. for(var i=0; i<child.length; i++){
  58. if(child[i].checked==true){
  59. child[i].checked=false;
  60. }else if(child[i].checked==false){
  61. child[i].checked=true;
  62. }
  63. }
  64. }
  65. //不选
  66. function nocheck(){
  67. var check = document.getElementById("allcheck");
  68. check.checked=false;
  69. var child = document.getElementsByName("check");
  70. for(var i=0; i<child.length; i++){
  71. child[i].checked=false;
  72. }
  73. }
  74. function go(method){
  75. var child = document.getElementsByName("check");
  76. var flag = false;
  77. for(var i=0; i<child.length; i++){
  78. if(child[i].checked==true){
  79. flag = true;
  80. }
  81. }
  82. if(flag ==false){
  83. alert("请选择删除对象");
  84. return false;
  85. }
  86. document.getElementById("method").value=method; 
  87. }
  88. </script>
  89. </head>
  90. <body>
  91. <html:form action="/email"  styleId="form1">
  92. <html:hidden property="method" value=""/>
  93. <table width="100%" border="1">
  94.   <tr>
  95.     <td colspan="2">查看:
  96.      <a href="${pageContext.request.contextPath}/email.do?method=receiveBox&emailtype=0&receiveid=${sessionScope.user.uno}" style="margin-left:10px">全部</a>-
  97.      <a href="${pageContext.request.contextPath}/email.do?method=isRead&emailtype=0&receiveid=${sessionScope.user.uno}&isread=0" style="margin-left:10px">未读</a>-
  98.             <a href="${pageContext.request.contextPath}/email.do?method=isRead&emailtype=0&receiveid=${sessionScope.user.uno}&isread=1" style="margin-left:10px">已读</a> 
  99.     </td>
  100.   </tr>
  101.   <tr>
  102.     <td colspan="2"><table width="100%" border="1">
  103.       <tr>
  104.         <td width="8%" align="center"><input type="checkbox" name="allcheck" onclick="isAllCheck();" /></td>
  105.         <td width="10%">邮件类型</td>
  106.         <td width="14%">发件人</td>
  107.         <td width="29%">主题</td>
  108.         <td width="25%">日前</td>
  109.         <td width="14%">附件</td>
  110.       </tr>
  111.   <logic:notPresent name="letterpage" property="list" scope="request">
  112.    <tr>
  113.    <td colspan="6"><font color="red">邮箱里没有邮件</font>
  114.    </td>
  115.    </tr>
  116.   </logic:notPresent>
  117.   <logic:present name="letterpage" property="list" scope="request">
  118.    <logic:empty name="letterpage" property="list" scope="request">
  119.    <tr>
  120.    <td colspan="6"><font color="red">邮箱里没有邮件</font>
  121.    </td>
  122.    </tr>
  123.    </logic:empty>
  124.   </logic:present>
  125.   
  126.   <logic:iterate id="letter" name="letterpage" property="list" scope="request">
  127.   
  128.    <tr>
  129.    <td width="8%" align="center">
  130.    <html:multibox   name="emailForm" property="check" value="${letter.emailid}"></html:multibox>
  131.   
  132.    </td>   
  133.    <td>
  134.    <html:link action="/email.do?method=readEmail&isread=${letter.isread}&emailid=${letter.emailid}"  >
  135.    <logic:equal value="1" name="letter" property="isread">
  136.    已读 
  137.    </logic:equal>
  138.    <logic:equal value="0" name="letter" property="isread">未读</logic:equal>   
  139. </html:link>
  140.    </td>
  141.   
  142.    <td>
  143.    <bean:write name="letter" property="sendname"/>
  144.    </td>
  145.    <td>
  146.    <bean:write name="letter" property="title"/>
  147.    </td>
  148.    <td>
  149.    <bean:write name="letter" property="sendtime"/>
  150.    </td>
  151.    <td>
  152.    <logic:equal value="1" name="letter" property="isfujian"><font color="red">有附件</font></logic:equal>
  153. <logic:equal value="0" name="letter" property="isfujian">无附件</logic:equal>   
  154.    </td>
  155.    </tr>
  156.   
  157.   </logic:iterate>
  158.     </table></td>
  159.   </tr>
  160.   <tr>
  161.    <td width="40%">选择:<a href="javascript:allCheck();" style="margin-left:10px">全部</a>-      
  162.              <a href="javascript:check();" style="margin-left:10px">反选</a>-
  163.              <a href="javascript:nocheck();" style="margin-left:10px">不选</a>    </td>
  164.     <td width="60%" align="right"> <bean:write name="letterpage" property="pageBar" filter="false"/> </td>
  165.   </tr>
  166.   <tr>
  167.    <td colspan="2">
  168.      <input  type="submit" value="删除" onclick="return go('removesToRublish');"/>
  169.      <input  type="submit" value="彻底删除" onclick="return go('delsForever');"/>        
  170.     </td>
  171.   </tr>
  172. </table>
  173. </html:form>
  174. </body>
  175. </html>