delbox.jsp
上传用户:liangcc
上传日期:2019-05-24
资源大小:4412k
文件大小:13k
- <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
- <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>收件箱</title>
- <script src="js/public.js" type="text/JavaScript"></script>
- <script language="JavaScript" src="include/CheckDataFunction.js" type="text/JavaScript"></script>
- <SCRIPT LANGUAGE=javascript>
- <!--
- var EmailID=0;
- function selectRow(id)
- {
- ListForm.cid.value=id;
- }
- function selectAll(obj,value)
- {
- if(obj.length==undefined)
- {
- obj.checked=value;
- }
- for(var i=0;i<obj.length;i++)
- obj[i].checked=value;
- }
- function getId(){
- var str="";
- var obj=document.getElementsByName("cids");
- for(var i = 0;i<obj.length;i++){
- if(obj[i].checked){
- str+=obj[i].value+":";
- }
- }
- window.location.href="DeleteServlet?str="+str;
- }
- function doDel()
- {
- var str="";
- var obj=document.getElementsByName("cids");
- for(var i=0;i<obj.length;i++){
- if(obj[i].checked){
- str+=obj[i].value+":";
- }else if(str==""){
- str=":";
- }
- }
- if(str!=":"){
- if(confirm('邮件将不可恢复,是否真的要永久删除此邮件?'))
- window.location.href="DeleteServlet?str="+str;
- }else{
- alert("请选择要删除的内容!");
- }
- }
- function doMove()
- {
- var ids="";
- var obj=ListForm.cids;
- for(var i=0;i<obj.length;i++)
- if(obj[i].checked)ids+=obj[i].value+",";
- if(ids=="")ids=ListForm.cid.value+",";
- ListForm.mulitCid.value=ids;
- if(ids==",")
- {
- alert("请选择要移动的邮件!");
- return false;
- }
- ListForm.easyJWebCommand.value="move";
- ListForm.cid.value=ids;
- ListForm.submit();
- }
- function doReply()
- {
- if(ListForm.cid.value==""){
- alert("请选择要回复的邮件!");
- return ;
- }
- //alert(ListForm.cid.value);
- ListForm.easyJWebCommand.value="reply";
- ListForm.submit();
- }
- function doEdit()
- {
- if(ListForm.cid.value==""){
- alert("请选择要修改的邮件!");
- return ;
- }
- //alert(ListForm.cid.value);
- ListForm.easyJWebCommand.value="edit";
- ListForm.submit();
- }
- function doForward()
- {
- if(ListForm.cid.value==""){
- alert("请选择转发的邮件!");
- return ;
- }
- //alert(ListForm.cid.value);
- ListForm.easyJWebCommand.value="forward";
- ListForm.submit();
- }
- function doReplyAll(id)
- {
- if(ListForm.cid.value==""){
- alert("请选择要回复的邮件!");
- return ;
- }
- ListForm.easyJWebCommand.value="replyAll";
- //ListForm.cid.value=id;
- ListForm.submit();
- }
- function doMoveToDel()
- {
- alert("此功能不存在");
- if(confirm('邮件删除操作将把邮件移到垃圾箱,是否执行该操作?')){
- ListForm.newBox.value="delbox";
- }
- }
- function show(id)
- {
- ListForm.cid.value=id;
- ListForm.easyJWebCommand.value="show";
- //ListForm.target="_blank";
- ListForm.submit();
- //ListForm.target="_self";
- }
- function gotoPage(n)
- {
- ListForm.page.value=n;
- ListForm.submit();
- }
- function ChangeNoEx()
- {
- if(!CheckPositiveInt(form1.txtPageNo,"请输入一个正整数!",false))
- return false;
- ChangePageNo(form1.txtPageNo.value);
- }
- //=================
- function setMailID(id)
- {
- if(event.ctrlKey)
- {
- EmailID=id;
- if(form1.msgID.value !='')
- form1.msgID.value+=','+id;
- else
- form1.msgID.value=id;
- }
- else
- {
- EmailID=id;
- form1.msgID.value=id;
- }
- }
- //================
- //排序
- function doSort(fld)
- {
- if(ListForm.field.value==fld){
- if(ListForm.orderType.value=='asc')
- ListForm.orderType.value='desc';
- else
- ListForm.orderType.value='asc';
- }
- ListForm.field.value=fld;
- ListForm.method="post";
- ListForm.submit();
- }
- //document.onselectstart =function () {return false;}
- function Exec_Click(n){
- var SelectedId = '';
- var arrUsers = temp;
- var i = 0 ;
- if(form1.delid.value=='')// &&SelectedId == '')
- {
- alert('请先选择邮件!') ;
- return ;
- }
- SelectedId = form1.delid.value;
- if(SelectedId.indexOf(",")==0)
- SelectedId = SelectedId.substring(1);
- form1.delid.value = "";
- //alert(SelectedId)
- // }
- switch(n){
- case 0://移动到垃圾箱
- //form1.Actions.value=0;
- form1.msgID.value=SelectedId;
- form1.action='del1.jsp';
- form1.submit();
- break;
- case 1://彻底删除
- if(confirm('邮件将不可恢复,是否真的要永久删除此邮件?')){
- //form1.Actions.value=1;
- form1.msgID.value=SelectedId;
- form1.action='del.jsp';
- form1.submit();
- }
- break;
- case 2://查看邮件内容
- case 3://回复邮件
- case 4://转发邮件
- if(SelectedId.indexOf(',') == -1){
- switch(n){
- case 2://查看邮件内容
- var urls='ShowMail.jsp?id='+SelectedId+'&uls=0';
- OpenWin(urls,'ShowMail',700,450);
- break;
- case 3://回复邮件
- self.location='replyForm.jsp?actions=RE&id='+SelectedId+"&uri=inbox";
- break;
- case 4://转发邮件
- self.location='replyForm.jsp?actions=FWD&id='+SelectedId+"&uri=inbox";
- break;
- }
- }
- else{
- alert('一次只能选择一个邮件!') ;
- return ;
- }
- break;
- case 5://移动邮件
- form1.Tombx.value=document.all('lstFolderList').value;
- form1.msgID.value=SelectedId;
- form1.action='MoveToMailBox.jsp';
- form1.method='post';
- form1.submit();
- break;
- }
- }
- function check(obj)
- {
- var slt = form1.delid.value;
-
- if(obj.checked==true)
- {
- if(slt.indexOf(obj.value+",")<0)slt = slt+","+obj.value;
- }
- else
- {
- if(slt.indexOf(","+obj.value)>=0)slt = slt.replace(","+obj.value,"");
- }
- form1.delid.value = slt;
- //alert(form1.delid.value);
- }
- function checkAll(obj,value)
- {
- for(var i=0;i<obj.length;i++)
- {
- if(value=="1")
- {
- if(obj[i].checked==false)obj[i].click();
- }
- else
- {
- if(obj[i].checked==true)obj[i].click();
- }
- }
- }
- function ck(obj)
- {
- if(obj==undefined)return;
- if(form1.delall.checked)
- {
- form1.delall.value = "1";
- checkAll(obj,'1');
- //alert(form1.delid.value);
-
- }
- else
- {
- form1.delall.value = "0";
- checkAll(obj,'0');
- //alert(form1.delid.value);
- }
- }
- function doMoveToDel(theForm)
- {
- if(confirm('确认要删除邮件吗?')){
- theForm.toBoxName.value='delbox';
- doMove(theForm);
- }
- }
- //-->
- </SCRIPT>
- <link href="css/css.css" rel="stylesheet" type="text/css">
- </head>
- <body bgcolor="#F2F1F2" leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" scroll="no" background="images/login_bg.gif">
- <table width="100%" height="5%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td width="11" height="11"></td>
- <td ></td>
- </tr>
- </table>
- <table width="100%" height="95%" border="0" cellpadding="0" cellspacing="0" bgcolor="ECF4F5">
- <FORM id='ListForm' name="ListForm" METHOD='POST' ACTION='ManageDelServlet'>
- <input type="hidden" name="box" value="delbox">
- <input type="hidden" name="easyJWebCommand" value="list">
- <input type="hidden" name="subCommand" value="">
- <input type="hidden" name="cid" value="">
- <input type="hidden" name="mulitCid" value="">
- <input type="hidden" name="page" value="0">
- <input name="field" type="hidden" value="">
- <input name="orderType" type="hidden" value="">
- <tr>
- <td height="20" align="center"><table height="20">
- <tr>
- <td nowrap class='coolbutton' onClick='doReply()' style="cursor:hand"><img src='images/replytogroup.gif' width='20' height='18' border='0' align='absmiddle'>回复</td>
- <td nowrap class='coolbutton' onClick='doForward()' style="cursor:hand"><img src='images/forward.gif' width='20' height='18' border='0' align='absmiddle'>转发</td>
- <td align="center" nowrap class='coolbutton' onClick='doMove();' style="cursor:hand">转移到
- <img src='images/right.gif' width='9' height='13' border='0' align='absmiddle'>
- </td>
-
- <td nowrap>
- <select name='newBox'>
- <option value='inbox'>收件箱</option>
- <option value='drafts'>草稿箱</option>
- <option value='sendbox'>发件箱</option>
- <option value='laji'>垃圾箱</option>
- </select>
- </td>
- <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>
- <td nowrap class='coolbutton' onClick='doMoveToDel()' style="cursor:hand"><img src='images/delete2.gif' width='20' height='18' border='0' align='absmiddle'>删除</td>
- <td align="center" style="cursor:hand">选中全部
- <input type="checkbox" name="delall" value="0" onClick="selectAll(cids,this.checked);"></td>
- </tr>
- </table></td>
- </tr>
-
- <tr height="100%">
- <td valign="top" height="100%">
- <div style="overflow: auto;height:95%;width:100%;">
- <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">
- <thead>
- <TR align="center" valign="middle">
- <Td height="20" nowrap><div style="height:20;width:100%;" align="center" >选择</div></td>
- <TD height="20" nowrap > <div style="height:20;width:100%;cursor:hand" title="点击按是否已读排序" onClick="doSort('isRead')" align="center" >状态</div></TD>
- <TD height="20" nowrap ><div style="height:20;width:100%;" align="center" >附件</div></TD>
- <TD height="20" nowrap> <div style="height:20;width:100%;cursor:hand" title="点击按发件人排序" onClick="doSort('sendCID')" align="center">发件人</div></TD>
- <TD height="20" nowrap> <div style="height:20;width:100%;cursor:hand" title="点击按主题排序" onClick="doSort('subject')" align="center">主题
- </div></TD>
- <TD height="20" nowrap> <div style="height:20;width:100%;cursor:hand" title="点击按日期排序" onClick="doSort('sendTime')" align="center">日期</div></TD>
- <TD height="20" nowrap> <div style="height:20;width:100%;cursor:hand" title="点击按大小排序" onClick="doSort('emailSize')" align="center">大小</div></TD>
- </TR>
- </thead>
-
- <c:forEach items="${delbox}" var="del">
- <TR bgcolor='F1F6F8' id='2009092471131106253.eml' >
- <td height="26" align="center"> <input type="checkbox" name="cids" id="cids" value="${del.id }" onClick="if(this.checked)selectRow(this.value);">
- </td>
- <TD height="40" align="center">
- <c:if test="${del.stat=='1'}">
- <img src="images/new2.gif" border="0">
- </c:if>
- </TD>
- <TD height="26" align="center" style='word-break:break-all'>
- <c:if test="${del.add !=null}">
- <a href="${del.add}"><img src="images/paperclip.gif" border="0"></a>
- </c:if>
-
- </TD>
- <TD ><span style="word-break:break-all">${del.mail_from }<jaty_613@163.com></span></TD>
- <TD ><font color="#0000FF"><a href="#" target="_self" onClick="show('2009092471131106253.eml');return false;" ><span style="word-break:break-all">${del.subject }</span></a></font></TD>
- <TD align='center'><span style="word-break:break-all">${del.date }</span></TD>
- <TD align='center'><span style="word-break:break-all">${del.mail_size }B</span></TD>
- </TR>
- </c:forEach>
-
- <TR bgcolor='F1F6F8' id=2005102816402618 >
- <td colspan="7" align="center"></td>
- </TR>
- </TABLE>
- </div>
- </td>
- </tr>
-
-
- <tr>
- <td height="40" class="TableTitle" valign='top'><table bgcolor="#C1F9FD" class='cooltbl-b' width='100%' cellspacing='0' id='table_bar'>
- <tr bgcolor="#C1F9FD">
- <td height="100%" align='left' bgcolor="#FFFFFF"><table bgcolor="#FFFFFF" id='table_page' width="100%">
- <tr>
- <td nowrap><b>收件箱: ${total } 封邮件</b></td>
- <td nowrap> </td>
- <td nowrap><b> 封邮件未读</b></td>
- <td align='left' nowrap>
- <a href="DelboxServlet?page=1">首页</a>
- <c:if test="${currentpage==1}">上一页</c:if>
- <c:if test="${currentpage!=1}"><a href="DelboxServlet?page=${currentpage-1 }">上一页</a></c:if>
- <c:if test="${currentpage==lastpage}">下一页</c:if>
- <c:if test="${currentpage!=lastpage}"><a href="DelboxServlet?page=${currentpage+1 }">下一页</a> </c:if>
- <a href="DelboxServlet?page=${lastpage}">末页</a>
- <table align="right" >
-
- </table></td>
- </tr>
- </table></td>
- </tr>
-
- </table></td>
- </tr>
- </table>
- </body>
- </html>