- <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
- <%@page import="com.softeem.webmail.dao.folder.*"%>
- <%@page import="com.softeem.webmail.beans.receive.User"%>
- <%!int [] rec = null;
- int [] send = null;
- int [] draft = null;
- int [] rubbish = null;
- int [] news = null;%>
- <%
- String username = ((User)session.getAttribute("user")).getUsername();
- rec = new QueryRecBox().queryByBoxName("recbox",username);
- send = new QuerySendBox().queryByBoxName("sendbox",username);
- draft = new Query().queryByBoxName("drafts",username);
- rubbish = new Query().queryByBoxName("laji",username);
- news = new QueryNewBox().queryByBoxName("1",username);
- %>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>邮件列表</title>
- <SCRIPT LANGUAGE=javascript>
- <!--
- function clearbox(box)
- {
- if(!confirm('警告:邮件删除不可恢复,是否真的要清空?'))
- return;
- else
- {
- form1.dirName.value=box;
- form1.subCommand.value="clearDir";
- form1.submit();
- }
- }
- function clearbox1(box)
- {
- if(!confirm('警告:邮件删除不可恢复,是否真的要清空?'))
- return;
- else
- {
- window.location.href="deleteBox.do?boxname="+box;
- }
- }
- function delbox(box)
- {
- if(!confirm('警告:邮箱删除不可恢复,是否真的要删除邮箱?'))
- return;
- else
- {
- form1.dirName.value=box;
- form1.subCommand.value="delDir";
- form1.submit();
- }
- }
- function doNewDir()
- {
- //长度限制
- if(form1.dirName.value=='')
- {
- alert('文件夹名不能为空');
- return;
- }
- form1.subCommand.value="createDir";
- form1.submit();
- }
- function renameFdr(parentfid )
- {
- var nn = window.prompt("文件夹名","");a
- if(nn==null || nn=="null" || nn=="")
- {
- alert('文件夹名不能为空');
- return;
- }
- var str=nn;
- var i=1;
- for(var x=0;x<str.length;x++)
- {
- i++;
- if(escape(str.charAt(x)).length>4)
- {
- i++;
- }
- }
- var L=16;
- if(L<i-1)
- {
- alert('此输入框最多只能输入 '+L+' 个字符;您输入的数据现在多出了 '+(i-1-L)+' 个字符;一个汉字相当于两个字符。');
- }
- else{
- form1.dirName.value=parentfid;
- form1.subCommand.value="renameDir";
- form1.action = 'mail-box.do?newDirName='+nn;
- form1.submit();
- }
- }
- -->
- </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">
- <div style="overflow: auto;height:100%;width:100%;">
- <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">
- <tr>
- <td width="11" valign="top"><img src="images/spacer.gif" width="11" height="20"></td>
- <td align="center" valign="top" bgcolor="ECF4F5"><br>
- <table width="99%" height="34" border="1" cellpadding="0" cellspacing="0" bordercolor="9AC0E1" background="images/table_headbg.gif" style="border-collapse: collapse">
- <tr align="center">
- <td width="22%" nowrap>邮件箱名称</td>
- <td width="16%" nowrap>邮件总数</td>
- <td width="21%" nowrap>未读邮件数</td>
- <td width="18%" nowrap>占用空间</td>
- <td width="23%" nowrap>操作</td>
- </tr>
- </table>
- <TABLE WIDTH='99%' height='150' BORDER='1' align='center' CELLPADDING='0' CELLSPACING='0' bordercolor="C7D0D2" class="table2" style="border-collapse: collapse">
- <FORM id='form1' name="form1" METHOD='POST' ACTION='/mail-box.do'>
- <input type="hidden" name="easyJFAction" value="update">
- <input type="hidden" name="subCommand" value="creatDir">
- <thead>
- </thead>
- <tr align='center' bgcolor="EEF6F9">
- <TD width='22%' height="30" nowrap ><a href="list.jsp?easyJWebCommand=list&&box=newbox">新邮件</a></TD>
- <TD width='16%' nowrap ><%=news[0] %></TD>
- <TD width='21%' nowrap ><%=news[0] %></TD>
- <TD width='18%' nowrap ><%=news[1] %></TD>
- <TD width='23%' nowrap><a href="#">删除</a> <a href="javascript:clearbox1('newbox')">清空</a></TD>
- </TR>
- <tr align='center' bgcolor="EEF6F9">
- <TD width='22%' height="30" nowrap ><a href="ReceiveBox">收件箱</a></TD>
- <TD width='16%' nowrap ><%=rec[0] %></TD>
- <TD width='21%' nowrap >0</TD>
- <TD width='18%' nowrap ><%=rec[1] %></TD>
- <TD width='23%' nowrap><a href="#">删除</a> <a href="javascript:clearbox1('recbox')">清空</a></TD>
- </TR>
- <tr align='center' bgcolor="EEF6F9">
- <TD width='22%' height="30" nowrap ><a href="DraftboxServlet">草稿箱</a></TD>
- <TD width='16%' nowrap ><%=draft[0] %></TD>
- <TD width='21%' nowrap >0</TD>
- <TD width='18%' nowrap ><%=draft[1] %></TD>
- <TD width='23%' nowrap><a href="#">删除</a> <a href="javascript:clearbox1('drafts')">清空</a></TD>
- </TR>
- <tr align='center' bgcolor="EEF6F9">
- <TD width='22%' height="30" nowrap ><a href="sendbox.jsp?easyJWebCommand=list&&box=sendbox">发件箱</a></TD>
- <TD width='16%' nowrap ><%=send[0] %></TD>
- <TD width='21%' nowrap >0</TD>
- <TD width='18%' nowrap ><%=send[1] %></TD>
- <TD width='23%' nowrap><a href="#">删除</a> <a href="javascript:clearbox1('sendbox')">清空</a></TD>
- </TR>
- <tr align='center' bgcolor="EEF6F9">
- <TD width='22%' height="30" nowrap ><a href="DelboxServlet">垃圾箱</a></TD>
- <TD width='16%' nowrap ><%=rubbish[0] %></TD>
- <TD width='21%' nowrap >0</TD>
- <TD width='18%' nowrap ><%=rubbish[1] %></TD>
- <TD width='23%' nowrap><a href="#">删除</a> <a href="javascript:clearbox1('laji')">清空</a></TD>
- </TR>
- <tr align='center' bgcolor="EEF6F9">
- <td colspan="5">建新邮件夹 <input type="text" name="dirName" maxlength='16' id="dirName" value="">
- <input type="button" name="build" value="新建" onClick="doNewDir();"></td>
- </TR>
- </TABLE></td>
- <td width="11" bgcolor="ECF4F5"> </td>
- </tr>
- </table>
- </div>
- </body>
- </html>