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

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="inbox">
  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="1">
  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='2009082260226235570.eml' > 
  330.               <td height="26" align="center"> <input type="checkbox"   name="cids"  value="2009082260226235570.eml" onClick="if(this.checked)selectRow(this.value);"> 
  331.               </td>
  332.               <TD height="40" align="center"> <img src="images/new2.gif" border="0">  </TD>
  333.               <TD height="26" align="center" style='word-break:break-all'></TD>
  334.               <TD ><span style="word-break:break-all">Gazup! Accounts<accounts@gazup.com></span></TD>
  335.               <TD  ><font color="#0000FF"><a href="#" target="_self" onClick="show('2009082260226235570.eml');return false;" ><span style="word-break:break-all">Regarding your Gazup! Account</span></a></font></TD>
  336.               <TD align='center'><span style="word-break:break-all">2009-08-13 07:03</span></TD>
  337.               <TD align='center'><span style="word-break:break-all">.57KB</span></TD>
  338.             </TR>
  339.             
  340.             <TR bgcolor='F1F6F8'  id='2009082260226238077.eml' > 
  341.               <td height="26" align="center"> <input type="checkbox"   name="cids"  value="2009082260226238077.eml" onClick="if(this.checked)selectRow(this.value);"> 
  342.               </td>
  343.               <TD height="40" align="center"> <img src="images/new2.gif" border="0">  </TD>
  344.               <TD height="26" align="center" style='word-break:break-all'></TD>
  345.               <TD ><span style="word-break:break-all">赛我网<admin65@cyworld.com.cn></span></TD>
  346.               <TD  ><font color="#0000FF"><a href="#" target="_self" onClick="show('2009082260226238077.eml');return false;" ><span style="word-break:break-all">陈健,你错过了很多红颜知己</span></a></font></TD>
  347.               <TD align='center'><span style="word-break:break-all">2009-08-14 11:50</span></TD>
  348.               <TD align='center'><span style="word-break:break-all">3.11KB</span></TD>
  349.             </TR>
  350.             
  351.             <TR bgcolor='F1F6F8'  id='2009082281058227332.eml' > 
  352.               <td height="26" align="center"> <input type="checkbox"   name="cids"  value="2009082281058227332.eml" onClick="if(this.checked)selectRow(this.value);"> 
  353.               </td>
  354.               <TD height="40" align="center"> <img src="images/new2.gif" border="0">  </TD>
  355.               <TD height="26" align="center" style='word-break:break-all'></TD>
  356.               <TD ><span style="word-break:break-all">开心网<support+tx3rP@kaixin.com></span></TD>
  357.               <TD  ><font color="#0000FF"><a href="#" target="_self" onClick="show('2009082281058227332.eml');return false;" ><span style="word-break:break-all">hi~ 陈健 最近有些游戏很热门啊~</span></a></font></TD>
  358.               <TD align='center'><span style="word-break:break-all">2009-08-14 06:55</span></TD>
  359.               <TD align='center'><span style="word-break:break-all">1.38KB</span></TD>
  360.             </TR>
  361.             
  362.             <TR bgcolor='F1F6F8'  id='2009082290835044123.eml' > 
  363.               <td height="26" align="center"> <input type="checkbox"   name="cids"  value="2009082290835044123.eml" onClick="if(this.checked)selectRow(this.value);"> 
  364.               </td>
  365.               <TD height="40" align="center"> <img src="images/new2.gif" border="0">  </TD>
  366.               <TD height="26" align="center" style='word-break:break-all'></TD>
  367.               <TD ><span style="word-break:break-all">580K<580k@580k.com></span></TD>
  368.               <TD  ><font color="#0000FF"><a href="#" target="_self" onClick="show('2009082290835044123.eml');return false;" ><span style="word-break:break-all">jaty_613,您关注的最新信息(2009-08-17)</span></a></font></TD>
  369.               <TD align='center'><span style="word-break:break-all">2009-08-17 04:06</span></TD>
  370.               <TD align='center'><span style="word-break:break-all">28.66KB</span></TD>
  371.             </TR>
  372.             
  373.             <TR bgcolor='F1F6F8'  id='2009082291115142475.eml' > 
  374.               <td height="26" align="center"> <input type="checkbox"   name="cids"  value="2009082291115142475.eml" onClick="if(this.checked)selectRow(this.value);"> 
  375.               </td>
  376.               <TD height="40" align="center"> <img src="images/new2.gif" border="0">  </TD>
  377.               <TD height="26" align="center" style='word-break:break-all'></TD>
  378.               <TD ><span style="word-break:break-all">开心网<support+tx3rPe2Df5rd90u08r723_Ihjfi_o@kaixin.com></span></TD>
  379.               <TD  ><font color="#0000FF"><a href="#" target="_self" onClick="show('2009082291115142475.eml');return false;" ><span style="word-break:break-all">太酷了!!!陈健 最近有些游戏太爽了!</span></a></font></TD>
  380.               <TD align='center'><span style="word-break:break-all">2009-08-17 12:22</span></TD>
  381.               <TD align='center'><span style="word-break:break-all">1.30KB</span></TD>
  382.             </TR>
  383.             
  384.             <TR bgcolor='F1F6F8'  id='2009082320926342065.eml' > 
  385.               <td height="26" align="center"> <input type="checkbox"   name="cids"  value="2009082320926342065.eml" onClick="if(this.checked)selectRow(this.value);"> 
  386.               </td>
  387.               <TD height="40" align="center"> <img src="images/new2.gif" border="0">  </TD>
  388.               <TD height="26" align="center" style='word-break:break-all'></TD>
  389.               <TD ><span style="word-break:break-all">PayPal<paypal@email.paypal.com></span></TD>
  390.               <TD  ><font color="#0000FF"><a href="#" target="_self" onClick="show('2009082320926342065.eml');return false;" ><span style="word-break:break-all">Developers: Innovate a New World of Payments with PayPal</span></a></font></TD>
  391.               <TD align='center'><span style="word-break:break-all">2009-08-20 09:03</span></TD>
  392.               <TD align='center'><span style="word-break:break-all">13.97KB</span></TD>
  393.             </TR>
  394.             
  395.             <TR bgcolor='F1F6F8'  id='2009082320926353416.eml' > 
  396.               <td height="26" align="center"> <input type="checkbox"   name="cids"  value="2009082320926353416.eml" onClick="if(this.checked)selectRow(this.value);"> 
  397.               </td>
  398.               <TD height="40" align="center"> <img src="images/new2.gif" border="0">  </TD>
  399.               <TD height="26" align="center" style='word-break:break-all'></TD>
  400.               <TD ><span style="word-break:break-all">eFax Customer Service<help@mail.efax.com></span></TD>
  401.               <TD  ><font color="#0000FF"><a href="#" target="_self" onClick="show('2009082320926353416.eml');return false;" ><span style="word-break:break-all">Unable to obtain payment from your credit card</span></a></font></TD>
  402.               <TD align='center'><span style="word-break:break-all">2009-08-19 09:08</span></TD>
  403.               <TD align='center'><span style="word-break:break-all">6.41KB</span></TD>
  404.             </TR>
  405.             
  406.             <TR bgcolor='F1F6F8'  id='2009082320926368504.eml' > 
  407.               <td height="26" align="center"> <input type="checkbox"   name="cids"  value="2009082320926368504.eml" onClick="if(this.checked)selectRow(this.value);"> 
  408.               </td>
  409.               <TD height="40" align="center"> <img src="images/new2.gif" border="0">  </TD>
  410.               <TD height="26" align="center" style='word-break:break-all'></TD>
  411.               <TD ><span style="word-break:break-all">开心网<support+tx3r@kaixin.com></span></TD>
  412.               <TD  ><font color="#0000FF"><a href="#" target="_self" onClick="show('2009082320926368504.eml');return false;" ><span style="word-break:break-all">  ~_~    养什么就是什么~嘻嘻</span></a></font></TD>
  413.               <TD align='center'><span style="word-break:break-all">2009-08-19 05:03</span></TD>
  414.               <TD align='center'><span style="word-break:break-all">1.37KB</span></TD>
  415.             </TR>
  416.             
  417.             <TR bgcolor='F1F6F8'  id='2009092471107248256.eml' > 
  418.               <td height="26" align="center"> <input type="checkbox"   name="cids"  value="2009092471107248256.eml" onClick="if(this.checked)selectRow(this.value);"> 
  419.               </td>
  420.               <TD height="40" align="center"> <img src="images/new2.gif" border="0">  </TD>
  421.               <TD height="26" align="center" style='word-break:break-all'><img src="images/paperclip.gif" border="0"> </TD>
  422.               <TD ><span style="word-break:break-all">fufafen<fufafen@126.com></span></TD>
  423.               <TD  ><font color="#0000FF"><a href="#" target="_self" onClick="show('2009092471107248256.eml');return false;" ><span style="word-break:break-all">JAVA MAIL 问题</span></a></font></TD>
  424.               <TD align='center'><span style="word-break:break-all">2009-09-03 08:52</span></TD>
  425.               <TD align='center'><span style="word-break:break-all">36.69KB</span></TD>
  426.             </TR>
  427.             
  428.             <TR bgcolor='F1F6F8'  id='2009092471107269082.eml' > 
  429.               <td height="26" align="center"> <input type="checkbox"   name="cids"  value="2009092471107269082.eml" onClick="if(this.checked)selectRow(this.value);"> 
  430.               </td>
  431.               <TD height="40" align="center"> <img src="images/new2.gif" border="0">  </TD>
  432.               <TD height="26" align="center" style='word-break:break-all'></TD>
  433.               <TD ><span style="word-break:break-all">余瑞娟<yuruijuan@gmail.com></span></TD>
  434.               <TD  ><font color="#0000FF"><a href="#" target="_self" onClick="show('2009092471107269082.eml');return false;" ><span style="word-break:break-all">余瑞娟 邀请您开设 Google 电子邮件帐户</span></a></font></TD>
  435.               <TD align='center'><span style="word-break:break-all">2009-09-03 10:50</span></TD>
  436.               <TD align='center'><span style="word-break:break-all">1.84KB</span></TD>
  437.             </TR>
  438.             
  439.             <TR bgcolor='F1F6F8'  id=2005102816402618 > 
  440.               <td colspan="7" align="center"></td>
  441.             </TR>
  442.           </TABLE>
  443. </div>
  444.  </td>
  445. </tr>
  446.    
  447.    
  448.         <tr>
  449.           <td height="40" class="TableTitle" valign='top'><table bgcolor="#C1F9FD" class='cooltbl-b' width='100%' cellspacing='0' id='table_bar'>
  450.               <tr bgcolor="#C1F9FD">
  451.                 <td height="100%" align='left' bgcolor="#FFFFFF"><table bgcolor="#FFFFFF" id='table_page' width="100%">
  452.                     <tr>
  453.                       <td nowrap><b>收件箱: 58 封邮件</b></td>
  454.                       <td nowrap>&nbsp;</td>
  455.                       <td nowrap><b> 封邮件未读</b></td>
  456.                       <td align='left' nowrap>第 <font color=red>1</font> <a href=# onclick='return gotoPage(2)'>2</a> <a href=# onclick='return gotoPage(3)'>3</a> <a href=# onclick='return gotoPage(4)'>4</a> <a href=# onclick='return gotoPage(5)'>5</a> <a href=# onclick='return gotoPage(6)'>6</a> 页 <a href=# onclick='return gotoPage(2)'>下一页</a> <a href=# onclick='return gotoPage(6)'>末页</a> 
  457.                         <table align="right" >
  458.                         
  459.                         </table></td>
  460.                     </tr>
  461.                 </table></td>
  462.               </tr>
  463.           </table></td>                    
  464.         </tr>
  465. </table>
  466. </body>
  467. </html>