📄 listmail.asp
字号:
<!--#include file="passinc.asp" -->
<%
dim ei
set ei = server.createobject("easymail.InfoList")
dim addsortstr
sortstr = request("sortstr")
sortmode = request("sortmode")
if sortmode = 1 then
addsortstr = "&sortstr=" & sortstr & "&sortmode=1"
sortmode = true
else
addsortstr = "&sortstr=" & sortstr & "&sortmode=0"
sortmode = false
end if
if sortstr <> "" then
ei.SetSort sortstr, sortmode
end if
'-----------------------------------------
username = Session("wem")
ei.LoadMailBox username, trim(request("mode"))
ei.timeMode = 2
''''''''''''''''''''''''''''''''
sname = trim(request("sname"))
sfname = trim(request("sfname"))
if sname <> "" and sfname <> "" then
if Application("em_Enable_ShareFolder") = true then
openresult = ei.LoadFriendMailBox(username, sname, sfname)
else
openresult = -1
end if
if openresult = -1 then
set ei = nothing
Response.Redirect "err.asp?errstr=Error"
elseif openresult = 1 then
set ei = nothing
Response.Redirect "err.asp?errstr=Invalid password"
elseif openresult = 2 then
set ei = nothing
Response.Redirect "err.asp?errstr=Folder does not exist or is inaccessible"
end if
end if
if sname = "" or sfname = "" then
dim pf
set pf = server.createobject("easymail.PerFolders")
pf.Load Session("wem")
end if
mb = trim(request("mode"))
allnum = ei.getMailsCount
if trim(request("page")) = "" then
page = 0
else
page = CInt(request("page"))
end if
allpage = CInt((allnum - (allnum mod pageline))/ pageline)
if allnum mod pageline <> 0 then
allpage = allpage + 1
end if
if page >= allpage then
page = allpage - 1
end if
if page < 0 then
page = 0
end if
if allpage = 0 then
allpage = 1
end if
gourl = "listmail.asp?mode=" & Server.URLEncode(mb) & "&sname=" & Server.URLEncode(sname) & "&sfname=" & Server.URLEncode(sfname) & "&page=" & page & "&" & getGRSN()
%>
<HTML>
<HEAD>
<title>Corp.Email</title>
<LINK href="images\hwem.css" rel=stylesheet>
</HEAD>
<SCRIPT LANGUAGE=javascript>
<!--
<%
dim forpn
forpn = ""
i = 0
do while i < allnum
ei.getMailInfo allnum - i - 1, idname, isread, priority, sendMail, sendName, subject, size, etime
forpn = forpn & Chr(9) & idname
idname = NULL
isread = NULL
priority = NULL
sendMail = NULL
sendName = NULL
subject = NULL
size = NULL
etime = NULL
i = i + 1
loop
%>
parent.f1.temp.value="<%=forpn %>"
function setsort(addsortstr){
<% if sortmode = false then %>
location.href = "<%=gourl %>" + "&sortstr=" + addsortstr + "&sortmode=1";
<% else %>
location.href = "<%=gourl %>" + "&sortstr=" + addsortstr + "&sortmode=0";
<% end if %>
}
function checkall(check) {
var i = 0;
var theObj;
for(; i<<%
if allnum > pageline then
if page > 0 then
response.write allnum - page * pageline
else
response.write pageline
end if
else
response.write allnum
end if
%>; i++)
{
theObj = eval("f1.check" + i);
if (theObj != null)
theObj.checked = check;
}
}
function del() {
if (ischeck() == true)
{
f1.gourl.value = "<%=gourl & addsortstr %>";
f1.mode.value = "del";
f1.submit();
}
}
function realdel() {
if (ischeck() == true)
{
f1.gourl.value = "<%=gourl & addsortstr %>";
f1.mode.value = "del";
f1.isremove.value = "1";
f1.submit();
}
}
function move() {
if (ischeck() == true)
{
f1.gourl.value = "<%=gourl & addsortstr %>";
f1.mode.value = "move";
f1.submit();
}
}
function ischeck() {
var i = 0;
var theObj;
for(; i<<%
if allnum > pageline then
if page > 0 then
response.write allnum - page * pageline
else
response.write pageline
end if
else
response.write allnum
end if
%>; i++)
{
theObj = eval("f1.check" + i);
if (theObj != null)
if (theObj.checked == true)
return true;
}
return false;
}
function allcheck_onclick() {
if (document.f1.allcheck.checked == true)
checkall(true);
else
checkall(false);
}
function selectpage_onchange()
{
location.href = "listmail.asp?<%="mode=" & Server.URLEncode(mb) & "&sname=" & Server.URLEncode(sname) & "&sfname=" & Server.URLEncode(sfname) & addsortstr & "&" & getGRSN() %>&page=" + f1.page.value;
}
//-->
</SCRIPT>
<BODY>
<FORM ACTION="mulmail.asp" METHOD="POST" name="f1">
<INPUT NAME="mode" TYPE="hidden">
<INPUT NAME="gourl" TYPE="hidden">
<br>
<table width="98%" border="0" align="center" bgcolor="#EFF7FF" cellspacing="0" style="border-left:1px #8CA5B5 solid; border-top:1px #8CA5B5 solid; border-right:1px #8CA5B5 solid; border-bottom:1px #8CA5B5 solid;">
<tr>
<td align="center" nowrap>[<%
if sname = "" or sfname = "" then
if mb = "in" then
response.write "Inbox"
elseif mb = "out" then
response.write "Draft"
elseif mb = "sed" then
response.write "Sent"
elseif mb = "del" then
response.write "Trash"
else
response.write server.htmlencode(mb)
end if
else
response.write "<font color=""#FF3333"">" & server.htmlencode(sname) & "</font>\" & server.htmlencode(sfname)
end if
%> - <font color="#FF3333"><%=allnum %></font>] [<%
response.write page + 1 & "/" & allpage
%>] <%
if page - 1 < 0 then
response.write "<font face='Webdings' style='font-size:13px'>9</font> "
response.write "<font face='Webdings' style='font-size:13px'>7</font> "
else
response.write "<a href=""listmail.asp?mode=" & Server.URLEncode(mb) & "&sname=" & Server.URLEncode(sname) & "&sfname=" & Server.URLEncode(sfname) & "&page=" & 0 & addsortstr & "&" & getGRSN() & """><font face='Webdings' style='font-size:13px'>9</font></a> "
response.write "<a href=""listmail.asp?mode=" & Server.URLEncode(mb) & "&sname=" & Server.URLEncode(sname) & "&sfname=" & Server.URLEncode(sfname) & "&page=" & page - 1 & addsortstr & "&" & getGRSN() & """><font face='Webdings' style='font-size:13px'>7</font></a> "
end if
%><select name="page" class="drpdwn" size="1" LANGUAGE=javascript onchange="selectpage_onchange()">
<%
i = 0
do while i < allpage
if i <> page then
response.write "<option value=""" & i & """>" & i + 1 & "</option>"
else
response.write "<option value=""" & i & """ selected>" & i + 1 & "</option>"
end if
i = i + 1
loop
%></select>
<%
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -