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

WEB邮件程序

开发平台:

Java

  1. <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <title>收件箱</title>
  6. <script src="js/public.js" type="text/JavaScript"></script>
  7. <script language="JavaScript" src="include/CheckDataFunction.js" type="text/JavaScript"></script>
  8. <SCRIPT LANGUAGE=javascript>
  9.   <!--
  10.     var EmailID=0;
  11. function selectRow(id)
  12. {
  13. ListForm.cid.value=id;
  14. }
  15. function selectAll(obj,value)
  16. {
  17. if(obj.length==undefined)
  18. {
  19. obj.checked=value;
  20. }
  21. for(var i=0;i<obj.length;i++)
  22. obj[i].checked=value;
  23. }
  24. function doDel()
  25. {
  26. var ids="";
  27. var obj=ListForm.cids;
  28. for(var i=0;i<obj.length;i++)
  29. if(obj[i].checked)ids+=obj[i].value+",";
  30. if((ids==""))ids=ListForm.cid.value+",";
  31. ListForm.mulitCid.value=ids;
  32. if(ids==",")
  33. {
  34. alert("请选择要删除的内容!");
  35. return false;
  36. }
  37. if(confirm('邮件将不可恢复,是否真的要永久删除此邮件?')){
  38. ListForm.easyJWebCommand.value="del";
  39. ListForm.submit();
  40. }
  41. }
  42. function doMove()
  43. {
  44. var ids="";
  45. var obj=ListForm.cids;
  46. for(var i=0;i<obj.length;i++)
  47. if(obj[i].checked)ids+=obj[i].value+",";
  48. if(ids=="")ids=ListForm.cid.value+",";
  49. ListForm.mulitCid.value=ids;
  50. if(ids==",")
  51. {
  52. alert("请选择要移动的邮件!");
  53. return false;
  54. }
  55. ListForm.easyJWebCommand.value="move";
  56. ListForm.submit();
  57. }
  58. function doReply()
  59. {
  60.     if(ListForm.cid.value==""){
  61. alert("请选择要回复的邮件!");
  62. return ;
  63. }
  64. //alert(ListForm.cid.value);
  65.     ListForm.easyJWebCommand.value="reply";
  66. ListForm.submit();
  67. }
  68. function doEdit()
  69. {
  70.     if(ListForm.cid.value==""){
  71. alert("请选择要修改的邮件!");
  72. return ;
  73. }
  74. //alert(ListForm.cid.value);
  75.     ListForm.easyJWebCommand.value="edit";
  76. ListForm.submit();
  77. }
  78. function doForward()
  79. {
  80.     if(ListForm.cid.value==""){
  81. alert("请选择转发的邮件!");
  82. return ;
  83. }
  84. //alert(ListForm.cid.value);
  85.     ListForm.easyJWebCommand.value="forward";
  86. ListForm.submit();
  87. }
  88. function doReplyAll(id)
  89. {
  90.  if(ListForm.cid.value==""){
  91. alert("请选择要回复的邮件!");
  92. return ;
  93. }
  94.     ListForm.easyJWebCommand.value="replyAll";
  95. //ListForm.cid.value=id;
  96. ListForm.submit();
  97. }
  98. function doMoveToDel()
  99. {
  100. if(confirm('邮件删除操作将把邮件移到垃圾箱,是否执行该操作?')){
  101. ListForm.newBox.value="delbox";
  102. doMove();
  103. }
  104. }
  105. function show(id)
  106. {
  107. ListForm.cid.value=id;
  108. ListForm.easyJWebCommand.value="show";
  109. //ListForm.target="_blank";
  110. ListForm.submit();
  111. //ListForm.target="_self";
  112. }
  113. function gotoPage(n)
  114. {
  115. ListForm.page.value=n;
  116. ListForm.submit();
  117. }
  118. function ChangeNoEx()
  119. {
  120.     if(!CheckPositiveInt(form1.txtPageNo,"请输入一个正整数!",false))
  121.     return false;    
  122.     ChangePageNo(form1.txtPageNo.value);
  123. }
  124. //=================
  125. function setMailID(id)
  126. {
  127.   if(event.ctrlKey)
  128.   {
  129.     EmailID=id;
  130.     if(form1.msgID.value !='')
  131.       form1.msgID.value+=','+id;
  132.     else
  133.       form1.msgID.value=id;
  134.   }
  135.   else
  136.   {
  137.     EmailID=id;
  138.     form1.msgID.value=id;
  139.   }
  140. }
  141. //================
  142. //排序
  143. function doSort(fld)
  144. {
  145. if(ListForm.field.value==fld){
  146. if(ListForm.orderType.value=='asc')
  147. ListForm.orderType.value='desc';
  148. else
  149. ListForm.orderType.value='asc';
  150. }
  151. ListForm.field.value=fld;
  152. ListForm.method="post";
  153.     ListForm.submit();
  154. }
  155. //document.onselectstart =function () {return false;}
  156. function Exec_Click(n){
  157.   var SelectedId = '';
  158.   var arrUsers = temp;
  159.   var i = 0 ;
  160.    if(form1.delid.value=='')// &&SelectedId == '')
  161. {
  162. alert('请先选择邮件!') ;
  163. return ;
  164. }
  165. SelectedId = form1.delid.value;
  166. if(SelectedId.indexOf(",")==0)
  167. SelectedId = SelectedId.substring(1);
  168. form1.delid.value = "";
  169. //alert(SelectedId)
  170. //  }
  171.   switch(n){
  172.     case 0://移动到垃圾箱
  173.       //form1.Actions.value=0;
  174.       form1.msgID.value=SelectedId;
  175.       form1.action='del1.jsp';
  176.       form1.submit();
  177.       break;
  178.     case 1://彻底删除
  179.       if(confirm('邮件将不可恢复,是否真的要永久删除此邮件?')){
  180.         //form1.Actions.value=1;
  181.         form1.msgID.value=SelectedId;
  182.         form1.action='del.jsp';
  183.         form1.submit();
  184.       }
  185.       break;   
  186.     case 2://查看邮件内容
  187.     case 3://回复邮件
  188.     case 4://转发邮件
  189.       if(SelectedId.indexOf(',') == -1){
  190.         switch(n){
  191.           case 2://查看邮件内容
  192.             var urls='ShowMail.jsp?id='+SelectedId+'&uls=0';
  193.             OpenWin(urls,'ShowMail',700,450);
  194.             break;
  195.           case 3://回复邮件
  196.             self.location='replyForm.jsp?actions=RE&id='+SelectedId+"&uri=inbox";
  197.             break;
  198.           case 4://转发邮件
  199.             self.location='replyForm.jsp?actions=FWD&id='+SelectedId+"&uri=inbox";
  200.             break;
  201.         }
  202.       }
  203.       else{
  204.         alert('一次只能选择一个邮件!') ;
  205.         return ;
  206.       }
  207.       break;
  208.       case 5://移动邮件
  209.   form1.Tombx.value=document.all('lstFolderList').value;
  210.   form1.msgID.value=SelectedId;
  211.   form1.action='MoveToMailBox.jsp';
  212.   form1.method='post';
  213.   form1.submit();
  214.   break;   
  215. }
  216. }
  217. function check(obj)
  218. {
  219. var slt = form1.delid.value;
  220. if(obj.checked==true)
  221. {
  222. if(slt.indexOf(obj.value+",")<0)slt = slt+","+obj.value;
  223. }
  224. else
  225. {
  226. if(slt.indexOf(","+obj.value)>=0)slt = slt.replace(","+obj.value,"");
  227. }
  228. form1.delid.value = slt;
  229. //alert(form1.delid.value);
  230. }
  231. function checkAll(obj,value)
  232. {
  233. for(var i=0;i<obj.length;i++)
  234. {
  235. if(value=="1")
  236. {
  237. if(obj[i].checked==false)obj[i].click();
  238. }
  239. else
  240. {
  241. if(obj[i].checked==true)obj[i].click();
  242. }
  243. }
  244. }
  245. function ck(obj)
  246. {
  247. if(obj==undefined)return;
  248. if(form1.delall.checked)
  249. {
  250. form1.delall.value = "1";
  251. checkAll(obj,'1');
  252. //alert(form1.delid.value);
  253. }
  254. else
  255. {
  256. form1.delall.value = "0";
  257. checkAll(obj,'0');
  258. //alert(form1.delid.value);
  259. }
  260. }
  261. function doMoveToDel(theForm)
  262. {
  263. if(confirm('确认要删除邮件吗?')){
  264. theForm.toBoxName.value='delbox';
  265. doMove(theForm);
  266. }
  267. }
  268. //-->
  269. </SCRIPT>
  270. <link href="css/css.css" rel="stylesheet" type="text/css">
  271. </head>
  272. <body bgcolor="#F2F1F2" leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" scroll="no" background="images/login_bg.gif">
  273. <table width="100%" height="5%"  border="0" cellpadding="0" cellspacing="0">
  274.   <tr>
  275.     <td width="11" height="11"></td>
  276.     <td ></td>
  277.   </tr>
  278. </table>
  279. <table width="100%" height="95%"  border="0" cellpadding="0" cellspacing="0" bgcolor="ECF4F5">
  280.   <FORM id='ListForm' name="ListForm" METHOD='POST' ACTION='email.ejf'>
  281. <input type="hidden" name="box" value="delbox">
  282. <input type="hidden" name="easyJWebCommand" value="list">
  283. <input type="hidden" name="subCommand" value="">
  284. <input type="hidden" name="cid"   value="">
  285. <input type="hidden" name="mulitCid"   value="">
  286. <input type="hidden" name="page"   value="0">
  287. <input name="field" type="hidden" value="">
  288.        <input name="orderType" type="hidden" value="">
  289. <tr>
  290.           <td height="20" align="center"><table height="20">
  291.               <tr>               
  292.                 <td nowrap class='coolbutton' onClick='doReply()' style="cursor:hand"><img src='images/replytogroup.gif' width='20' height='18' border='0' align='absmiddle'>回复</td>
  293.                 <td nowrap class='coolbutton' onClick='doForward()' style="cursor:hand"><img src='images/forward.gif' width='20' height='18' border='0' align='absmiddle'>转发</td>
  294. <td align="center" nowrap class='coolbutton' onClick='doMove();' style="cursor:hand">转移到
  295. <img src='images/right.gif' width='9' height='13' border='0' align='absmiddle'>
  296. </td>
  297. <td nowrap>
  298. <select name='newBox'>
  299. <option value='inbox'>收件箱</option>
  300. <option value='draftbox'>草稿箱</option>
  301. <option value='sendbox'>发件箱</option>
  302. <option value='delbox'>垃圾箱</option>
  303. </select>  
  304. </td>
  305.                 <td align="center" nowrap class='coolbutton' onClick='doDel()' style="cursor:hand"><img src='images/delete2.gif' width='20' height='18' border='0' align='absmiddle'> 永久删除 </td>
  306.                 <td nowrap class='coolbutton' onClick='doMoveToDel()' style="cursor:hand"><img src='images/delete2.gif' width='20' height='18' border='0' align='absmiddle'>删除</td>
  307.                 <td align="center" style="cursor:hand">选中全部
  308.                     <input type="checkbox" name="delall"  value="0" onClick="selectAll(cids,this.checked);"></td>
  309.               </tr>
  310.       </table></td>
  311.     </tr>
  312.        
  313.    <tr height="100%">
  314. <td valign="top" height="100%">
  315. <div style="overflow: auto;height:95%;width:100%;">
  316.           <TABLE WIDTH='99%' height="100%" BORDER='1' bordercolor="C7D0D2" align='center' CELLPADDING='4' CELLSPACING='0' style="border-collapse: collapse" class="table1" background="images/table_headbg.gif">
  317.             <thead>
  318.               <TR align="center" valign="middle"> 
  319.                 <Td height="20" nowrap><div style="height:20;width:100%;" align="center" >选择</div></td>
  320.                 <TD height="20" nowrap > <div style="height:20;width:100%;cursor:hand"  title="点击按是否已读排序" onClick="doSort('isRead')" align="center" >状态</div></TD>
  321.                 <TD height="20" nowrap ><div style="height:20;width:100%;" align="center" >附件</div></TD>
  322.                 <TD height="20" nowrap> <div style="height:20;width:100%;cursor:hand"  title="点击按发件人排序" onClick="doSort('sendCID')" align="center">发件人</div></TD>
  323.                 <TD height="20" nowrap> <div style="height:20;width:100%;cursor:hand"  title="点击按主题排序" onClick="doSort('subject')" align="center">主题 
  324.                   </div></TD>
  325.                 <TD height="20" nowrap> <div style="height:20;width:100%;cursor:hand"  title="点击按日期排序" onClick="doSort('sendTime')" align="center">日期</div></TD>
  326.                 <TD height="20" nowrap> <div style="height:20;width:100%;cursor:hand"  title="点击按大小排序" onClick="doSort('emailSize')" align="center">大小</div></TD>
  327.               </TR>
  328.             </thead>
  329.                    <TR bgcolor='F1F6F8'  id=2005102816402618 > 
  330.               <td colspan="7" align="center"></td>
  331.             </TR>
  332.           </TABLE>
  333. </div>
  334.  </td>
  335. </tr>
  336.    
  337.    
  338.         <tr>
  339.           <td height="40" class="TableTitle" valign='top'><table bgcolor="#C1F9FD" class='cooltbl-b' width='100%' cellspacing='0' id='table_bar'>
  340.               <tr bgcolor="#C1F9FD">
  341.                 <td height="100%" align='left' bgcolor="#FFFFFF"><table bgcolor="#FFFFFF" id='table_page' width="100%">
  342.                     <tr>
  343.                       <td nowrap><b>收件箱: 0 封邮件</b></td>
  344.                       <td nowrap>&nbsp;</td>
  345.                       <td nowrap><b> 封邮件未读</b></td>
  346.                       <td align='left' nowrap>
  347.                         <table align="right" >
  348.                         
  349.                         </table></td>
  350.                     </tr>
  351.                 </table></td>
  352.               </tr>
  353.           </table></td>                    
  354.         </tr>
  355. </table>
  356. </body>
  357. </html>