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

WEB邮件程序

开发平台:

Java

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