mailbox.jsp
上传用户:liangcc
上传日期:2019-05-24
资源大小:4412k
文件大小:7k
源码类别:

WEB邮件程序

开发平台:

Java

  1. <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
  2. <%@page import="com.softeem.webmail.dao.folder.*"%>
  3. <%@page import="com.softeem.webmail.beans.receive.User"%>
  4. <%!int [] rec = null; 
  5. int [] send = null;
  6. int [] draft = null;
  7. int [] rubbish = null;
  8. int [] news = null;%>
  9. <%
  10. String username = ((User)session.getAttribute("user")).getUsername();
  11. rec = new QueryRecBox().queryByBoxName("recbox",username);
  12.    send = new QuerySendBox().queryByBoxName("sendbox",username);
  13.    draft = new Query().queryByBoxName("drafts",username);
  14.     rubbish = new Query().queryByBoxName("laji",username);
  15.     news = new QueryNewBox().queryByBoxName("1",username);
  16. %>
  17. <html>
  18. <head>
  19. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  20. <title>邮件列表</title>
  21. <SCRIPT LANGUAGE=javascript>
  22. <!--
  23. function clearbox(box)
  24. {
  25. if(!confirm('警告:邮件删除不可恢复,是否真的要清空?'))
  26. return;
  27. else
  28. {
  29. form1.dirName.value=box;
  30. form1.subCommand.value="clearDir";
  31. form1.submit();
  32. }
  33. }
  34. function clearbox1(box)
  35. {
  36. if(!confirm('警告:邮件删除不可恢复,是否真的要清空?'))
  37. return;
  38. else
  39. {
  40. window.location.href="deleteBox.do?boxname="+box;
  41. }
  42. }
  43. function delbox(box)
  44. {
  45. if(!confirm('警告:邮箱删除不可恢复,是否真的要删除邮箱?'))
  46. return;
  47. else
  48. {
  49. form1.dirName.value=box;
  50. form1.subCommand.value="delDir";
  51. form1.submit();
  52. }
  53. }
  54. function doNewDir()
  55. {
  56. //长度限制
  57. if(form1.dirName.value=='')
  58. {
  59. alert('文件夹名不能为空');
  60. return;
  61. }
  62. form1.subCommand.value="createDir";
  63. form1.submit();
  64. }
  65. function renameFdr(parentfid )
  66. {
  67. var nn = window.prompt("文件夹名","");a
  68. if(nn==null || nn=="null" || nn=="")
  69. {
  70. alert('文件夹名不能为空');
  71. return;
  72. }
  73. var str=nn;
  74. var i=1;
  75. for(var x=0;x<str.length;x++)
  76. {
  77. i++;
  78. if(escape(str.charAt(x)).length>4)
  79. {
  80. i++;
  81. }
  82. }
  83. var L=16;
  84. if(L<i-1)
  85. {
  86. alert('此输入框最多只能输入 '+L+' 个字符;您输入的数据现在多出了 '+(i-1-L)+' 个字符;一个汉字相当于两个字符。');
  87. }
  88. else{
  89. form1.dirName.value=parentfid;
  90. form1.subCommand.value="renameDir";
  91. form1.action = 'mail-box.do?newDirName='+nn;
  92. form1.submit();
  93. }
  94. }
  95. -->
  96. </script> 
  97. <link href="css/css.css" rel="stylesheet" type="text/css">
  98. </head>
  99. <body bgcolor="#F2F1F2" leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" scroll="no" background="images/login_bg.gif">
  100. <div style="overflow: auto;height:100%;width:100%;">
  101. <table width="100%" height="5%"  border="0" cellpadding="0" cellspacing="0">
  102.   <tr>
  103.     <td width="11" height="11" >&nbsp;</td>
  104.     <td >&nbsp;</td>
  105.   </tr>
  106. </table>
  107. <table width="100%" height="95%"  border="0" cellpadding="0" cellspacing="0">
  108.   <tr>
  109.     <td width="11" valign="top"><img src="images/spacer.gif" width="11" height="20"></td>
  110.     <td align="center" valign="top" bgcolor="ECF4F5"><br>
  111.       <table width="99%" height="34"  border="1" cellpadding="0" cellspacing="0" bordercolor="9AC0E1" background="images/table_headbg.gif" style="border-collapse: collapse">
  112.         <tr align="center">
  113.           <td width="22%" nowrap>邮件箱名称</td>
  114.           <td width="16%" nowrap>邮件总数</td>
  115.           <td width="21%" nowrap>未读邮件数</td>
  116.           <td width="18%" nowrap>占用空间</td>
  117.           <td width="23%" nowrap>操作</td>
  118.         </tr>
  119.       </table>
  120.         <TABLE WIDTH='99%' height='150' BORDER='1' align='center' CELLPADDING='0' CELLSPACING='0' bordercolor="C7D0D2" class="table2" style="border-collapse: collapse">
  121.           <FORM id='form1' name="form1" METHOD='POST' ACTION='/mail-box.do'>
  122.   <input type="hidden" name="easyJFAction" value="update">
  123.   <input type="hidden" name="subCommand" value="creatDir">  
  124.             <thead>
  125.             </thead>
  126.              <tr align='center' bgcolor="EEF6F9"> 
  127.               <TD width='22%' height="30" nowrap  ><a href="list.jsp?easyJWebCommand=list&&box=newbox">新邮件</a></TD>
  128.               <TD width='16%' nowrap  ><%=news[0] %></TD>
  129.               <TD width='21%' nowrap  ><%=news[0] %></TD>
  130.               <TD width='18%' nowrap  ><%=news[1] %></TD>
  131.               <TD width='23%' nowrap><a href="#">删除</a> <a href="javascript:clearbox1('newbox')">清空</a></TD>
  132.             </TR>
  133.             <tr align='center' bgcolor="EEF6F9"> 
  134.               <TD width='22%' height="30" nowrap  ><a href="ReceiveBox">收件箱</a></TD>
  135.               <TD width='16%' nowrap  ><%=rec[0] %></TD>
  136.               <TD width='21%' nowrap  >0</TD>
  137.               <TD width='18%' nowrap  ><%=rec[1] %></TD>
  138.               <TD width='23%' nowrap><a href="#">删除</a> <a href="javascript:clearbox1('recbox')">清空</a></TD>
  139.             </TR>
  140.             <tr align='center' bgcolor="EEF6F9"> 
  141.               <TD width='22%' height="30" nowrap  ><a href="DraftboxServlet">草稿箱</a></TD>
  142.               <TD width='16%' nowrap  ><%=draft[0] %></TD>
  143.               <TD width='21%' nowrap  >0</TD>
  144.               <TD width='18%' nowrap  ><%=draft[1] %></TD>
  145.               <TD width='23%' nowrap><a href="#">删除</a> <a href="javascript:clearbox1('drafts')">清空</a></TD>
  146.             </TR>
  147.             <tr align='center' bgcolor="EEF6F9"> 
  148.               <TD width='22%' height="30" nowrap  ><a href="sendbox.jsp?easyJWebCommand=list&&box=sendbox">发件箱</a></TD>
  149.               <TD width='16%' nowrap  ><%=send[0] %></TD>
  150.               <TD width='21%' nowrap  >0</TD>
  151.               <TD width='18%' nowrap  ><%=send[1] %></TD>
  152.               <TD width='23%' nowrap><a href="#">删除</a> <a href="javascript:clearbox1('sendbox')">清空</a></TD>
  153.             </TR>
  154.             <tr align='center' bgcolor="EEF6F9"> 
  155.               <TD width='22%' height="30" nowrap  ><a href="DelboxServlet">垃圾箱</a></TD>
  156.               <TD width='16%' nowrap  ><%=rubbish[0] %></TD>
  157.               <TD width='21%' nowrap  >0</TD>
  158.               <TD width='18%' nowrap  ><%=rubbish[1] %></TD>
  159.               <TD width='23%' nowrap><a href="#">删除</a> <a href="javascript:clearbox1('laji')">清空</a></TD>
  160.             </TR>
  161.             <tr align='center' bgcolor="EEF6F9"> 
  162.               <td colspan="5">建新邮件夹&nbsp;&nbsp;&nbsp;&nbsp; <input type="text" name="dirName" maxlength='16' id="dirName" value=""> 
  163.                 &nbsp; <input type="button" name="build" value="新建" onClick="doNewDir();"></td>
  164.             </TR>
  165.           
  166.         </TABLE></td>
  167.     <td width="11" bgcolor="ECF4F5">&nbsp;</td>
  168.   </tr>
  169. </table>
  170. </div>
  171. </body>
  172. </html>