📄 forwardmail.asp
字号:
<!--#include file="passinc.asp" -->
<%
dim ei
set ei = server.createobject("easymail.emmail")
'-----------------------------------------
sname = trim(request("sname"))
sfname = trim(request("sfname"))
if sname <> "" and sfname <> "" then
openresult = ei.OpenFriendFolder(Session("wem"), sname, sfname)
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
filename = trim(request("filename"))
ei.LoadAll Session("wem"), filename
dim userweb
set userweb = server.createobject("easymail.UserWeb")
'-----------------------------------------
userweb.Load Session("wem")
if userweb.useRichEditer = false then
useRichEditer = false
else
useRichEditer = true
end if
MailName = userweb.MailName
dim ads
set ads = server.createobject("easymail.Addresses")
ads.Load Session("wem")
%>
<HTML>
<HEAD>
<title>Corp.Email</title>
<LINK href="images\hwem.css" rel=stylesheet>
</HEAD>
<SCRIPT LANGUAGE=javascript>
<!--
function selectAdd(mode) {
var remote = null;
if (mode == "To")
{
remote = window.open("selectadd.asp?mode=To&<%=getGRSN() %>", "", "top=80; left=150; height=330,width=496,scrollbars=yes,resizable=yes,status=no,toolbar=no,menubar=no,location=no");
if (remote)
remote.opener = this.f1.EasyMail_To;
}
else if (mode == "Cc")
{
remote = window.open("selectadd.asp?mode=Cc&<%=getGRSN() %>", "", "top=80; left=150; height=330,width=496,scrollbars=yes,resizable=yes,status=no,toolbar=no,menubar=no,location=no");
if (remote)
remote.opener = this.f1.EasyMail_Cc;
}
else if (mode == "Bcc")
{
remote = window.open("selectadd.asp?mode=Bcc&<%=getGRSN() %>", "", "top=80; left=150; height=330,width=496,scrollbars=yes,resizable=yes,status=no,toolbar=no,menubar=no,location=no");
if (remote)
remote.opener = this.f1.EasyMail_Bcc;
}
}
function window_onload() {
if (f1.IsReSend.value != "")
{
var s,ss;
var s = f1.EasyMail_OrAtt.value;
ss = s.split("\t");
for (i = f1.OrAtt.length - 1; i >= 0; i--)
{
if (checkOrgAtt(ss, f1.OrAtt.options[i].value) == false)
f1.OrAtt.remove(i);
}
}
f1.OrAtt.selectedIndex = 0;
<%
if useRichEditer = true then
if ei.HTML_Text <> "" then
html_text = server.htmlencode(ei.HTML_Text)
html_text = replace(html_text, Chr(10), "")
html_text = replace(html_text, Chr(13), "")
response.write "richedit.setHTML(""" & html_text & """);"
else
html_text = replace(ei.Text, """", "'")
html_text = replace(html_text, Chr(13), "<br>\")
response.write "richedit.setHTML(""" & html_text & """);"
end if
end if
%>
}
function checkOrgAtt(attarray, attindex) {
var i;
for(i = attarray.length - 1; i >= 0 ; i--)
{
if (attarray[i] == attindex)
return true;
}
return false;
}
function showSave() {
f1.SendMode.value = "save"
sub(0);
}
function showSending() {
sub(1);
}
function sub(smode){
if (f1.EasyMail_To.value != "")
{
<%
if useRichEditer = false then
%>
if (smode == 1)
sending.style.visibility="visible";
else
esave.style.visibility="visible";
dec_EasyMail_Text();
<%
end if
%>
addOAtt();
<%
if useRichEditer = true then
%>
f1.RichEdit_Text.value = richedit.getText();
f1.RichEdit_Html.value = richedit.getHTML();
dec_RichEdit_Text();
dec_RichEdit_Html();
<%
end if
%>
f1.AddFromAttFileString.value = "";
var i = 0;
for (i; i < f1.NetAtts.length; i++)
{
f1.AddFromAttFileString.value = f1.AddFromAttFileString.value + f1.NetAtts[i].value + "\t";
}
f1.submit();
}
else
{
alert("Your message must have at least one addressee in the 'To' field.");
f1.EasyMail_To.focus();
}
}
function delOAtt(){
if (f1.OrAtt.selectedIndex != -1)
{
f1.OrAtt.remove(f1.OrAtt.selectedIndex);
f1.OrAtt.selectedIndex = 0;
}
}
function addOAtt(){
var i = 0;
var al = "";
for (i; i < f1.OrAtt.length; i++)
{
al = al + f1.OrAtt[i].value + '\t';
}
f1.EasyMail_OrAtt.value = al;
f1.IsReSend.value = '1';
}
function timerSending() {
if (checkTime() == true)
{
f1.SendMode.value = "timersend"
sub(0);
}
}
function cutz(inval)
{
var rval = "";
for (var i = 0; i < inval.length; i++)
{
if (inval.charAt(i) != '0')
break;
}
rval = inval.substring(i);
return rval;
}
function checkTime()
{
var err = "Error Date.";
var nowdate = new Date(<%=Year(now()) & "," & Month(now()) & "," & Day(now()) & "," & Hour(now()) & "," & Minute(now()) %>);
var mydate = new Date(f1.t_year.value, f1.t_month.value, f1.t_day.value, f1.t_hour.value, 1);
var nmonth = f1.t_month.value;
var nday = f1.t_day.value;
var nhour = f1.t_hour.value;
if (f1.t_year.value == "" || f1.t_year.value > 9999 || f1.t_year.value < <%=Year(now()) %>)
{
alert(err);
f1.t_year.focus();
return false;
}
if (nmonth == "" || nmonth > 12 || nmonth < 1)
{
alert(err);
f1.t_month.focus();
return false;
}
if (nday == "" || nday > 31 || nday < 1)
{
alert(err);
f1.t_day.focus();
return false;
}
if (nhour == "" || nhour > 23 || nhour < 0)
{
alert(err);
f1.t_hour.focus();
return false;
}
if (mydate > nowdate)
{
if (f1.t_month.value < 10)
nmonth = "0" + cutz(f1.t_month.value);
if (f1.t_day.value < 10)
nday = "0" + cutz(f1.t_day.value);
if (f1.t_hour.value < 10)
nhour = "0" + cutz(f1.t_hour.value);
if (nhour == "0")
nhour = "00"
f1.EasyMail_TimerSend.value = f1.t_year.value + nmonth + nday + nhour;
}
else
{
f1.t_hour.focus();
alert("The scheduled time should be later than present.");
return false;
}
return true;
}
var qF = "EasyMail_To";
function addit(qaEmail){
if (f1.elements[qF].value.length == 0 || f1.elements[qF].value.indexOf(qaEmail) == -1)
{
if (f1.elements[qF].value.length != 0 && f1.elements[qF].value.charAt(f1.elements[qF].value.length - 1) != ",")
f1.elements[qF].value += ",";
f1.elements[qF].value += qaEmail;
}
}
function setIt(H){qF=H;}
function EditSpeedAff(){
window.open("editspeedadd.asp?<%=getGRSN() %>", "", "top=80; left=150; height=330,width=496,scrollbars=yes,resizable=yes,status=no,toolbar=no,menubar=no,location=no");
}
function delNetAtt(){
if (f1.NetAtts.selectedIndex != -1)
{
f1.NetAtts.remove(f1.NetAtts.selectedIndex);
f1.NetAtts.selectedIndex = 0;
}
}
function addNetAtt(){
if (f1.NetSaveAtts.selectedIndex != -1)
{
var oOption = document.createElement("OPTION");
oOption.text = f1.NetSaveAtts[f1.NetSaveAtts.selectedIndex].text;
oOption.value = f1.NetSaveAtts[f1.NetSaveAtts.selectedIndex].value;
f1.NetAtts.add(oOption);
f1.NetAtts.selectedIndex = f1.NetAtts.length - 1;
}
}
function dec_EasyMail_Text()
{
var count = 0;
var theObj;
var FormLimit = 50000;
var TempVar = new String;
TempVar = document.f1.EasyMail_Text.value;
if (TempVar.length > FormLimit)
{
while (TempVar.length > 0 && count < 10)
{
theObj = eval("document.all(\"add" + count + "\")");
theObj.innerHTML = "<Textarea rows=1 cols=1 name='Mdec_EasyMail_Text" + count + "'></Textarea>";
theObj = eval("f1.Mdec_EasyMail_Text" + count);
theObj.value = TempVar.substr(0, FormLimit);
TempVar = TempVar.substr(FormLimit);
count++;
}
}
else
{
theObj = eval("document.all(\"add1\")");
theObj.innerHTML = "<Textarea rows=1 cols=1 name='Mdec_EasyMail_Text1'></Textarea>";
theObj = eval("f1.Mdec_EasyMail_Text1");
theObj.value = TempVar;
}
}
function dec_RichEdit_Text()
{
var count = 10;
var theObj;
var FormLimit = 50000;
var TempVar = new String;
TempVar = document.f1.RichEdit_Text.value;
if (TempVar.length > FormLimit)
{
while (TempVar.length > 0 && count < 20)
{
theObj = eval("document.all(\"add" + count + "\")");
theObj.innerHTML = "<Textarea rows=1 cols=1 name='Mdec_RichEdit_Text" + count + "'></Textarea>";
theObj = eval("f1.Mdec_RichEdit_Text" + count);
theObj.value = TempVar.substr(0, FormLimit);
TempVar = TempVar.substr(FormLimit);
count++;
}
}
else
{
theObj = eval("document.all(\"add10\")");
theObj.innerHTML = "<Textarea rows=1 cols=1 name='Mdec_RichEdit_Text10'></Textarea>";
theObj = eval("f1.Mdec_RichEdit_Text10");
theObj.value = TempVar;
}
}
function dec_RichEdit_Html()
{
var count = 20;
var theObj;
var FormLimit = 50000;
var TempVar = new String;
TempVar = document.f1.RichEdit_Html.value;
if (TempVar.length > FormLimit)
{
while (TempVar.length > 0 && count < 30)
{
theObj = eval("document.all(\"add" + count + "\")");
theObj.innerHTML = "<Textarea rows=1 cols=1 name='Mdec_RichEdit_Html" + count + "'></Textarea>";
theObj = eval("f1.Mdec_RichEdit_Html" + count);
theObj.value = TempVar.substr(0, FormLimit);
TempVar = TempVar.substr(FormLimit);
count++;
}
}
else
{
theObj = eval("document.all(\"add20\")");
theObj.innerHTML = "<Textarea rows=1 cols=1 name='Mdec_RichEdit_Html20'></Textarea>";
theObj = eval("f1.Mdec_RichEdit_Html20");
theObj.value = TempVar;
}
}
//-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -