📄 viewmailbox.asp
字号:
<!--#include file="passinc.asp" -->
<%
dim ischange
ischange = FALSE
if trim(request("mode")) <> "" then
dim pf
set pf = server.createobject("easymail.PerFolders")
pf.Load Session("wem")
if trim(request("mode")) = "del" then
if pf.DeleteFolderByName(trim(request("pfname"))) = FALSE then
response.write "*Error: Only empty folders can be removed. [" & server.htmlencode(trim(request("pfname"))) & "]"
else
ischange = TRUE
end if
elseif trim(request("mode")) = "add" then
if CInt(Application("em_MaxFolders")) > pf.FolderCount then
NewName = trim(request("NewName"))
NewName = replace(NewName, Chr(9), " ")
NewName = replace(NewName, """", "")
NewName = replace(NewName, "'", "")
pf.AddFolder NewName
ischange = TRUE
else
response.write "*Error: Maximum number of private folders reached."
end if
elseif trim(request("mode")) = "rename" then
NewName = trim(request("NewName"))
NewName = replace(NewName, """", "'")
pf.RenameFolder trim(request("pfname")), NewName
ischange = TRUE
end if
pf.Save
set pf = nothing
end if
noticemsg = trim(request("noticemsg"))
dim am
set am = server.createobject("easymail.Attachments")
am.Load Session("wem"), Session("tid")
am.RemoveAll
set am = nothing
'-----------------------------------------
dim eusers
set eusers = Application("em")
maxsize = eusers.GetMailBoxSize(Session("wem"))
set eusers = nothing
if maxsize < 0 then
maxsize = 10000
end if
dim ei
set ei = server.createobject("easymail.InfoList")
'-----------------------------------------
ei.LoadSizeInfo Session("wem")
cursize = ei.allMailSize
dim bf
if maxsize > 0 then
bf = CInt((100 * CLng(cursize / 1000)) / maxsize)
else
bf = 100
end if
if bf > 100 then
bf = 100
end if
if bf < 0 then
bf = 0
end if
%>
<HTML>
<HEAD>
<title>Corp.Email</title>
<LINK href="images\hwem.css" rel=stylesheet>
</HEAD>
<SCRIPT LANGUAGE=javascript>
<!--
function window_onload() {
<%
if ischange = TRUE then
response.write "parent.f1.window.location.href = ""left.asp?" & getGRSN() & """;"
end if
%>
}
function deletepf() {
if (f1.pfName.selectedIndex != -1)
{
f1.mode.value = "del";
f1.submit();
}
}
function add() {
if (f1.NewName.value.indexOf("\"") != -1 || f1.NewName.value.indexOf("'") != -1)
{
alert("Contains Invalid characters.");
return;
}
if (f1.NewName.value != "")
{
f1.mode.value = "add";
f1.submit();
}
}
function rename() {
if (f1.NewName.value.indexOf("\"") != -1 || f1.NewName.value.indexOf("'") != -1)
{
alert("Contains Invalid characters.");
return;
}
if (f1.NewName.value != "")
{
f1.mode.value = "rename";
f1.submit();
}
}
//-->
</SCRIPT>
<BODY LANGUAGE=javascript onload="return window_onload()">
<br>
<form name="f1" method="post" action="viewmailbox.asp?<%=getGRSN() %>">
<table width="93%" border="0" align="center">
<tr>
<td>
<table width="93%" border="0" align="center" cellspacing="0" bgcolor="#EFF7FF">
<tr><td colspan=4>
<table cellspacing=0 cellpadding=2 border=0 bgcolor="#EFF7FF">
<tbody>
<tr>
<td>0%</td>
<td width="100%">
<table style="BORDER-RIGHT: #104a7b 1px solid; PADDING-RIGHT: 0px; BORDER-TOP: #104a7b 1px solid; PADDING-LEFT: 0px; PADDING-BOTTOM: 1px; BORDER-LEFT: #104a7b 1px solid; PADDING-TOP: 1px; BORDER-BOTTOM: #104a7b 1px solid" cellspacing=0 cellpadding=0 width="100%" border=0>
<tbody>
<tr>
<td width="100%">
<div style="FONT-SIZE: 3px; WIDTH: <%=bf %>%; HEIGHT: 6px; BACKGROUND-COLOR: #339933"></div>
</td>
</tr>
</tbody>
</table>
</td>
<td>100%</td>
</tr>
<tr>
<td colspan=3><font class=s><font color="#FF3333" style="font-size: 13pt; font-family:tahoma,san-serif"><%=Session("mail") %></font><br>The storage space of your mailbox is: <%=maxsize %><b>K</b>, of which you have taken up <%=bf %>%.</font>
<%
if noticemsg <> "" then
response.write "<br><br><b><font class=s>Note: <a href='logon.asp?forget=1&" & getGRSN() & "'>" & noticemsg & "</a></font></b>"
end if
%>
<br>
</td>
</tr>
</tbody>
</table>
</td></tr>
<tr><td height="22" colspan=4 bgcolor="#ffffff">
</td></tr>
<tr bgcolor="#dbeaf5">
<td height="35" width="30%" style="border-left:1px #8CA5B5 solid; border-top:1px #8CA5B5 solid; border-bottom:1px #8CA5B5 solid;">
<div align="center"><b>Folder Name</b></div>
</td>
<td width="15%" style="border-left:1px #8CA5B5 solid; border-top:1px #8CA5B5 solid; border-bottom:1px #8CA5B5 solid;">
<div align="center"><b>Messages</b></div>
</td>
<td width="15%" style="border-left:1px #8CA5B5 solid; border-top:1px #8CA5B5 solid; border-bottom:1px #8CA5B5 solid;">
<div align="center"><b>Unread</b></div>
</td>
<td width="15%" style="border-left:1px #8CA5B5 solid; border-top:1px #8CA5B5 solid; border-bottom:1px #8CA5B5 solid; border-right:1px #8CA5B5 solid;">
<div align="center"><b>Space Used</b></div>
</td>
</tr>
<tr>
<td width="15%" height="30" style="border-bottom:1px #8CA5B5 solid;">
<div align="center"><a href="listmail.asp?mode=in&<%=getGRSN() %>">Inbox</a></div>
</td>
<td style="border-bottom:1px #8CA5B5 solid;">
<div align="right"><%= ei.inboxMailCount %></div>
</td>
<td style="border-bottom:1px #8CA5B5 solid;"> <% if ei.newInBoxMailCount = 0 then%>
<div align="right"><%= ei.newInBoxMailCount %></div>
<% else %>
<div align="right"><font color="#FF3333" size="2"><b><%= ei.newInBoxMailCount %></b></font></div>
<% end if %> </td>
<td style="border-bottom:1px #8CA5B5 solid;">
<div align="right"><%= CLng(ei.inboxMailSize/1000) %>K</div>
</td>
</tr>
<tr>
<td width="15%" height="30" style="border-bottom:1px #8CA5B5 solid;">
<div align="center"><a href="listmail.asp?mode=out&<%=getGRSN() %>">Draft</a></div>
</td>
<td style="border-bottom:1px #8CA5B5 solid;">
<div align="right"><%= ei.outboxMailCount %></div>
</td>
<td style="border-bottom:1px #8CA5B5 solid;"> <% if ei.newOutBoxMailCount = 0 then%>
<div align="right"><%= ei.newOutBoxMailCount %></div>
<% else %>
<div align="right"><font color="#FF3333" size="2"><b><%= ei.newOutBoxMailCount %></b></font></div>
<% end if %> </td>
<td style="border-bottom:1px #8CA5B5 solid;">
<div align="right"><%= CLng(ei.outboxMailSize/1000) %>K</div>
</td>
</tr>
<tr>
<td width="15%" height="30" style="border-bottom:1px #8CA5B5 solid;">
<div align="center"><a href="listmail.asp?mode=sed&<%=getGRSN() %>">Sent</a></div>
</td>
<td style="border-bottom:1px #8CA5B5 solid;">
<div align="right"><%= ei.sendboxMailCount %></div>
</td>
<td style="border-bottom:1px #8CA5B5 solid;"><% if ei.newSendBoxMailCount = 0 then%>
<div align="right"><%= ei.newSendBoxMailCount %></div>
<% else %>
<div align="right"><font color="#FF3333" size="2"><b><%= ei.newSendBoxMailCount %></b></font></div>
<% end if %> </td>
<td style="border-bottom:1px #8CA5B5 solid;">
<div align="right"><%= CLng(ei.sendboxMailSize/1000) %>K</div>
</td>
</tr>
<tr>
<td width="15%" height="30" style="border-bottom:1px #8CA5B5 solid;">
<div align="center"><a href="listmail.asp?mode=del&<%=getGRSN() %>">Trash</a> <a href="mulmail.asp?mode=cleanTrash&<%=getGRSN() %>&gourl=viewmailbox.asp?<%=getGRSN() %>"><img src='images\del.gif' align='absmiddle' border='0' alt="Empty Folder"></a></div>
</td>
<td style="border-bottom:1px #8CA5B5 solid;">
<div align="right"><%= ei.delboxMailCount %></div>
</td>
<td style="border-bottom:1px #8CA5B5 solid;"><% if ei.newDelBoxMailCount = 0 then%>
<div align="right"><%= ei.newDelBoxMailCount %></div>
<% else %>
<div align="right"><font color="#FF3333" size="2"><b><%= ei.newDelBoxMailCount %></b></font></div>
<% end if %> </td>
<td style="border-bottom:1px #8CA5B5 solid;">
<div align="right"><%= CLng(ei.delboxMailSize/1000) %>K</div>
</td>
</tr>
<tr>
<td width="15%" height="30" style="border-bottom:1px #8CA5B5 solid;">
<div align="center"><a href="listatt.asp?<%=getGRSN() %>">Network Storage</a><%
if Application("em_Enable_ShareFolder") = true then
%> [<a href="ff_sharefolder.asp?foldername=att&<%=getGRSN() %>">Sharing</a>]</div>
<%
end if
%>
</td>
<td style="border-bottom:1px #8CA5B5 solid;">
<div align="right"><%= ei.attachmentsCount %></div>
</td>
<td style="border-bottom:1px #8CA5B5 solid;"><% if ei.newAttachmentsCount = 0 then%>
<div align="right"><%= ei.newAttachmentsCount %></div>
<% else %>
<div align="right"><font color="#FF3333" size="2"><b><%= ei.newAttachmentsCount %></b></font></div>
<% end if %> </td>
<td style="border-bottom:1px #8CA5B5 solid;">
<div align="right"><%= CLng(ei.attachmentsSize/1000) %>K</div>
</td>
</tr>
<%
allnum = ei.PerFolderCount
i = 0
do while i < allnum
ei.GetPerFolderInfo i, pfname, pfmailcount, pfsize, pfnewmailcount
response.write "<tr><td width='15%' height='30' style='border-bottom:1px #8CA5B5 solid;'><div align='center'>"
response.write "<a href='listmail.asp?mode=" & Server.URLEncode(pfname) & "&" & getGRSN() & "'>" & server.htmlencode(pfname) & "</a>"
if Application("em_Enable_ShareFolder") = true then
response.write " [<a href='ff_sharefolder.asp?foldername=" & Server.URLEncode(pfname) & "&" & getGRSN() & "'>Sharing</a>]</div>"
end if
response.write "</td><td style='border-bottom:1px #8CA5B5 solid;'><div align='right'>" & pfmailcount & "</div></td>"
response.write "<td style='border-bottom:1px #8CA5B5 solid;'>"
if pfnewmailcount = 0 then
response.write "<div align='right'>" & pfnewmailcount & "</div>"
else
response.write "<div align='right'><font color='#FF3333' size='2'><b>" & pfnewmailcount & "</b></font></div>"
end if
response.write "</td><td style='border-bottom:1px #8CA5B5 solid;'>"
response.write "<div align='right'>" & CLng(pfsize/1000) & "K</div></td></tr>"
pfname = NULL
pfmailcount = NULL
pfsize = NULL
pfnewmailcount = NULL
i = i + 1
loop
%>
<tr>
<td height="30" width="15%" style='border-bottom:1px #8CA5B5 solid;'>
<div align="center"><b>TOTAL</b></div>
</td>
<td style='border-bottom:1px #8CA5B5 solid;'>
<div align="right"><b><%= ei.allMailCount %></b></div>
</td>
<td style='border-bottom:1px #8CA5B5 solid;'>
<div align="right"><b><%= ei.allNewMailCount %></b></div>
</td>
<td style='border-bottom:1px #8CA5B5 solid;'>
<div align="right"><b><%= CLng(ei.allMailSize/1000) %>K</b></div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td>
<div align="center">
<table width="93%" align="center" cellspacing="0" bgcolor="#EFF7FF" style="border-top:1px #8CA5B5 solid;">
<tr bgcolor="#dbeaf5">
<td height="28" style="border-left:1px #8CA5B5 solid; border-right:1px #8CA5B5 solid; border-bottom:1px #8CA5B5 solid;">
<div align="center"><b>Personal Folder</b></div>
</td>
</tr>
<tr>
<td>
<div align="center">
<table width="93%" border="0">
<tr>
<td>
<div align="center">
<input type="hidden" name="mode" value="add">
<input type="text" name="NewName" size="40" maxlength="64" class='textbox'>
<input type="button" value="Create" name="button" onclick="javascript:add()" class="sbttn">
<input type="button" value="Rename" name="button" onclick="javascript:rename()" class="sbttn">
</div>
</td>
</tr>
<%
if allnum > 0 then
%>
<tr>
<td>
<div align="center">
<hr size="1" color="#8CA5B5">
</div>
</td>
</tr>
<tr>
<td>
<div align="center">
<select name="pfName" class="drpdwn" size="1">
<%
allnum = ei.PerFolderCount
i = 0
do while i < allnum
ei.GetPerFolderInfo i, pfname, pfmailcount, pfsize, pfnewmailcount
response.write "<option value=""" & pfname & """>" & server.htmlencode(pfname) & "</option>"
pfname = NULL
pfmailcount = NULL
pfsize = NULL
pfnewmailcount = NULL
i = i + 1
loop
%>
</select>
<input type="button" value="Delete" onclick="javascript:deletepf()" class="sbttn">
</div>
</td>
</tr>
<%
end if
%>
</table>
</div>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<br>
</Form>
</BODY>
</HTML>
<%
set ei = nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -