📄 changetime.asp
字号:
<!--#include file="passinc.asp" -->
<%
filename = trim(request("filename"))
timestr = trim(request("timestr"))
if timestr <> "" then
dim ei
set ei = server.createobject("easymail.emmail")
ei.LoadText Session("wem"), filename
dim isok
isok = ei.SetNewTimeForTimerMail(timestr)
set ei = nothing
if isok = true then
Response.Redirect "ok.asp?" & getGRSN() & "&gourl=showmail.asp?" & trim(request("backurl"))
else
Response.Redirect "err.asp?" & getGRSN() & "&gourl=showmail.asp?" & trim(request("backurl"))
end if
end if
%>
<HTML>
<HEAD>
<title>Corp.Email</title>
<LINK href="images\hwem.css" rel=stylesheet>
</HEAD>
<script LANGUAGE=javascript>
<!--
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 timerSending() {
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 ;
}
if (nmonth == "" || nmonth > 12 || nmonth < 1)
{
alert(err);
f1.t_month.focus();
return ;
}
if (nday == "" || nday > 31 || nday < 1)
{
alert(err);
f1.t_day.focus();
return ;
}
if (nhour == "" || nhour > 23 || nhour < 0)
{
alert(err);
f1.t_hour.focus();
return ;
}
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.timestr.value = f1.t_year.value + nmonth + nday + nhour;
}
else
{
alert("The scheduled time should be later than present.");
return ;
}
f1.submit();
}
//-->
</script>
<BODY>
<br><br><br>
<form name="f1" method="post" action="changetime.asp">
<input type="hidden" name="timestr">
<input type="hidden" name="filename" value="<%=filename %>">
<input type="hidden" name="backurl" value="<%=Server.URLEncode(Request.QueryString) %>">
<table width="95%" border="0" bgcolor="#93bee2" align="center" cellspacing="0" style='border-top:1px #336699 solid;'>
<tr>
<td colspan="2" height="30" valign="middle" style='border-bottom:1px #336699 solid;'>
<div align="center"><font class="s" color="#104A7B"><b>Modify Mail Scheduled Time</b></font></div>
</td>
</tr>
<tr bgcolor="#dbeaf5">
<td width="35%" height="35">
<div align="right"><font class="s" color="#104A7B"><b>Enter new dispatch time :</b></font></div>
</td>
<td width="65%"> Year:
<select name="t_year" class="drpdwn">
<%
now_temp = Year(Now())
i = now_temp
do while i < now_temp + 10
response.write "<option value='" & i & "'>" & i & "</option>"
i = i + 1
loop
%>
</select> Month:
<select name="t_month" class="drpdwn">
<%
now_temp = Month(Now())
i = 1
do while i < 13
if i <> now_temp then
response.write "<option value='" & i & "'>" & i & "</option>"
else
response.write "<option value='" & i & "' selected>" & i & "</option>"
end if
i = i + 1
loop
%>
</select> Day:
<select name="t_day" class="drpdwn">
<%
now_temp = Day(Now())
i = 1
do while i < 32
if i <> now_temp then
response.write "<option value='" & i & "'>" & i & "</option>"
else
response.write "<option value='" & i & "' selected>" & i & "</option>"
end if
i = i + 1
loop
%>
</select> Hour:
<select name="t_hour" class="drpdwn">
<%
i = 0
do while i < 24
response.write "<option value='" & i & "'>" & i & "</option>"
i = i + 1
loop
%>
</select>
</td>
</tr>
<tr><td colspan="2" bgcolor="#FFFFFF" style='border-bottom:1px #336699 solid;'> </td></tr>
<tr bgcolor="#FFFFFF">
<td colspan="2" align="right"><br>
<input type="button" value="Save" onclick="javascript:timerSending()" class="Bsbttn">
<input type="button" value="Cancel" class="Bsbttn" onclick="javascript:history.back()">
</td></tr>
</table>
</form>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -